diff --git a/Mage.Sets/src/mage/cards/c/CaptainsManeuver.java b/Mage.Sets/src/mage/cards/c/CaptainsManeuver.java index ac11099fe2..009a07a8e7 100644 --- a/Mage.Sets/src/mage/cards/c/CaptainsManeuver.java +++ b/Mage.Sets/src/mage/cards/c/CaptainsManeuver.java @@ -56,7 +56,7 @@ class CaptainsManeuverEffect extends RedirectionEffect { protected MageObjectReference redirectToObject; public CaptainsManeuverEffect() { - super(Duration.EndOfTurn, Integer.MAX_VALUE, UsageType.ONE_USAGE_ABSOLUTE); + super(Duration.EndOfTurn, Integer.MAX_VALUE, UsageType.ACCORDING_DURATION); staticText = "The next X damage that would be dealt to target creature, planeswalker, or player this turn is dealt to another target creature, planeswalker, or player instead."; } diff --git a/Mage.Sets/src/mage/cards/h/HarmsWay.java b/Mage.Sets/src/mage/cards/h/HarmsWay.java index 2925c2d5d4..2ddabce28f 100644 --- a/Mage.Sets/src/mage/cards/h/HarmsWay.java +++ b/Mage.Sets/src/mage/cards/h/HarmsWay.java @@ -46,7 +46,7 @@ class HarmsWayPreventDamageTargetEffect extends RedirectionEffect { private final TargetSource damageSource; public HarmsWayPreventDamageTargetEffect() { - super(Duration.EndOfTurn, 2, UsageType.ONE_USAGE_ABSOLUTE); + super(Duration.EndOfTurn, 2, UsageType.ACCORDING_DURATION); staticText = "The next 2 damage that a source of your choice would deal to you and/or permanents you control this turn is dealt to any target instead"; this.damageSource = new TargetSource(); } diff --git a/Mage.Sets/src/mage/cards/h/HazduhrTheAbbot.java b/Mage.Sets/src/mage/cards/h/HazduhrTheAbbot.java index 1769330d3f..ff6ff10296 100644 --- a/Mage.Sets/src/mage/cards/h/HazduhrTheAbbot.java +++ b/Mage.Sets/src/mage/cards/h/HazduhrTheAbbot.java @@ -66,7 +66,7 @@ class HazduhrTheAbbotRedirectDamageEffect extends RedirectionEffect { private static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); public HazduhrTheAbbotRedirectDamageEffect(Duration duration) { - super(duration, 0, UsageType.ONE_USAGE_ABSOLUTE); + super(duration, 0, UsageType.ACCORDING_DURATION); this.staticText = "The next X damage that would be dealt this turn to target white creature you control is dealt to {this} instead"; } diff --git a/Mage.Sets/src/mage/cards/r/RaziaBorosArchangel.java b/Mage.Sets/src/mage/cards/r/RaziaBorosArchangel.java index a1a15feb12..c88f537260 100644 --- a/Mage.Sets/src/mage/cards/r/RaziaBorosArchangel.java +++ b/Mage.Sets/src/mage/cards/r/RaziaBorosArchangel.java @@ -81,7 +81,7 @@ class RaziaBorosArchangelEffect extends RedirectionEffect { protected MageObjectReference redirectToObject; public RaziaBorosArchangelEffect(Duration duration, int amount) { - super(duration, 3, UsageType.ONE_USAGE_ABSOLUTE); + super(duration, amount, UsageType.ACCORDING_DURATION); staticText = "The next " + amount + " damage that would be dealt to target creature you control this turn is dealt to another target creature instead"; } diff --git a/Mage.Sets/src/mage/cards/s/ShimianNightStalker.java b/Mage.Sets/src/mage/cards/s/ShimianNightStalker.java index d26f6f0fa3..3e5fdcbc1a 100644 --- a/Mage.Sets/src/mage/cards/s/ShimianNightStalker.java +++ b/Mage.Sets/src/mage/cards/s/ShimianNightStalker.java @@ -62,7 +62,7 @@ class ShimianNightStalkerRedirectDamageEffect extends RedirectionEffect { private static FilterCreaturePermanent filter = new FilterCreaturePermanent(); public ShimianNightStalkerRedirectDamageEffect() { - super(Duration.EndOfTurn, Integer.MAX_VALUE, UsageType.ONE_USAGE_ABSOLUTE); + super(Duration.EndOfTurn, Integer.MAX_VALUE, UsageType.ACCORDING_DURATION); this.staticText = "All damage that would be dealt to you this turn by target attacking creature is dealt to {this} instead"; } diff --git a/Mage/src/main/java/mage/abilities/effects/RedirectionEffect.java b/Mage/src/main/java/mage/abilities/effects/RedirectionEffect.java index 2804b557e2..0fc50330ce 100644 --- a/Mage/src/main/java/mage/abilities/effects/RedirectionEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/RedirectionEffect.java @@ -85,6 +85,12 @@ public abstract class RedirectionEffect extends ReplacementEffectImpl { applyEffectsCounter = game.getState().getApplyEffectsCounter(); } } + if (usageType == UsageType.ACCORDING_DURATION) { + amountToRedirect -= damageEvent.getAmount(); + if (amountToRedirect <= 0) { + this.discard(); + } + } Permanent permanent = game.getPermanent(redirectTarget.getFirstTarget()); if (permanent != null) { permanent.damage(damageToRedirect, event.getSourceId(), source, game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects());