Commit Graph

4 Commits

Author SHA1 Message Date
Shni
852b1d02a2 feat: Add scripts for mob dependency management and server setup
- Implemented `findMobDependencies.ts` to identify foreign key constraints referencing the Mob table and log dependent rows.
- Created `fullServerSetup.ts` for idempotent server setup, including economy items, item recipes, game areas, mobs, and optional demo mob attacks.
- Developed `removeInvalidMobsWithDeps.ts` to delete invalid mobs and their dependencies, backing up affected scheduled mob attacks.
- Added unit tests in `testMobUnit.ts` and `mob.test.ts` for mob functionality, including stats computation and instance retrieval.
- Introduced reward modification tests in `testRewardMods.ts` and `rewardMods.unit.ts` to validate drop selection and coin multiplier behavior.
- Enhanced command handling for mob deletion in `mobDelete.ts` and setup examples in `setup.ts`, ensuring proper permissions and feedback.
- Created utility functions in `testHelpers.ts` for deterministic drop selection from mob definitions.
2025-10-14 14:58:38 -05:00
Shni
f36fa24e46 Refactor item property parsing and centralize utility functions
- Moved `parseItemProps` function to `core/utils.ts` for reuse across modules.
- Updated various services to import and utilize the centralized `parseItemProps`.
- Introduced new utility functions for handling consumable cooldowns and healing calculations.
- Enhanced mob management with a new repository system, allowing for dynamic loading and validation of mob definitions from the database.
- Added admin functions for creating, updating, listing, and deleting mobs, with validation using Zod.
- Implemented tests for mob management functionalities.
- Improved error handling and logging throughout the mob and consumable services.
2025-10-14 12:57:53 -05:00
79ece13420 fix: resolve durability and combat issues with stackable items
- Updated database schema to set stackable items as non-stackable.
- Implemented migration script to convert existing stackable items to instances with durability.
- Fixed combat logic to ensure players lose if no weapon is equipped.
- Added admin commands for inventory debugging and resetting.
- Enhanced item display to show durability instead of quantity.
- Conducted thorough testing and validation of changes.
2025-10-09 02:47:29 -05:00
b4737a536f feat(cache): migrar caché de guilds de Redis a Appwrite para mejorar rendimiento y persistencia 2025-10-07 10:55:45 -05:00