Prototype Richese No-Fields on foreign Homeworlds

This commit is contained in:
Quintine committed 2026-10-28 20:04:03 +11:00
1 parent dd3c199e2e
commit 850227c26d
71 files changed
+1806 -187

No files matched your search

+5 -2
View File
@@ -3,6 +3,7 @@ import type { Action, GameView } from './engine';
import { nexusGuildShipmentAvailable } from './nexus-guild-cunning-options';
import { nexusGuildSecretAllyAction, nexusGuildSecretAllyCanAct } from './nexus-guild-secret-ally-options';
import { guildTransportQuote } from './transport-quote';
import { isBoardNoFieldLocation } from './richese-no-field';
/** Minimal legal choices for the owned concealed marker, before auto-revelation.
* The shared quotes own timing, entry, pricing and original source validation.
@@ -12,14 +13,16 @@ export function guildNoFieldTransportActions(g: GameView): Action[] {
const inventory = g.richeseNoField;
const marker = inventory?.owner === g.me ? inventory.private?.deployed : null;
const publicMarker = inventory?.public.deployed;
if (!own || own.shipped || !marker || marker.controller !== own.id || !publicMarker ||
if (!own || own.shipped || !marker || !isBoardNoFieldLocation(marker.location) || marker.controller !== own.id || !publicMarker ||
!isBoardNoFieldLocation(publicMarker.location) ||
publicMarker.controller !== own.id || !inventory?.event ||
!nexusGuildShipmentAvailable(g)) return [];
const guild = g.players.find(player => player.faction === 'guild');
const native = !!guild && own.ally === guild.id && guild.ally === own.id;
const secret = nexusGuildSecretAllyCanAct(g);
if (!native && !secret) return [];
const destinations = gameTerritories(g).flatMap(territory => territory.id === publicMarker.location.territory
const origin = publicMarker.location.territory;
const destinations = gameTerritories(g).flatMap(territory => territory.id === origin
? [] : territory.sectors.map(sector => ({ territory: territory.id, sector })));
if (secret) destinations.push({ territory: 'reserves', sector: 0 });
const actions: Action[] = [];