proc-gen equipment drops from monsters can be picked up
This is a large update that deals with procedurally generated equipment
that monsters can drop when they're killed.
1. Procedurally Generated Equipment
All equipment is added with a "base" type. An "Old Shirt" for example.
This has some rarity-based weights to decide the probability of dropping
a Common/Uncommon/Rare version of this item. It also defines a set of
stats that can be manipulated by this equipment as well as a list of
stats that this equipment MUST modify.
The stats that can be modified are done so via min/max values to allow
for some randomness in drops.
There is also the base durability of an item.
Everything is modified by the rarity at set rates.
All euipment is tagged with the type of equipment and the place that
equipment can be equipped (Left Arm, Torso, Head, etc.).
2. Monsters are assigned a base-item that can be generated. When they
die, we generated a rough item that is placed in the "World Drops" that
references the base item. A player can choose to pick or leave the item.
Once picked up the item is then generated based on the proc-gen rules
and placed in their inventory.
- [DH] prisma/migrations/20220317054135_create_item_config/migration.sql
- [DH] prisma/migrations/20220317054315_add_more_types/migration.sql
- [DH] prisma/migrations/20220317054755_add_dual_wield_type/migration.sql
- [DH] prisma/migrations/20220317154129_rework_items/migration.sql
- [DH] prisma/migrations/20220317154640_default_item_droprate_10/migration.sql
- [DH] prisma/migrations/20220318060910_id_on_monster_biome/migration.sql
- [DH] prisma/migrations/20220325174002_add_worldrops/migration.sql
- [DH] prisma/schema.prisma
- [DH] prisma/seed.ts
- [DH] prisma/seed/equipment.ts
- [DH] prisma/seed/monsters.ts
- [DH] src/lib/weighted.ts
- [DH] src/public/app/api.ts
- [DH] src/public/app/dom.ts
- [DH] src/public/app/game.ts
- [DH] src/public/app/sections/overview.ts
- [DH] src/public/bundle.js
- [DH] src/public/index.html
- [DH] src/routes/fight/fight.ts
- [DH] src/routes/index.ts
- [DH] src/routes/inventory/index.ts
- [DH] src/routes/inventory/pick.ts