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 -1
View File
@@ -35,6 +35,7 @@ type ItemRequirements struct {
Titles []string `json:"titles" yaml:"titles"`
}
type ItemDefinition struct {
WeaponType string `json:"weaponType,omitempty" yaml:"weaponType"`
CraftPool []CraftStat `json:"craftPool,omitempty" yaml:"craftPool"`
CraftRolls int64 `json:"craftRolls,omitempty" yaml:"craftRolls"`
AttackID string `json:"attackId,omitempty" yaml:"attackId"`
@@ -48,6 +49,7 @@ type ItemDefinition struct {
Modifiers []StatModifier `json:"modifiers" yaml:"modifiers"`
}
type Catalog struct {
Powers *PowerContent `json:"powers,omitempty"`
Crafting *CraftingContent `json:"crafting,omitempty"`
Combat *CombatContent `json:"combat,omitempty"`
Gathering *GatheringContent `json:"gathering,omitempty"`
@@ -132,6 +134,9 @@ func (item ItemDefinition) Validate() error {
return ValidateModifiers(item.Modifiers)
}
func (c Catalog) Validate() error {
if err := c.validatePowers(); err != nil {
return err
}
if err := c.validateCrafting(); err != nil {
return err
}
@@ -210,5 +215,5 @@ func DefaultCatalog() (Catalog, error) {
if err != nil {
return Catalog{}, err
}
return Catalog{Crafting: b.Crafting, Combat: b.Combat, Gathering: b.Gathering, Version: 1, Titles: b.Titles, Items: b.Items, Stats: *b.Stats}, nil
return Catalog{Powers: b.Powers, Crafting: b.Crafting, Combat: b.Combat, Gathering: b.Gathering, Version: 1, Titles: b.Titles, Items: b.Items, Stats: *b.Stats}, nil
}