diff options
| author | historia <[not public]> | 2026-07-08 02:23:59 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-08 02:23:59 -0400 |
| commit | 2bbe6b8e912bbc5f4a61a33988fb27aca7bd5eb3 (patch) | |
| tree | ef4aef5a7393de51d765b24d565b414ddac4b9fe /internal/world | |
| parent | 71f0f381de64e045f91da19450adacf10fbc7902 (diff) | |
| download | thehouseoficarus-2bbe6b8e912bbc5f4a61a33988fb27aca7bd5eb3.tar.gz | |
feat: object and mob steal tables can include both tables and items
Diffstat (limited to 'internal/world')
| -rw-r--r-- | internal/world/mob.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/internal/world/mob.go b/internal/world/mob.go index 05650c0..6780c45 100644 --- a/internal/world/mob.go +++ b/internal/world/mob.go @@ -18,10 +18,10 @@ type MobDropTable struct { } type MobSteal struct { - Table string `yaml:"table"` - Level int `yaml:"level"` - XP int `yaml:"xp"` - Speed float64 `yaml:"speed"` + Drops []behavior.DropEntry `yaml:"drops"` + Level int `yaml:"level"` + XP int `yaml:"xp"` + Speed float64 `yaml:"speed"` } type MobTask struct { @@ -148,7 +148,7 @@ type MobInstance struct { MaxMeleeHit int MaxRangedHit int MaxScienceHit int - StealTable string + StealDrops []behavior.DropEntry StealLevel int StealXP int StealSpeed float64 @@ -222,7 +222,7 @@ func NewMobInstance(def *MobDef, instanceID string, roomID int, wanderRooms []in progressNoun := "" completeMessage := "" var combatDescriptions []string - stealTable := "" + var stealDrops []behavior.DropEntry stealLevel := 0 stealXP := 0 stealSpeed := 0.0 @@ -265,7 +265,7 @@ func NewMobInstance(def *MobDef, instanceID string, roomID int, wanderRooms []in } if def.Steal != nil { - stealTable = def.Steal.Table + stealDrops = def.Steal.Drops stealLevel = def.Steal.Level stealXP = def.Steal.XP stealSpeed = def.Steal.Speed @@ -318,7 +318,7 @@ func NewMobInstance(def *MobDef, instanceID string, roomID int, wanderRooms []in MaxMeleeHit: maxMeleeHit, MaxRangedHit: maxRangedHit, MaxScienceHit: maxScienceHit, - StealTable: stealTable, + StealDrops: stealDrops, StealLevel: stealLevel, StealXP: stealXP, StealSpeed: stealSpeed, |
