From 935134b16348302f4dd339e0719c871784b92fb8 Mon Sep 17 00:00:00 2001 From: gereon77 Date: Sat, 6 Jul 2024 11:55:38 +0200 Subject: [PATCH] Fix turn skipped detection --- .../DoranMartellAbilityGameState.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agot-bg-game-server/src/common/ingame-game-state/action-game-state/resolve-march-order-game-state/combat-game-state/immediately-house-card-abilities-resolution-game-state/doran-martell-ability-game-state/DoranMartellAbilityGameState.ts b/agot-bg-game-server/src/common/ingame-game-state/action-game-state/resolve-march-order-game-state/combat-game-state/immediately-house-card-abilities-resolution-game-state/doran-martell-ability-game-state/DoranMartellAbilityGameState.ts index 5a5082712..75d0dd6ae 100644 --- a/agot-bg-game-server/src/common/ingame-game-state/action-game-state/resolve-march-order-game-state/combat-game-state/immediately-house-card-abilities-resolution-game-state/doran-martell-ability-game-state/DoranMartellAbilityGameState.ts +++ b/agot-bg-game-server/src/common/ingame-game-state/action-game-state/resolve-march-order-game-state/combat-game-state/immediately-house-card-abilities-resolution-game-state/doran-martell-ability-game-state/DoranMartellAbilityGameState.ts @@ -94,7 +94,9 @@ export default class DoranMartellAbilityGameState extends GameState< currentIndex = (currentIndex + 1) % numberOfHouses; const currentHouseToCheck = turnOrder[currentIndex]; - const regions = this.combatGameState.actionGameState.getRegionsWithMarchOrderOfHouse(currentHouseToCheck); + const regions = this.combatGameState.actionGameState.getRegionsWithMarchOrderOfHouse(currentHouseToCheck) + // Filter out the march order that initiated the combat + .filter(r => r != this.combatGameState.attackingRegion); if (regions.length > 0) { return currentHouseToCheck; }