Give every NPC a race and class, resolved at spawn time
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
This commit is contained in:
14
TESTING.md
14
TESTING.md
@@ -151,6 +151,20 @@ Run through these checks before every commit to ensure consistent feature covera
|
||||
- [ ] Server remains responsive to immediate commands between ticks
|
||||
- [ ] Multiple players in separate combats are processed independently per tick
|
||||
|
||||
## NPC Race & Class
|
||||
- [ ] NPCs with fixed race/class in TOML show that race/class
|
||||
- [ ] NPCs without race get a random non-hidden race at spawn
|
||||
- [ ] NPCs without class: race default_class used, or random non-hidden if no default
|
||||
- [ ] `look <npc>` shows NPC race and class
|
||||
- [ ] `examine <npc>` shows NPC race and class
|
||||
- [ ] Rat shows "Beast Creature" (fixed race/class)
|
||||
- [ ] Barkeep shows a random race + Peasant (no fixed race, human default class)
|
||||
- [ ] Thief shows random race + Rogue (no fixed race, fixed class)
|
||||
- [ ] Guard shows random race + Warrior (no fixed race, fixed class)
|
||||
- [ ] On NPC respawn, race/class re-rolled if not fixed in TOML
|
||||
- [ ] Hidden races (Beast) do not appear in character creation
|
||||
- [ ] Hidden classes (Peasant, Creature) do not appear in character creation
|
||||
|
||||
## Race System
|
||||
- [ ] Existing races (Human, Elf, Dwarf, Orc, Halfling) load with expanded fields
|
||||
- [ ] Dragon race loads with custom body, natural attacks, resistances, traits
|
||||
|
||||
Reference in New Issue
Block a user