valueCityStateAlliance no longer causes a crash when the city-state has not been met (#10853)

This commit is contained in:
Oskar Niesen
2024-01-04 01:03:56 -06:00
committed by GitHub
parent a37807f4bb
commit 1a0bdff019

View File

@ -152,7 +152,9 @@ object NextTurnAutomation {
return value
// The more we have invested into the city-state the more the alliance is worth
val ourInfluence = cityState.getDiplomacyManager(civInfo).getInfluence().toInt()
val ourInfluence = if (civInfo.knows(cityState))
cityState.getDiplomacyManager(civInfo).getInfluence().toInt()
else 0
value += ourInfluence / 10
if (civInfo.gold < 100 && ourInfluence < 30) {