From 2bbe6b8e912bbc5f4a61a33988fb27aca7bd5eb3 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 8 Jul 2026 02:23:59 -0400 Subject: feat: object and mob steal tables can include both tables and items --- internal/world/mob.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'internal/world/mob.go') 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, -- cgit v1.2.3