aboutsummaryrefslogtreecommitdiff
path: root/internal/world/mob.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-09 22:15:54 -0400
committerhistoria <[not public]>2026-07-09 22:15:54 -0400
commitecba7f726f70b37126d852c38c7e3eec7b04d730 (patch)
tree9129215c6e5015336fde1116395336d82bb952d1 /internal/world/mob.go
parentb3d4c616f59ad2519f3a0b77e3b47d6571cd2486 (diff)
downloadthehouseoficarus-ecba7f726f70b37126d852c38c7e3eec7b04d730.tar.gz
feat: old standalone trigger systems completely unified into trigger->condition->action system
Diffstat (limited to 'internal/world/mob.go')
-rw-r--r--internal/world/mob.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/internal/world/mob.go b/internal/world/mob.go
index 45b0fb8..fa0cdbf 100644
--- a/internal/world/mob.go
+++ b/internal/world/mob.go
@@ -78,13 +78,13 @@ type MobCombat struct {
}
type MobDef struct {
- ID string `yaml:"id"`
- Name string `yaml:"name"`
- Description string `yaml:"description"`
- IdleDescriptions []string `yaml:"idle_descriptions"`
- Protected bool `yaml:"protected"`
- Unique bool `yaml:"unique"`
- Drops MobDropTable `yaml:"drops"`
+ ID string `yaml:"id"`
+ Name string `yaml:"name"`
+ Description string `yaml:"description"`
+ IdleDescriptions []string `yaml:"idle_descriptions"`
+ Protected bool `yaml:"protected"`
+ Unique bool `yaml:"unique"`
+ Drops MobDropTable `yaml:"drops"`
Steal *MobSteal `yaml:"steal,omitempty"`
Task *MobTask `yaml:"task,omitempty"`
@@ -94,7 +94,7 @@ type MobDef struct {
Talk *behavior.TalkConfig `yaml:"talk,omitempty"`
Shop *behavior.ShopConfig `yaml:"shop,omitempty"`
- OnKill []behavior.Interaction `yaml:"on_kill,omitempty"`
+ OnKill []behavior.Trigger `yaml:"on_kill,omitempty"`
}
func (d *MobDef) IsTalkable() bool { return d.Talk != nil }
@@ -132,7 +132,7 @@ type MobInstance struct {
AttackBonus int
StrengthBonus int
- AttackTypes []string
+ AttackTypes []string
RangedBonus int
ScienceBonus int
@@ -172,7 +172,7 @@ type MobInstance struct {
// HP draining to zero (the "completion" of the work). The first entry
// whose item filter, Condition, and the first-match-wins rule all pass
// fires.
- OnKill []behavior.Interaction
+ OnKill []behavior.Trigger
// Shop is the (shared, read-only) shop config from the def. Per-instance
// live stock is tracked in ShopStock; ShopRestock holds per-item countdown
@@ -313,7 +313,7 @@ func NewMobInstance(def *MobDef, instanceID string, roomID int, wanderRooms []in
Drops: def.Drops,
AttackBonus: attackBonus,
StrengthBonus: strengthBonus,
- AttackTypes: attackType,
+ AttackTypes: attackType,
RangedBonus: rangedBonus,
ScienceBonus: scienceBonus,
SciencePercentBonus: sciencePercentBonus,