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:
@@ -1,5 +1,6 @@
|
||||
name = "Cleric"
|
||||
description = "Devout healers and protectors, clerics channel divine power to mend and shield."
|
||||
guild = "guild:clerics_guild"
|
||||
|
||||
[base_stats]
|
||||
max_hp = 100
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
name = "Mage"
|
||||
description = "Wielders of arcane power, mages trade resilience for devastating force."
|
||||
guild = "guild:mages_guild"
|
||||
|
||||
[base_stats]
|
||||
max_hp = 70
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
name = "Rogue"
|
||||
description = "Quick and cunning, rogues strike from the shadows with lethal precision."
|
||||
guild = "guild:rogues_guild"
|
||||
|
||||
[base_stats]
|
||||
max_hp = 85
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
name = "Warrior"
|
||||
description = "Masters of arms and armor, warriors lead the charge and hold the line."
|
||||
guild = "guild:warriors_guild"
|
||||
|
||||
[base_stats]
|
||||
max_hp = 120
|
||||
|
||||
16
world/guilds/clerics_guild.toml
Normal file
16
world/guilds/clerics_guild.toml
Normal file
@@ -0,0 +1,16 @@
|
||||
name = "Clerics Guild"
|
||||
description = "Channels of divine power, the Clerics Guild teaches the sacred arts of healing, protection, and righteous combat. A balance of support and resilience."
|
||||
max_level = 50
|
||||
resource = "mana"
|
||||
base_mana = 40
|
||||
base_endurance = 20
|
||||
spells = ["spell:heal", "spell:smite", "spell:divine_shield", "spell:purify"]
|
||||
min_player_level = 0
|
||||
race_restricted = []
|
||||
|
||||
[growth]
|
||||
hp_per_level = 6
|
||||
mana_per_level = 5
|
||||
endurance_per_level = 2
|
||||
attack_per_level = 1
|
||||
defense_per_level = 2
|
||||
16
world/guilds/mages_guild.toml
Normal file
16
world/guilds/mages_guild.toml
Normal file
@@ -0,0 +1,16 @@
|
||||
name = "Mages Guild"
|
||||
description = "Wielders of arcane forces, the Mages Guild unlocks the mysteries of magical power. Members sacrifice physical resilience for devastating magical attacks."
|
||||
max_level = 50
|
||||
resource = "mana"
|
||||
base_mana = 60
|
||||
base_endurance = 0
|
||||
spells = ["spell:magic_missile", "spell:fireball", "spell:frost_shield", "spell:arcane_blast"]
|
||||
min_player_level = 0
|
||||
race_restricted = []
|
||||
|
||||
[growth]
|
||||
hp_per_level = 3
|
||||
mana_per_level = 8
|
||||
endurance_per_level = 0
|
||||
attack_per_level = 1
|
||||
defense_per_level = 0
|
||||
16
world/guilds/rogues_guild.toml
Normal file
16
world/guilds/rogues_guild.toml
Normal file
@@ -0,0 +1,16 @@
|
||||
name = "Rogues Guild"
|
||||
description = "Silent and deadly, the Rogues Guild teaches the arts of stealth, subterfuge, and precision strikes. Members trade raw power for cunning and speed."
|
||||
max_level = 50
|
||||
resource = "endurance"
|
||||
base_mana = 0
|
||||
base_endurance = 40
|
||||
spells = ["spell:backstab", "spell:poison_blade", "spell:evasion", "spell:shadow_step"]
|
||||
min_player_level = 0
|
||||
race_restricted = []
|
||||
|
||||
[growth]
|
||||
hp_per_level = 5
|
||||
mana_per_level = 0
|
||||
endurance_per_level = 6
|
||||
attack_per_level = 3
|
||||
defense_per_level = 0
|
||||
16
world/guilds/warriors_guild.toml
Normal file
16
world/guilds/warriors_guild.toml
Normal file
@@ -0,0 +1,16 @@
|
||||
name = "Warriors Guild"
|
||||
description = "Masters of martial combat, the Warriors Guild trains its members in the art of physical warfare. Emphasizes strength, endurance, and weapon mastery."
|
||||
max_level = 50
|
||||
resource = "endurance"
|
||||
base_mana = 0
|
||||
base_endurance = 50
|
||||
spells = ["spell:power_strike", "spell:battle_cry", "spell:shield_wall", "spell:whirlwind"]
|
||||
min_player_level = 0
|
||||
race_restricted = []
|
||||
|
||||
[growth]
|
||||
hp_per_level = 8
|
||||
mana_per_level = 0
|
||||
endurance_per_level = 5
|
||||
attack_per_level = 2
|
||||
defense_per_level = 1
|
||||
8
world/spells/arcane_blast.toml
Normal file
8
world/spells/arcane_blast.toml
Normal 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
|
||||
8
world/spells/backstab.toml
Normal file
8
world/spells/backstab.toml
Normal 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
|
||||
9
world/spells/battle_cry.toml
Normal file
9
world/spells/battle_cry.toml
Normal 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
|
||||
9
world/spells/divine_shield.toml
Normal file
9
world/spells/divine_shield.toml
Normal 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
|
||||
9
world/spells/evasion.toml
Normal file
9
world/spells/evasion.toml
Normal 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
|
||||
8
world/spells/fireball.toml
Normal file
8
world/spells/fireball.toml
Normal 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
|
||||
9
world/spells/frost_shield.toml
Normal file
9
world/spells/frost_shield.toml
Normal 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
7
world/spells/heal.toml
Normal 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
|
||||
8
world/spells/magic_missile.toml
Normal file
8
world/spells/magic_missile.toml
Normal 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
|
||||
11
world/spells/poison_blade.toml
Normal file
11
world/spells/poison_blade.toml
Normal 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
|
||||
8
world/spells/power_strike.toml
Normal file
8
world/spells/power_strike.toml
Normal 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
10
world/spells/purify.toml
Normal 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
|
||||
8
world/spells/shadow_step.toml
Normal file
8
world/spells/shadow_step.toml
Normal 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
|
||||
9
world/spells/shield_wall.toml
Normal file
9
world/spells/shield_wall.toml
Normal 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
8
world/spells/smite.toml
Normal 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
|
||||
8
world/spells/whirlwind.toml
Normal file
8
world/spells/whirlwind.toml
Normal 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
|
||||
Reference in New Issue
Block a user