aboutsummaryrefslogtreecommitdiff
path: root/internal/game/act_state_test.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-17 19:54:21 -0400
committerhistoria <[not public]>2026-07-17 19:54:21 -0400
commitc23c87b56fd568956d263bb8b8c5d26fbd8d01ee (patch)
tree58737f94d5417e11a7d94b2a250d28ae05a25c58 /internal/game/act_state_test.go
parentd553a976dd2f899e28dc8e023ee4ca2eb8951c38 (diff)
downloadthehouseoficarus-c23c87b56fd568956d263bb8b8c5d26fbd8d01ee.tar.gz
feat: add test for mob aggro
Diffstat (limited to 'internal/game/act_state_test.go')
-rw-r--r--internal/game/act_state_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/game/act_state_test.go b/internal/game/act_state_test.go
new file mode 100644
index 0000000..0ec139f
--- /dev/null
+++ b/internal/game/act_state_test.go
@@ -0,0 +1,22 @@
+package game
+
+import (
+ "testing"
+
+ "thehouseoficarus/internal/player"
+)
+
+func TestPlayerActionDisplayFightingInCombat(t *testing.T) {
+ g := escapeTestGame()
+ inst := spawnTestMob(g, "skeleton", 100)
+ p := player.New("combatant")
+ p.EscapeDir = "north"
+
+ g.Combat.Enter(p.Name, inst.InstanceID)
+
+ display := g.playerActionDisplay(p)
+ want := "fighting a " + inst.Name
+ if display != want {
+ t.Errorf("playerActionDisplay = %q, want %q", display, want)
+ }
+}