Compose classic Homeworld Skills and Discovery with physical custody

This commit is contained in:
Quintine committed 2026-10-06 18:07:41 +11:00
1 parent 4a3bd8fe90
commit e2dcebca35
24 files changed
+1426 -54

No files matched your search

+21
View File
@@ -9,8 +9,29 @@ export function discoveryModuleProfile(game: FactionModuleProfile): boolean {
discoveryModeSupported(game);
}
/** Original classic Homeworld/Discovery; live Arrakis-only token frames are expected. */
export function classicHomeworldDiscoveryProfile(game: FactionModuleProfile): boolean {
if (!game.homeworlds || typeof game.advanced !== 'boolean' || game.discoveryEnabled !== true ||
game.expansions.length || game.players.length < 2 || game.players.length > 6 ||
game.leaderSkills || game.nexusCards || game.techTokens || game.strongholdCards ||
game.ecazTreachery || game.semutaPreview || game.advancedPreview || game.kullPreview ||
game.nexusKullPreview || game.guildBetrayalPreview || game.richeseBetrayalPreview ||
game.nexusIxianReplacementPreview || game.nexusIxianBetrayalPreview ||
game.nexusHarkonnenBetrayalPreview) return false;
for (let i = 0; i < game.players.length; i++) {
const player = game.players[i];
for (let j = 0; j < i; j++) if (game.players[j].faction === player.faction) return false;
let classic = false;
for (const faction of FACTIONS)
if (faction.id === player.faction) { classic = faction.expansion === 'base'; break; }
if (!classic) return false;
}
return true;
}
/** The same roster/module contract during play; live Discovery frames are expected. */
export function discoveryModeSupported(game: FactionModuleProfile): boolean {
if (classicHomeworldDiscoveryProfile(game)) return true;
if (typeof game.advanced !== 'boolean' || game.discoveryEnabled !== true ||
game.players.length < 2 || game.players.length > 6 ||
(game.techTokens && game.players.length < 3) || game.expansions.length > 2 ||