From 1a8708576d671f7b491fd1b1975b0fe0164ee1eb Mon Sep 17 00:00:00 2001 From: Yann <40295529+B5656@users.noreply.github.com> Date: Mon, 1 Apr 2019 11:37:36 +0200 Subject: [PATCH] Update BattleDamage.kt To solve Issue #621 --- core/src/com/unciv/logic/battle/BattleDamage.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/battle/BattleDamage.kt b/core/src/com/unciv/logic/battle/BattleDamage.kt index 85e25a0abb..9705e24f34 100644 --- a/core/src/com/unciv/logic/battle/BattleDamage.kt +++ b/core/src/com/unciv/logic/battle/BattleDamage.kt @@ -49,8 +49,9 @@ class BattleDamage{ if (combatant.getCivInfo().happiness < 0) modifiers["Unhappiness"] = max(0.02f * combatant.getCivInfo().happiness,-0.9f) // otherwise it could exceed -100% and start healing enemy units... - if(combatant.getCivInfo().policies.isAdopted("Populism")) + if(combatant.getCivInfo().policies.isAdopted("Populism") && combatant.getHealth() < 100){ modifiers["Populism"] = 0.25f + } if(combatant.getCivInfo().policies.isAdopted("Discipline") && combatant.isMelee() && combatant.getTile().neighbors.flatMap { it.getUnits() } @@ -215,4 +216,4 @@ class BattleDamage{ val ratio = getAttackingStrength(attacker,defender) / getDefendingStrength(attacker,defender) return (ratio * 30 * getHealthDependantDamageRatio(attacker)).toInt() } -} \ No newline at end of file +}