Idiot lifts the moment its march turns impossible
The all-carried check ran only on the victim's own step, so a curse whose last floor treasure was hauled off mid-turn kept its grip until the idiot happened to move. The lift check now also runs at the pickup that empties the floor, and at attach for a victim already standing on their chest. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015RCWSTnb1KYTPyL4GmhGnF
This commit is contained in:
co-authored by
Claude Fable 5
parent
dd6ba59220
commit
7ee3c01e44
@@ -165,6 +165,34 @@ describe("expansion combat cards", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("idiot lifts the moment the victim's last floor treasure is carried off", () => {
|
||||
let { state } = createGame({ playerIds: ["alice", "bob", "carol"], seed: 42, sets: ["basic"] });
|
||||
while (state.turn.round < 2) {
|
||||
state = must(state, activePlayer(state).id, { type: "endTurn", draw: 0 });
|
||||
}
|
||||
const { attacker, defender } = faceOff(state);
|
||||
const third = state.players.find((p) => p.id !== attacker && p.id !== defender)!;
|
||||
const id = giveCard(state, attacker, "idiot");
|
||||
state = castAt(state, attacker, defender, id);
|
||||
expect(sustainedOn(state, defender, "idiot").length).toBe(1);
|
||||
|
||||
// A third wizard hauls off one of the victim's chests: one destination
|
||||
// remains, so the march goes on.
|
||||
const [first, second] = state.treasures.filter((t) => t.owner === defender);
|
||||
const hauler = state.players.find((p) => p.id === third.id)!;
|
||||
first!.carriedBy = hauler.id;
|
||||
first!.position = null;
|
||||
hauler.carriedTreasureId = first!.id;
|
||||
expect(sustainedOn(state, defender, "idiot").length).toBe(1);
|
||||
|
||||
// The caster takes the last one off the floor — nothing left to march
|
||||
// to, and the curse lifts on the spot.
|
||||
const att = state.players.find((p) => p.id === attacker)!;
|
||||
att.position = { ...second!.position! };
|
||||
state = must(state, attacker, { type: "pickUpTreasure", treasureId: second!.id });
|
||||
expect(sustainedOn(state, defender, "idiot").length).toBe(0);
|
||||
});
|
||||
|
||||
it("idiot forbids item handling and punches but allows counteractions", () => {
|
||||
let { state } = createGame({
|
||||
playerIds: ["alice", "bob"], seed: 42, sets: ["basic", "expansion1"],
|
||||
|
||||
Reference in New Issue
Block a user