mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-03 22:22:51 +07:00
Fixed bug where if the AI completed all the policies and needed to pick another one, the game would crash
This commit is contained in:
parent
2799205884
commit
dae20d09dc
@ -199,6 +199,10 @@ class NextTurnAutomation{
|
||||
.flatMap { it.policies.union(listOf(it)) }
|
||||
.filter { civInfo.policies.isAdoptable(it) }
|
||||
|
||||
// This can happen if the player is crazy enough to have the game continue forever and he disabled cultural victory
|
||||
if(adoptablePolicies.isEmpty()) return
|
||||
|
||||
|
||||
val preferredVictoryType = civInfo.victoryType()
|
||||
val policyBranchPriority =
|
||||
when(preferredVictoryType) {
|
||||
|
Loading…
Reference in New Issue
Block a user