Connect owned Sandmaster destination pile choices

This commit is contained in:
Quintine committed 2026-10-09 04:51:12 +11:00
1 parent 24863480cb
commit 0040ed1921
17 files changed
+458 -89

No files matched your search

+3 -2
View File
@@ -11,16 +11,17 @@ export function sandmasterWormCollection(
destination: string,
sector: number,
decision: Game['decision'] | GameView['decision'] = game.decision,
selectedPile?: string,
): SandmasterDestinationCollection | null {
const leader = sandmasterLeader(game, player);
if (!leader || game.phase !== 1 || decision?.kind !== 'wormRide' ||
decision.player !== player ||
game.players.find(p => p.id === player)?.faction !== 'fremen') return null;
const blocked = (reason: string): SandmasterDestinationCollection =>
({ leader, key: null, before: 0, blocked: reason });
({ leader, key: null, before: 0, piles: [], blocked: reason });
if (!sandmasterModeSupported(game) || game.ecazTreachery ||
!(nativeExpansionLeaderSkillsProfile(game) ||
game.players.every(p => faction(p.faction).expansion === 'base')))
return blocked('Sandmaster worm collection with other optional modules is still being integrated.');
return sandmasterDestinationCollection(game, player, decision.territory, destination, sector);
return sandmasterDestinationCollection(game, player, decision.territory, destination, sector, selectedPile);
}