A permanent spell settles 'for good' in the chronicle and the receipt, not for a billion turns

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
Eric Wagoner
2026-09-21 11:09:01 -04:00
co-authored by Claude Fable 5.1
parent 48350a3686
commit 071e7ce988
2 changed files with 7 additions and 4 deletions
+3 -2
View File
@@ -3,7 +3,7 @@
// engine's own events, so it explains what happened rather than what the
// cards promise.
import { cardDef, type GameEvent } from "@wizwar/engine";
import { cardDef, isPermanentDuration, type GameEvent } from "@wizwar/engine";
export interface Receipt {
title: string;
@@ -75,7 +75,8 @@ export function receiptFor(batch: readonly GameEvent[], e: GameEvent): Receipt |
: e.fullyStopped ? "nothing lands"
: healed && healed.type === "lifeGained" ? `${healed.amount} heals ${e.defender} instead`
: e.damageDealt > 0 ? `${e.damageDealt} lands on ${e.defender}`
: tookHold && tookHold.type === "spellSustained" ? `${card} takes hold of ${e.defender} for ${tookHold.turns} turn${tookHold.turns === 1 ? "" : "s"}`
: tookHold && tookHold.type === "spellSustained"
? (isPermanentDuration(tookHold.turns) ? `${card} takes hold of ${e.defender} for good` : `${card} takes hold of ${e.defender} for ${tookHold.turns} turn${tookHold.turns === 1 ? "" : "s"}`)
: "nothing to land",
);
lines.push(parts.join(" → "));