From 95843898644888c1527c27e158540291ade45d9a Mon Sep 17 00:00:00 2001 From: itanasi <44038014+itanasi@users.noreply.github.com> Date: Sat, 15 Jan 2022 12:43:11 -0800 Subject: [PATCH] Capturing Civilians Not an Attack (#5974) * Change to not count civilian attacks * Change to not count civilian attacks Co-authored-by: temurakami --- core/src/com/unciv/logic/battle/Battle.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/com/unciv/logic/battle/Battle.kt b/core/src/com/unciv/logic/battle/Battle.kt index a679ac6f5e..2dc2567a0c 100644 --- a/core/src/com/unciv/logic/battle/Battle.kt +++ b/core/src/com/unciv/logic/battle/Battle.kt @@ -398,6 +398,11 @@ object Battle { private fun reduceAttackerMovementPointsAndAttacks(attacker: ICombatant, defender: ICombatant) { if (attacker is MapUnitCombatant) { val unit = attacker.unit + // If captured this civilian, doesn't count as attack + // And we've used a movement already + if(defender.isCivilian() && attacker.getTile() == defender.getTile()){ + return + } unit.attacksThisTurn += 1 if (unit.hasUnique(UniqueType.CanMoveAfterAttacking) || unit.maxAttacksPerTurn() > unit.attacksThisTurn) { // if it was a melee attack and we won, then the unit ALREADY got movement points deducted,