aboutsummaryrefslogtreecommitdiff
path: root/internal/game/combat_attack.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-10-05 17:05:14 -0400
committerhistoria <[not public]>2026-10-05 17:05:14 -0400
commite42952469dadfb3535633c66c881050ac128703c (patch)
treea78f7396b72cdbd6fa4f6c454c830f40cf2ad0cb /internal/game/combat_attack.go
parent90ad8c0c33b519d5830c69d4128bdc984b5e9de8 (diff)
downloadthehouseoficarus-e42952469dadfb3535633c66c881050ac128703c.tar.gz
fix: gather verbs, walk oom, admin path bypass, roulette refund
Diffstat (limited to 'internal/game/combat_attack.go')
-rw-r--r--internal/game/combat_attack.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/game/combat_attack.go b/internal/game/combat_attack.go
index 1e53510..180038b 100644
--- a/internal/game/combat_attack.go
+++ b/internal/game/combat_attack.go
@@ -135,6 +135,14 @@ func (g *Game) findMob(sess *net.Session, input string, roomID int) *world.MobIn
}
func (g *Game) startCombat(sess *net.Session, p *player.Player, mob *world.MobInstance) {
+ // One player fights one mob at a time. doAttack and the aggro path already
+ // check this, but act_steal/act_talk call startCombat directly; without the
+ // guard a second pair of combat subscribers is registered and both the
+ // player and the mob attack twice per tick.
+ if g.Combat.Get(p.Name) != nil {
+ sess.WriteLine("You are already in combat!")
+ return
+ }
if mob.OwnerOnly && mob.Owner != "" && mob.Owner != p.Name {
sess.WriteLine("They don't seem interested in you.")
return