Fix unique Great Prophets not having the correct cost when buying at an increasing cost (#10095)

This commit is contained in:
SeventhM
2023-09-10 23:29:25 -07:00
committed by GitHub
parent 2061b2cc03
commit c2acdadc50

View File

@ -168,7 +168,8 @@ class ReligionManager : IsPartOfGameInfoSerialization {
}
fun getGreatProphetEquivalent(): BaseUnit? {
return civInfo.gameInfo.ruleset.units.values.firstOrNull { it.hasUnique(UniqueType.MayFoundReligion) }
val baseUnit = civInfo.gameInfo.ruleset.units.values.firstOrNull { it.hasUnique(UniqueType.MayFoundReligion) }
return if (baseUnit == null) null else civInfo.getEquivalentUnit(baseUnit)
}
private fun generateProphet() {