Compose original classic and paired Nexus Discovery modules
This commit is contained in:
1 parent
9e8c718739
commit
c8a6d0bb3c
20 files changed
+1603
-44
No files matched your search
@@ -89,3 +89,33 @@ export function classicDiscoveryNexusProfile(game: FactionModuleProfile): boolea
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Both original natives in one E1/E2 Nexus/Discovery family, without Skills.
|
||||
* Original setup owns undealt inventories; live Discovery frames are expected. */
|
||||
export function pairedDiscoveryNexusProfile(game: FactionModuleProfile): boolean {
|
||||
if (typeof game.advanced !== 'boolean' || game.discoveryEnabled !== true ||
|
||||
!game.nexusCards || game.expansions.length !== 1 ||
|
||||
game.players.length < 2 || game.players.length > 6 ||
|
||||
(game.techTokens && game.players.length < 3) ||
|
||||
(game.strongholdCards && !game.advanced) || game.leaderSkills || game.homeworlds ||
|
||||
game.ecazTreachery || game.semutaPreview || game.advancedPreview || game.kullPreview ||
|
||||
game.nexusKullPreview || game.guildBetrayalPreview || game.richeseBetrayalPreview ||
|
||||
game.nexusIxianReplacementPreview || game.nexusIxianBetrayalPreview ||
|
||||
game.nexusHarkonnenBetrayalPreview) return false;
|
||||
const expansion = game.expansions[0];
|
||||
if (expansion !== 'ix' && expansion !== 'choam') return false;
|
||||
const primary = expansion === 'ix' ? 'ixians' : 'choam';
|
||||
const secondary = expansion === 'ix' ? 'tleilaxu' : 'richese';
|
||||
let hasPrimary = false, hasSecondary = 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 family: string | undefined;
|
||||
for (const faction of FACTIONS)
|
||||
if (faction.id === player.faction) { family = faction.expansion; break; }
|
||||
if (family !== 'base' && family !== expansion) return false;
|
||||
if (player.faction === primary) hasPrimary = true;
|
||||
if (player.faction === secondary) hasSecondary = true;
|
||||
}
|
||||
return hasPrimary && hasSecondary;
|
||||
}
|
||||
Reference in new issue
Block a user