feat(crafting): add monster drops
authorxangelo <me@xangelo.ca>
Tue, 3 Dec 2024 05:53:33 +0000 (00:53 -0500)
committerxangelo <me@xangelo.ca>
Tue, 3 Dec 2024 05:53:33 +0000 (00:53 -0500)
commit078ab3f34462a1ece53417bff54f10932bc2b60f
tree7d910dfc4edc7905b8dab7ad13853da243d097d6
parenta19f3703f340bdd2457f7ed0c6be2498a08caec7
feat(crafting): add monster drops

We now have per-monster drop tables that link back to items (Airtable).

It allows us to select an item + monster, and set a drop rate for that item,
as well as a min/max quantity. When the monster is killed, we use the drop table
to determine how many of that item to drop.

That item gets added to the players Items inventory.

In order to support the fact that crafting isn't in play yet, if an item
doesn't have an effect_name, we disable the "use" button.

Eventually these crafting items will be only usable through the crafting
system to improve your existing weapons/armour
17 files changed:
migrations/20241202190606_drop_tables.ts [new file with mode: 0644]
public/assets/css/inventory.css
public/assets/css/tabs.css
public/assets/img/icons/items/Light_Hide.png [new file with mode: 0644]
seeds/drop-tables.ts [new file with mode: 0644]
src/server/chat-commands.ts
src/server/chat-commands/index.ts
src/server/chat-commands/refresh-droptables.ts [new file with mode: 0644]
src/server/fight.ts
src/server/items.ts
src/server/monster.ts
src/server/routes/chat.ts
src/server/routes/inventory.ts
src/server/views/fight.ts
src/shared/fight.ts
src/shared/items/index.ts
src/shared/monsters.ts