Resolved #4648 - city states no longer great Great Prophets when religion is not enabled

This commit is contained in:
Yair Morgenstern 2021-07-27 06:43:11 +03:00
parent e94033fc36
commit a74e7c0a6a
3 changed files with 2 additions and 14 deletions

View File

@ -525,12 +525,6 @@ class CityStats {
buildingsMaintenance *= (1f - unique.params[0].toFloat() / 100)
}
// Deprecated since 3.15
for (unique in cityInfo.getMatchingUniques("-[]% building maintenance costs []", citySpecificUniques)) {
buildingsMaintenance *= (1f - unique.params[0].toFloat() / 100)
}
//
return buildingsMaintenance
}

View File

@ -136,10 +136,6 @@ class CivInfoStats(val civInfo: CivilizationInfo) {
var happinessPerUniqueLuxury = 4f + civInfo.getDifficulty().extraHappinessPerLuxury
for (unique in civInfo.getMatchingUniques("+[] happiness from each type of luxury resource"))
happinessPerUniqueLuxury += unique.params[0].toInt()
// Deprecated since 3.14.17
for (unique in civInfo.getMatchingUniques("+1 happiness from each type of luxury resource"))
happinessPerUniqueLuxury += 1
//
val ownedLuxuries = civInfo.getCivResources().map { it.resource }.filter { it.resourceType == ResourceType.Luxury }

View File

@ -509,12 +509,10 @@ class QuestManager {
private fun getGreatPersonForQuest(challenger: CivilizationInfo): BaseUnit? {
val ruleSet = civInfo.gameInfo.ruleSet
val challengerGreatPeople = challenger.getCivGreatPeople().map { it.baseUnit.getReplacedUnit(ruleSet) }
val challengerGreatPeople = challenger.getGreatPeople()getCivGreatPeople().map { it.baseUnit.getReplacedUnit(ruleSet) }
val cityStateGreatPeople = civInfo.getCivGreatPeople().map { it.baseUnit.getReplacedUnit(ruleSet) }
val greatPeople = ruleSet.units.values
.asSequence()
.filter { it.isGreatPerson() }
val greatPeople = challenger.getGreatPeople()
.map { it.getReplacedUnit(ruleSet) }
.distinct()
.filter { !challengerGreatPeople.contains(it) && !cityStateGreatPeople.contains(it) }