mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-25 10:26:05 +07:00
Resolves #11193 - above/below HP conditionals work outside of combat
This commit is contained in:
parent
72fa2a3f48
commit
83655bbd34
@ -202,10 +202,10 @@ object Conditionals {
|
||||
UniqueType.ConditionalUnitWithoutPromotion -> relevantUnit?.promotions?.promotions?.contains(condition.params[0]) == false
|
||||
UniqueType.ConditionalAttacking -> state.combatAction == CombatAction.Attack
|
||||
UniqueType.ConditionalDefending -> state.combatAction == CombatAction.Defend
|
||||
UniqueType.ConditionalAboveHP ->
|
||||
state.ourCombatant != null && state.ourCombatant.getHealth() > condition.params[0].toInt()
|
||||
UniqueType.ConditionalBelowHP ->
|
||||
state.ourCombatant != null && state.ourCombatant.getHealth() < condition.params[0].toInt()
|
||||
UniqueType.ConditionalAboveHP -> state.unit != null && state.unit.health > condition.params[0].toInt()
|
||||
|| state.ourCombatant != null && state.ourCombatant.getHealth() > condition.params[0].toInt()
|
||||
UniqueType.ConditionalBelowHP -> state.unit != null && state.unit.health < condition.params[0].toInt()
|
||||
||state.ourCombatant != null && state.ourCombatant.getHealth() < condition.params[0].toInt()
|
||||
UniqueType.ConditionalHasNotUsedOtherActions ->
|
||||
state.unit == null || // So we get the action as a valid action in BaseUnit.hasUnique()
|
||||
state.unit.abilityToTimesUsed.isEmpty()
|
||||
|
Loading…
Reference in New Issue
Block a user