Support group Fremen worm protection
Verify and publish checkpoint container / container (push) Successful in 10m58s
Verify and publish checkpoint container / container (push) Successful in 10m58s
This commit is contained in:
1 parent
6e26ceb216
commit
40c9651b80
12 files changed
+479
-24
No files matched your search
@@ -192,7 +192,7 @@ export function validateDiscoveryBlow(g: Game, t: string) {
|
||||
export function validateWormDevouring(
|
||||
g: Game,
|
||||
t: string,
|
||||
protectedAlly?: string,
|
||||
protectedAlly?: string | readonly string[],
|
||||
protectFremen = true,
|
||||
) {
|
||||
requireDisaster(validTerritory(t), 'The worm needs a valid territory.');
|
||||
@@ -277,10 +277,13 @@ export function validateWormCancellation(g: Game, response: ResponseWindow) {
|
||||
}
|
||||
// Canceling allied protection may first open the separate survival decision;
|
||||
// validate the affected army now without executing that future window.
|
||||
const group = response.coalitionWormEvent && g.coalitionWormProtection?.event === response.coalitionWormEvent
|
||||
? g.coalitionWormProtection.outcomes.filter(outcome => outcome.outcome === 'allowed').map(outcome => outcome.ally)
|
||||
: undefined;
|
||||
validateWormDevouring(
|
||||
g,
|
||||
response.location,
|
||||
response.kind === 'wormSurvival' ? response.recipient : undefined,
|
||||
group ?? (response.kind === 'wormSurvival' ? response.recipient : undefined),
|
||||
response.kind === 'wormAllyProtection',
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user