diff --git a/game/engine.ts b/game/engine.ts index bbf323bd..80afac3b 100644 --- a/game/engine.ts +++ b/game/engine.ts @@ -33830,6 +33830,11 @@ function applyActionInner( } if (t === 'declineBattlePower') { const b = g.battle; + if (b?.preparation?.kind === 'nexusVoice' && b.preparation.owner === id && b.nexusBorrowedVoice) { + // A generic decline is the same as continuing without the borrowed command. + playNexusBorrowedVoice(g, p, { type: 'nexusBorrowedVoice', event: b.nexusBorrowedVoice.event, use: false }); + return g; + } requireRule( b?.preparation?.owner === id && !['nexusVoice', 'prescienceAnswer', 'nexusPrescienceAnswer'].includes(b.preparation.kind), 'You do not own this battle power decision.', diff --git a/tests/fixture-nexus-cunning.ts b/tests/fixture-nexus-cunning.ts index 8a45d235..de9ef18b 100644 --- a/tests/fixture-nexus-cunning.ts +++ b/tests/fixture-nexus-cunning.ts @@ -19,6 +19,8 @@ export function suboidFixture(advanced = true, atreides = false) { g = applyAction(g, 'p', { type: 'chooseBattle', territory: 'pasty_mesa', target: 'q' }); for (const id of ['p', 'q']) if (g.battle!.preLeader && !g.battle!.preLeader.closed) g = applyAction(g, id, { type: 'battlePreparationReady', event: g.battle!.event }); + while (g.battle?.preparation?.kind === 'nexusVoice') + g = applyAction(g, g.battle.preparation.owner, { type: 'declineBattlePower' }); validateNexusCards(g.nexusCards!.cards!, g.players); return g; } diff --git a/tests/fixture-nexus-inspection.ts b/tests/fixture-nexus-inspection.ts index 2320ede0..d62dd34c 100644 --- a/tests/fixture-nexus-inspection.ts +++ b/tests/fixture-nexus-inspection.ts @@ -126,6 +126,9 @@ export function nexusInspectionFixture( type: 'battlePreparationReady', event: g.battle!.event, }); + // Pass the absent-BG borrowed Voice opportunity that precedes native Prescience. + while (g.battle?.preparation?.kind === 'nexusVoice') + g = applyAction(g, g.battle.preparation.owner, { type: 'declineBattlePower' }); return g; } export function inspectionHold(g: Game, id: string, kind: Card['kind']): Card { diff --git a/tests/fixture-nexus-sardaukar.ts b/tests/fixture-nexus-sardaukar.ts index 433819f5..4161901b 100644 --- a/tests/fixture-nexus-sardaukar.ts +++ b/tests/fixture-nexus-sardaukar.ts @@ -80,6 +80,8 @@ export function nexusSardaukarFixture( type: 'battlePreparationReady', event: g.battle!.event, }); + while (g.battle?.preparation?.kind === 'nexusVoice') + g = applyAction(g, g.battle.preparation.owner, { type: 'declineBattlePower' }); nexusSardaukarInventory(g); return g; }