Support Basic Kull and Leader Skills with Ecaz
Verify and publish checkpoint container / container (push) Successful in 10m49s
Verify and publish checkpoint container / container (push) Successful in 10m49s
This commit is contained in:
1 parent
4270b36be7
commit
4fba4860e1
11 files changed
+415
-13
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { homeworldLeaderSkillsProfile, independentTreacheryLeaderSkillsProfile, classicNexusLeaderSkillsProfile, classicTechLeaderSkillsProfile, guildBetrayalNexusLeaderSkillsProfile, mixedE1E2NexusLeaderSkillsProfile, mixedE3NexusLeaderSkillsProfile, nativeDiscoveryLeaderSkillsProfile, nativeExpansionLeaderSkillsProfile, nativeTechLeaderSkillsProfile, noOtherLeaderSkillModules, pairedE3NexusLeaderSkillsProfile, pairedNexusLeaderSkillsProfile, selectedNexusLeaderSkillsProfile, standaloneE3NexusLeaderSkillsProfile, strongholdLeaderSkillsProfile, type LeaderSkillProfile } from './leader-skill-profile';
|
||||
import { classicDiscoveryLeaderSkillsProfile } from './discovery-module-profile';
|
||||
import { nexusKullLeaderSkillsProfile } from './faction-module-profile';
|
||||
import { basicKullLeaderSkillsProfile, nexusKullLeaderSkillsProfile } from './faction-module-profile';
|
||||
export type BureaucratPaymentKind = 'auction' | 'shipment' | 'bribe' | 'revival';
|
||||
export type BureaucratPaymentSource = {
|
||||
event: string;
|
||||
@@ -44,7 +44,7 @@ export function bureaucratPaymentSignature(value: object): string {
|
||||
return JSON.stringify({ ...value, signature: undefined });
|
||||
}
|
||||
export function bureaucratPaymentModeSupported(game: LeaderSkillProfile): boolean {
|
||||
return nexusKullLeaderSkillsProfile(game) || independentTreacheryLeaderSkillsProfile(game) || (!game.homeworlds && game.expansions.length === 1 &&
|
||||
return basicKullLeaderSkillsProfile(game) || nexusKullLeaderSkillsProfile(game) || independentTreacheryLeaderSkillsProfile(game) || (!game.homeworlds && game.expansions.length === 1 &&
|
||||
(game.expansions[0] === 'choam' || game.expansions[0] === 'ix') &&
|
||||
pairedNexusLeaderSkillsProfile(game)) ||
|
||||
selectedNexusLeaderSkillsProfile(game) || mixedE3NexusLeaderSkillsProfile(game) || mixedE1E2NexusLeaderSkillsProfile(game) || pairedE3NexusLeaderSkillsProfile(game) ||
|
||||
|
||||
+24
-6
@@ -102,7 +102,7 @@ import { movementShipmentPreparations } from './movement-shipment-preparation';
|
||||
import { MovementClaimError, liveMovementPromises, movementEventAllowed, movementPromiseModeSupported, movementPromiseTargetAvailable, settleMovementEvent, finishMovementPromises, validMovementClaim, type MovementClaim, type MovementPromise } from './movement-promises';
|
||||
import { findMovementCompletion, type MovementCompletion } from './movement-promise-search';
|
||||
import { classicNexusModulesProfile, mixedE1E2NexusProfile, mixedE3NexusProfile, pairedE3NexusProfile, pairedNexusModulesProfile, singleE1E2NexusProfile, standaloneE3NexusProfile } from './nexus-module-profile';
|
||||
import { independentDiscoveryProfile, independentNexusProfile, nexusCoreProfile, nativeFactionTechProfile, selectedDiscoverySkillsSemutaProfile, selectedDiscoveryWithoutCardsProfile, selectedFactionStrongholdProfile, selectedIndependentCardsProfile, selectedNexusWithoutCardsProfile, selectedPhaseModuleRoster } from './faction-module-profile';
|
||||
import { basicKullLeaderSkillsProfile, independentDiscoveryProfile, independentNexusProfile, nexusCoreProfile, nexusKullLeaderSkillsProfile, nativeFactionTechProfile, selectedDiscoverySkillsSemutaProfile, selectedDiscoveryWithoutCardsProfile, selectedFactionStrongholdProfile, selectedIndependentCardsProfile, selectedNexusWithoutCardsProfile, selectedPhaseModuleRoster } from './faction-module-profile';
|
||||
import { homeworldOccupationLeaderSkillsProfile, homeworldOccupationModulesProfile, homeworldPhaseModulesProfile } from './homeworld-module-profile';
|
||||
import { RevivalPromiseError, revivalPromiseModeSupported, liveRevivalPromises, recordPromisedRevival,
|
||||
revivalPromisesSatisfied, validateRevivalPromises, type RevivalClaim, type RevivalPromise } from './revival-promises';
|
||||
@@ -7285,7 +7285,7 @@ function kullSemutaParentSupported(g: Game, frame?: NonNullable<Game['pendingKul
|
||||
const battle = g.battle;
|
||||
const use = frame?.intent.kind === 'ordinary' ? frame.intent.use : undefined;
|
||||
const nativeResponse = !!frame && !g.advanced &&
|
||||
(bareBasicSemutaProfile(g) || basicNexusKullSemutaProfile(g) ||
|
||||
(bareBasicSemutaProfile(g) || basicNexusKullSemutaProfile(g) || basicKullSkillsSemutaProfile(g) ||
|
||||
g.semutaRecruitsPreview === true && basicIndependentRecruitsSemutaProfile(g)) &&
|
||||
use?.kind === 'cancel' && JSON.stringify(use.response) === JSON.stringify(frame.resume.response) &&
|
||||
!frame.resume.decision && !frame.resume.pendingKarama && !frame.resume.phaseOpening;
|
||||
@@ -8252,6 +8252,9 @@ function basicNexusKullSemutaProfile(g: Game): boolean {
|
||||
return g.advanced === false && g.semutaPreview === true && g.kullPreview === true &&
|
||||
g.nexusKullPreview === true && nexusCoreProfile(g);
|
||||
}
|
||||
function basicKullSkillsSemutaProfile(g: Game): boolean {
|
||||
return g.semutaPreview === true && g.kullPreview === true && basicKullLeaderSkillsProfile(g);
|
||||
}
|
||||
/** Original classic occupation or a focused Advanced Tleilax SEND profile.
|
||||
* Other optional envelopes remain separate; no recorded game is redealt. */
|
||||
function semutaHomeworldRoster(g: Game): boolean {
|
||||
@@ -9944,7 +9947,7 @@ function semutaOfferSupported(
|
||||
!continuation.resume.response && !continuation.resume.decision &&
|
||||
!continuation.resume.pendingKarama && !continuation.resume.phaseOpening;
|
||||
if (continuation.kind === 'kullSuccessDiscard' || continuation.kind === 'kullCounterDiscard')
|
||||
return (g.semutaPreview === true && (bareBasicSemutaProfile(g) || basicNexusKullSemutaProfile(g)) ||
|
||||
return (g.semutaPreview === true && (bareBasicSemutaProfile(g) || basicNexusKullSemutaProfile(g) || basicKullSkillsSemutaProfile(g)) ||
|
||||
g.semutaRecruitsPreview === true && basicIndependentRecruitsSemutaProfile(g) &&
|
||||
(!g.pendingTreacheryDiscard || !!g.pendingTreacheryDiscard.reaction)) && g.advanced === false &&
|
||||
!!byFaction(g, 'richese') && kullSemutaParentSupported(kullSource(g, continuation.frame), continuation.frame) &&
|
||||
@@ -11455,10 +11458,24 @@ function startModules(state: Game): Game {
|
||||
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 && !g.nexusCards && !g.discoveryEnabled &&
|
||||
!g.homeworlds && (!g.techTokens || basicKullTechRoster(g) && !options.ecazTreachery) && !g.strongholdCards;
|
||||
!g.nexusCards && !g.discoveryEnabled &&
|
||||
!g.homeworlds && (!g.techTokens || basicKullTechRoster(g) && !options.ecazTreachery && !options.leaderSkills) && !g.strongholdCards;
|
||||
requireRule(supportedBasic || advancedKullLobbyEligible(state),
|
||||
'Kull preview needs CHOAM and Ix decks. Basic supports selected native factions, independent Ecaz Treachery Cards, or Tech Tokens with three to six CHOAM/classic factions. Advanced supports CHOAM and classic factions without optional modules.');
|
||||
if (options.leaderSkills) {
|
||||
requireRule(supportedBasic, 'Kull with Leader Skills currently requires a supported Basic native roster without Tech Tokens.');
|
||||
if (options.ecazTreachery) g.ecazTreachery = true;
|
||||
requireFreshBaseRuntime(g);
|
||||
requireFreshFactionInventory(g);
|
||||
const seed = structuredClone(g);
|
||||
seed.leaderSkills = createLeaderSkills(random);
|
||||
requireRule(basicKullLeaderSkillsProfile(seed), 'This Kull and Leader Skills composition is unavailable.');
|
||||
const initialized = initializeSetupGameForAudit(seed, false, false, false, false, true, false, true, seed.ecazTreachery === true);
|
||||
initialized.kullPreview = true;
|
||||
if (byFaction(initialized, 'richese')) initialized.semutaPreview = true;
|
||||
if (byFaction(initialized, 'ecaz')) initialized.ecazOccupyPreview = true;
|
||||
return initialized;
|
||||
}
|
||||
if (options.ecazTreachery) {
|
||||
requireRule(supportedBasic, 'Kull with independent Ecaz cards currently needs the supported Basic native roster.');
|
||||
const initialized = initializeEcazTreacheryGameForAudit(g);
|
||||
@@ -13742,6 +13759,7 @@ function initializeFactionExpansionsGame(state: Game, semuta = false): Game {
|
||||
return initialized;
|
||||
}
|
||||
function ecazOccupyCompositionSupported(g: Game): boolean {
|
||||
if (byFaction(g, 'ecaz') && (basicKullLeaderSkillsProfile(g) || nexusKullLeaderSkillsProfile(g))) return true;
|
||||
if (homeworldPhaseModulesProfile(g) && byFaction(g, 'ecaz')) return true;
|
||||
// Native Basic uses the same physical coalition and selected decks.
|
||||
// Family/roster checks below remain authoritative; optional configurations
|
||||
@@ -13884,7 +13902,7 @@ function basicIndependentRecruitsSemutaProfile(g: Game): boolean {
|
||||
* Recruits reaction without combining the separate legacy preview markers. */
|
||||
function independentRecruitsSemutaEnabled(g: Game): boolean {
|
||||
return g.semutaRecruitsPreview === true && basicIndependentRecruitsSemutaProfile(g) ||
|
||||
g.ecazTreachery === true && basicNexusKullSemutaProfile(g);
|
||||
g.ecazTreachery === true && (basicNexusKullSemutaProfile(g) || basicKullSkillsSemutaProfile(g));
|
||||
}
|
||||
function semutaCardProducerEnabled(g: Game): boolean {
|
||||
return g.semutaPreview === true || g.semutaRecruitsPreview === true && basicIndependentRecruitsSemutaProfile(g);
|
||||
|
||||
@@ -117,6 +117,36 @@ function basicNativeNexusCore(game: NexusCoreConfiguration): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Basic Kull and physical Leader Skills without Nexus. The same public
|
||||
* roster is used while the fresh setup is dealt and after Kull is stamped. */
|
||||
export function basicKullLeaderSkillsProfile(game: NexusCoreConfiguration): boolean {
|
||||
const players = game.players;
|
||||
if (game.advanced !== false || !game.leaderSkills || !players ||
|
||||
players.length < 2 || players.length > 6 ||
|
||||
(game.expansions.length !== 2 && game.expansions.length !== 3) ||
|
||||
!game.expansions.includes('ix') || !game.expansions.includes('choam') ||
|
||||
game.expansions.some(id => id !== 'ix' && id !== 'choam' && id !== 'ecaz') ||
|
||||
new Set(game.expansions).size !== game.expansions.length ||
|
||||
!players.some(player => player.faction === 'choam') ||
|
||||
game.nexusCards || game.nexusKullPreview || game.homeworlds || game.techTokens ||
|
||||
game.strongholdCards || game.discoveryEnabled || game.discoveries ||
|
||||
game.discoveryStash || game.greatMaker || game.advancedPreview ||
|
||||
game.guildBetrayalPreview || game.richeseBetrayalPreview ||
|
||||
game.nexusIxianReplacementPreview || game.nexusIxianBetrayalPreview ||
|
||||
game.nexusHarkonnenBetrayalPreview || game.moritaniAssassinatePreview ||
|
||||
(game.semutaPreview && (game.semutaPreview !== true ||
|
||||
!players.some(player => player.faction === 'richese'))) ||
|
||||
(game.kullPreview && game.kullPreview !== true)) return false;
|
||||
const factions = new Set<string>();
|
||||
for (const player of players) {
|
||||
if (factions.has(player.faction)) return false;
|
||||
factions.add(player.faction);
|
||||
const faction = FACTIONS.find(candidate => candidate.id === player.faction);
|
||||
if (!faction || (faction.expansion !== 'base' && !game.expansions.includes(faction.expansion))) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Basic Nexus/Kull with original Leader Skills. Recognize the fresh setup
|
||||
* before its Kull stamps and live games after both stamps alike. */
|
||||
export function nexusKullLeaderSkillsProfile(game: NexusCoreConfiguration): boolean {
|
||||
|
||||
@@ -64,7 +64,7 @@ export function kullDefaultProfile(game: KullDefaultProfile): KullDefaultEligibi
|
||||
projected?.ecazTreachery || projected?.discoveries || game.leaderSkills || game.ecazTreachery ||
|
||||
game.discoveryEnabled || game.discoveries || game.discoveryStash || game.greatMaker ||
|
||||
game.homeworlds || game.techTokens || game.strongholdCards || game.sandtrout)
|
||||
return blocked('Kull with Nexus currently requires Basic rules, the Ix and CHOAM decks and no other optional modules; the Ecaz deck may also be selected.');
|
||||
return blocked('Automatic Kull is unavailable for this Nexus combination. Select Kull explicitly if the chosen modules support it.');
|
||||
return { eligible: true, reason: null };
|
||||
}
|
||||
if (options?.leaderSkills || projected?.leaderSkills ||
|
||||
@@ -72,7 +72,7 @@ export function kullDefaultProfile(game: KullDefaultProfile): KullDefaultEligibi
|
||||
game.discoveryEnabled || game.discoveries || game.discoveryStash || game.greatMaker ||
|
||||
game.homeworlds || game.strongholdCards ||
|
||||
(game.techTokens && (!basicKullTechRoster(game) || options?.ecazTreachery || projected?.ecazTreachery)))
|
||||
return blocked('Automatic Kull supports independent Ecaz Treachery Cards, or Tech Tokens with three to six CHOAM/classic factions and the Ix and CHOAM decks.');
|
||||
return blocked('Automatic Kull is unavailable for this combination. Select Kull explicitly if the chosen modules support it.');
|
||||
return { eligible: true, reason: null };
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { FACTIONS } from './catalog';
|
||||
import { independentDiscoveryProfile, independentNexusProfile, classicNexusCoreProfile, nexusCoreProfile, nexusKullLeaderSkillsProfile, mixedE3NexusRosterProfile, selectedNexusWithoutCardsProfile } from './faction-module-profile';
|
||||
import { independentDiscoveryProfile, independentNexusProfile, classicNexusCoreProfile, nexusCoreProfile, basicKullLeaderSkillsProfile, nexusKullLeaderSkillsProfile, mixedE3NexusRosterProfile, selectedNexusWithoutCardsProfile } from './faction-module-profile';
|
||||
import { classicDiscoveryLeaderSkillsProfile, selectedDiscoveryLeaderSkillsProfile } from './discovery-module-profile';
|
||||
|
||||
/** Public configuration only; never gate a skill on a hidden card or random deal. */
|
||||
@@ -498,6 +498,7 @@ export function homeworldLeaderSkillsProfile(game: LeaderSkillProfile): boolean
|
||||
|
||||
/** Independent cards with registered selected-family all14 setup and original module/role guards. */
|
||||
export function independentTreacheryLeaderSkillsProfile(game: LeaderSkillProfile): boolean {
|
||||
if (game.ecazTreachery === true && basicKullLeaderSkillsProfile(game)) return true;
|
||||
if (independentNexusProfile(game) || independentDiscoveryProfile(game)) return true;
|
||||
if (game.ecazTreachery !== true || game.expansions.length > 3 ||
|
||||
typeof game.advanced !== 'boolean' || !game.players ||
|
||||
@@ -534,7 +535,7 @@ export function independentTreacheryLeaderSkillsProfile(game: LeaderSkillProfile
|
||||
|
||||
/** Shared by rule quotes, controls and minimal legal bot participation. */
|
||||
export function ordinaryLeaderSkillModeSupported(game: LeaderSkillProfile): boolean {
|
||||
return nexusKullLeaderSkillsProfile(game) || independentTreacheryLeaderSkillsProfile(game) || (noOtherLeaderSkillModules(game) &&
|
||||
return basicKullLeaderSkillsProfile(game) || nexusKullLeaderSkillsProfile(game) || independentTreacheryLeaderSkillsProfile(game) || (noOtherLeaderSkillModules(game) &&
|
||||
(!game.expansions.length || nativeExpansionLeaderSkillsProfile(game) ||
|
||||
(game.expansions.length === 1 && game.expansions[0] === 'choam'))) ||
|
||||
classicTechLeaderSkillsProfile(game) || nativeTechLeaderSkillsProfile(game) ||
|
||||
|
||||
+1
-1
@@ -4927,7 +4927,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. Basic supports Richese, Ixians, Tleilaxu, Ecaz, Moritani and classic factions with each seated faction’s deck, optionally with independent Ecaz Treachery Cards. Tech Tokens are separately supported with three to six CHOAM and classic factions; other optional modules are excluded. 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 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, optionally with independent Ecaz Treachery Cards. The host may explicitly select Kull alongside Leader Skills, with or without those independent cards. Tech Tokens are separately supported with three to six CHOAM and classic factions; other optional modules are excluded. 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 supported Basic games with independent Ecaz Treachery Cards and Richese, Semuta may claim the discarded successful Kull, a distinct Karama counter, or the original shipment Karama when Kull declines. The original attempt continues under its existing rules; other nested reactions 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 supported profiles. Some structured questions remain unavailable when Tech Tokens are selected. 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.',
|
||||
|
||||
Reference in new issue
Block a user