mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 12:31:59 -08:00
Fix Redirection effects ending early (#9191)
This commit is contained in:
parent
1e220d9f77
commit
7bed65e8ec
6 changed files with 11 additions and 5 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue