mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-25 10:26:05 +07:00
Fixed a few bugs relating to earning great prophets (#5267)
* Fixed bug where great prophets gifted by city-states wouldn't have a religion * Fixed bug where earning/buying great prophets whithout having founded a religion would result in great prophets of your pantheon, regardless of the religious state of the city
This commit is contained in:
parent
027057874d
commit
cb4feb29ed
@ -77,8 +77,8 @@ class CityStateFunctions(val civInfo: CivilizationInfo) {
|
||||
return
|
||||
val giftedUnit = giftableUnits.random()
|
||||
val cities = NextTurnAutomation.getClosestCities(receivingCiv, civInfo)
|
||||
val placedUnit = receivingCiv.placeUnitNearTile(cities.city1.location, giftedUnit.name)
|
||||
if (placedUnit == null) return
|
||||
val placedUnit = receivingCiv.addUnit(giftedUnit.name, cities.city1)
|
||||
?: return
|
||||
val locations = LocationAction(listOf(placedUnit.getTile().position, cities.city2.location))
|
||||
receivingCiv.addNotification( "[${civInfo.civName}] gave us a [${giftedUnit.name}] as a gift!", locations, civInfo.civName, giftedUnit.name)
|
||||
}
|
||||
|
@ -921,8 +921,9 @@ class CivilizationInfo {
|
||||
if (placedUnit.hasUnique("Religious Unit") && gameInfo.isReligionEnabled()) {
|
||||
placedUnit.religion =
|
||||
when {
|
||||
placedUnit.hasUnique("Takes your religion over the one in their birth city") ->
|
||||
religionManager.religion?.name
|
||||
placedUnit.hasUnique("Takes your religion over the one in their birth city")
|
||||
&& religionManager.religion?.isMajorReligion() == true ->
|
||||
religionManager.religion!!.name
|
||||
city != null -> city.cityConstructions.cityInfo.religion.getMajorityReligionName()
|
||||
else -> religionManager.religion?.name
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user