Support Basic allied No-Field transit
Verify and publish checkpoint container / container (push) Canceled after 0s
Verify and publish checkpoint container / container (push) Canceled after 0s
This commit is contained in:
1 parent
50c6201d33
commit
8083598cef
9 files changed
+282
-14
No files matched your search
+20
-8
@@ -23135,16 +23135,25 @@ function basicAlliedShipmentView(g: Game, p: Player) {
|
||||
const visit = g.basicAlliedShipment;
|
||||
if (g.advanced || g.phase !== 5 || !visit || visit.player !== p.id ||
|
||||
visit.turn !== g.turn || p.ally !== visit.ally) return null;
|
||||
getPlayer(g, visit.ally);
|
||||
const ally = getPlayer(g, visit.ally);
|
||||
if (ally.ally !== p.id || !at(ally, visit.territory) || sharesEcazOccupation(g, p, visit.territory)) return null;
|
||||
const quote = occupancyRule(() => quoteBasicAlliedShipment(g, p, visit));
|
||||
return quote ? { ...quote, territory: territory(quote.territory).name } : null;
|
||||
const deployed = p.noField?.deployed;
|
||||
const noField = !!visit.noField && deployed?.tokenId === visit.noField && deployed.controller === p.id &&
|
||||
isBoardNoFieldLocation(deployed.location) && deployed.location.territory === visit.territory;
|
||||
return quote || noField ? { territory: territory(visit.territory).name,
|
||||
normal: quote?.normal ?? 0, elite: quote?.elite ?? 0, ...(noField ? {noField: true as const} : {}) } : null;
|
||||
}
|
||||
|
||||
/** Provisional no-exit policy: only the excess physical visitors go to Tanks. */
|
||||
function finishBasicAlliedShipment(g: Game, p: Player) {
|
||||
const visit = g.basicAlliedShipment;
|
||||
if (!visit || visit.player !== p.id) return;
|
||||
const quote = basicAlliedShipmentView(g, p);
|
||||
let quote = basicAlliedShipmentView(g, p);
|
||||
if (quote?.noField) {
|
||||
revealPlayerNoField(g, p, 'alliedSeparation');
|
||||
quote = basicAlliedShipmentView(g, p);
|
||||
}
|
||||
g.basicAlliedShipment = null;
|
||||
if (!quote) return;
|
||||
let normal = quote.normal;
|
||||
@@ -38421,6 +38430,11 @@ function commitShipment(g: Game, shipment: PendingShipment, settlement?: {recipi
|
||||
advisors,
|
||||
} = shipment;
|
||||
const p = getPlayer(g, shipment.player);
|
||||
if (!g.advanced && !shipment.alliedNoField && n > 0) {
|
||||
const visit = occupancyRule(() => makeBasicAlliedShipment(g, p, to));
|
||||
if (visit) g.basicAlliedShipment = shipment.noField
|
||||
? { ...visit, noField: shipment.noField.tokenId } : visit;
|
||||
}
|
||||
let pairRevealed: ReturnType<typeof deployRicheseNoFieldPair>['revealed'] | null = null;
|
||||
if (shipment.noField) {
|
||||
requireRule(
|
||||
@@ -38491,10 +38505,6 @@ function commitShipment(g: Game, shipment: PendingShipment, settlement?: {recipi
|
||||
}
|
||||
let homeworldOrigins = '';
|
||||
if (!shipment.noField) {
|
||||
if (!g.advanced && !shipment.alliedNoField && n > 0) {
|
||||
const visit = occupancyRule(() => makeBasicAlliedShipment(g, p, to));
|
||||
if (visit) g.basicAlliedShipment = visit;
|
||||
}
|
||||
const receipts = withdrawNativeReserves(
|
||||
g,
|
||||
p,
|
||||
@@ -44762,7 +44772,9 @@ function applyActionInner(
|
||||
'Only Ixians may ship directly into the mobile stronghold.',
|
||||
);
|
||||
allowedEntry(g, p, to, s, !guildSecretEvent && g.advanced && p.faction === 'fremen', advisors,
|
||||
action.noField === undefined && isAlliedShipmentVisit(g, p, to));
|
||||
(action.noField === undefined || !g.advanced && !richesePair &&
|
||||
action.noFieldReserves === undefined && action.smuggler !== true) &&
|
||||
isAlliedShipmentVisit(g, p, to));
|
||||
let noField: PendingShipment['noField'];
|
||||
if (action.noField !== undefined) {
|
||||
requireRule(
|
||||
|
||||
Reference in new issue
Block a user