mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-24 03:53:12 -04:00
valueCityStateAlliance no longer causes a crash when the city-state has not been met (#10853)
This commit is contained in:
parent
a37807f4bb
commit
1a0bdff019
@ -152,7 +152,9 @@ object NextTurnAutomation {
|
|||||||
return value
|
return value
|
||||||
|
|
||||||
// The more we have invested into the city-state the more the alliance is worth
|
// 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
|
value += ourInfluence / 10
|
||||||
|
|
||||||
if (civInfo.gold < 100 && ourInfluence < 30) {
|
if (civInfo.gold < 100 && ourInfluence < 30) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user