mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
refactor: Cleanup CopyTargetStackObjectEffect (#12220)
* simplify constructors * rename class * adjust to accommodate any stack object * adjust all usages to main common class
This commit is contained in:
parent
b1b83dc5b8
commit
fa728eafb1
84 changed files with 204 additions and 265 deletions
|
|
@ -5,7 +5,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.CopyTargetStackAbilityEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -45,7 +45,7 @@ public final class AbstruseArchaic extends CardImpl {
|
|||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// {1}, {T}: Copy target activated or triggered ability you control from a colorless source. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(new CopyTargetStackAbilityEffect(), new GenericManaCost(1));
|
||||
Ability ability = new SimpleActivatedAbility(new CopyTargetStackObjectEffect(), new GenericManaCost(1));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetActivatedOrTriggeredAbility(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CopyTargetStackAbilityEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.CounterTargetEffect;
|
||||
import mage.abilities.keyword.DoctorsCompanionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -42,7 +42,7 @@ public final class AdricMathematicalGenius extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// {2}{U}, {T}: Copy target activated or triggered ability you control. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(new CopyTargetStackAbilityEffect(), new ManaCostsImpl<>("{2}{U}"));
|
||||
Ability ability = new SimpleActivatedAbility(new CopyTargetStackObjectEffect(), new ManaCostsImpl<>("{2}{U}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetActivatedOrTriggeredAbility(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import mage.filter.predicate.mageobject.PermanentPredicate;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.keyword.WardAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -45,7 +45,7 @@ public final class ArchmageOfEchoes extends CardImpl {
|
|||
|
||||
// Whenever you cast a Faerie or Wizard permanent spell, copy it.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new CopyTargetSpellEffect(false, false, false).setText("copy it"),
|
||||
new CopyTargetStackObjectEffect(false, false, false).setText("copy it"),
|
||||
filter, false, SetTargetPointer.SPELL));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -39,8 +38,8 @@ public final class BonusRound extends CardImpl {
|
|||
|
||||
class BonusRoundDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
||||
|
||||
public BonusRoundDelayedTriggeredAbility() {
|
||||
super(new CopyTargetSpellEffect(true, true), Duration.EndOfTurn, false);
|
||||
BonusRoundDelayedTriggeredAbility() {
|
||||
super(new CopyTargetStackObjectEffect(true, true, true), Duration.EndOfTurn, false);
|
||||
}
|
||||
|
||||
private BonusRoundDelayedTriggeredAbility(final BonusRoundDelayedTriggeredAbility ability) {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import mage.abilities.condition.Condition;
|
|||
import mage.abilities.condition.common.CardsInControllerGraveyardCondition;
|
||||
import mage.abilities.condition.common.SolvedSourceCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.keyword.SurveilEffect;
|
||||
import mage.abilities.hint.common.CaseSolvedHint;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -43,7 +43,7 @@ public final class CaseOfTheShiftingVisage extends CardImpl {
|
|||
Condition toSolveCondition = new CardsInControllerGraveyardCondition(15);
|
||||
// Solved — Whenever you cast a nonlegendary creature spell, copy that spell.
|
||||
Ability solvedAbility = new ConditionalTriggeredAbility(new SpellCastControllerTriggeredAbility(
|
||||
new CopyTargetSpellEffect(true).setText("copy that spell. <i>(The copy becomes a token.)</i>"), filter, false, SetTargetPointer.SPELL
|
||||
new CopyTargetStackObjectEffect(true).setText("copy that spell. <i>(The copy becomes a token.)</i>"), filter, false, SetTargetPointer.SPELL
|
||||
), SolvedSourceCondition.SOLVED, null);
|
||||
|
||||
this.addAbility(new CaseAbility(initialAbility, toSolveCondition, solvedAbility)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package mage.cards.c;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -38,7 +38,7 @@ public final class ChancellorOfTales extends CardImpl {
|
|||
|
||||
// Whenever you cast an Adventure spell, you may copy it. You may choose new targets for the copy.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new CopyTargetSpellEffect(true).withSpellName("it"),
|
||||
new CopyTargetStackObjectEffect(true).withText("it"),
|
||||
filter, true, SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
|||
import mage.abilities.dynamicvalue.common.GetXLoyaltyValue;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.mana.AddManaInAnyCombinationEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -38,7 +38,7 @@ public class ChandraHopesBeacon extends CardImpl {
|
|||
//Whenever you cast an instant or sorcery spell, copy it. You may choose new targets for the copy. This ability
|
||||
//triggers only once each turn.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new CopyTargetSpellEffect(true).withSpellName("it"),
|
||||
new CopyTargetStackObjectEffect(true).withText("it"),
|
||||
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY,
|
||||
false, SetTargetPointer.SPELL
|
||||
).setTriggersOnceEachTurn(true));
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package mage.cards.c;
|
|||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -33,7 +33,7 @@ public final class ClovenCasting extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{U}{R}");
|
||||
|
||||
// Whenever you cast a multicolored instant or sorcery spell, you may pay {1}. If you do, copy that spell. You may choose new targets for the copy.
|
||||
Effect effect = new CopyTargetSpellEffect(true);
|
||||
Effect effect = new CopyTargetStackObjectEffect(true);
|
||||
effect.setText("copy that spell. You may choose new targets for the copy");
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new DoIfCostPaid(effect, new GenericManaCost(1)),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -27,7 +27,7 @@ public final class DoubleDown extends CardImpl {
|
|||
|
||||
// Whenever you cast an outlaw spell, copy that spell.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new CopyTargetSpellEffect(false, false, false),
|
||||
new CopyTargetStackObjectEffect(false, false, false),
|
||||
filter, false, SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -29,7 +29,7 @@ public final class DoubleMajor extends CardImpl {
|
|||
|
||||
// Copy target creature spell you control, except it isn't legendary if the spell is legendary.
|
||||
this.getSpellAbility().addEffect(
|
||||
new CopyTargetSpellEffect(false, false, false, 1, new RemoveTypeCopyApplier(SuperType.LEGENDARY))
|
||||
new CopyTargetStackObjectEffect(false, false, false, 1, new RemoveTypeCopyApplier(SuperType.LEGENDARY))
|
||||
.setText(
|
||||
"Copy target creature spell you control, except it isn't legendary if the spell is legendary."));
|
||||
this.getSpellAbility().addTarget(new TargetSpell(filter));
|
||||
|
|
@ -43,4 +43,4 @@ public final class DoubleMajor extends CardImpl {
|
|||
public DoubleMajor copy() {
|
||||
return new DoubleMajor(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -41,7 +41,7 @@ public final class DoubleVision extends CardImpl {
|
|||
class DoubleVisionCopyTriggeredAbility extends SpellCastControllerTriggeredAbility {
|
||||
|
||||
DoubleVisionCopyTriggeredAbility() {
|
||||
super(new CopyTargetSpellEffect(true), new FilterInstantOrSorcerySpell(), false);
|
||||
super(new CopyTargetStackObjectEffect(true), new FilterInstantOrSorcerySpell(), false);
|
||||
}
|
||||
|
||||
private DoubleVisionCopyTriggeredAbility(final DoubleVisionCopyTriggeredAbility ability) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -49,7 +49,7 @@ public final class DrafnaFounderOfLatNam extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// {3}, {T}: Copy target artifact spell you control.
|
||||
ability = new SimpleActivatedAbility(new CopyTargetSpellEffect(false, false, false), new GenericManaCost(3));
|
||||
ability = new SimpleActivatedAbility(new CopyTargetStackObjectEffect(false, false, false), new GenericManaCost(3));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetSpell(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ColoredManaCost;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -46,7 +46,7 @@ public final class DualCasting extends CardImpl {
|
|||
Ability ability = new EnchantAbility(auraTarget);
|
||||
this.addAbility(ability);
|
||||
// Enchanted creature has "{R}, {tap}: Copy target instant or sorcery spell you control. You may choose new targets for the copy."
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new ColoredManaCost(ColoredManaSymbol.R));
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetStackObjectEffect(), new ColoredManaCost(ColoredManaSymbol.R));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetSpell(filter));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.AURA)));
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -32,7 +32,7 @@ public final class DualcasterMage extends CardImpl {
|
|||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
// When Dualcaster Mage enters the battlefield, copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new CopyTargetSpellEffect(), false);
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new CopyTargetStackObjectEffect(), false);
|
||||
ability.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.keyword.LevelUpAbility;
|
||||
import mage.abilities.keyword.LevelerCardBuilder;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -45,7 +45,7 @@ public final class EchoMage extends LevelerCard {
|
|||
// 2/4
|
||||
// {U}{U}, {tap}: Copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||
Abilities<Ability> abilities1 = new AbilitiesImpl<>();
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new ManaCostsImpl<>("{U}{U}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetStackObjectEffect(), new ManaCostsImpl<>("{U}{U}"));
|
||||
ability.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
|
||||
ability.addCost(new TapSourceCost());
|
||||
abilities1.add(ability);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
|
|
@ -54,7 +54,7 @@ public final class ErrantStreetArtist extends CardImpl {
|
|||
this.addAbility(HasteAbility.getInstance());
|
||||
|
||||
// {1}{U}, {T}: Copy target spell you control that wasn't cast. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(new CopyTargetSpellEffect(), new ManaCostsImpl<>("{1}{U}"));
|
||||
Ability ability = new SimpleActivatedAbility(new CopyTargetStackObjectEffect(), new ManaCostsImpl<>("{1}{U}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetSpell(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
@ -77,4 +77,4 @@ enum ErrantStreetArtistPredicate implements Predicate<StackObject> {
|
|||
public boolean apply(StackObject input, Game game) {
|
||||
return input.isCopy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.SplitCard;
|
||||
|
|
@ -41,7 +41,7 @@ public final class ExpansionExplosion extends SplitCard {
|
|||
|
||||
// Expansion
|
||||
// Copy target instant or sorcery spell with converted mana cost 4 or less. You may choose new targets for the copy.
|
||||
this.getLeftHalfCard().getSpellAbility().addEffect(new CopyTargetSpellEffect());
|
||||
this.getLeftHalfCard().getSpellAbility().addEffect(new CopyTargetStackObjectEffect());
|
||||
this.getLeftHalfCard().getSpellAbility().addTarget(new TargetSpell(filter));
|
||||
|
||||
// Explosion
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package mage.cards.f;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -37,7 +37,7 @@ public final class FerocityOfTheUnderworld extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetNonlandPermanent(filterMode1));
|
||||
|
||||
// Copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||
Mode mode = new Mode(new CopyTargetSpellEffect());
|
||||
Mode mode = new Mode(new CopyTargetStackObjectEffect());
|
||||
mode.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
|
||||
this.getSpellAbility().addMode(mode);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.keyword.CommanderStormAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -22,7 +22,7 @@ public final class FuryStorm extends CardImpl {
|
|||
this.addAbility(new CommanderStormAbility());
|
||||
|
||||
// Copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||
this.getSpellAbility().addEffect(new CopyTargetSpellEffect());
|
||||
this.getSpellAbility().addEffect(new CopyTargetStackObjectEffect());
|
||||
this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.DamagePlayersEffect;
|
||||
import mage.abilities.effects.common.MayTapOrUntapTargetEffect;
|
||||
import mage.abilities.effects.common.PutOnLibrarySourceEffect;
|
||||
|
|
@ -61,7 +61,7 @@ public final class GandalfTheGrey extends CardImpl {
|
|||
|
||||
// * Copy target instant or sorcery spell you control. You may choose new targets for the copy.
|
||||
ability.addMode(
|
||||
new Mode(new CopyTargetSpellEffect()).addTarget(new TargetSpell(filter))
|
||||
new Mode(new CopyTargetStackObjectEffect()).addTarget(new TargetSpell(filter))
|
||||
.setModeTag("copy spell")
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.ExileSourceFromGraveCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -41,7 +41,7 @@ public final class Geistblast extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetAnyTarget());
|
||||
|
||||
// {2}{U}, Exile Geistblast from your graveyard: Copy target instant or sorcery you control. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new CopyTargetSpellEffect(), new ManaCostsImpl<>("{2}{U}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new CopyTargetStackObjectEffect(), new ManaCostsImpl<>("{2}{U}"));
|
||||
ability.addTarget(new TargetSpell(filter));
|
||||
ability.addCost(new ExileSourceFromGraveCost());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package mage.cards.g;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -40,7 +40,7 @@ public final class GorionWiseMentor extends CardImpl {
|
|||
|
||||
// Whenever you cast an Adventure spell, you may copy it. You may choose new targets for the copy.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new CopyTargetSpellEffect(true).withSpellName("it"),
|
||||
new CopyTargetStackObjectEffect(true).withText("it"),
|
||||
filter, true, SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,12 +4,11 @@ import mage.abilities.DelayedTriggeredAbility;
|
|||
import mage.abilities.condition.common.RaidCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.abilities.hint.common.RaidHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.game.Game;
|
||||
|
|
@ -57,7 +56,7 @@ public final class HowlOfTheHorde extends CardImpl {
|
|||
class HowlOfTheHordeDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
||||
|
||||
HowlOfTheHordeDelayedTriggeredAbility() {
|
||||
super(new CopyTargetSpellEffect(true), Duration.EndOfTurn);
|
||||
super(new CopyTargetStackObjectEffect(true), Duration.EndOfTurn);
|
||||
}
|
||||
|
||||
private HowlOfTheHordeDelayedTriggeredAbility(final HowlOfTheHordeDelayedTriggeredAbility ability) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ package mage.cards.i;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.common.ChooseNewTargetsTargetEffect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.CounterTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -35,7 +35,7 @@ public final class InsidiousWill extends CardImpl {
|
|||
this.getSpellAbility().addMode(mode);
|
||||
|
||||
// Copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||
mode = new Mode(new CopyTargetSpellEffect());
|
||||
mode = new Mode(new CopyTargetStackObjectEffect());
|
||||
mode.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
|
||||
this.getSpellAbility().getModes().addMode(mode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -46,12 +46,12 @@ public final class IzzetGuildmage extends CardImpl {
|
|||
|
||||
// <i>({UR} can be paid with either {U} or {R}.)</i>
|
||||
// {2}{U}: Copy target instant spell you control with converted mana cost 2 or less. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new ManaCostsImpl<>("{2}{U}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetStackObjectEffect(), new ManaCostsImpl<>("{2}{U}"));
|
||||
ability.addTarget(new TargetSpell(filterInstant));
|
||||
this.addAbility(ability);
|
||||
|
||||
// {2}{R}: Copy target sorcery spell you control with converted mana cost 2 or less. You may choose new targets for the copy.
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new ManaCostsImpl<>("{2}{R}"));
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetStackObjectEffect(), new ManaCostsImpl<>("{2}{R}"));
|
||||
ability.addTarget(new TargetSpell(filterSorcery));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import mage.abilities.DelayedTriggeredAbility;
|
|||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||
import mage.abilities.effects.common.MayExileCardFromHandPlottedEffect;
|
||||
|
|
@ -109,7 +109,7 @@ class CantCastJaceReawakenedEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
class JaceReawakenedDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
||||
|
||||
JaceReawakenedDelayedTriggeredAbility() {
|
||||
super(new CopyTargetSpellEffect(true), Duration.EndOfTurn, false);
|
||||
super(new CopyTargetStackObjectEffect(true), Duration.EndOfTurn, false);
|
||||
}
|
||||
|
||||
private JaceReawakenedDelayedTriggeredAbility(final JaceReawakenedDelayedTriggeredAbility ability) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import mage.abilities.DelayedTriggeredAbility;
|
|||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerOrPlaneswalkerTriggeredAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetStackAbilityEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
|
@ -72,8 +72,8 @@ public final class JayasPhoenix extends CardImpl {
|
|||
|
||||
class JayasPhoenixTriggeredAbility extends DelayedTriggeredAbility {
|
||||
|
||||
public JayasPhoenixTriggeredAbility() {
|
||||
super(new CopyTargetStackAbilityEffect(), Duration.EndOfTurn);
|
||||
JayasPhoenixTriggeredAbility() {
|
||||
super(new CopyTargetStackObjectEffect(), Duration.EndOfTurn);
|
||||
}
|
||||
|
||||
private JayasPhoenixTriggeredAbility(final JayasPhoenixTriggeredAbility ability) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.common.SpellCastOpponentTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
|
|
@ -42,7 +42,7 @@ public final class JinGitaxiasProgressTyrant extends CardImpl {
|
|||
|
||||
// Whenever you cast an artifact, instant, or sorcery spell, copy that spell. You may choose new targets for the copy. This ability triggers only once each turn.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new CopyTargetSpellEffect().setText("copy that spell. You may choose new targets for the copy"),
|
||||
new CopyTargetStackObjectEffect().setText("copy that spell. You may choose new targets for the copy"),
|
||||
filter, false, SetTargetPointer.SPELL
|
||||
).setTriggersOnceEachTurn(true));
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import mage.MageInt;
|
|||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -56,7 +56,7 @@ public final class KalamaxTheStormsire extends CardImpl {
|
|||
|
||||
class KalamaxTheStormsireSpellCastAbility extends SpellCastControllerTriggeredAbility {
|
||||
KalamaxTheStormsireSpellCastAbility() {
|
||||
super(new CopyTargetSpellEffect(true), new FilterInstantSpell(), false);
|
||||
super(new CopyTargetStackObjectEffect(true), new FilterInstantSpell(), false);
|
||||
}
|
||||
|
||||
private KalamaxTheStormsireSpellCastAbility(final KalamaxTheStormsireSpellCastAbility ability) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -49,7 +49,7 @@ public final class LeagueGuildmage extends CardImpl {
|
|||
|
||||
// {X}{R}, {T}: Copy target instant or sorcery spell you control with converted mana cost X. You may choose new targets for the copy.
|
||||
ability = new SimpleActivatedAbility(
|
||||
new CopyTargetSpellEffect(),
|
||||
new CopyTargetStackObjectEffect(),
|
||||
new ManaCostsImpl<>("{X}{R}")
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.CopyTargetStackAbilityEffect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -45,19 +44,19 @@ public final class LithoformEngine extends CardImpl {
|
|||
this.supertype.add(SuperType.LEGENDARY);
|
||||
|
||||
// {2}, {T}: Copy target activated or triggered ability you control. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(new CopyTargetStackAbilityEffect(), new GenericManaCost(2));
|
||||
Ability ability = new SimpleActivatedAbility(new CopyTargetStackObjectEffect(), new GenericManaCost(2));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetActivatedOrTriggeredAbility(filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
// {3}, {T}: Copy target instant or sorcery spell you control. You may choose new targets for the copy.
|
||||
ability = new SimpleActivatedAbility(new CopyTargetSpellEffect(), new GenericManaCost(3));
|
||||
ability = new SimpleActivatedAbility(new CopyTargetStackObjectEffect(), new GenericManaCost(3));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetSpell(filter2));
|
||||
this.addAbility(ability);
|
||||
|
||||
// {4}, {T}: Copy target permanent spell you control.
|
||||
ability = new SimpleActivatedAbility(new CopyTargetSpellEffect(
|
||||
ability = new SimpleActivatedAbility(new CopyTargetStackObjectEffect(
|
||||
false, false, false
|
||||
), new GenericManaCost(4));
|
||||
ability.addCost(new TapSourceCost());
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -29,7 +29,7 @@ public final class LuckyClover extends CardImpl {
|
|||
|
||||
// Whenever you cast an Adventure instant or sorcery spell, copy it. You may choose new targets for the copy.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new CopyTargetSpellEffect(true).withSpellName("it"),
|
||||
new CopyTargetStackObjectEffect(true).withText("it"),
|
||||
filter, false, SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.CastFromEverywhereSourceCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.keyword.CompanionAbility;
|
||||
import mage.abilities.keyword.CompanionCondition;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
|
|
@ -55,7 +55,7 @@ public final class LutriTheSpellchaser extends CardImpl {
|
|||
|
||||
// When Lutri, the Spellchaser enters the battlefield, if you cast it, copy target instant or sorcery spell you control. You may choose new targets for the copy.
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new CopyTargetSpellEffect(), false),
|
||||
new EntersBattlefieldTriggeredAbility(new CopyTargetStackObjectEffect(), false),
|
||||
CastFromEverywhereSourceCondition.instance, "When {this} enters the battlefield, " +
|
||||
"if you cast it, copy target instant or sorcery spell you control. " +
|
||||
"You may choose new targets for the copy."
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import mage.MageInt;
|
|||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.continuous.PlayFromTopOfLibraryEffect;
|
||||
import mage.abilities.effects.common.continuous.PlayWithTheTopCardRevealedEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -65,7 +65,7 @@ public final class MelekIzzetParagon extends CardImpl {
|
|||
class MelekIzzetParagonTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public MelekIzzetParagonTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), false);
|
||||
super(Zone.BATTLEFIELD, new CopyTargetStackObjectEffect(), false);
|
||||
}
|
||||
|
||||
private MelekIzzetParagonTriggeredAbility(final MelekIzzetParagonTriggeredAbility ability) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package mage.cards.m;
|
|||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -54,7 +54,7 @@ class MirariTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
MirariTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DoIfCostPaid(
|
||||
new CopyTargetSpellEffect(true),
|
||||
new CopyTargetStackObjectEffect(true),
|
||||
new GenericManaCost(3)), false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import java.util.UUID;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -37,7 +37,7 @@ public final class MirrorSheen extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U/R}{U/R}");
|
||||
|
||||
// {1}{UR}{UR}: Copy target instant or sorcery spell that targets you. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new ManaCostsImpl<>("{1}{U/R}{U/R}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetStackObjectEffect(), new ManaCostsImpl<>("{1}{U/R}{U/R}"));
|
||||
ability.addTarget(new TargetSpell(filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
|
||||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -47,7 +47,7 @@ public final class Mirrorpool extends CardImpl {
|
|||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {2}{C}, {T}, Sacrifice Mirrorpool: Copy target instant or sorcery spell you control. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new ManaCostsImpl<>("{2}{C}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetStackObjectEffect(), new ManaCostsImpl<>("{2}{C}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetSpell(filter));
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesFaceDownCreatureEffect;
|
||||
import mage.abilities.keyword.MorphAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -41,7 +41,7 @@ public final class MischievousQuanar extends CardImpl {
|
|||
this.addAbility(new MorphAbility(this, new ManaCostsImpl<>("{1}{U}{U}")));
|
||||
|
||||
// When Mischievous Quanar is turned face up, copy target instant or sorcery spell. You may choose new targets for that copy.
|
||||
Effect effect2 = new CopyTargetSpellEffect();
|
||||
Effect effect2 = new CopyTargetStackObjectEffect();
|
||||
effect2.setText("copy target instant or sorcery spell. You may choose new targets for that copy");
|
||||
Ability ability = new TurnedFaceUpSourceTriggeredAbility(effect2);
|
||||
ability.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.common.EntersBattlefieldAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -52,12 +52,12 @@ public class MyojinOfCrypticDreams extends CardImpl {
|
|||
// Remove an indestructible counter from Myojin of Cryptic Dreams:
|
||||
// Copy target permanent spell you control three times. (The copies become tokens.)
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new CopyTargetSpellEffect(false, false, false)
|
||||
new CopyTargetStackObjectEffect(false, false, false)
|
||||
.setText("Copy target permanent spell you control three times. <i>(The copies become tokens.)</i>"),
|
||||
new RemoveCountersSourceCost(CounterType.INDESTRUCTIBLE.createInstance())
|
||||
);
|
||||
ability.addEffect(new CopyTargetSpellEffect(false, false, false).setText(" "));
|
||||
ability.addEffect(new CopyTargetSpellEffect(false, false, false).setText(" "));
|
||||
ability.addEffect(new CopyTargetStackObjectEffect(false, false, false).setText(" "));
|
||||
ability.addEffect(new CopyTargetStackObjectEffect(false, false, false).setText(" "));
|
||||
ability.addTarget(new TargetSpell(permanentSpellFilter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mage.cards.n;
|
||||
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -19,7 +19,7 @@ public final class NarsetsReversal extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}{U}");
|
||||
|
||||
// Copy target instant or sorcery spell, then return it to its owner's hand. You may choose new targets for the copy.
|
||||
this.getSpellAbility().addEffect(new CopyTargetSpellEffect()
|
||||
this.getSpellAbility().addEffect(new CopyTargetStackObjectEffect()
|
||||
.setText("Copy target instant or sorcery spell,"));
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()
|
||||
.setText("then return it to its owner's hand. You may choose new targets for the copy."));
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -54,7 +54,7 @@ public final class NaruMehaMasterWizard extends CardImpl {
|
|||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
//When Naru Meha, Master Wizard enters the battlefield, copy target instant or sorcery spell you control. You may choose new targets for the copy.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new CopyTargetSpellEffect());
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new CopyTargetStackObjectEffect());
|
||||
ability.addTarget(new TargetSpell(spellFilter));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -46,7 +46,7 @@ public final class NivixGuildmage extends CardImpl {
|
|||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawDiscardControllerEffect(), new ManaCostsImpl<>("{1}{U}{R}")));
|
||||
|
||||
// {2}{U}{R}: Copy target instant or sorcery spell you control. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new ManaCostsImpl<>("{2}{U}{R}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetStackObjectEffect(), new ManaCostsImpl<>("{2}{U}{R}"));
|
||||
ability.addTarget(new TargetSpell(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package mage.cards.o;
|
|||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.SacrificeEffect;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.SplitCard;
|
||||
|
|
@ -71,7 +71,7 @@ class OddsEffect extends OneShotEffect {
|
|||
|
||||
} else {
|
||||
game.informPlayers("Odds: Spell will be copied");
|
||||
return new CopyTargetSpellEffect().apply(game, source);
|
||||
return new CopyTargetStackObjectEffect().apply(game, source);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -34,7 +34,7 @@ public final class OverloadedMageRing extends CardImpl {
|
|||
|
||||
// {1}, {T}, Sacrifice Overloaded Mage-Ring: Copy target spell you control. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new CopyTargetSpellEffect(false, false, true), new GenericManaCost(1)
|
||||
new CopyTargetStackObjectEffect(false, false, true), new GenericManaCost(1)
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import java.util.UUID;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.mana.AnyColorManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -33,7 +33,7 @@ public final class PrimalWellspring extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// When that mana is spent to cast an instant or sorcery spell, copy that spell and you may choose new targets for the copy.
|
||||
Effect effect = new CopyTargetSpellEffect(true);
|
||||
Effect effect = new CopyTargetStackObjectEffect(true);
|
||||
effect.setText("copy that spell and you may choose new targets for the copy");
|
||||
this.addAbility(new PyrimalWellspringTriggeredAbility(ability.getOriginalId(), effect));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -100,7 +100,7 @@ class PyromancerAscensionQuestTriggeredAbility extends TriggeredAbilityImpl {
|
|||
class PyromancerAscensionCopyTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
PyromancerAscensionCopyTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new CopyTargetSpellEffect(true), true);
|
||||
super(Zone.BATTLEFIELD, new CopyTargetStackObjectEffect(true), true);
|
||||
}
|
||||
|
||||
private PyromancerAscensionCopyTriggeredAbility(final PyromancerAscensionCopyTriggeredAbility ability) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.ObjectColor;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.mana.RedManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -35,7 +35,7 @@ public final class PyromancersGoggles extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// When that mana is used to cast a red instant or sorcery spell, copy that spell and you may choose new targets for the copy.
|
||||
Effect effect = new CopyTargetSpellEffect(true);
|
||||
Effect effect = new CopyTargetStackObjectEffect(true);
|
||||
effect.setText("copy that spell and you may choose new targets for the copy");
|
||||
this.addAbility(new PyromancersGogglesTriggeredAbility(ability.getOriginalId(), effect));
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package mage.cards.r;
|
|||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -33,7 +33,7 @@ public final class ReflectionsOfLittjara extends CardImpl {
|
|||
|
||||
// Whenever you cast a spell of the chosen type, copy that spell.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new CopyTargetSpellEffect(false, true, false)
|
||||
new CopyTargetStackObjectEffect(false, true, false)
|
||||
.setText("copy that spell"),
|
||||
filter, false, SetTargetPointer.SPELL
|
||||
));
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import mage.abilities.AbilityImpl;
|
|||
import mage.abilities.Mode;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -51,7 +51,7 @@ public final class ReflectiveGolem extends CardImpl {
|
|||
class ReflectiveGolemTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
ReflectiveGolemTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DoIfCostPaid(new CopyTargetSpellEffect(), new GenericManaCost(2)), false);
|
||||
super(Zone.BATTLEFIELD, new DoIfCostPaid(new CopyTargetStackObjectEffect(), new GenericManaCost(2)), false);
|
||||
}
|
||||
|
||||
private ReflectiveGolemTriggeredAbility(final ReflectiveGolemTriggeredAbility ability) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package mage.cards.r;
|
|||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.keyword.AftermathAbility;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.SplitCard;
|
||||
|
|
@ -34,7 +34,7 @@ public final class RefuseCooperate extends SplitCard {
|
|||
// Aftermath
|
||||
getRightHalfCard().addAbility(new AftermathAbility().setRuleAtTheTop(true));
|
||||
// Copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||
getRightHalfCard().getSpellAbility().addEffect(new CopyTargetSpellEffect());
|
||||
getRightHalfCard().getSpellAbility().addEffect(new CopyTargetStackObjectEffect());
|
||||
getRightHalfCard().getSpellAbility().addTarget(new TargetSpell(new FilterInstantOrSorcerySpell()));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.keyword.BuybackAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -24,7 +24,7 @@ public final class Reiterate extends CardImpl {
|
|||
|
||||
// Copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||
this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
|
||||
this.getSpellAbility().addEffect(new CopyTargetSpellEffect());
|
||||
this.getSpellAbility().addEffect(new CopyTargetStackObjectEffect());
|
||||
}
|
||||
|
||||
private Reiterate(final Reiterate card) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -89,11 +89,11 @@ class RepeatedReverberationTriggeredAbility extends DelayedTriggeredAbility {
|
|||
if (spell != null && spell.isInstantOrSorcery(game)) {
|
||||
this.getEffects().clear();
|
||||
this.addEffect(
|
||||
new CopyTargetSpellEffect(true)
|
||||
new CopyTargetStackObjectEffect(true)
|
||||
.setTargetPointer(new FixedTarget(event.getTargetId(), game))
|
||||
);
|
||||
this.addEffect(
|
||||
new CopyTargetSpellEffect(true)
|
||||
new CopyTargetStackObjectEffect(true)
|
||||
.setTargetPointer(new FixedTarget(event.getTargetId(), game))
|
||||
);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package mage.cards.r;
|
|||
import mage.abilities.Mode;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.ChooseNewTargetsTargetEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackAbilityEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.keyword.SpreeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -39,7 +39,7 @@ public final class ReturnTheFavor extends CardImpl {
|
|||
this.addAbility(new SpreeAbility(this));
|
||||
|
||||
// + {1} -- Copy target instant spell, sorcery spell, activated ability, or triggered ability. You may choose new targets for the copy.
|
||||
this.getSpellAbility().addEffect(new CopyTargetStackAbilityEffect());
|
||||
this.getSpellAbility().addEffect(new CopyTargetStackObjectEffect());
|
||||
this.getSpellAbility().addTarget(new TargetStackObject(filter));
|
||||
this.getSpellAbility().withFirstModeCost(new GenericManaCost(1));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -19,7 +19,7 @@ public final class Reverberate extends CardImpl {
|
|||
|
||||
// Copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||
this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
|
||||
this.getSpellAbility().addEffect(new CopyTargetSpellEffect());
|
||||
this.getSpellAbility().addEffect(new CopyTargetStackObjectEffect());
|
||||
}
|
||||
|
||||
private Reverberate(final Reverberate card) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
|||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -46,7 +46,7 @@ public final class RikuOfTwoReflections extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// Whenever you cast an instant or sorcery spell, you may pay {U}{R}. If you do, copy that spell. You may choose new targets for the copy.
|
||||
Effect effect = new CopyTargetSpellEffect(true);
|
||||
Effect effect = new CopyTargetStackObjectEffect(true);
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new DoIfCostPaid(effect, new ManaCostsImpl<>("{U}{R}")),
|
||||
filter, false, SetTargetPointer.SPELL
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.ReturnToHandFromBattlefieldSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -40,7 +40,7 @@ public final class RoothaMercurialArtist extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// {2}, Return Rootha, Mercurial Artist to its owner's hand: Copy target instant or sorcery spell you control. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(new CopyTargetSpellEffect(), new GenericManaCost(2));
|
||||
Ability ability = new SimpleActivatedAbility(new CopyTargetStackObjectEffect(), new GenericManaCost(2));
|
||||
ability.addCost(new ReturnToHandFromBattlefieldSourceCost());
|
||||
ability.addTarget(new TargetSpell(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|||
import mage.abilities.condition.common.KickedCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -62,9 +62,9 @@ class SeaGateStormcallerDelayedTriggeredAbility extends DelayedTriggeredAbility
|
|||
private final boolean twice;
|
||||
|
||||
public SeaGateStormcallerDelayedTriggeredAbility(boolean twice) {
|
||||
super(new CopyTargetSpellEffect(true), Duration.EndOfTurn, true, false);
|
||||
super(new CopyTargetStackObjectEffect(true), Duration.EndOfTurn, true, false);
|
||||
if (twice) {
|
||||
this.addEffect(new CopyTargetSpellEffect(true));
|
||||
this.addEffect(new CopyTargetStackObjectEffect(true));
|
||||
}
|
||||
this.twice = twice;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import mage.abilities.Mode;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.CardsInOpponentGraveyardCondition;
|
||||
import mage.abilities.effects.common.CantBeCopiedSourceEffect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -34,7 +34,7 @@ public final class SeeDouble extends CardImpl {
|
|||
this.getSpellAbility().addHint(CardsInOpponentGraveyardCondition.EIGHT.getHint());
|
||||
|
||||
// * Copy target spell. You may choose new targets for the copy.
|
||||
this.getSpellAbility().addEffect(new CopyTargetSpellEffect());
|
||||
this.getSpellAbility().addEffect(new CopyTargetStackObjectEffect());
|
||||
this.getSpellAbility().addTarget(new TargetSpell());
|
||||
|
||||
// * Create a token that's a copy of target creature.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import mage.MageInt;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.PreventAllDamageToSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -71,7 +71,7 @@ class SevinneTheChronoclasmTriggeredAbility extends SpellCastControllerTriggered
|
|||
return false;
|
||||
}
|
||||
this.getEffects().clear();
|
||||
Effect effect = new CopyTargetSpellEffect(true);
|
||||
Effect effect = new CopyTargetStackObjectEffect(true);
|
||||
effect.setTargetPointer(new FixedTarget(event.getTargetId(), game));
|
||||
this.addEffect(effect);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -40,7 +40,7 @@ public final class SigilTracer extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// {1}{U}, Tap two untapped Wizards you control: Copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new ManaCostsImpl<>("{1}{U}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetStackObjectEffect(), new ManaCostsImpl<>("{1}{U}"));
|
||||
ability.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
|
||||
ability.addCost(new TapTargetCost(new TargetControlledCreaturePermanent(2, 2, filter, false)));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package mage.cards.s;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.DrawCardAllEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.RollDieWithResultTableEffect;
|
||||
|
|
@ -50,7 +50,7 @@ public final class SimonWildMagicSorcerer extends CardImpl {
|
|||
effect.addTableEntry(10, 19, new DrawCardSourceControllerEffect(1, "you"));
|
||||
|
||||
// 20 | Copy that spell. You may choose new targets for the copy.
|
||||
effect.addTableEntry(20, 20, new CopyTargetSpellEffect());
|
||||
effect.addTableEntry(20, 20, new CopyTargetStackObjectEffect());
|
||||
}
|
||||
|
||||
private SimonWildMagicSorcerer(final SimonWildMagicSorcerer card) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package mage.cards.s;
|
|||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.choices.TwoChoiceVote;
|
||||
|
|
@ -78,7 +78,7 @@ class SplitDecisionEffect extends OneShotEffect {
|
|||
if (denialCount > duplicationCount) {
|
||||
return game.getStack().counter(spell.getId(), source, game);
|
||||
} else {
|
||||
return new CopyTargetSpellEffect().apply(game, source);
|
||||
return new CopyTargetStackObjectEffect().apply(game, source);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
|||
import mage.abilities.common.CastSecondSpellTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.ExileTopXMayPlayUntilEffect;
|
||||
import mage.abilities.keyword.StormAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -47,7 +47,7 @@ public final class StellaLeeWildCard extends CardImpl {
|
|||
|
||||
// {T}: Copy target instant or sorcery spell you control. You may choose new targets for the copy. Activate only if you've cast three or more spells this turn.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(
|
||||
Zone.BATTLEFIELD, new CopyTargetSpellEffect(),
|
||||
Zone.BATTLEFIELD, new CopyTargetStackObjectEffect(),
|
||||
new TapSourceCost(), StellaLeeWildCardCondition.instance
|
||||
);
|
||||
ability.addTarget(new TargetSpell(filter));
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package mage.cards.s;
|
|||
|
||||
import mage.abilities.common.CastSecondSpellTriggeredAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.keyword.WardAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -24,7 +24,7 @@ public final class StormOfSaruman extends CardImpl {
|
|||
|
||||
// Whenever you cast your second spell each turn, copy it, except the copy isn't legendary. You may choose new targets for the copy.
|
||||
this.addAbility(new CastSecondSpellTriggeredAbility(Zone.BATTLEFIELD,
|
||||
new CopyTargetSpellEffect(false, true, true, 1, new RemoveTypeCopyApplier(SuperType.LEGENDARY))
|
||||
new CopyTargetStackObjectEffect(false, true, true, 1, new RemoveTypeCopyApplier(SuperType.LEGENDARY))
|
||||
.setText("copy it, except the copy isn't legendary. You may choose new targets for the copy."),
|
||||
TargetController.YOU, false,
|
||||
SetTargetPointer.SPELL));
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CopyTargetStackAbilityEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -29,7 +29,7 @@ public final class StrionicResonator extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
|
||||
// {2}, {T}: Copy target triggered ability you control. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(new CopyTargetStackAbilityEffect(), new ManaCostsImpl<>("{2}"));
|
||||
Ability ability = new SimpleActivatedAbility(new CopyTargetStackObjectEffect(), new ManaCostsImpl<>("{2}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetTriggeredAbility(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -21,7 +21,7 @@ public final class SwarmIntelligence extends CardImpl {
|
|||
|
||||
// Whenever you cast an instant or sorcery spell, you may copy that spell. You may choose new targets for the copy.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new CopyTargetSpellEffect(true)
|
||||
new CopyTargetStackObjectEffect(true)
|
||||
.setText("you may copy that spell. You may choose new targets for the copy"),
|
||||
new FilterInstantOrSorcerySpell("an instant or sorcery spell"),
|
||||
true, SetTargetPointer.SPELL
|
||||
|
|
|
|||
|
|
@ -1,24 +1,21 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CopyTargetStackAbilityEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterStackObject;
|
||||
import mage.filter.predicate.other.ArtifactSourcePredicate;
|
||||
import mage.target.common.TargetActivatedOrTriggeredAbility;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
|
|
@ -45,7 +42,7 @@ public final class TawnosUrzasApprentice extends CardImpl {
|
|||
this.addAbility(HasteAbility.getInstance());
|
||||
|
||||
// {U}{R}, {T}: Copy target activated or triggered ability you control from an artifact source. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetStackAbilityEffect(), new ManaCostsImpl<>("{U}{R}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetStackObjectEffect(), new ManaCostsImpl<>("{U}{R}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetActivatedOrTriggeredAbility(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ package mage.cards.t;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.common.SagaAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -74,7 +74,7 @@ public final class TheMirariConjecture extends CardImpl {
|
|||
class TheMirariConjectureDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
||||
|
||||
public TheMirariConjectureDelayedTriggeredAbility() {
|
||||
super(new CopyTargetSpellEffect(true), Duration.EndOfTurn, false);
|
||||
super(new CopyTargetStackObjectEffect(true), Duration.EndOfTurn, false);
|
||||
}
|
||||
|
||||
private TheMirariConjectureDelayedTriggeredAbility(final TheMirariConjectureDelayedTriggeredAbility ability) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.CopyTargetStackAbilityEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -48,7 +48,7 @@ public final class ThePeregrineDynamo extends CardImpl {
|
|||
this.addAbility(HasteAbility.getInstance());
|
||||
|
||||
// {1}, {T}: Copy target activated or triggered ability you control from another legendary source that's not a commander. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(new CopyTargetStackAbilityEffect(), new GenericManaCost(1));
|
||||
Ability ability = new SimpleActivatedAbility(new CopyTargetStackObjectEffect(), new GenericManaCost(1));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetActivatedOrTriggeredAbility(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package mage.cards.t;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -38,7 +38,7 @@ public final class TheSixthDoctor extends CardImpl {
|
|||
// Time Lord's Prerogative -- Whenever you cast a historic spell, copy it, except the copy isn't legendary. This ability triggers only once each turn.
|
||||
this.addAbility(
|
||||
new SpellCastControllerTriggeredAbility(
|
||||
new CopyTargetSpellEffect(
|
||||
new CopyTargetStackObjectEffect(
|
||||
false, true, false, 1,
|
||||
new RemoveTypeCopyApplier(SuperType.LEGENDARY)
|
||||
).setText("copy it, except the copy isn't legendary"),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -18,7 +18,7 @@ public final class Twincast extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}{U}");
|
||||
|
||||
// Copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||
this.getSpellAbility().addEffect(new CopyTargetSpellEffect());
|
||||
this.getSpellAbility().addEffect(new CopyTargetStackObjectEffect());
|
||||
this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -39,7 +39,7 @@ public final class TwinningStaff extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(new TwinningStaffEffect()));
|
||||
|
||||
// {7}, {T}: Copy target instant or sorcery spell you control. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(new CopyTargetSpellEffect(), new GenericManaCost(7));
|
||||
Ability ability = new SimpleActivatedAbility(new CopyTargetStackObjectEffect(), new GenericManaCost(7));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetSpell(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
@ -90,4 +90,4 @@ class TwinningStaffEffect extends ReplacementEffectImpl {
|
|||
public TwinningStaffEffect copy() {
|
||||
return new TwinningStaffEffect(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -38,7 +38,7 @@ public final class UyoSilentProphet extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// {2}, Return two lands you control to their owner's hand: Copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new GenericManaCost(2));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetStackObjectEffect(), new GenericManaCost(2));
|
||||
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("lands"), false)));
|
||||
ability.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import mage.abilities.common.EntersBattlefieldAbility;
|
|||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.ManaSpentToCastCount;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -40,7 +40,7 @@ public final class VerazolTheSplitCurrent extends CardImpl {
|
|||
// Whenever you cast a kicked spell, you may remove two +1/+1 counters from Verazol, the Split Current. If you do, copy that spell. You may choose new targets for that copy.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new DoIfCostPaid(
|
||||
new CopyTargetSpellEffect(false, true)
|
||||
new CopyTargetStackObjectEffect(true)
|
||||
.setText("copy that spell. You may choose new targets for the copy"),
|
||||
new RemoveCountersSourceCost(CounterType.P1P1.createInstance(2))
|
||||
), StaticFilters.FILTER_SPELL_KICKED_A, false, SetTargetPointer.SPELL
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package mage.cards.v;
|
||||
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.CopyTargetStackAbilityEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.replacement.AdditionalTriggerControlledETBReplacementEffect;
|
||||
import mage.cards.AdventureCard;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -32,7 +32,7 @@ public final class VirtueOfKnowledge extends AdventureCard {
|
|||
|
||||
// Vantress Visions
|
||||
// Copy target activated or triggered ability you control. You may choose new targets for the copy.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new CopyTargetStackAbilityEffect());
|
||||
this.getSpellCard().getSpellAbility().addEffect(new CopyTargetStackObjectEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetActivatedOrTriggeredAbility(filter));
|
||||
|
||||
this.finalizeAdventure();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package mage.cards.v;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -44,7 +44,7 @@ public final class VoloGuideToMonsters extends CardImpl {
|
|||
|
||||
// Whenever you cast a creature spell that doesn't share a creature type with a creature you control or a creature card in your graveyard, copy that spell.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new CopyTargetSpellEffect(true)
|
||||
new CopyTargetStackObjectEffect(true)
|
||||
.setText("copy that spell"),
|
||||
filter, false, SetTargetPointer.SPELL
|
||||
));
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CopyTargetStackAbilityEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -48,7 +48,7 @@ public final class WeaverOfHarmony extends CardImpl {
|
|||
)));
|
||||
|
||||
// {G}, {T}: Copy target activated or triggered ability you control from an enchantment source. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(new CopyTargetStackAbilityEffect(), new ManaCostsImpl<>("{G}"));
|
||||
Ability ability = new SimpleActivatedAbility(new CopyTargetStackObjectEffect(), new ManaCostsImpl<>("{G}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetActivatedOrTriggeredAbility(filter2));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ package mage.cards.w;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.ChooseNewTargetsTargetEffect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -31,7 +31,7 @@ public final class WildRicochet extends CardImpl {
|
|||
|
||||
// You may choose new targets for target instant or sorcery spell. Then copy that spell. You may choose new targets for the copy.
|
||||
this.getSpellAbility().addEffect(new ChooseNewTargetsTargetEffect());
|
||||
Effect effect = new CopyTargetSpellEffect();
|
||||
Effect effect = new CopyTargetStackObjectEffect();
|
||||
effect.setText("Then copy that spell. You may choose new targets for the copy");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addTarget(new TargetStackObject(filter));
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package org.mage.test.cards.copy;
|
||||
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.SetTargetPointer;
|
||||
|
|
@ -21,7 +21,7 @@ public class CopyPermanentSpellTest extends CardTestPlayerBase {
|
|||
addCustomCardWithAbility(
|
||||
"Forker", playerA,
|
||||
new SpellCastControllerTriggeredAbility(
|
||||
new CopyTargetSpellEffect(true),
|
||||
new CopyTargetStackObjectEffect(true),
|
||||
StaticFilters.FILTER_SPELL, false,
|
||||
SetTargetPointer.SPELL
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package mage.abilities.common.delayed;
|
|||
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.StaticFilters;
|
||||
|
|
@ -24,7 +24,7 @@ public class CopyNextSpellDelayedTriggeredAbility extends DelayedTriggeredAbilit
|
|||
}
|
||||
|
||||
public CopyNextSpellDelayedTriggeredAbility(FilterSpell filter) {
|
||||
this(filter, new CopyTargetSpellEffect(true), null);
|
||||
this(filter, new CopyTargetStackObjectEffect(true), null);
|
||||
}
|
||||
|
||||
public CopyNextSpellDelayedTriggeredAbility(FilterSpell filter, Effect effect, String rule) {
|
||||
|
|
|
|||
|
|
@ -1,47 +0,0 @@
|
|||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.StackAbility;
|
||||
|
||||
public class CopyTargetStackAbilityEffect extends OneShotEffect {
|
||||
|
||||
/**
|
||||
* Copy target (activated/triggered) ability on the stack, choosing new targets for the copy
|
||||
*/
|
||||
public CopyTargetStackAbilityEffect() {
|
||||
super(Outcome.Copy);
|
||||
}
|
||||
|
||||
protected CopyTargetStackAbilityEffect(final CopyTargetStackAbilityEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
StackAbility stackAbility = (StackAbility) game.getStack().getStackObject(getTargetPointer().getFirst(game, source));
|
||||
if (stackAbility == null) {
|
||||
return false;
|
||||
}
|
||||
stackAbility.createCopyOnStack(game, source, source.getControllerId(), true);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CopyTargetStackAbilityEffect copy() {
|
||||
return new CopyTargetStackAbilityEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
if (staticText != null && !staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
return "copy " + getTargetPointer().describeTargets(mode.getTargets(), "that spell")
|
||||
+ ". You may choose new targets for the copy";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -2,44 +2,35 @@ 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.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.game.stack.StackObject;
|
||||
import mage.util.functions.StackObjectCopyApplier;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class CopyTargetSpellEffect extends OneShotEffect {
|
||||
public class CopyTargetStackObjectEffect extends OneShotEffect {
|
||||
|
||||
private final boolean useController;
|
||||
private final boolean useLKI;
|
||||
private String copyThatSpellName = "that spell";
|
||||
private String objectName = "that spell";
|
||||
private final boolean chooseTargets;
|
||||
private final int amount;
|
||||
private final StackObjectCopyApplier applier;
|
||||
|
||||
public CopyTargetSpellEffect() {
|
||||
public CopyTargetStackObjectEffect() {
|
||||
this(false);
|
||||
}
|
||||
|
||||
public CopyTargetSpellEffect(boolean useLKI) {
|
||||
this(false, useLKI);
|
||||
public CopyTargetStackObjectEffect(boolean useLKI) {
|
||||
this(false, useLKI, true);
|
||||
}
|
||||
|
||||
public CopyTargetSpellEffect(boolean useController, boolean useLKI) {
|
||||
this(useController, useLKI, true);
|
||||
}
|
||||
|
||||
public CopyTargetSpellEffect(boolean useController, boolean useLKI, boolean chooseTargets) {
|
||||
this(useController, useLKI, chooseTargets, 1);
|
||||
}
|
||||
|
||||
public CopyTargetSpellEffect(boolean useController, boolean useLKI, boolean chooseTargets, int amount) {
|
||||
this(useController, useLKI, chooseTargets, amount, null);
|
||||
public CopyTargetStackObjectEffect(boolean useController, boolean useLKI, boolean chooseTargets) {
|
||||
this(useController, useLKI, chooseTargets, 1, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -50,8 +41,8 @@ public class CopyTargetSpellEffect extends OneShotEffect {
|
|||
* @param amount The amount of copies to create
|
||||
* @param applier An applier to apply to the newly created copies. Used to change copiable values of the copy, such as types or name
|
||||
*/
|
||||
public CopyTargetSpellEffect(boolean useController, boolean useLKI, boolean chooseTargets, int amount,
|
||||
StackObjectCopyApplier applier) {
|
||||
public CopyTargetStackObjectEffect(boolean useController, boolean useLKI, boolean chooseTargets, int amount,
|
||||
StackObjectCopyApplier applier) {
|
||||
super(Outcome.Copy);
|
||||
this.useController = useController;
|
||||
this.useLKI = useLKI;
|
||||
|
|
@ -60,34 +51,35 @@ public class CopyTargetSpellEffect extends OneShotEffect {
|
|||
this.applier = applier;
|
||||
}
|
||||
|
||||
protected CopyTargetSpellEffect(final CopyTargetSpellEffect effect) {
|
||||
protected CopyTargetStackObjectEffect(final CopyTargetStackObjectEffect effect) {
|
||||
super(effect);
|
||||
this.useLKI = effect.useLKI;
|
||||
this.useController = effect.useController;
|
||||
this.copyThatSpellName = effect.copyThatSpellName;
|
||||
this.objectName = effect.objectName;
|
||||
this.chooseTargets = effect.chooseTargets;
|
||||
this.amount = effect.amount;
|
||||
this.applier = effect.applier;
|
||||
}
|
||||
|
||||
public Effect withSpellName(String copyThatSpellName) {
|
||||
this.copyThatSpellName = copyThatSpellName;
|
||||
public CopyTargetStackObjectEffect withText(String objectName) {
|
||||
this.objectName = objectName;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Spell spell;
|
||||
StackObject stackObject;
|
||||
if (useLKI) {
|
||||
spell = game.getSpellOrLKIStack(getTargetPointer().getFirst(game, source));
|
||||
stackObject = game.getSpellOrLKIStack(getTargetPointer().getFirst(game, source));
|
||||
} else {
|
||||
spell = game.getStack().getSpell(getTargetPointer().getFirst(game, source));
|
||||
stackObject = game.getStack().getStackObject(getTargetPointer().getFirst(game, source));
|
||||
}
|
||||
if (spell == null) {
|
||||
spell = (Spell) game.getLastKnownInformation(getTargetPointer().getFirst(game, source), Zone.STACK);
|
||||
if (stackObject == null) {
|
||||
stackObject = (StackObject) game.getLastKnownInformation(getTargetPointer().getFirst(game, source), Zone.STACK);
|
||||
}
|
||||
if (spell != null) {
|
||||
spell.createCopyOnStack(game, source, useController ? spell.getControllerId() : source.getControllerId(),
|
||||
if (stackObject != null) {
|
||||
stackObject.createCopyOnStack(game, source,
|
||||
useController ? stackObject.getControllerId() : source.getControllerId(),
|
||||
chooseTargets, amount, applier);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -95,8 +87,8 @@ public class CopyTargetSpellEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
public CopyTargetSpellEffect copy() {
|
||||
return new CopyTargetSpellEffect(this);
|
||||
public CopyTargetStackObjectEffect copy() {
|
||||
return new CopyTargetStackObjectEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -105,7 +97,7 @@ public class CopyTargetSpellEffect extends OneShotEffect {
|
|||
return staticText;
|
||||
}
|
||||
return "copy " +
|
||||
getTargetPointer().describeTargets(mode.getTargets(), copyThatSpellName) +
|
||||
getTargetPointer().describeTargets(mode.getTargets(), objectName) +
|
||||
(chooseTargets ? ". You may choose new targets for the copy" : "");
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@ package mage.game.command.emblems;
|
|||
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
|
|
@ -18,7 +18,7 @@ public final class RowanScholarOfSparksEmblem extends Emblem {
|
|||
public RowanScholarOfSparksEmblem() {
|
||||
super("Emblem Rowan");
|
||||
this.getAbilities().add(new SpellCastControllerTriggeredAbility(
|
||||
Zone.COMMAND, new DoIfCostPaid(new CopyTargetSpellEffect(true), new GenericManaCost(2)),
|
||||
Zone.COMMAND, new DoIfCostPaid(new CopyTargetStackObjectEffect(true), new GenericManaCost(2)),
|
||||
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false, SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package mage.game.command.emblems;
|
||||
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
|
@ -17,7 +17,7 @@ public final class WillKenrithEmblem extends Emblem {
|
|||
super("Emblem Will Kenrith");
|
||||
this.getAbilities().add(new SpellCastControllerTriggeredAbility(
|
||||
Zone.COMMAND,
|
||||
new CopyTargetSpellEffect(true).withSpellName("it"),
|
||||
new CopyTargetStackObjectEffect(true).withText("it"),
|
||||
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY,
|
||||
false,
|
||||
SetTargetPointer.SPELL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue