mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-22 19:08:48 -04:00
Update MotivationToAttackAutomation.kt (#13862)
This commit is contained in:
parent
fd4fd6e79e
commit
19aa66d208
@ -257,7 +257,7 @@ object MotivationToAttackAutomation {
|
||||
private fun getDefensivePactAlliesScore(otherCiv: Civilization, civInfo: Civilization, baseForce: Float, ourCombatStrength: Float): Float {
|
||||
var theirAlliesValue = 0f
|
||||
for (thirdCiv in otherCiv.diplomacy.values.filter { it.hasFlag(DiplomacyFlags.DefensivePact) && it.otherCiv() != civInfo }) {
|
||||
val thirdCivCombatStrengthRatio = otherCiv.getStatForRanking(RankingType.Force).toFloat() + baseForce / ourCombatStrength
|
||||
val thirdCivCombatStrengthRatio = (otherCiv.getStatForRanking(RankingType.Force).toFloat() + baseForce) / ourCombatStrength
|
||||
theirAlliesValue += when {
|
||||
thirdCivCombatStrengthRatio > 5 -> -15f
|
||||
thirdCivCombatStrengthRatio > 2.5 -> -10f
|
||||
|
Loading…
x
Reference in New Issue
Block a user