aboutsummaryrefslogtreecommitdiff
path: root/internal/game/combat_attack.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-17 18:36:31 -0400
committerhistoria <[not public]>2026-07-17 18:36:31 -0400
commite6d0d46ac9977e77c7f19f41121ec466a3c53e56 (patch)
tree86063e0dfda2206ccdda1b8e1070dc4da7dea9d9 /internal/game/combat_attack.go
parent6e6c4a157564100249bb58f412485055bb2d10cf (diff)
downloadthehouseoficarus-e6d0d46ac9977e77c7f19f41121ec466a3c53e56.tar.gz
feat: update mob flee mechanics with new energy system
Diffstat (limited to 'internal/game/combat_attack.go')
-rw-r--r--internal/game/combat_attack.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/game/combat_attack.go b/internal/game/combat_attack.go
index 11be7f7..dd92a6d 100644
--- a/internal/game/combat_attack.go
+++ b/internal/game/combat_attack.go
@@ -19,6 +19,11 @@ import (
func (g *Game) doAttack(sess *net.Session, input string) {
p := sess.Player
+ if p.EscapeDir != "" {
+ p.ClearEscape()
+ sess.WriteLine("You decide to attack instead of fleeing!")
+ }
+
if g.Combat.Get(p.Name) != nil {
sess.WriteLine("You are already in combat!")
return