Enable Basic Kull with Ecaz and Moritani

This commit is contained in:
Quintine committed 2026-10-27 20:13:04 +11:00
1 parent 69a9330810
commit 6d50829c0c
13 files changed
+503 -16

No files matched your search

+5 -3
View File
@@ -38,7 +38,7 @@ export function parseBribeClaim(value: unknown): BribeClaim {
/** The ordinary, grouped and mixed bribe families share this admission. The
* printed Kull extension is deliberately limited to the existing fresh Basic
* CHOAM, Ixian, Tleilaxu and classic roster; other previews keep their own composition boundaries.
* CHOAM, Ixian, Tleilaxu, Ecaz, Moritani and classic roster; other previews keep their own composition boundaries.
* This quote grants no start permission or future unowned funds. */
export function bribePromiseModeSupported(game: NativePromiseScope & {
semutaPreview?: unknown; kullPreview?: unknown; nexusKullPreview?: unknown;
@@ -50,12 +50,14 @@ export function bribePromiseModeSupported(game: NativePromiseScope & {
if (!nativePromiseScopeSupported(game) || game.semutaPreview || game.nexusKullPreview ||
game.richeseBetrayalPreview) return false;
if (!game.kullPreview) return true;
return game.kullPreview === true && game.advanced === false && game.expansions.length === 2 &&
return game.kullPreview === true && game.advanced === false && (game.expansions.length === 2 ||
game.expansions.length === 3 && game.expansions.includes('ecaz')) &&
game.expansions.includes('choam') && game.expansions.includes('ix') &&
game.players.some(player => player.faction === 'choam') &&
new Set(game.players.map(player => player.faction)).size === game.players.length &&
game.players.every(player => player.faction === 'choam' || player.faction === 'ixians' ||
player.faction === 'tleilaxu' ||
player.faction === 'tleilaxu' || game.expansions.includes('ecaz') &&
(player.faction === 'ecaz' || player.faction === 'moritani') ||
FACTIONS.some(faction => faction.id === player.faction && faction.expansion === 'base')) &&
!game.guildBetrayalPreview && !game.nexusIxianReplacementPreview &&
!game.nexusIxianBetrayalPreview && !game.nexusHarkonnenBetrayalPreview &&
+45 -7
View File
@@ -10017,13 +10017,15 @@ function startModules(state: Game): Game {
const g = structuredClone(state);
delete g.lobbyOptions;
if (options.kullPreview) {
requireRule(g.advanced === false && g.expansions.length === 2 && g.expansions.includes('choam') &&
requireRule(g.advanced === false && (g.expansions.length === 2 ||
g.expansions.length === 3 && g.expansions.includes('ecaz')) && g.expansions.includes('choam') &&
g.expansions.includes('ix') && !!byFaction(g,'choam') &&
g.players.every(player => player.faction === 'choam' || player.faction === 'ixians' ||
player.faction === 'tleilaxu' || CLASSIC_FACTIONS[player.faction] === true) &&
player.faction === 'tleilaxu' || g.expansions.includes('ecaz') &&
(player.faction === 'ecaz' || player.faction === 'moritani') || CLASSIC_FACTIONS[player.faction] === true) &&
!options.leaderSkills && !options.ecazTreachery && !g.nexusCards && !g.discoveryEnabled &&
!g.homeworlds && !g.techTokens && !g.strongholdCards,
'Kull preview needs Basic CHOAM, Ixian, Tleilaxu or classic factions, CHOAM and Ix decks, and no optional modules.');
'Kull preview needs Basic CHOAM with classic or supported Ix/Ecaz factions, CHOAM and Ix decks, each faction’s deck, and no optional modules.');
return initializeKullGameForAudit(g);
}
if (options.ecazTreachery && options.leaderSkills) g.ecazTreachery = true;
@@ -12394,11 +12396,13 @@ export function initializeSemutaGameForAudit(state: Game, skills = false): Game
/** Opt-in printed Kull gameplay with the physical Ix deck, not a public release gate. */
export function initializeKullGameForAudit(state: Game): Game {
requireRule(!state.kullPreview && !state.nexusKullPreview && !state.pendingKull && !state.kullRestrictions &&
state.expansions.length === 2 && state.expansions.includes('choam') &&
(state.expansions.length === 2 || !state.advanced && state.expansions.length === 3 &&
state.expansions.includes('ecaz')) && state.expansions.includes('choam') &&
state.expansions.includes('ix') && state.players.some(p => p.faction === 'choam') &&
state.players.every(p => p.faction === 'choam' || faction(p.faction).expansion === 'base' ||
!state.advanced && (p.faction === 'ixians' || p.faction === 'tleilaxu')),
'Kull preview needs a fresh CHOAM, Ixian, Tleilaxu or classic-faction lobby with CHOAM and Ix decks.');
!state.advanced && (p.faction === 'ixians' || p.faction === 'tleilaxu' ||
state.expansions.includes('ecaz') && (p.faction === 'ecaz' || p.faction === 'moritani'))),
'Kull preview needs a fresh CHOAM lobby with supported native factions and selected CHOAM and Ix decks.');
const g = initializeFactionExpansionsGameForAudit(state);
g.kullPreview = true;
return g;
@@ -17912,6 +17916,26 @@ function assertKaramaPromiseFeasibility(
use: KaramaUse,
costCard?: Card,
): boolean {
if (g.pendingKull?.stage === 'counter' && use.kind === 'cancel' &&
use.response.kind === 'choamWorthless' && use.response.intent === 'Kull Wahad') {
const moves = liveMovementPromises(g.movementPromises ?? [], p.id, g.turn);
const expressions = liveMovementExpressionPromises(g.movementExpressionPromises ?? [], p.id, g.turn);
if (moves.length || expressions.length) {
if (!costCard) return false;
const projected = structuredClone(g);
const owner = getPlayer(projected, p.id);
owner.hand = owner.hand.filter(card => card.id !== costCard.id);
// A successful counter resumes the original intent. Quote the actual
// resumed parent with this distinct counter already unavailable.
try {
resumeKullAttempt(projected, false);
if (!groundMovementCompletion(projected, p.id, moves, expressions)) return false;
} catch (error) {
if (error instanceof RuleError) return false;
throw error;
}
}
}
const battlePromises =
g.battle && !g.battle.revealed && !g.battle.plans[p.id]
? (g.battle.truthPromises ?? []).filter(
@@ -19696,6 +19720,12 @@ function recoverableUnsupportedShipment(shipment: PendingShipment) {
* owned movement reachability; unresolved opposing outcomes are never replayed. */
function groundMovementProbe(source: Game, actor: string): Game {
const game = structuredClone(source);
// A freshly interrupted owned shipment discount has a possible native
// continuation when CHOAM declines Kull. Quote that outcome only in this
// detached witness; the live table still waits for the real response.
if (game.pendingKull?.stage === 'offer' && game.pendingKull.owner === actor &&
game.pendingKull.intent.kind === 'ordinary' && game.pendingKull.intent.use.kind === 'shipment')
resumeKullAttempt(game, false);
projectPendingShipmentKarama(game, actor);
if (game.phase < 5) {
if (game.pendingRevival?.player === actor) projectOwnedOrdinaryRevival(game, actor);
@@ -21575,7 +21605,15 @@ function groundMovementCompletionAtMovement(game: Game, actor: string, promises:
for (const card of player.hand) {
if (!player.shipped && !state.karamaShipping && canUseAsKaramaRole(state, player, card)) {
const action: Action = { type: 'card', card: card.id, mode: 'shipment', target: owner };
try { yield { game: groundMovementProbe(applyActionInner(state, owner, action, 'movementPreparation'), owner), actions: [action] }; }
try {
const prepared = applyActionInner(state, owner, action, 'movementPreparation');
// This detached witness may assume a newly opened Kull offer is
// declined. The real action still waits for CHOAM's decision.
if (!state.pendingKull && prepared.pendingKull?.stage === 'offer' &&
prepared.pendingKull.owner === owner && prepared.pendingKull.card === card.id)
resumeKullAttempt(prepared, false);
yield { game: groundMovementProbe(prepared, owner), actions: [action] };
}
catch (error) { if (!(error instanceof RuleError)) throw error; }
}
if (card.effect === 'hajr' && hajrAvailable(state, player) && !transferCardBlock(state, player, card)) {
+4 -4
View File
@@ -4755,7 +4755,7 @@ export const RULE_TOPICS: RuleTopic[] = [
'Whenever another faction requests a normal revival with a free portion, CHOAM receives a response decision independently of its private hand. Allow the request, or declare La La La for that requester. If the effect succeeds, the whole pending request stops without payment, force movement or quota use; a faction permitted to purchase normal revivals can submit a paid request. If the effect is canceled, the original quote resumes through any Tleilaxu and other applicable responses.',
'La La La does not prevent otherwise legal paid revivals or separate Ghola card effects. With Tleilaxu in the game, Fremen may submit a paid request within their current limit after free revival is prevented. Without Tleilaxu, Fremen’s base purchase restriction leaves no normal force return available. Emperor-funded extras remain separate. The prohibition resets when the next Revival phase begins. Card custody is checked at settlement: if CHOAM cashed in the declared card during the response, no Worthless effect occurs and the interrupted revival resumes.',
'During Shipment and Movement, use Baliset to select another player and a territory CHOAM occupies. The current implementation prevents that player from entering that territory by movement for the phase while CHOAM remains there; shipment is allowed. A declared move into a CHOAM territory pauses for CHOAM regardless of its private hand. Allow it or declare Baliset. A successful effect leaves the moving forces in place and the movement unspent; a canceled or unavailable card resumes the original move after checking its legality again.',
'Kulon, La La La, Baliset, Jubba Cloak and Trip to Gamont have engine, private controls and AI support. Printed Kull Wahad has an opt-in Basic lobby preview for CHOAM, Ixians, Tleilaxu and classic factions with the CHOAM and Ix decks and no other modules; the explicit Nexus Kull profile adds Cunning fuel choices at that same reaction, not in every Nexus game. See both Kull guides for distinct counters, pre-conversion Bene Gesserit custody and the deferred winning-overbid boundary. Exact cancellation scope, Hajr/ornithopter combinations, Baliset duration and destination scope, simultaneous prevention and later module exceptions remain under audit. Complete expansion play remains unfinished.',
'Kulon, La La La, Baliset, Jubba Cloak and Trip to Gamont have engine, private controls and AI support. Printed Kull Wahad has an opt-in Basic lobby preview for CHOAM, Ixians, Tleilaxu, Ecaz, Moritani and classic factions with the CHOAM and Ix decks, each seated faction’s deck and no other modules; the explicit Nexus Kull profile adds Cunning fuel choices at that same reaction, not in every Nexus game. See both Kull guides for distinct counters, pre-conversion Bene Gesserit custody and the deferred winning-overbid boundary. Exact cancellation scope, Hajr/ornithopter combinations, Baliset duration and destination scope, simultaneous prevention and later module exceptions remain under audit. Complete expansion play remains unfinished.',
],
related: [
'faction-choam',
@@ -4778,7 +4778,7 @@ export const RULE_TOPICS: RuleTopic[] = [
developmentStage: 'Prototyped',
summary: 'React before a Karama is played; a distinct counter can stop Kull before its phase restriction begins.',
steps: [
'In the lobby, the host can opt into this Basic development preview with CHOAM, Ixians, Tleilaxu and classic factions, the CHOAM and Ix Treachery decks, and no other optional modules. It uses printed ordinary Karama. The preview withholds some structured Truthtrance question types and defers unfunded non-CHOAM Karama-dependent bids; leave it off to retain the ordinary current game. A separate Advanced development profile supports Bene Gesserit substitutions and legal special powers. Existing games are not retrofitted, and the warning is not rules-completion approval.',
'In the lobby, the host can opt into this Basic development preview with CHOAM, Ixians, Tleilaxu, Ecaz, Moritani and classic factions, the CHOAM and Ix decks, each seated faction’s deck, and no other optional modules. It uses printed ordinary Karama. The preview withholds some structured Truthtrance question types and defers unfunded non-CHOAM Karama-dependent bids; leave it off to retain the ordinary current game. A separate Advanced development profile supports Bene Gesserit substitutions and legal special powers. Existing games are not retrofitted, and the warning is not rules-completion approval.',
'In the supported Basic printed Kull preview, ordinary, grouped and mixed Truthtrance bribe questions remain available. A pending Kull response temporarily holds bribe controls; its real resolution resumes the existing commitment. Other structured question types remain incomplete in this preview.',
'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.',
@@ -4788,12 +4788,12 @@ export const RULE_TOPICS: RuleTopic[] = [
'Advanced Bene Gesserit is intercepted before Worthless conversion or discard: successful Kull keeps that original unplayed Worthless card held. If CHOAM declines or Kull is countered, the original proceeds to its separate conversion response. Ordinary cancellation of that conversion still leaves its Worthless card discarded. A different BG Worthless counter has its own conversion response; it is never the reserved original.',
'Winning overbids whose Karama payment would become unplayable remain deferred. To avoid accepting a bid that the preview cannot settle, a non-CHOAM unfunded Karama-dependent bid is refused privately before commitment, independently of CHOAM’s hidden Kull ownership. CHOAM self-activations are outside interception; normal non-preview bidding is unchanged. An already unfunded winning activation remains guarded. Holding Karama alone is not a reaction trigger. This unfinished-composition fence does not restart bidding, award the lot free, supply new funding or change numeric UI bid limits.',
'A live Truthtrance battle or shipment promise also constrains original attempts, Kull costs and counters. A cost that cannot be proved compatible is unavailable before disposal; CHOAM may decline instead. Proven supported cancellations remain available. Pending Kull cannot release a suspended promise, and its counter choices exclude unproven costs so legal AI can progress. Unsupported continuations remain an incomplete preview composition, not a publisher ban or permission to release the promise.',
'The different-card counter and before-conversion custody are explicitly selected development policy, not a located publisher clarification. This printed-only profile still excludes Nexus. The separate Nexus Kull profile adds one bounded Cunning interaction without changing older games; Richese, Ecaz and Moritani rosters, optional modules, unpayable-auction recovery and full CHOAM acceptance remain outside this printed preview. Nexus cards do not receive blanket immunity to Karama.',
'The different-card counter and before-conversion custody are explicitly selected development policy, not a located publisher clarification. This printed-only profile still excludes Nexus. The separate Nexus Kull profile adds one bounded Cunning interaction without changing older games; Richese/Semuta, optional modules, unpayable-auction recovery and full CHOAM acceptance remain outside this printed preview. Nexus cards do not receive blanket immunity to Karama.',
],
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: 'Opt-in 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 Ixians and Tleilaxu and retains structured bribe promises through its response; 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-native-ix-runtime.test.ts'] },
{ area: 'Implementation', status: 'Partial', detail: 'Opt-in 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 Ixians, Tleilaxu, Ecaz and Moritani and retains structured bribe promises through its response; 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-native-ix-runtime.test.ts', 'tests/kull-native-e3-runtime.test.ts', 'tests/kull-ground-movement-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'] },