Compose classic Discovery skills and Advanced Orgiz collection
This commit is contained in:
1 parent
1947e354ce
commit
c12b463439
21 files changed
+1107
-83
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { FACTIONS } from './catalog';
|
||||
import type { FactionModuleProfile } from './faction-module-profile';
|
||||
import type { LeaderSkillProfile } from './leader-skill-profile';
|
||||
|
||||
/** Public unused-lobby admission only. The original initializer owns physical
|
||||
* decks, tokens, leader/force inventories and all mandatory setup choices. */
|
||||
@@ -43,3 +44,26 @@ export function discoveryModeSupported(game: FactionModuleProfile): boolean {
|
||||
}
|
||||
return (!e3 || native === 1) && !(game.advanced && moritani && harkonnen);
|
||||
}
|
||||
|
||||
/** Fresh or live classic all-fourteen Skills/Discovery, optionally original Tech.
|
||||
* Physical undealt components and existing inventories belong to the initializer. */
|
||||
export function classicDiscoveryLeaderSkillsProfile(game: LeaderSkillProfile): boolean {
|
||||
const players = game.players;
|
||||
if (typeof game.advanced !== 'boolean' || game.discoveryEnabled !== true ||
|
||||
game.expansions.length || !players || players.length < 2 || players.length > 6 ||
|
||||
(game.techTokens && players.length < 3) || game.strongholdCards ||
|
||||
game.homeworlds || game.nexusCards || game.ecazTreachery || game.semutaPreview ||
|
||||
game.moritaniAssassinatePreview || game.advancedPreview || game.kullPreview ||
|
||||
game.nexusKullPreview || game.guildBetrayalPreview || game.richeseBetrayalPreview ||
|
||||
game.nexusIxianReplacementPreview || game.nexusIxianBetrayalPreview ||
|
||||
game.nexusHarkonnenBetrayalPreview || game.mentatQuestionPreview ||
|
||||
game.spiceBankerIncomePreview) return false;
|
||||
for (let i = 0; i < players.length; i++) {
|
||||
for (let j = 0; j < i; j++) if (players[j].faction === players[i].faction) return false;
|
||||
let classic = false;
|
||||
for (const faction of FACTIONS)
|
||||
if (faction.id === players[i].faction) { classic = faction.expansion === 'base'; break; }
|
||||
if (!classic) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Reference in new issue
Block a user