Expose Advanced printed Kull preview in lobbies
This commit is contained in:
1 parent
f1bef950e0
commit
b750a3d3eb
17 files changed
+422
-20
No files matched your search
+5
-3
@@ -1,6 +1,7 @@
|
||||
import { CharityPromiseError, liveCharityPromises, charityPromiseAnswers, bindCharityPromise, guardCharityClaim, guardCharityReady, reconcileCharityPromises, type CharityPromise } from './charity-promises';
|
||||
import { SabotageGiftError, quoteSabotageGift, quoteSabotageGiftDiscard } from './sabotage-gift';
|
||||
import { kullDefaultEligible } from './kull-default-profile';
|
||||
import { advancedKullLobbyEligible } from './kull-advanced-profile';
|
||||
import { SaphoTruthOrderError, quoteSaphoTruthOrder, reorderSaphoTruthOrder, validateSaphoTruthOrder } from './sapho-truth-order';
|
||||
import { RicheseBidPromiseError, richeseBidCompletionRange, richeseBidRequired, recordRicheseBid,
|
||||
liveRicheseBidPromises, reconcileRicheseBidPromises, finishRicheseBidLot, validateRicheseBidPromises,
|
||||
@@ -10117,15 +10118,16 @@ function startModules(state: Game): Game {
|
||||
const g = structuredClone(state);
|
||||
delete g.lobbyOptions;
|
||||
if (lobbyKullEnabled(state)) {
|
||||
requireRule(g.advanced === false && (g.expansions.length === 2 ||
|
||||
const supportedBasic = 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 === 'richese' || player.faction === 'ixians' ||
|
||||
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 with supported factions, CHOAM and Ix decks, each faction’s deck, and no optional modules.');
|
||||
!g.homeworlds && !g.techTokens && !g.strongholdCards;
|
||||
requireRule(supportedBasic || advancedKullLobbyEligible(state),
|
||||
'Kull preview needs CHOAM and Ix decks with no optional modules. Advanced currently supports CHOAM and classic factions only; Basic also supports the selected native expansion factions.');
|
||||
return initializeKullGameForAudit(g);
|
||||
}
|
||||
if (options.ecazTreachery && options.leaderSkills) g.ecazTreachery = true;
|
||||
|
||||
@@ -18,7 +18,7 @@ export const FACTION_RULES: Record<
|
||||
],
|
||||
advanced: [
|
||||
'Once per game, spend a real Karama and discard selected other cards for three spice each. The cash-in can occur during pending phase or power decisions, while committed battle cards remain protected. See the CHOAM special Karama topic for funding and timing details.',
|
||||
'The Kull preview also intercepts supported special Karama intents before once-use or other costs, and BG Worthless substitutions before conversion. Successful Kull leaves an attempted special unspent and the original BG card held; ordinary later cancellation of BG conversion still discards its card. Approved preview timing is product policy, not publisher clarification, and does not enable Nexus Cunning Kull or combined modules.',
|
||||
'In a supported Advanced CHOAM and classic-faction preview lobby, the host can select printed Kull with the CHOAM and Ix decks and no optional modules. It intercepts supported special Karama intents before once-use or other costs, and BG Worthless substitutions before conversion. Successful Kull leaves an attempted special unspent and the original BG card held; ordinary later cancellation of BG conversion still discards its card. Advanced restricts the attempted effect; phase expiry is provisional. This preview does not enable Nexus Cunning Kull or combined modules.',
|
||||
'Reserve spice to pay for some or all of your ally’s battle support. Each sealed plan records its own and allied shares. A Karama response may prevent this alliance benefit for one battle; unused funding returns at the end of Battle.',
|
||||
'Receive half of each other player’s actual force-support payment, rounded down, unless any traitor is revealed. Your own payments, including support paid for your ally, go to the bank. A separate Karama response can cancel this battle’s income. See CHOAM combat for examples and outstanding interaction audits.',
|
||||
'The Auditor is an additional strength-two leader. After using it in battle, CHOAM may inspect two randomly selected unused opposing Treachery Cards if it survives, or one if it dies, limited by the unused cards available. The opponent may pay CHOAM one spice per card that would be inspected to prevent the whole inspection; Karama can also cancel the power. Use the Auditor guide for the exact private choices and limits. Setup and inspection are supported in development games; complete combined play remains unfinished.',
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { KullDefaultProfile, KullDefaultEligibility } from './kull-default-profile';
|
||||
|
||||
const classic = new Set(['atreides', 'beneGesserit', 'emperor', 'fremen', 'guild', 'harkonnen']);
|
||||
const blocked = (reason: string): KullDefaultEligibility => ({ eligible: false, reason });
|
||||
|
||||
/** Public configuration for the existing Advanced printed-Kull prototype.
|
||||
* This does not select it, inspect private hands, validate fresh inventory, or
|
||||
* authorize a start. In particular, the genuine initializer remains the owner
|
||||
* of the saved-game, physical deck and readiness checks. */
|
||||
export function advancedKullLobbyProfile(game: KullDefaultProfile): KullDefaultEligibility {
|
||||
if (game.status !== 'lobby') return blocked('Advanced Kull applies only to a fresh lobby.');
|
||||
if (game.advanced !== true) return blocked('Choose Advanced preview rules for this Kull profile.');
|
||||
if (!Array.isArray(game.expansions) || game.expansions.length !== 2 ||
|
||||
!game.expansions.includes('choam') || !game.expansions.includes('ix'))
|
||||
return blocked('Advanced Kull currently needs exactly the CHOAM and Ix decks.');
|
||||
if (!Array.isArray(game.players) || game.players.length < 1 || game.players.length > 6 ||
|
||||
!game.players.some(player => player?.faction === 'choam') ||
|
||||
!game.players.every(player => !!player && typeof player.faction === 'string' &&
|
||||
(player.faction === 'choam' || classic.has(player.faction))) ||
|
||||
new Set(game.players.map(player => player.faction)).size !== game.players.length)
|
||||
return blocked('Advanced Kull currently needs CHOAM and up to five distinct classic factions.');
|
||||
const options = game.lobbyOptions, projected = game.lobbyModules;
|
||||
if (options?.leaderSkills || options?.ecazTreachery || projected?.leaderSkills || projected?.ecazTreachery ||
|
||||
projected?.nexusCards || projected?.discoveries || game.leaderSkills || game.ecazTreachery || game.nexusCards ||
|
||||
game.discoveryEnabled || game.discoveries || game.discoveryStash || game.greatMaker ||
|
||||
game.homeworlds || game.techTokens || game.strongholdCards)
|
||||
return blocked('Advanced Kull currently excludes optional modules.');
|
||||
return { eligible: true, reason: null };
|
||||
}
|
||||
|
||||
/** Eligibility remains independent of any host selection or opt-out. */
|
||||
export function advancedKullLobbyEligible(game: KullDefaultProfile): boolean {
|
||||
return advancedKullLobbyProfile(game).eligible;
|
||||
}
|
||||
+1
-1
@@ -4782,7 +4782,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 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. The supported roster includes Richese, Ixians, Tleilaxu, Ecaz, Moritani and classic factions with each seated faction’s deck and no other optional modules. It uses printed ordinary Karama. The preview withholds some structured questions and defers unfunded non-CHOAM Karama-dependent bids. A separate Advanced development profile supports Bene Gesserit substitutions and legal special powers. Existing lobbies and games are not retrofitted, and this warning does not certify complete rules.',
|
||||
'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 without Richese, existing current-lot ordinary bid, Revival, alliance and bribe Truthtrance questions are available, including supported grouped and mixed forms. A pending Kull response holds their controls while the original transaction resolves. The existing Richese Semuta preview does not yet admit these structured commitments; phase-wide bid and combined turn-action questions and 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.',
|
||||
|
||||
Reference in new issue
Block a user