From 9aa41d3d13d82833654be64eee5659b27a30ccbe Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Mon, 11 Jun 2018 18:32:37 +0300 Subject: [PATCH] Units that can move after attacking (horseman, knight) no longer get deducted movement points for BOTH the movement to the enemy tile AND the attack --- core/src/com/unciv/logic/battle/Battle.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/battle/Battle.kt b/core/src/com/unciv/logic/battle/Battle.kt index 57a43bd99e..e5435a82bc 100644 --- a/core/src/com/unciv/logic/battle/Battle.kt +++ b/core/src/com/unciv/logic/battle/Battle.kt @@ -170,8 +170,10 @@ class Battle(val gameInfo:GameInfo=UnCivGame.Current.gameInfo) { } if(attacker is MapUnitCombatant) { - if (attacker.unit.hasUnique("Can move after attacking")) - attacker.unit.currentMovement = max(0f, attacker.unit.currentMovement - 1) + if (attacker.unit.hasUnique("Can move after attacking")){ + if(!attacker.getUnitType().isMelee() || !defender.isDefeated()) // if it was a melee attack and we won, then the unit ALREADY got movement points deducted, for the movement to the enemie's tile! + attacker.unit.currentMovement = max(0f, attacker.unit.currentMovement - 1) + } else attacker.unit.currentMovement = 0f attacker.unit.attacksThisTurn+=1 attacker.unit.action=null // for instance, if it was fortified