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
This commit is contained in:
AI Agent
2026-03-14 16:13:10 -06:00
parent bdd1a85ea2
commit 598360ac95
33 changed files with 1082 additions and 48 deletions

View File

@@ -0,0 +1,8 @@
name = "Arcane Blast"
description = "Channel raw magical energy into an overwhelming burst of destructive force."
spell_type = "offensive"
damage = 35
damage_type = "magical"
cost_mana = 35
cooldown_ticks = 4
min_guild_level = 8

View File

@@ -0,0 +1,8 @@
name = "Backstab"
description = "Strike from the shadows with a precise, deadly attack that exploits your target's vulnerabilities."
spell_type = "offensive"
damage = 22
damage_type = "physical"
cost_endurance = 12
cooldown_ticks = 3
min_guild_level = 1

View File

@@ -0,0 +1,9 @@
name = "Battle Cry"
description = "A thunderous war shout that steels your resolve, boosting regeneration temporarily."
spell_type = "utility"
cost_endurance = 10
cooldown_ticks = 10
min_guild_level = 3
effect = "regen"
effect_duration = 5
effect_magnitude = 4

View File

@@ -0,0 +1,9 @@
name = "Divine Shield"
description = "Invoke the protection of the gods, wrapping yourself in a shimmering barrier of holy light."
spell_type = "utility"
cost_mana = 20
cooldown_ticks = 10
min_guild_level = 5
effect = "defense_up"
effect_duration = 5
effect_magnitude = 10

View File

@@ -0,0 +1,9 @@
name = "Evasion"
description = "Enter a heightened state of awareness, dodging incoming attacks with uncanny agility."
spell_type = "utility"
cost_endurance = 15
cooldown_ticks = 8
min_guild_level = 5
effect = "defense_up"
effect_duration = 3
effect_magnitude = 8

View File

@@ -0,0 +1,8 @@
name = "Fireball"
description = "Conjure a sphere of roaring flame and launch it at your foe, dealing massive fire damage."
spell_type = "offensive"
damage = 28
damage_type = "fire"
cost_mana = 25
cooldown_ticks = 3
min_guild_level = 5

View File

@@ -0,0 +1,9 @@
name = "Frost Shield"
description = "Encase yourself in a barrier of magical ice, absorbing damage and chilling attackers."
spell_type = "utility"
cost_mana = 20
cooldown_ticks = 8
min_guild_level = 3
effect = "defense_up"
effect_duration = 4
effect_magnitude = 12

7
world/spells/heal.toml Normal file
View File

@@ -0,0 +1,7 @@
name = "Heal"
description = "Channel divine energy to mend wounds and restore health."
spell_type = "heal"
heal = 25
cost_mana = 15
cooldown_ticks = 2
min_guild_level = 1

View File

@@ -0,0 +1,8 @@
name = "Magic Missile"
description = "Hurl bolts of pure arcane energy at your target. Simple but reliable."
spell_type = "offensive"
damage = 15
damage_type = "magical"
cost_mana = 10
cooldown_ticks = 1
min_guild_level = 1

View File

@@ -0,0 +1,11 @@
name = "Poison Blade"
description = "Coat your weapon with a virulent toxin, inflicting lingering poison on your target."
spell_type = "offensive"
damage = 8
damage_type = "poison"
cost_endurance = 10
cooldown_ticks = 6
min_guild_level = 3
effect = "poison"
effect_duration = 4
effect_magnitude = 3

View File

@@ -0,0 +1,8 @@
name = "Power Strike"
description = "A devastating overhead blow that channels raw strength into a single crushing attack."
spell_type = "offensive"
damage = 18
damage_type = "physical"
cost_endurance = 15
cooldown_ticks = 2
min_guild_level = 1

10
world/spells/purify.toml Normal file
View File

@@ -0,0 +1,10 @@
name = "Purify"
description = "Cleanse your body and soul of all harmful effects through divine grace."
spell_type = "heal"
heal = 10
cost_mana = 20
cooldown_ticks = 6
min_guild_level = 3
effect = "cleanse"
effect_duration = 0
effect_magnitude = 0

View File

@@ -0,0 +1,8 @@
name = "Shadow Step"
description = "Vanish into the shadows and reappear behind your foe, landing a devastating precision strike."
spell_type = "offensive"
damage = 30
damage_type = "physical"
cost_endurance = 25
cooldown_ticks = 5
min_guild_level = 8

View File

@@ -0,0 +1,9 @@
name = "Shield Wall"
description = "Brace yourself behind your weapon, drastically reducing incoming damage for a short time."
spell_type = "utility"
cost_endurance = 20
cooldown_ticks = 8
min_guild_level = 5
effect = "defense_up"
effect_duration = 4
effect_magnitude = 10

8
world/spells/smite.toml Normal file
View File

@@ -0,0 +1,8 @@
name = "Smite"
description = "Call down holy wrath upon your enemy, dealing radiant damage that burns the unholy."
spell_type = "offensive"
damage = 18
damage_type = "holy"
cost_mana = 15
cooldown_ticks = 2
min_guild_level = 1

View File

@@ -0,0 +1,8 @@
name = "Whirlwind"
description = "Spin in a deadly arc, striking all nearby foes with tremendous force."
spell_type = "offensive"
damage = 25
damage_type = "physical"
cost_endurance = 30
cooldown_ticks = 4
min_guild_level = 8