aboutsummaryrefslogtreecommitdiff
path: root/internal/game/combat_mob.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-27 02:29:55 -0400
committerhistoria <[not public]>2026-06-27 02:29:55 -0400
commit6f3d21d6e7f01155ce0c461857a053b43d329392 (patch)
tree51e96b62deb5f99a3d70c3a15ab94c520a1ee8e8 /internal/game/combat_mob.go
parent3102525d97aa6f1ad152c74b2ccfbd4b3a9b83f5 (diff)
downloadthehouseoficarus-6f3d21d6e7f01155ce0c461857a053b43d329392.tar.gz
feat: recall/home cmd, line break option
Diffstat (limited to 'internal/game/combat_mob.go')
-rw-r--r--internal/game/combat_mob.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/game/combat_mob.go b/internal/game/combat_mob.go
index 2abaf81..7096b66 100644
--- a/internal/game/combat_mob.go
+++ b/internal/game/combat_mob.go
@@ -115,6 +115,12 @@ func (g *Game) applyMobHit(sess *net.Session, p *player.Player, mob *world.MobIn
p.ClearMoveState()
sess.WriteLine("Can't escape!")
}
+
+ if p.Action != nil && p.Action.Type == behavior.TypeTriggerModule {
+ g.cancelAction(p)
+ p.AttackTimer = 0
+ sess.WriteLine("Your concentration is broken!")
+ }
}
func (g *Game) applyMobMiss(sess *net.Session, mob *world.MobInstance) {
@@ -250,6 +256,7 @@ func (g *Game) killPlayer(sess *net.Session, p *player.Player, mob *world.MobIns
p.DeactivateAllTechs()
p.Stats.RecordDeath()
sess.WriteLine(g.colorize(sess, "death", "Oh dear, you are dead!"))
+ p.Action = nil
p.ClearMoveState()
p.HazardTimer = 0
if ss, ok := g.safespot.Get(p.Name); ok {