mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
refactor: fixed miss copy effect (related to #12605)
This commit is contained in:
parent
7969ffb548
commit
e7585e8d95
2 changed files with 6 additions and 6 deletions
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
package mage.abilities.effects;
|
||||
|
||||
import mage.constants.EffectType;
|
||||
|
|
@ -37,4 +35,7 @@ public abstract class OneShotEffect extends EffectImpl {
|
|||
super.setTargetPointer(targetPointer);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
abstract public OneShotEffect copy();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package mage.abilities.effects.common;
|
|||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.Outcome;
|
||||
|
|
@ -44,7 +43,7 @@ public class ExileThenReturnTargetEffect extends OneShotEffect {
|
|||
this.putCards = effect.putCards;
|
||||
this.yourControl = effect.yourControl;
|
||||
this.textThatCard = effect.textThatCard;
|
||||
this.afterEffect = effect.afterEffect;
|
||||
this.afterEffect = effect.afterEffect == null ? null : effect.afterEffect.copy();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -78,7 +77,7 @@ public class ExileThenReturnTargetEffect extends OneShotEffect {
|
|||
yourControl ? controller : game.getPlayer(card.getOwnerId()),
|
||||
card.getMainCard(), source, game, "card");
|
||||
}
|
||||
if (afterEffect != null){
|
||||
if (afterEffect != null) {
|
||||
afterEffect.setTargetPointer(new FixedTargets(toFlicker, game));
|
||||
afterEffect.apply(game, source);
|
||||
}
|
||||
|
|
@ -105,7 +104,7 @@ public class ExileThenReturnTargetEffect extends OneShotEffect {
|
|||
sb.append(this.yourControl ? "your" : "its owner's");
|
||||
}
|
||||
sb.append(" control");
|
||||
if (afterEffect != null){
|
||||
if (afterEffect != null) {
|
||||
sb.append(". ").append(CardUtil.getTextWithFirstCharUpperCase(afterEffect.getText(mode)));
|
||||
}
|
||||
return sb.toString();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue