Respect storm sector for rides into mobile stronghold
Verify and publish checkpoint container / container (push) Failing after 10m28s

This commit is contained in:
Quintine committed 2026-10-29 07:33:59 +11:00
1 parent 0d55333d5d
commit ac1f32c859
11 files changed
+324 -3

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import { MOBILE_STRONGHOLD, splitLocation, validLocation } from './board';
/** The mobile stronghold's interior is encoded as sector 0, but a worm ride
* enters through its actual pointed sector. Ordinary sectors and the Polar
* Sink keep their existing independent entry checks. */
export function wormRideDestinationBlock(
g: {storm: number; mobileStronghold?: {location: string | null} | null},
territory: string,
_sector: number,
): string | null {
if (territory !== MOBILE_STRONGHOLD || !g.mobileStronghold?.location ||
!Number.isSafeInteger(g.storm) || g.storm < 1 || g.storm > 18) return null;
const pointer = g.mobileStronghold.location;
const parts = pointer.split(':');
if (parts.length !== 2) return null;
const at = splitLocation(pointer);
if (!validLocation(at.territory, at.sector) || at.sector < 1) return null;
return at.sector === g.storm
? 'The Hidden Mobile Stronghold points into the storm; a worm ride cannot enter it.'
: null;
}