Admit genuine Basic Tleilaxu/base setup with the full fourteen-skill deck, Ix card inventories and native three Face Dancers. Share public profile guards across existing skill effects while retaining public-start and Advanced gates. Record native own-leader skill offers at successful revival commitment so automatic Tleilaxu response chains preserve the optional private draw. Connect Rihani to unrevealed Face Dancer exchange with exact physical/status custody, private controls and existing legal AI choices. Release completed Rihani's live snapshot only after validated Face Dance admission; keep signed history and current census checks. Zoal Smuggler uses opposing printed disc value at reveal, excluding opposing skill bonuses and his separate revival value. Add genuine setup, response/cancellation, private choice, custody, Face Dance reset, Zoal, legal AI and authenticated concurrent recovery regressions. Add a reproducible two-through-six-player sample profile and saved continuation. Preserve unresolved skill effects, foreign-ghola boundaries and delayed AI tuning. Validation: types, lint, 5,058 offline tests and production build passed. Five full games completed with zero rejected actions and 74 JSON restores. Browser QA CRY4DD4J used genuine setup and an explicitly conserved staged battle; real Rihani draw/exchange and same-state refresh passed on mobile and desktop. Screenshot capture timed out; full visual acceptance remains open. No HTTP endpoint/auth/storage implementation changed; authenticated SQLite recovery was verified. All 1,581 prior rooms, 3,349 seats and auxiliary records were preserved. One new QA room/seat remains. No server restart, database reset or automation.
49 lines
2.2 KiB
TypeScript
49 lines
2.2 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'));
|
|
}
|
|
|
|
export function basicExpansionLeaderSkillsProfile(game: LeaderSkillProfile): boolean {
|
|
return basicMoritaniLeaderSkillsProfile(game) || basicTleilaxuLeaderSkillsProfile(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));
|
|
}
|