The fallen drop what they carry, however they fall (rev 30)

A wizard eliminated by treasuresLost took any carried treasure into the
void with them — the killed path drops it, but checkVictory's branch
never did. At rev 30 the treasure lands where they stood, with the
usual treasureDropped event (onHomeOf included, so a capture completed
by the falling is honored in the same breath). Stored games replay the
vanishing unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0138A8CjeQRpvzKxuMfz1Bqc
This commit is contained in:
Eric Wagoner
2026-08-19 12:25:41 -04:00
co-authored by Claude Fable 5
parent f1743e6fe5
commit 62c4680d1f
4 changed files with 56 additions and 2 deletions
+16
View File
@@ -5821,6 +5821,22 @@ function checkVictory(state: GameState, events: GameEvent[]): void {
state.discard.push(...p.hand.splice(0));
p.displayed = [];
events.push({ type: "playerEliminated", player: p.id, reason: "treasuresLost" });
// A treasure in the fallen wizard's arms lands where they stood, as
// it does when a wizard is killed (rules rev 30; earlier games let
// it vanish with them and replay so).
if ((state.config.deckRev ?? 1) >= 30 && p.carriedTreasureId) {
const t = state.treasures.find((t) => t.id === p.carriedTreasureId)!;
t.carriedBy = null;
t.position = p.position;
p.carriedTreasureId = null;
events.push({
type: "treasureDropped",
player: p.id,
treasureId: t.id,
at: p.position,
onHomeOf: homeOwnerAt(state, p.position),
});
}
if ((state.config.deckRev ?? 1) >= 14) sweepEliminated(state, p.id);
}
}