Enforce Atomics shipment ban across transport
Verify and publish checkpoint container / container (push) Successful in 10m7s
Verify and publish checkpoint container / container (push) Successful in 10m7s
This commit is contained in:
1 parent
4feb418488
commit
0f8e0b4153
17 files changed
+477
-19
No files matched your search
@@ -4,6 +4,7 @@ import type { Game } from './engine';
|
||||
import { validCaladanEntryParent, validateCaladanTerrorPacket, type CaladanEntryParent } from './caladan-arrival';
|
||||
import { currentHomeworldRevivalArrival } from './homeworld-revival-return';
|
||||
import { presenceAt, type ForcePresence } from './force-presence';
|
||||
import { atomicsShipmentBlocked, type AtomicsAftermath } from './moritani-atomics';
|
||||
|
||||
export type SpiritualAdvisorSource = {
|
||||
event: string;
|
||||
@@ -26,6 +27,7 @@ export type SpiritualAdvisorPlayer = ForcePresence & {
|
||||
export type SpiritualAdvisorBoardContext = {
|
||||
advanced: boolean;
|
||||
players: readonly SpiritualAdvisorPlayer[];
|
||||
moritaniAtomics?: Pick<AtomicsAftermath, 'territory'> | null;
|
||||
};
|
||||
|
||||
export type SpiritualAdvisorContext = SpiritualAdvisorBoardContext & MobileBoard & {
|
||||
@@ -82,10 +84,12 @@ export function spiritualAdvisorTargetBlock(
|
||||
owner: string,
|
||||
target: SpiritualAdvisorTarget,
|
||||
): string | null {
|
||||
const territory = territoryId(target);
|
||||
if (atomicsShipmentBlocked(ctx.moritaniAtomics, territory))
|
||||
return 'Atomics Aftermath prevents shipments into this territory; choose the Polar Sink or decline.';
|
||||
if (!ctx.advanced) return null;
|
||||
const player = nativeOwner(ctx, owner);
|
||||
if (!player) return 'Spiritual Advisors need the current native Bene Gesserit owner.';
|
||||
const territory = territoryId(target);
|
||||
if (territory === 'polar_sink') return null;
|
||||
return hasResidents(player, territory) && !player.advisors?.[territory]
|
||||
? 'Advanced Spiritual Advisors cannot accompany into a non-Polar territory containing your fighters; choose the Polar Sink or decline. Intrusion that already made them advisors removes this block.'
|
||||
|
||||
Reference in new issue
Block a user