mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-23 03:23:17 -04:00
Fixed honor policy not adding bonus vs barbarians (#4160)
* Fixed honor policy not adding bonus vs barbarians * Implemented requested changes
This commit is contained in:
parent
4fc2364cb0
commit
591fd9c138
@ -20,7 +20,10 @@ object BattleDamage {
|
|||||||
|
|
||||||
val civInfo = combatant.getCivInfo()
|
val civInfo = combatant.getCivInfo()
|
||||||
if (combatant is MapUnitCombatant) {
|
if (combatant is MapUnitCombatant) {
|
||||||
for (unique in combatant.unit.getMatchingUniques("+[]% Strength vs []")) {
|
for (unique in
|
||||||
|
combatant.unit.getMatchingUniques("+[]% Strength vs []") +
|
||||||
|
civInfo.getMatchingUniques("+[]% Strength vs []")
|
||||||
|
) {
|
||||||
if (enemy.matchesCategory(unique.params[1]))
|
if (enemy.matchesCategory(unique.params[1]))
|
||||||
modifiers.add("vs [${unique.params[1]}]", unique.params[0].toInt())
|
modifiers.add("vs [${unique.params[1]}]", unique.params[0].toInt())
|
||||||
}
|
}
|
||||||
@ -94,9 +97,10 @@ object BattleDamage {
|
|||||||
modifiers["Difficulty"] =
|
modifiers["Difficulty"] =
|
||||||
(civInfo.gameInfo.getDifficulty().barbarianBonus * 100).toInt()
|
(civInfo.gameInfo.getDifficulty().barbarianBonus * 100).toInt()
|
||||||
// Deprecated since 3.14.17
|
// Deprecated since 3.14.17
|
||||||
if (civInfo.hasUnique("+25% bonus vs Barbarians")) {
|
if (civInfo.hasUnique("+25% bonus vs Barbarians")) {
|
||||||
modifiers["vs Barbarians (deprecated)"] = 25
|
modifiers["vs Barbarians (deprecated)"] = 25
|
||||||
}
|
}
|
||||||
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
return modifiers
|
return modifiers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user