Commit Graph

12 Commits

Author SHA1 Message Date
AI Agent
e5e7057650 Add TOML reference docs for all world data types
- world/MANIFEST.md: manifest.toml and directory layout
- world/races/RACES.md: race schema (stats, body, natural, resistances, etc.)
- world/classes/CLASSES.md: class schema (base_stats, growth, hidden, guild)
- world/guilds/GUILDS.md: guild schema and [growth]
- world/spells/SPELLS.md: spell schema and types
- world/town/REGION.md: region.toml
- world/town/rooms/ROOMS.md: room schema and exits
- world/town/npcs/NPCS.md: NPC schema, race/class resolution
- world/town/objects/OBJECTS.md: object schema and [stats]

Made-with: Cursor
2026-03-14 16:40:09 -06:00
AI Agent
7b6829b1e8 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
2026-03-14 16:32:27 -06:00
AI Agent
598360ac95 Implement guild system with multi-guild, spells, and combat casting
- 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
2026-03-14 16:13:10 -06:00
AI Agent
bdd1a85ea2 Add optional target argument to look command
look with no args still shows the room. With an argument, it inspects
NPCs (showing stats/attitude), objects (description), exits (destination),
players, or inventory items. Replaces the need to use examine for quick
inspection while keeping full room view as the default.

Made-with: Cursor
2026-03-14 15:42:35 -06:00
AI Agent
005c4faf08 Flexible race system with slot-based equipment and dragon race
- 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
2026-03-14 15:37:20 -06:00
AI Agent
3f164e4697 Add README and agent guidelines documentation
README covers building, running, connecting, world data format,
game mechanics, database schema, mudtool usage, and admin system.
AGENTS.md provides architecture overview, concurrency model, coding
conventions, and step-by-step guides for extending the codebase.

Made-with: Cursor
2026-03-14 15:12:49 -06:00
AI Agent
5fd2c10198 Implement tick-based game loop, combat overhaul, and attack-any-NPC
Replace immediate combat with a 3-second tick engine that resolves
actions, NPC AI, status effects, respawns, and passive regeneration.
Players queue combat actions (attack/defend/flee/use) that resolve on
the next tick. Any NPC can now be attacked — non-hostile targets incur
attitude penalties instead of being blocked. Status effects persist in
the database and continue ticking while players are offline.

Made-with: Cursor
2026-03-14 15:12:44 -06:00
AI Agent
a083c38326 Update tests: status effects persist across sessions and tick while offline
Made-with: Cursor
2026-03-14 14:36:13 -06:00
AI Agent
1d344225d3 Update test checklist for tick-based combat and status effect systems
Add test cases for: tick engine lifecycle, tick-based combat resolution,
NPC AI auto-engage, defend command, queued flee/use, status effects
(poison, regen, expiration), passive HP regen, combat RNG variance,
and movement lockout during combat. Update smoke test with tick-timing test.

Made-with: Cursor
2026-03-14 14:34:00 -06:00
AI Agent
e7aac6d1dd Add admin system, registration gate, mudtool database editor, and test checklist
- Add is_admin flag to player DB schema with migration for existing databases
- Add server_settings table for key-value config (registration_open, etc.)
- Add 10 in-game admin commands: promote, demote, kick, teleport, registration,
  announce, heal, info, setattitude, list — all gated behind admin flag
- Registration gate: new players rejected when registration_open=false,
  existing players can still reconnect
- Add mudtool binary with CLI mode (players/settings/attitudes CRUD) and
  interactive ratatui TUI with tabbed interface for database management
- Restructure to lib.rs + main.rs so mudtool shares DB code with server
- Add TESTING.md with comprehensive pre-commit checklist and smoke test script
- Stats and who commands show [ADMIN] badge; help shows admin section for admins

Made-with: Cursor
2026-03-14 14:24:03 -06:00
AI Agent
680f48477e Add SQLite persistence, per-player NPC attitude system, character creation, and combat
- 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
2026-03-14 13:58:22 -06:00
AI Agent
c82f57a720 Initial commit: SSH MUD server with data-driven world
Rust-based MUD server accepting SSH connections on port 2222.
Players connect with any SSH client, get dropped into a
data-driven world loaded from TOML files at startup.

Binary systems: SSH handling (russh), command parser, game state,
multiplayer broadcast, ANSI terminal rendering.

Data layer: world/ directory with regions, rooms, NPCs, and objects
defined as individual TOML files — no recompile needed to modify.

Commands: look, movement (n/s/e/w/u/d), say, who, help, quit.
Made-with: Cursor
2026-03-14 13:24:34 -06:00