Connect staged Advanced classic group alliances
Verify and publish checkpoint container / container (push) Successful in 10m53s
Verify and publish checkpoint container / container (push) Successful in 10m53s
This commit is contained in:
1 parent
ef92ddf2b9
commit
3ba9087405
22 files changed
+561
-44
No files matched your search
@@ -12,6 +12,7 @@ import { isDiscoveryLocationId, JACURUTU_SIETCH } from './discoveries';
|
||||
import type { TwoPlayerControllers } from './two-player-controllers';
|
||||
import { allianceVictoryTarget } from './alliance-victory-option';
|
||||
import { coalitionGroups } from './coalition-alliance';
|
||||
import { FACTIONS } from './catalog';
|
||||
|
||||
export type StrongholdProgress = {
|
||||
player: string;
|
||||
@@ -38,9 +39,8 @@ function requireProgress(
|
||||
if (!condition) throw new VictoryProgressError(message);
|
||||
}
|
||||
|
||||
/** Ordered side membership for the bounded coalition victory quote. Three-member
|
||||
* Advanced and Ecaz combinations remain unavailable until their board rules
|
||||
* and faction interactions are integrated. No game mode is enabled here. */
|
||||
/** Ordered side membership for the bounded coalition victory quote. Advanced
|
||||
* larger groups are scoped to classic rosters; no game mode is enabled here. */
|
||||
export function victoryMembers(g: BoardContext, player: string): string[] {
|
||||
const seat = g.players.find(candidate => candidate.id === player);
|
||||
requireProgress(seat, 'Victory needs a seated player.');
|
||||
@@ -48,8 +48,9 @@ export function victoryMembers(g: BoardContext, player: string): string[] {
|
||||
return g.order.filter(member => member === player || member === seat.ally);
|
||||
const groups = coalitionGroups(g.players, g.coalitionState);
|
||||
requireProgress(!groups.some(group => group.members.length >= 3 &&
|
||||
(g.advanced || g.players.some(candidate => candidate.faction === 'ecaz'))),
|
||||
'Three-member victory rules require Basic play without Ecaz.');
|
||||
(g.players.some(candidate => candidate.faction === 'ecaz') || g.advanced &&
|
||||
g.players.some(candidate => !FACTIONS.some(faction => faction.id === candidate.faction && faction.expansion === 'base')))),
|
||||
'Larger alliance victory rules require a supported roster without Ecaz.');
|
||||
const group = groups.find(candidate => candidate.members.includes(player));
|
||||
return g.order.filter(member => member === player || !!group?.members.includes(member));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user