Allow recovered Recruits replay and more bribe windows
Verify and publish checkpoint container / container (push) Successful in 10m51s
Verify and publish checkpoint container / container (push) Successful in 10m51s
This commit is contained in:
1 parent
bd8377d87b
commit
de7fe7d64a
13 files changed
+394
-22
No files matched your search
+23
-6
@@ -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))
|
||||
|
||||
+10
-2
@@ -1,5 +1,6 @@
|
||||
/** A global card effect expires when the authoritative turn changes. */
|
||||
export type RecruitsEffect = Readonly<{ turn: number }>;
|
||||
/** Legacy receipts omit uses and represent one physical play. */
|
||||
export type RecruitsEffect = Readonly<{ turn: number; uses?: number }>;
|
||||
export const RECRUITS_CARD_ID = 'ecaz-recruits' as const;
|
||||
export type RecruitsPlay = Readonly<{
|
||||
type: 'card';
|
||||
@@ -10,6 +11,7 @@ export type RecruitsPreview = Readonly<{
|
||||
active: boolean;
|
||||
playedTurn?: number;
|
||||
playedBy?: string;
|
||||
plays?: number;
|
||||
play: RecruitsPlay | null;
|
||||
rates: ReadonlyArray<Readonly<{ player: string; freeRate: number; limit: number }>>;
|
||||
grantRevivalBlocked: string | null;
|
||||
@@ -73,11 +75,17 @@ export function recruitsRevivalAllowance(
|
||||
throw new RangeError(`${key} must be a nonnegative integer force count.`);
|
||||
|
||||
const active = scope.recruits?.turn === scope.turn;
|
||||
const uses = active ? scope.recruits?.uses ?? 1 : 0;
|
||||
if (!Number.isSafeInteger(uses) || uses < 0 || (active && uses === 0))
|
||||
throw new RangeError('Active Recruits uses must be a positive safe integer.');
|
||||
const limit = active ? Math.max(7, facts.currentLimit) : facts.currentLimit;
|
||||
const freeRate = facts.freeBlocked
|
||||
? 0
|
||||
: Math.min(
|
||||
facts.currentFreeRate * (active ? 2 : 1),
|
||||
// Each actual replay doubles the current rate again. Cap the exponent
|
||||
// at 53: every supported input and cap is a safe nonnegative integer,
|
||||
// so a larger power can never alter the capped result.
|
||||
facts.currentFreeRate * 2 ** Math.min(uses, 53),
|
||||
facts.freeRateCap,
|
||||
limit,
|
||||
);
|
||||
|
||||
+3
-1
@@ -301,6 +301,7 @@ export const RULE_TOPICS: RuleTopic[] = [
|
||||
'In supported Advanced selected-deck auctions, the Emperor may gift spice before an allied ordinary purchase, Richese cache sale or Black Market sale. The original split remains: direct gifts are the buyer’s spice, while the Emperor’s pledged share goes to the bank. A promised funding update can be completed before continuing.',
|
||||
'In supported classic Advanced games, the Emperor may share spice before a pending Guild shipment-rate response continues. Allowing or canceling the gift returns to the same rate decision and shipment.',
|
||||
'You may pay out of turn when no decision or response is pending, including during Mentat after opening collection. In supported Basic games with classic or selected native expansion factions, direct bribes can also interrupt a normal auction-payment decision, Atreides auction inspection, Fremen allied-revival grant, ordinary Fremen or Ixian movement response, or CHOAM movement decision. Supported Basic Ix and Moritani games also allow payments during the Amal opening or an Extortion choice. The original parent and its passes remain pending. You cannot bribe yourself or your ally, or while Inflation shows Double. Emperor gifts to allies use their own power controls.',
|
||||
'Supported clean Basic games also permit a direct bribe while a Fremen worm-ride choice or winner’s optional battle-card decision is pending. The decision and physical pieces remain in place, and the recipient collects the bribe at the original Mentat opening. Other interruption families and optional combinations remain partial.',
|
||||
'Your payment limit excludes reserved spending and preserves binding Truthtrance answers. If an alliance, pending decision or available supply changes, recheck the recipient and amount. A rejected payment does not change the game.',
|
||||
'In the Basic group preview, group allies are excluded from ordinary bribes and nonallied deals. Existing agreements remain recorded and can be released; a deferred bribe to a newly allied recipient stays pending while it is unavailable, subject to its original deadline.',
|
||||
'A qualifying Bureaucrat may divert two spice to the Bank without reducing the payer’s cost. The remainder stays deferred. Unsupported combinations remain unavailable and do not imply an official rule prohibition.',
|
||||
@@ -6728,9 +6729,10 @@ export const RULE_TOPICS: RuleTopic[] = [
|
||||
steps: [
|
||||
'The separate three-card variant includes Recruits, Reinforcements and Harass & Withdraw. It does not require the Ecaz faction. A development preview includes all three physical cards before setup; Recruits, bounded Reinforcements and Harass & Withdraw controls are connected.',
|
||||
'The holder may play Recruits from its Revival panel. Discard the card once, then all players use the increased rates while this Revival phase remains open, including players who had already marked themselves ready. Completed returns still count toward their turn totals.',
|
||||
'If the actual card is legally recovered during the same Revival, its holder may play and discard it again. Provisionally, each play doubles the current free rate again; the ordinary seven-force limit, native unlimited advantages, prior returns and payments remain. The public panel shows the number of plays and resulting rates.',
|
||||
'In a fresh Basic game with Richese, the CHOAM deck and these independent cards, Semuta Drug may claim Recruits or a used Hajr, Ghola, Harvester, Weather Control or Family Atomics immediately after another player discards it, including when other selected expansion factions are seated. With the Ix deck, clean Thumper, Amal and an Ixian ally’s privately discarded ordinary-auction replacement card can also be claimed before their original continuation. Supported battle cleanup, clean pre-leader Residual Poison, native Moritani allied retention, Ixian substitution, CHOAM sales and Worthless costs, clean Ambassador and Terror discards, completed Box searches, Distrans, simple Truthtrance and ordinary Ornithopter can also offer their discarded card. The original effect stays committed; other Semuta opportunities remain unfinished.',
|
||||
'Atreides rises from two free forces to four; Fremen from three to six; Guild from one to two. The ordinary force limit becomes seven. Native unlimited CHOAM and Tleilaxu allowances remain unlimited, and their free rates become zero and four. Paid prices and separate elite limits still apply.',
|
||||
'Free prevention still prevents free returns. Prior paid ordinary returns now have a visibly provisional policy: preserve payment, deduct only recorded free returns from the doubled free allowance and all returns from the total cap. Two free plus one paid Atreides may take two more free without refund; this is not a numerical user ruling. Fremen may now grant after play under the same provisional current-rate policy, with its original Karama response settled before commitment. Missing/inconsistent ledgers, pending transactions and same-turn replay remain guarded.',
|
||||
'Free prevention still prevents free returns. Prior paid ordinary returns now have a visibly provisional policy: preserve payment, deduct only recorded free returns from the doubled free allowance and all returns from the total cap. Two free plus one paid Atreides may take two more free without refund; this is not a numerical user ruling. Fremen may now grant after play under the same provisional current-rate policy, with its original Karama response settled before commitment. Missing/inconsistent ledgers and pending transactions remain guarded.',
|
||||
'Clean classic2–6 Basic/Advanced Homeworlds compose through the fresh independent36-card setup. Double current native free rates including low-population bonuses, within the seven-force total. Provisionally recheck population and recorded free use on each separate request: low Fremen may take7 together, but1 crossing high leaves5 further free and cannot buy a seventh without Tleilaxu. Original typed destinations and special-force limits stay. Other overlays/rosters, public activation and whole-mode acceptance remain unfinished.',
|
||||
'Classic or selected Ix/CHOAM native/base rosters, including Homeworlds, may retain original unused Tech Tokens3–6 and/or Stronghold Cards2–6 Advanced. Setup, first-Storm Tech and actual end-Mentat custody remain original. Recruits changes current native free rates, not the once-per-phase Axlotl trigger/delayed payout. Harass returns are not free Revival.',
|
||||
'Selected Ix/CHOAM native/base Basic/Advanced Worlds use original38/50 independent-card setup with optional original phase modules. Current native bonuses, typed deposits and accepted paid/free classifications stay. Ix keeps its multiple-Cyborg allowance; Tleilaxu and CHOAM remain unlimited rather than being reduced to seven. Other card/overlay/public-start gates remain.',
|
||||
|
||||
Reference in new issue
Block a user