summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index 3c1e44b..90f42d4 100644
--- a/rules.js
+++ b/rules.js
@@ -4509,7 +4509,7 @@ states.combat_victory = {
let ae = is_attacker_eliminated()
if (de && ae)
prompt("Combat: There is no winner.")
- else if (de || game.combat.dtaken + game.combat.staken + game.combat.cavalry > game.combat.ataken)
+ else if (!ae && (de || game.combat.dtaken + game.combat.staken + game.combat.cavalry > game.combat.ataken))
prompt("Combat: You win the battle!")
else
prompt("Combat: Defenders win the battle!")
@@ -4528,7 +4528,7 @@ function goto_combat_victory() {
let ae = is_attacker_eliminated()
if (de && ae)
goto_combat_no_victory()
- else if (de || game.combat.dtaken + game.combat.staken + game.combat.cavalry > game.combat.ataken)
+ else if (!ae && (de || game.combat.dtaken + game.combat.staken + game.combat.cavalry > game.combat.ataken))
goto_combat_victory_attacker()
else
goto_combat_victory_defender()