Connect ordinary Leader Skill paths to Basic CHOAM with base opponents, the real 35-card Treachery deck and all fourteen skills. Retain wider development initializer behavior and existing mode/publication gates. Pause a declared sale until its Ghola revival and private skill choice finish. Bind the actual revived leader, offer event and completion to the saved interruption. Preserve nested Truthtrance disposal and exact sale responses; canceling a resumed sale leaves the free revival completed. Keep force-only and retained-skill revivals free of replacement offers. Add genuine setup, native card-sale, mandatory disposal, private custody, corruption and concurrent authenticated recovery regressions plus a two-through-six-player complete-game sample profile. Record the unresolved Sandmaster/native-HMS eligibility question without inventing a bonus. Validation: types, lint, 5101 offline tests and production build passed. Five genuine 2-6 player CHOAM Skills games completed with zero rejected actions. Independent review and 50 focused compatibility tests passed. Browser Y2UJGMCS exercised real setup, Ghola draw, exact private refresh, mobile assignment and resumed sale paying two spice once. Screenshot capture timed out; full visual acceptance remains open. All 1,583 prior rooms, 3,351 seats and auxiliary records remain intact; one QA room and human seat were added. No restart, reset or automation. Full AI implementation and tuning remain deferred until all non-AI features are complete, then target roughly 75% for each adjacent tier.
68 lines
3.3 KiB
TypeScript
68 lines
3.3 KiB
TypeScript
import { FACTIONS } from './catalog';
|
|
|
|
/** Public configuration only; never gate a skill on a hidden card or random deal. */
|
|
export type LeaderSkillProfile = {
|
|
expansions: readonly string[];
|
|
advanced?: boolean;
|
|
players?: readonly { faction: string }[];
|
|
homeworlds?: unknown;
|
|
nexusCards?: unknown;
|
|
discoveries?: unknown;
|
|
discoveryEnabled?: unknown;
|
|
strongholdCards?: unknown;
|
|
techTokens?: unknown;
|
|
ecazTreachery?: unknown;
|
|
};
|
|
|
|
export function noOtherLeaderSkillModules(game: LeaderSkillProfile): boolean {
|
|
return !game.homeworlds && !game.nexusCards && !game.discoveries &&
|
|
!game.discoveryEnabled && !game.strongholdCards && !game.techTokens && !game.ecazTreachery;
|
|
}
|
|
|
|
/** Bounded integration of the ordinary Moritani roster, not Advanced assassination. */
|
|
export function basicMoritaniLeaderSkillsProfile(game: LeaderSkillProfile): boolean {
|
|
return game.advanced === false && game.expansions.length === 1 &&
|
|
game.expansions[0] === 'ecaz' && noOtherLeaderSkillModules(game) &&
|
|
!!game.players?.some(player => player.faction === 'moritani') &&
|
|
game.players.every(player => player.faction === 'moritani' ||
|
|
FACTIONS.some(faction => faction.id === player.faction && faction.expansion === 'base'));
|
|
}
|
|
|
|
/** Native Basic Tleilaxu, including Face Dancers; foreign gholas are Advanced. */
|
|
export function basicTleilaxuLeaderSkillsProfile(game: LeaderSkillProfile): boolean {
|
|
return game.advanced === false && game.expansions.length === 1 &&
|
|
game.expansions[0] === 'ix' && noOtherLeaderSkillModules(game) &&
|
|
!!game.players?.some(player => player.faction === 'tleilaxu') &&
|
|
game.players.every(player => player.faction === 'tleilaxu' ||
|
|
FACTIONS.some(faction => faction.id === player.faction && faction.expansion === 'base'));
|
|
}
|
|
|
|
/** Basic Ixians, optionally with native Tleilaxu, keep the ordinary Ix inventories. */
|
|
export function basicIxLeaderSkillsProfile(game: LeaderSkillProfile): boolean {
|
|
return game.advanced === false && game.expansions.length === 1 &&
|
|
game.expansions[0] === 'ix' && noOtherLeaderSkillModules(game) &&
|
|
!!game.players?.some(player => player.faction === 'ixians') &&
|
|
game.players.every(player => ['ixians', 'tleilaxu'].includes(player.faction) ||
|
|
FACTIONS.some(faction => faction.id === player.faction && faction.expansion === 'base'));
|
|
}
|
|
|
|
/** Basic CHOAM's ordinary leaders and economy; Auditor belongs to Advanced. */
|
|
export function basicChoamLeaderSkillsProfile(game: LeaderSkillProfile): boolean {
|
|
return game.advanced === false && game.expansions.length === 1 &&
|
|
game.expansions[0] === 'choam' && noOtherLeaderSkillModules(game) &&
|
|
!!game.players?.some(player => player.faction === 'choam') &&
|
|
game.players.every(player => player.faction === 'choam' ||
|
|
FACTIONS.some(faction => faction.id === player.faction && faction.expansion === 'base'));
|
|
}
|
|
|
|
export function basicExpansionLeaderSkillsProfile(game: LeaderSkillProfile): boolean {
|
|
return basicMoritaniLeaderSkillsProfile(game) || basicTleilaxuLeaderSkillsProfile(game) ||
|
|
basicIxLeaderSkillsProfile(game) || basicChoamLeaderSkillsProfile(game);
|
|
}
|
|
|
|
/** Shared by rule quotes, controls and minimal legal bot participation. */
|
|
export function ordinaryLeaderSkillModeSupported(game: LeaderSkillProfile): boolean {
|
|
return noOtherLeaderSkillModules(game) &&
|
|
(!game.expansions.length || basicExpansionLeaderSkillsProfile(game));
|
|
}
|