---
name: Quest and unified gear systems
description: Quest system backend (towns/NPCs/quests/hero_quests) and unified gear system replacing weapons/armor/equipment_items
type: project
---

Quest system uses migration 000006 schema (towns, npcs, quests, hero_quests tables). Go layer: model/quest.go, storage/quest_store.go, handler/quest.go. Quest progress hooks in processVictoryRewards call IncrementQuestProgress for kill_count and IncrementCollectItemProgress for collect_item quests.

Unified gear system (migration 000014): single `gear` + `hero_gear` tables replace weapons, armor, equipment_items, and hero_equipment. model/gear.go has GearItem, GearFamily, GearCatalog. storage/gear_store.go replaces equipment_store.go. weapon.go, armor.go deleted; equipment.go keeps only slot constants. Hero.Gear map[EquipmentSlot]*GearItem replaces Weapon/Armor fields. All loot drops use EquipmentSlot names (main_hand, chest, etc.).

**Why:** ONE table, ONE model, ONE store for all equippable items -- simpler code, easier to add new slots.

**How to apply:** NewGameHandler takes gearStore (not equipmentStore). NewNPCHandler takes gearStore. processVictoryRewards handles all slots uniformly. AutoEquipGear replaces AutoEquipWeapon/AutoEquipArmor.
