mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-10 23:37:31 +07:00
Fixed softlock forcing you to found a pantheon without available beliefs (#7883)
This commit is contained in:
parent
bf275cc1c4
commit
364da94e5d
@ -206,7 +206,8 @@ class ReligionManager : IsPartOfGameInfoSerialization {
|
||||
val gameInfo = civInfo.gameInfo
|
||||
val numberOfBeliefs = if (type == BeliefType.Any) gameInfo.ruleSet.beliefs.values.count()
|
||||
else gameInfo.ruleSet.beliefs.values.count { it.type == type }
|
||||
return numberOfBeliefs - gameInfo.religions.flatMap { it.value.getBeliefs(type) }.count()
|
||||
return numberOfBeliefs - gameInfo.religions.flatMap { it.value.getBeliefs(type) }.distinct().count()
|
||||
// We need to do the distinct above, as pantheons and religions founded out of those pantheons might share beliefs
|
||||
}
|
||||
|
||||
fun getReligionWithBelief(belief: Belief): Religion? {
|
||||
|
Loading…
Reference in New Issue
Block a user