Add ranged combat area effects and admin-authored mobs

This commit is contained in:
dingo
2026-09-09 05:26:31 -04:00
parent 7a4c6c9e9b
commit 0b4eaa153c
29 changed files with 2220 additions and 181 deletions
+10
View File
@@ -19,6 +19,8 @@ type Recipe struct {
}
type Balance struct {
Combat *CombatContent `yaml:"combat"`
CombatRules *CombatRules `yaml:"combatRules"`
Gathering *GatheringContent `yaml:"gathering"`
GatheringRules *GatheringRules `yaml:"gatheringRules"`
Version int `yaml:"version"`
@@ -78,6 +80,14 @@ func Parse(data []byte) (Balance, error) {
return b, b.Validate()
}
func (b Balance) Validate() error {
if b.CombatRules != nil {
if err := b.CombatRules.Validate(); err != nil {
return err
}
}
if err := (Catalog{Combat: b.Combat, Items: b.Items, Gathering: b.Gathering}).validateCombat(); err != nil {
return err
}
if b.Gathering != nil {
if err := b.Gathering.Validate(); err != nil {
return err