mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-07 14:02:48 +07:00
#9876 fix - Lock known city states before gaining influence to avoid altering the sequence we're iterating on
This commit is contained in:
parent
d9ceb9290d
commit
af49e8297f
@ -293,7 +293,9 @@ object NextTurnAutomation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun useGoldForCityStates(civ: Civilization) {
|
private fun useGoldForCityStates(civ: Civilization) {
|
||||||
val knownCityStates = civ.getKnownCivs().filter { it.isCityState() }
|
// RARE EDGE CASE: If you ally with a city-state, you may reveal more map that includes ANOTHER civ!
|
||||||
|
// So if we don't lock this list, we may later discover that there are more known civs, concurrent modification exception!
|
||||||
|
val knownCityStates = civ.getKnownCivs().filter { it.isCityState() }.toList()
|
||||||
|
|
||||||
// canBeMarriedBy checks actual cost, but it can't be below 500*speedmodifier, and the later check is expensive
|
// canBeMarriedBy checks actual cost, but it can't be below 500*speedmodifier, and the later check is expensive
|
||||||
if (civ.gold >= 330 && civ.getHappiness() > 0 && civ.hasUnique(UniqueType.CityStateCanBeBoughtForGold)) {
|
if (civ.gold >= 330 && civ.getHappiness() > 0 && civ.hasUnique(UniqueType.CityStateCanBeBoughtForGold)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user