Connect native Fremen Nexus effects across selected modules

Retain actual Cunning appearances, paid Karama and typed remote riding with optional Sandmaster collection and source-parent HMS entry. Preserve Betrayal movement sources and apply its declared worm restriction to Great Maker reserve riding without suppressing votes or casualties. Completed Maker history no longer blocks a later ordinary offer.

Validation: frozen 14-file86/86, types/lint/build, nine finite original-action/rendered-control programmes, four minimal legal policies. Discovery destination proof remains focused quotes pending actual arrival; full combinations, assurance and deployed acceptance remain required. No saved-game, restart or deployment operation.
This commit is contained in:
Quintine committed 2026-10-18 11:35:59 +11:00
1 parent bb9d292c4c
commit b4157aaa9b
20 files changed
+1349 -41

No files matched your search

+23
View File
@@ -1,4 +1,5 @@
import type { Game, GameView } from './engine';
import { TERRITORIES, splitLocation } from './board';
import { faction } from './catalog';
import { nativeExpansionLeaderSkillsProfile } from './leader-skill-profile';
import { sandmasterDestinationCollection, sandmasterLeader, sandmasterModeSupported,
@@ -25,3 +26,25 @@ export function sandmasterWormCollection(
return blocked('Sandmaster worm collection with other optional modules is still being integrated.');
return sandmasterDestinationCollection(game, player, decision.territory, destination, sector, selectedPile);
}
/** Cunning is still a worm ride; its selected source is the remote desert,
* rather than the territory of the already resolved empty appearance. */
export function sandmasterCunningCollection(
game: Game | GameView,
player: string,
source: string,
destination: string,
sector: number,
selectedPile?: string,
decision: Game['decision'] | GameView['decision'] = game.decision,
): SandmasterDestinationCollection | null {
const leader = sandmasterLeader(game, player);
const rider = game.players.find(p => p.id === player);
if (!leader || game.phase !== 1 || decision?.kind !== 'nexusFremenCunningRide' ||
decision.player !== player || rider?.faction !== 'fremen') return null;
if (!TERRITORIES.some(t => t.id === source && t.type === 'sand') ||
!Object.entries(rider.forces).some(([key, amount]) => amount > 0 &&
splitLocation(key).territory === source && splitLocation(key).sector !== game.storm))
return { leader, key: null, before: 0, piles: [], blocked: 'Choose an occupied desert source for this remote ride.' };
return sandmasterDestinationCollection(game, player, source, destination, sector, selectedPile);
}