Allow recovered Recruits replay and more bribe windows
Verify and publish checkpoint container / container (push) Successful in 10m51s

This commit is contained in:
Quintine committed 2026-11-16 22:00:35 +11:00
1 parent bd8377d87b
commit de7fe7d64a
13 files changed
+394 -22

No files matched your search

+23 -6
View File
@@ -2959,6 +2959,8 @@ export type Game = {
turn: number;
player: string;
card: typeof RECRUITS_CARD_ID;
/** Omitted by original receipts, which represent one play. */
uses?: number;
} | null;
emperorExtra: Record<string, number>;
aid: Record<string, { recipient: string; amount: number }>;
@@ -18273,6 +18275,18 @@ function basicBribeInterrupt(g: Game, p: Player): boolean {
if (nativeRoster && !g.phaseOpening && !g.choamMarket && !g.ixAuction &&
!Object.entries(g).some(([key, value]) => key.startsWith('pending') &&
(Array.isArray(value) ? value.length > 0 : value !== null && value !== undefined && value !== false))) {
if (g.decision?.kind === 'wormRide' && !g.response && g.phase === 1) {
const rider = g.players.find(seat => seat.id === g.decision?.player);
const territory = g.decision.territory;
return rider?.faction === 'fremen' && Object.entries(rider.forces).some(([key, count]) =>
count > 0 && splitLocation(key).territory === territory && splitLocation(key).sector !== g.storm);
}
if (g.decision?.kind === 'battleCards' && !g.response && g.phase === 6) {
const decision = g.decision, winner = g.players.find(seat => seat.id === decision.player);
return !!winner && g.lastBattleContext?.winner === winner.id &&
g.lastBattleContext.territory === decision.territory && decision.cards.length > 0 &&
decision.cards.every(card => winner.hand.some(held => held.id === card));
}
if (g.decision?.kind === 'auctionPayment' && !g.response)
return g.phase === 3 && !!g.auction && !g.richeseAuction && !g.currentAuctionSale &&
g.auction.bidder === g.decision.player && !!g.auction.cards[g.auction.index];
@@ -20749,9 +20763,10 @@ function ecazTreacheryIntegrity(g: Game) {
}
if (g.recruits) {
requireRule(
Object.keys(g.recruits).sort().join(',') === 'card,player,turn' &&
['card,player,turn', 'card,player,turn,uses'].includes(Object.keys(g.recruits).sort().join(',')) &&
g.recruits.card === RECRUITS_CARD_ID &&
g.recruits.turn === g.turn &&
(g.recruits.uses === undefined || Number.isSafeInteger(g.recruits.uses) && g.recruits.uses >= 1) &&
g.players.some((player) => player.id === g.recruits!.player),
'The Recruits effect has a malformed or expired receipt.',
);
@@ -20888,8 +20903,8 @@ function recruitsPlayBlock(g: Game, owner: Player, card: Card): string | null {
return 'Recruits requires a supported independent-card profile: faction-only, all14 Skills with original World/phase modules, or existing native Homeworld compositions.';
if (g.status !== 'playing' || g.phase !== 4)
return 'Play Recruits during Revival.';
if (g.recruits?.turn === g.turn)
return 'Recruits is already active this turn; a recovered copy cannot be played again.';
if (g.recruits?.turn === g.turn && (g.recruits.uses ?? 1) >= Number.MAX_SAFE_INTEGER)
return 'The Recruits play count cannot be increased further.';
const reserved = transferCardBlock(g, owner, card);
if (reserved) return reserved;
if (recruitsInteractionPending(g))
@@ -20917,7 +20932,7 @@ function recruitsPreview(g: Game, viewer: Player): RecruitsPreview | null {
const active = g.recruits?.turn === g.turn;
return {
active,
...(active ? { playedTurn: g.recruits!.turn, playedBy: g.recruits!.player } : {}),
...(active ? { playedTurn: g.recruits!.turn, playedBy: g.recruits!.player, plays: g.recruits!.uses ?? 1 } : {}),
play,
rates: g.order.map((player) => {
const target = getPlayer(g, player);
@@ -46454,10 +46469,12 @@ function applyActionInner(
requireRule(!blocked, blocked ?? 'Recruits is unavailable.');
discard(g, p, card.id);
for (const player of g.players) player.freeForcesRevived ??= 0;
g.recruits = { turn: g.turn, player: p.id, card: RECRUITS_CARD_ID };
const earlierUses = g.recruits?.turn === g.turn ? g.recruits.uses ?? 1 : 0;
g.recruits = { turn: g.turn, player: p.id, card: RECRUITS_CARD_ID,
...(earlierUses ? { uses: earlierUses + 1 } : {}) };
log(
g,
`${p.name} played Recruits. Current free revival rates are doubled and the ordinary force revival limit is seven for this turn.`,
`${p.name} played Recruits. Current free revival rates are doubled${earlierUses ? ' again' : ''} and the ordinary force revival limit is seven for this turn.`,
{ faction: p.faction, name: 'Recruits' },
);
if (execution === 'live' && independentRecruitsSemutaEnabled(g))