diff options
| author | historia <[not public]> | 2026-07-17 19:54:21 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-17 19:54:21 -0400 |
| commit | c23c87b56fd568956d263bb8b8c5d26fbd8d01ee (patch) | |
| tree | 58737f94d5417e11a7d94b2a250d28ae05a25c58 /internal/game/act_state_test.go | |
| parent | d553a976dd2f899e28dc8e023ee4ca2eb8951c38 (diff) | |
| download | thehouseoficarus-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.go | 22 |
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) + } +} |
