aboutsummaryrefslogtreecommitdiff
path: root/internal/game/sys_escape_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/sys_escape_test.go')
-rw-r--r--internal/game/sys_escape_test.go24
1 files changed, 3 insertions, 21 deletions
diff --git a/internal/game/sys_escape_test.go b/internal/game/sys_escape_test.go
index f8cd2e1..a9842ba 100644
--- a/internal/game/sys_escape_test.go
+++ b/internal/game/sys_escape_test.go
@@ -128,11 +128,6 @@ func TestBeginEscapeMoveWithCapeOfAgility(t *testing.T) {
p := player.New("cape")
p.Equipment[item.SlotBack] = capeOfAgilityID
- // moveTicks returns 0 for Cape of Agility. beginEscapeMove is only ever
- // called when an escape has been stashed, and Cape-of-Agility / GodMode
- // never enter the stash path (doMove's ticks<=0 short-circuit fires
- // first), so this test just verifies the moveTicks call site compiles
- // against the two-value signature.
ticks, usesEnergy := g.moveTicks(p, false)
if ticks != 0 {
t.Errorf("Cape of Agility should give 0 ticks, got %d", ticks)
@@ -247,11 +242,8 @@ func TestEscapeClearedOnStop(t *testing.T) {
}
}
-// TestPlayerActionDisplayNoPreparingToFlee verifies the (previously-unreachable)
-// "preparing to flee" display branch has been removed. While waiting to flee
-// the player is still in combat, so playerActionDisplay's in-combat branch
-// governs (returning "fighting a X" — exercised indirectly through combat
-// tests). A pure EscapeDir set with no combat engagement now yields "".
+// TestPlayerActionDisplayNoPreparingToFlee verifies the
+// "preparing to flee" display branch has been removed.
func TestPlayerActionDisplayNoPreparingToFlee(t *testing.T) {
g := escapeTestGame()
p := player.New("fleer")
@@ -281,9 +273,6 @@ func TestEscapeReliefFiresOnThirdHit(t *testing.T) {
g.Combat.Enter(p.Name, "relief_mob")
sess := escapeTestSession(p)
- // Three escape-canceling hits. Between hits the test re-arms the escape
- // (in the real flow the player re-issues a direction). maxHit=1 makes
- // RollDamage deterministic (always 1) so HP=100 survives cleanly.
for i := 0; i < 3; i++ {
p.EscapeDir = "north"
p.EscapeTarget = 11
@@ -411,14 +400,7 @@ func TestEscapeFailCountResetsOnCombatEntry(t *testing.T) {
}
// TestEscapeReliefSuppressedOnKillingBlow verifies that when the 3rd hit
-// would simultaneously kill the player (HP drops to 0), the relief is
-// suppressed — the player dies cleanly (the live mob-attack tick subscriber
-// notices HP<=0 and calls endCombat → killPlayer) rather than seeing a
-// misleading "power through" message.
-//
-// We exercise applyMobHit directly (no subscriber), so killPlayer is not
-// invoked here; we instead verify that the relief branch did NOT fire
-// (MoveTicks stays 0).
+// would kill the player, the relief is suppressed.
func TestEscapeReliefSuppressedOnKillingBlow(t *testing.T) {
g := escapeTestGame()
p := player.New("doomed")