mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-20 19:56:51 +01:00
After-combat notification for promotable units - see #4697
This commit is contained in:
parent
c9ed9d5d74
commit
1d5d445c19
|
|
@ -817,6 +817,7 @@ We have captured a barbarian encampment and recovered [goldAmount] gold! =
|
|||
An enemy [unitType] has joined us! =
|
||||
After an unknown civilization entered the [eraName], we have recruited [spyName] as a spy! =
|
||||
We have recruited [spyName] as a spy! =
|
||||
[unitName] can be promoted! =
|
||||
|
||||
# This might be needed for a rewrite of Germany's unique - see #7376
|
||||
A barbarian [unitType] has joined us! =
|
||||
|
|
|
|||
|
|
@ -483,10 +483,8 @@ object Battle {
|
|||
if (thisCombatant !is MapUnitCombatant) return
|
||||
val modConstants = thisCombatant.unit.civInfo.gameInfo.ruleSet.modOptions.constants
|
||||
if (thisCombatant.unit.promotions.totalXpProduced() >= modConstants.maxXPfromBarbarians
|
||||
&& otherCombatant.getCivInfo().isBarbarian()
|
||||
) {
|
||||
&& otherCombatant.getCivInfo().isBarbarian())
|
||||
return
|
||||
}
|
||||
|
||||
val stateForConditionals = StateForConditionals(civInfo = thisCombatant.getCivInfo(), ourCombatant = thisCombatant, theirCombatant = otherCombatant)
|
||||
|
||||
|
|
@ -515,6 +513,9 @@ object Battle {
|
|||
val greatGeneralPointsGained = (xpGained * greatGeneralPointsModifier).toInt()
|
||||
thisCombatant.getCivInfo().greatPeople.greatGeneralPoints += greatGeneralPointsGained
|
||||
}
|
||||
|
||||
if (!thisCombatant.isDefeated() && thisCombatant.unit.promotions.canBePromoted())
|
||||
thisCombatant.getCivInfo().addNotification("[${thisCombatant.unit.name}] can be promoted!",thisCombatant.getTile().position, thisCombatant.unit.name)
|
||||
}
|
||||
|
||||
private fun conquerCity(city: CityInfo, attacker: MapUnitCombatant) {
|
||||
|
|
|
|||
|
|
@ -96,7 +96,6 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags:
|
|||
// Stat percentage boosts
|
||||
StatPercentBonus("[relativeAmount]% [stat]", UniqueTarget.Global, UniqueTarget.FollowerBelief),
|
||||
StatPercentBonusCities("[relativeAmount]% [stat] [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief),
|
||||
// Todo: Add support for specialist next to buildingName
|
||||
StatPercentFromObject("[relativeAmount]% [stat] from every [tileFilter/buildingFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief),
|
||||
AllStatsPercentFromObject("[relativeAmount]% Yield from every [tileFilter/buildingFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief),
|
||||
StatPercentFromReligionFollowers("[relativeAmount]% [stat] from every follower, up to [relativeAmount]%", UniqueTarget.FollowerBelief),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user