Add Swap Home Bases — the audit's one escapee
Neutral, LOS to the other player, legal only when both home bases hold an equal number of treasures. With this, every card in the 6th edition game is implemented except Thumb Of God, which awaits its digital redesign. 118 tests passing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
06eea72ded
commit
21dcd532a3
@@ -209,3 +209,20 @@ describe("expansion combat cards", () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe("swap home bases", () => {
|
||||
it("trades homes when both bases hold equal treasures", () => {
|
||||
let { state } = newGame();
|
||||
const me = activePlayer(state);
|
||||
const other = state.players.find((p) => p.id !== me.id)!;
|
||||
other.position = { ...me.position }; // LOS guaranteed
|
||||
const myHome = { ...me.home };
|
||||
const theirHome = { ...other.home };
|
||||
const shb = giveCard(state, me.id, "swap-home-bases");
|
||||
state = must(state, me.id, {
|
||||
type: "cast", instanceId: shb.instanceId, target: { kind: "player", playerId: other.id },
|
||||
});
|
||||
expect(cellKey(state.players.find((p) => p.id === me.id)!.home)).toBe(cellKey(theirHome));
|
||||
expect(cellKey(state.players.find((p) => p.id === other.id)!.home)).toBe(cellKey(myHome));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user