aboutsummaryrefslogtreecommitdiff
path: root/internal/game/act_state_test.go
blob: 0ec139fb31d67e5eca44013c07ac8df2cf2869cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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)
	}
}