mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-09 07:18:57 +07:00
Added notification when enemy religion spread converts a city
This commit is contained in:
@ -1469,6 +1469,7 @@ Hurry Construction =
|
||||
Hurry Construction (+[productionAmount]⚙) =
|
||||
Spread Religion =
|
||||
Spread [religionName] =
|
||||
[civName]'s [unitName] has converted [cityName] to [religionName] =
|
||||
Remove Heresy =
|
||||
Found a Religion =
|
||||
Enhance a Religion =
|
||||
|
@ -97,10 +97,16 @@ object UnitActionsReligion {
|
||||
for (unique in unit.getMatchingUniques(UniqueType.StatsWhenSpreading, checkCivInfoUniques = true)) {
|
||||
unit.civ.addStat(Stat.valueOf(unique.params[1]), followersOfOtherReligions * unique.params[0].toInt())
|
||||
}
|
||||
val previousReligion = city.religion.getMajorityReligion()
|
||||
city.religion.addPressure(unit.religion!!, getPressureAddedFromSpread(unit))
|
||||
if (unit.hasUnique(UniqueType.RemoveOtherReligions))
|
||||
city.religion.removeAllPressuresExceptFor(unit.religion!!)
|
||||
|
||||
val newReligion = city.religion.getMajorityReligion()
|
||||
if (previousReligion != newReligion && newReligion != null && city.civ != unit.civ) {
|
||||
city.civ.addNotification("[${unit.civ.civName}]'s [${unit.name}] has converted [${city.name}] to [${newReligion.name}]!", NotificationCategory.Religion)
|
||||
}
|
||||
|
||||
UnitActionModifiers.activateSideEffects(unit, newStyleUnique)
|
||||
|
||||
if (city.civ != unit.civ) city.civ.getDiplomacyManager(unit.civ)!!
|
||||
|
Reference in New Issue
Block a user