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
This commit is contained in:
5
world/town/objects/gold_coin.toml
Normal file
5
world/town/objects/gold_coin.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
name = "Gold Coin"
|
||||
description = "A single gold coin stamped with the crest of Thornwall."
|
||||
room = "town:market"
|
||||
kind = "treasure"
|
||||
takeable = true
|
||||
@@ -2,3 +2,7 @@ name = "Healing Potion"
|
||||
description = "A small glass vial filled with a shimmering red liquid."
|
||||
room = "town:temple"
|
||||
kind = "consumable"
|
||||
takeable = true
|
||||
|
||||
[stats]
|
||||
heal_amount = 30
|
||||
|
||||
8
world/town/objects/iron_shield.toml
Normal file
8
world/town/objects/iron_shield.toml
Normal file
@@ -0,0 +1,8 @@
|
||||
name = "Iron Shield"
|
||||
description = "A dented but serviceable round shield bearing the blacksmith's mark."
|
||||
room = "town:forge"
|
||||
kind = "armor"
|
||||
takeable = true
|
||||
|
||||
[stats]
|
||||
armor = 4
|
||||
@@ -2,3 +2,7 @@ name = "Rusty Sword"
|
||||
description = "A battered iron blade with a cracked leather grip. It's seen better days."
|
||||
room = "town:cellar"
|
||||
kind = "weapon"
|
||||
takeable = true
|
||||
|
||||
[stats]
|
||||
damage = 5
|
||||
|
||||
Reference in New Issue
Block a user