Continue Kull across paid sale responses
Verify and publish checkpoint container / container (push) Successful in 10m57s
Verify and publish checkpoint container / container (push) Successful in 10m57s
This commit is contained in:
1 parent
3d2470b7f8
commit
e7520e8679
9 files changed
+487
-18
No files matched your search
+35
-15
@@ -1620,7 +1620,7 @@ export type Game = {
|
||||
allianceReceipt?: true;
|
||||
/** New Basic Kull attempts retain whole-answer order and progress. */
|
||||
turnActionReceipt?: true;
|
||||
/** A Basic bonus cancellation retains its already-paid auction parent. */
|
||||
/** A Basic sale cancellation retains its already-paid auction parent. */
|
||||
auctionReceipt?: true;
|
||||
stage: 'offer' | 'counter';
|
||||
selection?: { source: 'printed' | 'nexus'; card: string; nexusEvent?: string };
|
||||
@@ -6940,7 +6940,7 @@ function kullSemutaParentSupported(g: Game, frame?: NonNullable<Game['pendingKul
|
||||
!frame.resume.decision && !frame.resume.pendingKarama && !frame.resume.phaseOpening;
|
||||
let revivalSupported = false;
|
||||
let guildSupported = false;
|
||||
let bonusSupported = false;
|
||||
let saleSupported = false;
|
||||
if (nativeResponse && frame && use?.kind === 'cancel') {
|
||||
// Success has just installed this very Kull restriction. Validate the
|
||||
// suspended source as it stood before that restriction, without changing
|
||||
@@ -6952,12 +6952,19 @@ function kullSemutaParentSupported(g: Game, frame?: NonNullable<Game['pendingKul
|
||||
revivalSupported = !!g.pendingRevival && semutaRevivalKaramaResponse(source, use.response, frame.owner);
|
||||
guildSupported = (!!g.pendingShipment || !!g.pendingGuildTransport) &&
|
||||
semutaGuildShipmentKaramaResponse(source, use.response);
|
||||
bonusSupported = frame.auctionReceipt === true && use.response.kind === 'harkonnenBonus' &&
|
||||
!!g.currentAuctionSale && (g.currentAuctionSale.origin === 'normal'
|
||||
const paidSale = frame.auctionReceipt === true && !!g.currentAuctionSale && (g.currentAuctionSale.origin === 'normal'
|
||||
? !!g.auction && !g.richeseAuction
|
||||
: g.currentAuctionSale.origin === 'cache' && !!g.richeseAuction &&
|
||||
g.richeseAuction.source === 'cache' && !g.auction) &&
|
||||
semutaBonusNoFieldTraitorResponse(source, use.response, frame.owner);
|
||||
g.richeseAuction.source === 'cache' && !g.auction);
|
||||
if (paidSale && use.response.kind === 'harkonnenBonus')
|
||||
saleSupported = semutaBonusNoFieldTraitorResponse(source, use.response, frame.owner);
|
||||
else if (paidSale && use.response.kind === 'ixAllyCard')
|
||||
saleSupported = semutaMarketGrantKaramaResponse(source, use.response, frame.owner);
|
||||
else if (paidSale && use.response.kind === 'emperorIncome' && !use.response.source &&
|
||||
semutaIncomeKaramaResponse(source, use.response)) {
|
||||
validateKaramaUse(source, getPlayer(source, frame.owner), use);
|
||||
saleSupported = true;
|
||||
}
|
||||
} catch (error) {
|
||||
if (!(error instanceof RuleError)) throw error;
|
||||
}
|
||||
@@ -6971,13 +6978,14 @@ function kullSemutaParentSupported(g: Game, frame?: NonNullable<Game['pendingKul
|
||||
JSON.stringify(use.response) === JSON.stringify(frame.resume.response) &&
|
||||
!frame.resume.decision && !frame.resume.pendingKarama && !frame.resume.phaseOpening;
|
||||
return battleSupported && !g.truthtrance && !g.pendingRicheseGift && !g.pendingNullentropy &&
|
||||
!g.pendingAmbassador && !g.pendingIxAlly && (!g.pendingRevival || revivalSupported) &&
|
||||
!g.pendingAmbassador && (!g.pendingIxAlly || saleSupported && use?.kind === 'cancel' &&
|
||||
use.response.kind === 'ixAllyCard') && (!g.pendingRevival || revivalSupported) &&
|
||||
(!g.pendingShipment || guildSupported) && (!g.pendingGuildTransport || guildSupported) &&
|
||||
!g.pendingHomeworldShipment && !g.pendingTerrorEntry &&
|
||||
!g.pendingEcazPlacement && !g.pendingMoritaniPlacement &&
|
||||
!g.pendingArrivalOverlap && !g.pendingArrivalReaction?.length && !g.pendingExchange &&
|
||||
!g.pendingRichesePurchaseIncome && !g.pendingChoamMarketGhola && (!g.currentAuctionSale || bonusSupported) &&
|
||||
!g.choamMarket && (!g.richeseAuction || bonusSupported) && !g.pendingFremenMove && !g.pendingIxMove &&
|
||||
!g.pendingRichesePurchaseIncome && !g.pendingChoamMarketGhola && (!g.currentAuctionSale || saleSupported) &&
|
||||
!g.choamMarket && (!g.richeseAuction || saleSupported) && !g.pendingFremenMove && !g.pendingIxMove &&
|
||||
!g.pendingMobileMove && !g.pendingChoamMove && !g.ornithopter && !g.ecologicalStorm &&
|
||||
!g.summonedWorm && !g.wormRides.length;
|
||||
}
|
||||
@@ -7951,7 +7959,10 @@ function treacheryDiscardIntegrity(g: Game) {
|
||||
(!g.pendingNullentropy || continuation?.kind === 'karamaRicheseGiftDiscard') &&
|
||||
(!g.pendingAmbassador || box || truth || ambassadorTerror || ambassadorCost || continuation?.kind === 'karamaRicheseGiftDiscard') &&
|
||||
(!g.pendingIxAlly || box || truth || continuation?.kind === 'karamaRicheseGiftDiscard' ||
|
||||
continuation?.kind === 'karamaMarketDiscard' && continuation.use.response.kind === 'ixAllyCard'),
|
||||
continuation?.kind === 'karamaMarketDiscard' && continuation.use.response.kind === 'ixAllyCard' ||
|
||||
(continuation?.kind === 'kullSuccessDiscard' || continuation?.kind === 'kullCounterDiscard') &&
|
||||
continuation.frame.auctionReceipt === true && continuation.frame.intent.kind === 'ordinary' &&
|
||||
continuation.frame.intent.use.kind === 'cancel' && continuation.frame.intent.use.response.kind === 'ixAllyCard'),
|
||||
'The saved discard does not match its current continuation.',
|
||||
);
|
||||
const ids = new Set<string>();
|
||||
@@ -19231,8 +19242,17 @@ function canonicalKullCard(card: Card): boolean {
|
||||
return !!expected && card.name === expected.name && card.kind === expected.kind &&
|
||||
card.effect === expected.effect;
|
||||
}
|
||||
/** A settled normal sale is not an outstanding bid. Validate its native
|
||||
* response and physical auction receipt before exempting it from funding. */
|
||||
function kullPaidAuctionSale(g: Game, player: Player): boolean {
|
||||
const sale = g.currentAuctionSale, auction = g.auction, response = g.response;
|
||||
if (!sale || sale.origin !== 'normal' || !auction || auction.bidder !== player.id ||
|
||||
sale.winner !== player.id || sale.amount !== auction.bid || !response) return false;
|
||||
try { return !!validateAuctionContinuationCancellation(g, response); }
|
||||
catch (error) { if (error instanceof RuleError) return false; throw error; }
|
||||
}
|
||||
function kullCostRetainsAuctionPayment(g: Game, p: Player, card: Card, physical: readonly Card[]): boolean {
|
||||
return !g.auction || g.auction.bidder !== p.id || auctionSpicePaymentFunded(g, p) ||
|
||||
return !g.auction || g.auction.bidder !== p.id || kullPaidAuctionSale(g, p) || auctionSpicePaymentFunded(g, p) ||
|
||||
p.hand.some(held => held.id !== card.id && canonicalKullCard(held) &&
|
||||
physical.reduce((count, candidate) => count + Number(candidate.id === held.id), 0) === 1 &&
|
||||
!karamaSpendingBlock(g, p, held, 'auction-free-purchase'));
|
||||
@@ -19429,8 +19449,8 @@ function kullIntegrity(g: Game): void {
|
||||
requireRule(frame.auctionReceipt === undefined || frame.auctionReceipt === true &&
|
||||
!g.advanced && g.semutaPreview === true && !!g.currentAuctionSale &&
|
||||
frame.intent.kind === 'ordinary' && frame.intent.use.kind === 'cancel' &&
|
||||
frame.intent.use.response.kind === 'harkonnenBonus',
|
||||
'The Kull attempt has lost its original paid auction bonus.');
|
||||
['harkonnenBonus','emperorIncome','ixAllyCard'].includes(frame.intent.use.response.kind),
|
||||
'The Kull attempt has lost its original paid auction response.');
|
||||
validateKullAttemptStamp(g, frame, physicalTreacheryCards(g));
|
||||
requireRule(Number.isSafeInteger(g.kullSequence) && g.kullSequence! > 0 &&
|
||||
frame.event === JSON.stringify(['kull', g.turn, g.phase, g.kullSequence, frame.player, frame.owner]),
|
||||
@@ -19498,7 +19518,7 @@ function beginKullAttempt(g: Game, p: Player, card: Card, intent: KullFrame['int
|
||||
'Kull preview cannot interrupt this unproven Truthtrance cancellation continuation.');
|
||||
// This composition is user-deferred. The guard is private and independent
|
||||
// of CHOAM's hidden hand; never accept a transaction needing a made-up remedy.
|
||||
requireRule(!g.auction || g.auction.bidder !== p.id ||
|
||||
requireRule(!g.auction || g.auction.bidder !== p.id || kullPaidAuctionSale(g, p) ||
|
||||
g.auction.bid <= p.spice + (g.auction.allyPayment ?? 0),
|
||||
'Kull preview defers Karama activation while your winning overbid cannot be paid in spice.');
|
||||
const resume: KullFrame['resume'] = {
|
||||
@@ -19524,7 +19544,7 @@ function beginKullAttempt(g: Game, p: Player, card: Card, intent: KullFrame['int
|
||||
...(turnActionPromiseModeSupported(g) && g.turnActionPromises?.length
|
||||
? { turnActionReceipt: true as const } : {}),
|
||||
...(g.semutaPreview && !g.advanced && !!g.currentAuctionSale && intent.kind === 'ordinary' &&
|
||||
intent.use.kind === 'cancel' && intent.use.response.kind === 'harkonnenBonus'
|
||||
intent.use.kind === 'cancel' && ['harkonnenBonus','emperorIncome','ixAllyCard'].includes(intent.use.response.kind)
|
||||
? { auctionReceipt: true as const } : {}),
|
||||
worthless: structuredClone(g.pendingChoamWorthless ?? null), signature: '',
|
||||
};
|
||||
|
||||
+2
-2
@@ -4863,7 +4863,7 @@ export const RULE_TOPICS: RuleTopic[] = [
|
||||
summary: 'React before a Karama is played; a distinct counter can stop Kull before its phase restriction begins.',
|
||||
steps: [
|
||||
'In a new supported Basic lobby with CHOAM and the CHOAM and Ix decks, printed Kull is enabled by default as a development preview. The host may turn it off to keep the broader non-Kull Truthtrance options. Basic supports Richese, Ixians, Tleilaxu, Ecaz, Moritani and classic factions with each seated faction’s deck and no other optional modules. In an Advanced preview lobby, the host may explicitly select printed Kull with CHOAM, classic factions and exactly the CHOAM and Ix decks, without optional modules. Advanced supports Bene Gesserit substitutions and legal special powers. Both previews withhold some structured questions and defer unfunded non-CHOAM Karama-dependent bids. Existing games are not retrofitted, and this warning does not certify complete rules.',
|
||||
'In the supported Basic printed Kull preview, simple and mixed current-lot ordinary bid, phase-wide bid, ordinary bribe, Revival and alliance questions are available, including with Richese and Semuta. Combined turn-action questions are also available in this profile. A pending Kull response holds their controls while the original transaction resolves; some Karama uses remain guarded. Kull and Semuta also retain a paid ordinary or cache sale when Karama targets Harkonnen’s bonus. Wider interactions remain incomplete.',
|
||||
'In the supported Basic printed Kull preview, simple and mixed current-lot ordinary bid, phase-wide bid, ordinary bribe, Revival and alliance questions are available, including with Richese and Semuta. Combined turn-action questions are also available in this profile. A pending Kull response holds their controls while the original transaction resolves; some Karama uses remain guarded. Kull and Semuta also retain a paid ordinary or cache sale when Karama targets Harkonnen’s bonus or Emperor income, and an ordinary sale when it targets an Ixian ally’s replacement. Wider interactions remain incomplete.',
|
||||
'Another player’s legal Karama cancellation, shipment-rate use, immediate auction purchase, winning-bid payment or supported special activation pauses before its card and other costs. CHOAM sees the attempted player and purpose and may decline or choose a legal held Kull Wahad. Each Use names its printed source explicitly. The separate Nexus Kull guide covers additional Cunning costs in its new profile only. The same public opportunity appears without Kull in hand, so waiting does not disclose hidden ownership. Invalid attempts never open this window; CHOAM does not receive a self-targeted Kull offer.',
|
||||
'Decline resumes the original attempt once. Declaring Kull opens the ordinary CHOAM-effect response. Kull is still pending: its target may counter with a different eligible physical Karama before any phase ban applies. The interrupted card stays reserved and cannot serve as its own counter. Other eligible responders use their existing response controls.',
|
||||
'If everyone allows Kull, CHOAM discards the exact Kull card. The original attempted card remains in its owner’s hand; its effect and additional costs do not occur, and an attempted special once-per-game use remains unspent. Basic prevents that player’s Karama activations for this phase. A new Advanced attempt instead prevents only the specific effect: shipment pricing, free Treachery purchase, that faction’s special, or cancellation of the particular advantage. Other effects remain available; printed and substituted Karama share the same restriction. An allied shipment recipient is not automatically the restricted player.',
|
||||
@@ -4878,7 +4878,7 @@ export const RULE_TOPICS: RuleTopic[] = [
|
||||
example: 'Bene Gesserit attempts to use Baliset as Karama. CHOAM declares Kull. Baliset cannot also counter Kull; a different eligible Karama may. If Kull succeeds, Baliset stays held; in a new Advanced attempt BG cannot repeat that specific Karama effect this phase but may use another legal effect. If a distinct counter prevents Kull, the original Baliset attempt proceeds to its normal conversion response.',
|
||||
related: ['choam-worthless', 'nexus-choam-kull', 'faction-choam', 'card-karama', 'advanced-beneGesserit', 'special-karama', 'bidding', 'choam-karama', 'nexus-cards', 'implementation-checklist'],
|
||||
checklist: [
|
||||
{ area: 'Implementation', status: 'Partial', detail: 'Selectable Kull binds typed intents, distinct physical counters and Basic/legacy all-purpose or new Advanced semantic-effect restrictions. Different effects remain playable; phase expiry is provisional in Advanced. Basic printed Kull admits native Richese, Ixians, Tleilaxu, Ecaz and Moritani; supported clean Kull discards offer Semuta before their suspended parent resumes. Simple and mixed current-lot bid, phase-wide bid, ordinary bribe, Revival and alliance commitments can coexist with this preview including Richese. Combined turn-action answers use guarded Kull continuation; some cancellation parents, deferred overbid recovery and broader module support remain excluded.', evidence: ['game/choam-kull.ts', 'game/kull-purpose.ts', 'game/bribe-promises.ts', 'game/engine.ts', 'tests/kull-bid-runtime.test.ts', 'tests/kull-phase-bid-runtime.test.ts', 'tests/kull-richese-phase-bid-runtime.test.ts', 'tests/kull-richese-current-bid-runtime.test.ts', 'tests/kull-richese-mixed-bid-runtime.test.ts', 'tests/kull-richese-bribe-runtime.test.ts', 'tests/kull-richese-bribe-truth-semuta.test.ts', 'tests/kull-richese-bribe-table-controls.test.tsx', 'tests/kull-richese-revival-commitment.test.ts', 'tests/kull-richese-revival-truth-semuta.test.ts', 'tests/kull-richese-alliance-semuta.test.ts', 'tests/kull-richese-alliance-worm-ride.test.ts', 'tests/kull-richese-alliance-table-controls.test.tsx', 'tests/kull-richese-cache-cancel-runtime.test.ts', 'tests/kull-richese-normal-bonus-runtime.test.ts', 'tests/kull-truth-revival-runtime.test.ts', 'tests/kull-alliance-runtime.test.ts', 'tests/kull-richese-semuta-runtime.test.ts'] },
|
||||
{ area: 'Implementation', status: 'Partial', detail: 'Selectable Kull binds typed intents, distinct physical counters and Basic/legacy all-purpose or new Advanced semantic-effect restrictions. Different effects remain playable; phase expiry is provisional in Advanced. Basic printed Kull admits native Richese, Ixians, Tleilaxu, Ecaz and Moritani; supported clean Kull discards offer Semuta before their suspended parent resumes. Simple and mixed current-lot bid, phase-wide bid, ordinary bribe, Revival and alliance commitments can coexist with this preview including Richese. Combined turn-action answers use guarded Kull continuation; some cancellation parents, deferred overbid recovery and broader module support remain excluded.', evidence: ['game/choam-kull.ts', 'game/kull-purpose.ts', 'game/bribe-promises.ts', 'game/engine.ts', 'tests/kull-bid-runtime.test.ts', 'tests/kull-phase-bid-runtime.test.ts', 'tests/kull-richese-phase-bid-runtime.test.ts', 'tests/kull-richese-current-bid-runtime.test.ts', 'tests/kull-richese-mixed-bid-runtime.test.ts', 'tests/kull-richese-bribe-runtime.test.ts', 'tests/kull-richese-bribe-truth-semuta.test.ts', 'tests/kull-richese-bribe-table-controls.test.tsx', 'tests/kull-richese-revival-commitment.test.ts', 'tests/kull-richese-revival-truth-semuta.test.ts', 'tests/kull-richese-alliance-semuta.test.ts', 'tests/kull-richese-alliance-worm-ride.test.ts', 'tests/kull-richese-alliance-table-controls.test.tsx', 'tests/kull-richese-cache-cancel-runtime.test.ts', 'tests/kull-richese-normal-bonus-runtime.test.ts', 'tests/kull-richese-emperor-income-runtime.test.ts', 'tests/kull-richese-ix-replacement-runtime.test.ts', 'tests/kull-paid-auction-funding.test.ts', 'tests/kull-truth-revival-runtime.test.ts', 'tests/kull-alliance-runtime.test.ts', 'tests/kull-richese-semuta-runtime.test.ts'] },
|
||||
{ area: 'Player controls', status: 'Partial', detail: 'Owner-only legal held costs and decline use the Kull event; counters reuse ordinary response controls. Public viewers receive purpose/actors, not private intent payloads or hidden choices.', evidence: ['components/choam-kull.tsx', 'components/game-table.tsx'] },
|
||||
{ area: 'AI', status: 'Partial', detail: 'Legal preview participation uses projected reactor choices and ordinary distinct counter controls. Full strategy and difficulty calibration remain deferred.', evidence: ['game/bot-choam-kull.ts', 'game/bots.ts'] },
|
||||
{ area: 'Documentation', status: 'Partial', detail: 'Pending versus active restrictions, distinct custody, decline/prevention/success, BG-before-conversion and deferred overbid limits have internal explanations. Publisher-source and full-faction acceptance remain separate.', evidence: ['docs/CHOAM_KULL_DESIGN.md', 'docs/CHOAM_KULL_SOURCE_UPDATE.md', 'docs/NEXUS_CHOAM_RULES.md'] },
|
||||
|
||||
Reference in new issue
Block a user