mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 14:24:43 -04:00
parent
e433eefc05
commit
1a8708576d
@ -49,8 +49,9 @@ class BattleDamage{
|
|||||||
if (combatant.getCivInfo().happiness < 0)
|
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...
|
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
|
modifiers["Populism"] = 0.25f
|
||||||
|
}
|
||||||
|
|
||||||
if(combatant.getCivInfo().policies.isAdopted("Discipline") && combatant.isMelee()
|
if(combatant.getCivInfo().policies.isAdopted("Discipline") && combatant.isMelee()
|
||||||
&& combatant.getTile().neighbors.flatMap { it.getUnits() }
|
&& combatant.getTile().neighbors.flatMap { it.getUnits() }
|
||||||
@ -215,4 +216,4 @@ class BattleDamage{
|
|||||||
val ratio = getAttackingStrength(attacker,defender) / getDefendingStrength(attacker,defender)
|
val ratio = getAttackingStrength(attacker,defender) / getDefendingStrength(attacker,defender)
|
||||||
return (ratio * 30 * getHealthDependantDamageRatio(attacker)).toInt()
|
return (ratio * 30 * getHealthDependantDamageRatio(attacker)).toInt()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user