Add spells, weapon abilities, and durable corpse resurrection

This commit is contained in:
dingo
2026-09-09 18:15:23 -04:00
parent b3c5482558
commit 897c5745bc
49 changed files with 2277 additions and 137 deletions
+6 -2
View File
@@ -19,6 +19,7 @@ type Recipe struct {
}
type Balance struct {
Powers *PowerContent `yaml:"powers"`
Crafting *CraftingContent `yaml:"crafting"`
Combat *CombatContent `yaml:"combat"`
CombatRules *CombatRules `yaml:"combatRules"`
@@ -81,7 +82,10 @@ func Parse(data []byte) (Balance, error) {
return b, b.Validate()
}
func (b Balance) Validate() error {
if err := (Catalog{Crafting: b.Crafting, Items: b.Items, Titles: b.Titles, Gathering: b.Gathering}).validateCrafting(); err != nil {
if err := (Catalog{Powers: b.Powers, Combat: b.Combat, Items: b.Items, Titles: b.Titles}).validatePowers(); err != nil {
return err
}
if err := (Catalog{Powers: b.Powers, Crafting: b.Crafting, Items: b.Items, Titles: b.Titles, Gathering: b.Gathering}).validateCrafting(); err != nil {
return err
}
if b.CombatRules != nil {
@@ -89,7 +93,7 @@ func (b Balance) Validate() error {
return err
}
}
if err := (Catalog{Crafting: b.Crafting, Combat: b.Combat, Items: b.Items, Gathering: b.Gathering}).validateCombat(); err != nil {
if err := (Catalog{Powers: b.Powers, Crafting: b.Crafting, Combat: b.Combat, Items: b.Items, Gathering: b.Gathering}).validateCombat(); err != nil {
return err
}
if b.Gathering != nil {