Prototype Fremen Nexus free Revival for base factions

This commit is contained in:
Quintine committed 2026-09-27 14:48:31 +10:00
1 parent 5c1c944a4f
commit 1e690b7062
10 files changed
+350 -7

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
import type { Action, GameView } from './engine';
/** Server-owned private offer binds the selected physical group and turn. */
export function nexusFremenRevivalAction(game: GameView, elite: number): Action | null {
const offer = game.nexusFremenRevival;
const owner = game.players.find(player => player.id === game.me);
if (!offer || !owner || owner.ally || game.nexusCards?.card !== 'fremen' ||
game.players.some(player => player.faction === 'fremen') ||
game.status !== 'playing' || game.phase !== 4 ||
game.response || game.decision || game.truthtrance || game.phaseOpening ||
game.automaticContinuationPending || game.nexusCards.waiting.length ||
game.nexusTraitors?.pending || offer.blocked ||
!Number.isSafeInteger(elite) || !offer.eliteOptions.includes(elite)) return null;
return { type: 'nexusFremenRevive', event: offer.event, elite };
}