Add spells, weapon abilities, and durable corpse resurrection
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user