diff options
Diffstat (limited to 'internal/game/combat_mob.go')
| -rw-r--r-- | internal/game/combat_mob.go | 7 |
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 { |
