Compose standalone E3 Nexus without Leader Skills

This commit is contained in:
Quintine committed 2026-10-07 10:18:19 +11:00
1 parent ec3d26f663
commit 185f3b37be
18 files changed
+1675 -38

No files matched your search

+5 -1
View File
@@ -4,6 +4,7 @@ import { acquireDuke, DUKE_VIDAL_ID, type DukeSource } from './duke-vidal';
import { nexusCardMode } from './nexus-cards';
import { nexusCleanPlayBlocked } from './nexus-play-boundary';
import { standaloneE3NexusLeaderSkillsProfile } from './leader-skill-profile';
import { standaloneE3NexusProfile } from './nexus-module-profile';
const SUPPORTED_FACTIONS: Partial<Record<FactionId, true>> = {
ecaz: true, moritani: true, atreides: true, harkonnen: true,
@@ -65,7 +66,7 @@ export function quoteNexusEcazDuke(g: Game, owner: string, automaticPending = fa
if (g.advanced && g.players.some(player => player.faction === 'harkonnen'))
blocked = 'Duke Vidal battle use is unavailable with Advanced Harkonnen.';
else if (!nexusEcazDukeModeSupported(g) || nexusCardMode('ecaz', holder.faction, roster) !== 'cunning')
blocked = 'Ecaz Nexus Cunning requires the paired Nexus-only roster or fresh standalone Ecaz Skills/Nexus profile.';
blocked = 'Ecaz Nexus Cunning requires the paired Nexus-only roster or a fresh supported standalone Ecaz Nexus profile.';
else if (holder.ally) blocked = 'Use Ecaz Nexus Cunning while unallied.';
else if (g.status !== 'playing' || g.phase !== 6)
blocked = 'Use Ecaz Nexus Cunning at the Battle phase boundary.';
@@ -87,6 +88,9 @@ export function quoteNexusEcazDuke(g: Game, owner: string, automaticPending = fa
}
export function nexusEcazDukeModeSupported(g: Game): boolean {
if (standaloneE3NexusProfile(g) && g.players.some(player => player.faction === 'ecaz') &&
!g.sandtrout && !(g.advanced && g.players.some(player => player.faction === 'harkonnen')))
return !!g.nexusCards?.cards && g.players.length >= 3;
if (g.leaderSkills && standaloneE3NexusLeaderSkillsProfile(g) &&
g.players.some(player => player.faction === 'ecaz') && !g.sandtrout)
return !!g.nexusCards?.cards && g.players.length >= 3;