Guard Duke grants using public capture uncertainty
Verify and publish checkpoint container / container (push) Successful in 11m21s
Verify and publish checkpoint container / container (push) Successful in 11m21s
This commit is contained in:
1 parent
5f4eeee4f1
commit
57e7611468
15 files changed
+500
-19
No files matched your search
@@ -0,0 +1,35 @@
|
||||
import { selectedPhaseModuleRoster, type FactionModuleProfile } from './faction-module-profile';
|
||||
|
||||
/** Public, monotonic uncertainty about a possible concealed Duke capture.
|
||||
* Fresh games explicitly begin false. True, absent, or malformed values never
|
||||
* establish safety; in particular, legacy saves are not silently converted. */
|
||||
export type DukeCapturePolicyContext = Omit<Partial<FactionModuleProfile>, 'players'> & {
|
||||
advanced: boolean;
|
||||
players: readonly { faction: string }[];
|
||||
dukeCaptureUncertain?: boolean;
|
||||
};
|
||||
|
||||
export const DUKE_CAPTURE_UNCERTAIN_BLOCK =
|
||||
'Duke Vidal acquisition is unavailable while Harkonnen capture history may be unresolved.';
|
||||
|
||||
/** This result depends only on public table configuration and the public
|
||||
* uncertainty receipt, never on actual Duke custody or capture identity. */
|
||||
export function dukeCaptureUncertaintyBlock(g: DukeCapturePolicyContext): string | null {
|
||||
return g.advanced && g.players.some(player => player.faction === 'harkonnen') &&
|
||||
g.dukeCaptureUncertain !== false ? DUKE_CAPTURE_UNCERTAIN_BLOCK : null;
|
||||
}
|
||||
|
||||
/** Original native faction tables with no selected optional module. Native
|
||||
* Ecaz Occupy and Moritani assassination stamps are faction rules, not modules. */
|
||||
export function plainAdvancedEcazDukeProfile(g: DukeCapturePolicyContext): boolean {
|
||||
return g.advanced === true && Array.isArray(g.expansions) && g.expansions.includes('ecaz') &&
|
||||
selectedPhaseModuleRoster({ expansions: g.expansions, players: g.players }) &&
|
||||
g.players.some(player => player.faction === 'ecaz') &&
|
||||
g.players.some(player => player.faction === 'harkonnen') &&
|
||||
!g.leaderSkills && !g.homeworlds && !g.nexusCards && !g.techTokens && !g.strongholdCards &&
|
||||
!g.discoveryEnabled && !g.discoveries && !g.discoveryStash && !g.greatMaker &&
|
||||
!g.ecazTreachery && !g.semutaPreview && !g.advancedPreview && !g.kullPreview &&
|
||||
!g.nexusKullPreview && !g.guildBetrayalPreview && !g.richeseBetrayalPreview &&
|
||||
!g.nexusIxianReplacementPreview && !g.nexusIxianBetrayalPreview && !g.nexusHarkonnenBetrayalPreview &&
|
||||
!g.spiceBankerIncomePreview;
|
||||
}
|
||||
Reference in new issue
Block a user