Compose classic Homeworld Nexus optional modules

This commit is contained in:
Quintine committed 2026-10-07 07:14:52 +11:00
1 parent b5f5de5c83
commit c7073dc6b6
21 files changed
+1376 -71

No files matched your search

+4 -4
View File
@@ -37,7 +37,7 @@ export function noOtherLeaderSkillModules(game: LeaderSkillProfile): boolean {
function nexusLeaderSkillModulesSupported(game: LeaderSkillProfile, assassination = false, discovery = false): boolean {
return !!game.nexusCards && typeof game.advanced === 'boolean' &&
!!game.players && game.players.length >= 2 && game.players.length <= 6 &&
!game.homeworlds &&
(!game.homeworlds || game.expansions.length === 0) &&
((discovery && game.discoveryEnabled === true) ||
(!game.discoveries && !game.discoveryEnabled && !game.discoveryStash && !game.greatMaker)) &&
(!game.techTokens || game.players.length >= 3) &&
@@ -51,7 +51,7 @@ function nexusLeaderSkillModulesSupported(game: LeaderSkillProfile, assassinatio
!game.spiceBankerIncomePreview;
}
/** Fresh classic Nexus/Skills, with original Tech and Advanced Strongholds; native overlays stay separate. */
/** Fresh classic Nexus/Skills, optionally Homeworlds/Discovery/Tech/Advanced Strongholds. */
export function classicNexusLeaderSkillsProfile(game: LeaderSkillProfile): boolean {
if (game.expansions.length || !nexusLeaderSkillModulesSupported(game, false, true)) return false;
const players = game.players!;
@@ -385,7 +385,7 @@ function homeworldLeaderSkillModulesSupported(game: LeaderSkillProfile): boolean
const players = game.players;
if (!game.homeworlds || typeof game.advanced !== 'boolean' ||
!players || players.length < 2 || players.length > 6 ||
game.nexusCards ||
(game.nexusCards && !classicNexusLeaderSkillsProfile(game)) ||
(game.discoveryEnabled !== true && (game.discoveryEnabled || game.discoveries || game.discoveryStash || game.greatMaker)) ||
(game.techTokens && players.length < 3) || (game.strongholdCards && !game.advanced) ||
game.ecazTreachery ||
@@ -399,7 +399,7 @@ function homeworldLeaderSkillModulesSupported(game: LeaderSkillProfile): boolean
return true;
}
/** Original classic or existing native Homeworld/Skills, optionally Discovery/Tech/Strongholds. */
/** Original Homeworld/Skills; only classic rosters additionally compose Nexus. */
export function homeworldLeaderSkillsProfile(game: LeaderSkillProfile): boolean {
if (!game.homeworlds) return false;
if (game.expansions.length) return nativeExpansionLeaderSkillsProfile(game);