From c2acdadc5095b949cf5b3662573062524d6c0b2f Mon Sep 17 00:00:00 2001 From: SeventhM <127357473+SeventhM@users.noreply.github.com> Date: Sun, 10 Sep 2023 23:29:25 -0700 Subject: [PATCH] Fix unique Great Prophets not having the correct cost when buying at an increasing cost (#10095) --- .../com/unciv/logic/civilization/managers/ReligionManager.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/civilization/managers/ReligionManager.kt b/core/src/com/unciv/logic/civilization/managers/ReligionManager.kt index 13ddc8c58b..80f06a6769 100644 --- a/core/src/com/unciv/logic/civilization/managers/ReligionManager.kt +++ b/core/src/com/unciv/logic/civilization/managers/ReligionManager.kt @@ -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() {