mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-11 11:28:03 +07:00
Fixed some bugs with spreading of religion (#4851)
* Fixed some bugs with spreading of religion * Implemented requested changes
This commit is contained in:
parent
74a1da8e17
commit
607e40a712
@ -263,7 +263,14 @@ class CivilizationInfo {
|
||||
} +
|
||||
policies.policyUniques.getUniques(uniqueTemplate) +
|
||||
tech.techUniques.getUniques(uniqueTemplate) +
|
||||
temporaryUniques.filter { it.first.placeholderText == uniqueTemplate }.map { it.first }
|
||||
temporaryUniques
|
||||
.asSequence()
|
||||
.filter { it.first.placeholderText == uniqueTemplate }.map { it.first } +
|
||||
if (religionManager.religion != null)
|
||||
religionManager.religion!!.getFounderUniques()
|
||||
.asSequence()
|
||||
.filter { it.placeholderText == uniqueTemplate }
|
||||
else sequenceOf()
|
||||
}
|
||||
|
||||
//region Units
|
||||
@ -778,6 +785,15 @@ class CivilizationInfo {
|
||||
if (unit.isGreatPerson()) {
|
||||
addNotification("A [${unit.name}] has been born in [${cityToAddTo.name}]!", placedUnit.getTile().position, unit.name)
|
||||
}
|
||||
|
||||
if (placedUnit.hasUnique("Religious Unit")) {
|
||||
placedUnit.religion =
|
||||
if (city != null) city.cityConstructions.cityInfo.religion.getMajorityReligion()
|
||||
else religionManager.religion?.name
|
||||
if (placedUnit.hasUnique("Can spread religion [] times"))
|
||||
placedUnit.abilityUsedCount["Religion Spread"] = 0
|
||||
}
|
||||
|
||||
return placedUnit
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,6 @@ class ReligionManager {
|
||||
else civInfo.cities.firstOrNull { it.religion.religionThisIsTheHolyCityOf == religion!!.name }
|
||||
val prophet = civInfo.addUnit("Great Prophet", birthCity) ?: return
|
||||
prophet.religion = religion!!.name
|
||||
prophet.abilityUsedCount["Religion Spread"] = 0
|
||||
storedFaith -= faithForNextGreatProphet()
|
||||
greatProphetsEarned += 1
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user