NPCs can now optionally specify race and class in their TOML. When
omitted, race is randomly selected from non-hidden races and class is
determined by the race's default_class or picked randomly from
compatible non-hidden classes. Race/class are re-rolled on each
respawn for NPCs without fixed values, so killing the barkeep may
bring back a different race next time.
New hidden content (excluded from character creation):
- Beast race: for animals (rats, etc.) with feral stats and no
equipment slots
- Peasant class: weak default for humanoid NPCs
- Creature class: default for beasts/animals
Existing races gain default_class fields (humanoids → peasant,
beast → creature, dragon → random compatible). Look and examine
commands now display NPC race and class.
Made-with: Cursor
- Guild data model: world/guilds/*.toml defines guilds with stat growth,
resource type (mana/endurance), spell lists, level caps, and race
restrictions. Spells are separate files in world/spells/*.toml.
- Player resources: mana and endurance pools added to PlayerStats with
DB migration. Passive regen for mana/endurance when out of combat.
- Guild commands: guild list/info/join/leave with multi-guild support.
spells/skills command shows available spells per guild level.
- Spell casting: cast command works in and out of combat. Offensive
spells queue as CombatAction::Cast and resolve on tick. Heal/utility
spells resolve immediately out of combat. Mana/endurance costs,
cooldowns, and damage types all enforced.
- Chargen integration: classes reference a guild via TOML field. On
character creation, player auto-joins the seeded guild at level 1.
Class selection shows "→ joins <Guild>" hint.
- Look command: now accepts optional target argument to inspect NPCs
(stats/attitude), objects, exits, players, or inventory items.
- 4 guilds (warriors/rogues/mages/clerics) and 16 spells created for
the existing class archetypes.
Made-with: Cursor
- Expand race TOML schema: 7 stats, body shape (size/weight/custom slots),
natural armor and attacks with damage types, resistances, traits/disadvantages,
regen multipliers, vision types, XP rate, guild compatibility
- Replace equipped_weapon/equipped_armor with slot-based HashMap<String, Object>
- Each race defines available equipment slots; default humanoid slots as fallback
- Combat uses natural weapons/armor from race when no gear equipped
- DB migration from old weapon/armor columns to equipped_json
- Add Dragon race: huge body, custom slots (forelegs/wings/tail), fire breath,
natural armor 8, fire immune, slow XP rate for balance
- Update all existing races with expanded fields (traits, resistances, vision, regen)
- Objects gain optional slot field; kind=weapon/armor still works as fallback
- Update chargen to display race traits, size, natural attacks, vision
- Update stats display to show equipment and natural bonuses separately
- Update TESTING.md and AGENTS.md with race/slot system documentation
Made-with: Cursor
- Add trait-based DB layer (db.rs) with SQLite backend for easy future swapping
- Player state persisted to SQLite: stats, inventory, equipment, room position
- Returning players skip chargen and resume where they left off
- Replace boolean hostile flag with 5-tier attitude system (friendly/neutral/wary/aggressive/hostile)
- Per-player NPC attitudes stored in DB, shift on kills with faction propagation
- Add character creation flow (chargen.rs) with data-driven races and classes from TOML
- Add turn-based combat system (combat.rs) with XP, leveling, and NPC respawn
- Add commands: take, drop, inventory, equip, use, examine, talk, attack, flee, stats
- Add world data: 5 races, 4 classes, hostile NPCs (rat, thief), new items
Made-with: Cursor