Support bribes during Basic movement decisions
Verify and publish checkpoint container / container (push) Successful in 10m49s
Verify and publish checkpoint container / container (push) Successful in 10m49s
This commit is contained in:
1 parent
9dc339e726
commit
ab7a947833
10 files changed
+435
-80
No files matched your search
+9
-1
@@ -1,3 +1,4 @@
|
||||
import { basicPendingMovement } from './basic-pending-movement';
|
||||
import { createTwoPlayerControllers, validateTwoPlayerControllersLobby, validateTwoPlayerControllersComplete,
|
||||
addTwoPlayerControlledSeat, TwoPlayerControllersError, type TwoPlayerControllers } from './two-player-controllers';
|
||||
import { routeAuctionPayment, type AuctionPaymentLeg } from './auction-payment-routing';
|
||||
@@ -17492,6 +17493,7 @@ function basicBribeInterrupt(g: Game, p: Player): boolean {
|
||||
g.bureaucratPayments?.pending || g.battle || g.pendingRicheseGift || g.pendingShipment ||
|
||||
g.pendingGuildTransport || g.pendingArrivalOverlap || g.pendingAmbassador || g.pendingEmperorAuctionGift ||
|
||||
liveShipmentPromises(g.shipmentPromises ?? [], p.id, g.turn).length ||
|
||||
liveTravelPromises(g.travelPromises ?? [], p.id, g.turn).length ||
|
||||
hasMovementPromises(g, p.id) || hasBribePromises(g, p.id) ||
|
||||
liveRevivalPromises(g.revivalPromises ?? [], p.id, g.turn).length ||
|
||||
liveLeaderRevivalPromises(g.leaderRevivalPromises ?? [], p.id, g.turn).length ||
|
||||
@@ -17509,6 +17511,7 @@ function basicBribeInterrupt(g: Game, p: Player): boolean {
|
||||
const classic = ['atreides', 'beneGesserit', 'emperor', 'fremen', 'guild', 'harkonnen'];
|
||||
const nativeRoster = !g.expansions.length
|
||||
? g.players.every(seat => classic.includes(seat.faction)) : selectedPhaseModuleRoster(g);
|
||||
if (nativeRoster && !g.phaseOpening && !g.choamMarket && !g.ixAuction && basicPendingMovement(g)) return true;
|
||||
if (nativeRoster && !g.phaseOpening && !g.choamMarket && !g.ixAuction &&
|
||||
!Object.entries(g).some(([key, value]) => key.startsWith('pending') &&
|
||||
(Array.isArray(value) ? value.length > 0 : value !== null && value !== undefined && value !== false))) {
|
||||
@@ -33459,7 +33462,12 @@ function findShipmentCompletion(
|
||||
const action: Action = { type: 'ship', noField: token.id, event: p.noFieldEvent,
|
||||
territory: destination, sector };
|
||||
try {
|
||||
applyActionInner(g, p.id, action, 'movementPreparation');
|
||||
const trial = applyActionInner(g, p.id, action, 'movementPreparation');
|
||||
// The native declaration checks this after committing a detached
|
||||
// shipment. A witness must preserve the same physical movement.
|
||||
if (state.phase < 5) trial.movementRemaining = [p.id];
|
||||
if (hasMovementPromises(trial, p.id, true))
|
||||
reconcileGroundMovementPromises(trial, p.id, action, g.phase);
|
||||
return { early, actions: [...actions, action] };
|
||||
} catch (error) {
|
||||
if (!(error instanceof RuleError)) throw error;
|
||||
|
||||
Reference in new issue
Block a user