forked from External/mage
[LTC] Implement Gandalf, Westward Voyager (#10727)
* refactor and cleanup SpellCastControllerTriggeredAbility * [LTC] Implement Gandalf, Westward Voyager * throw on unexpected setTargetPointer
This commit is contained in:
parent
4ac9293821
commit
0e5069ccc2
82 changed files with 567 additions and 361 deletions
|
|
@ -34,12 +34,12 @@ public final class AriaOfFlame extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTriggeredAbility(new AriaOfFlameEffect()));
|
||||
|
||||
// Whenever you cast an instant or sorcery spell, put a verse counter on Aria of Flame, then it deals damage equal to the number of verse counters on it to target player or planeswalker.
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(
|
||||
Ability ability = SpellCastControllerTriggeredAbility.createWithRule(
|
||||
new AddCountersSourceEffect(CounterType.VERSE.createInstance()),
|
||||
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY,
|
||||
false, "Whenever you cast an instant or sorcery spell, " +
|
||||
"put a verse counter on {this}, then it deals damage equal to " +
|
||||
"the number of verse counters on it to target player or planeswalker."
|
||||
false, "Whenever you cast an instant or sorcery spell, "
|
||||
+ "put a verse counter on {this}, then it deals damage equal to "
|
||||
+ "the number of verse counters on it to target player or planeswalker."
|
||||
);
|
||||
ability.addEffect(new DamageTargetEffect(xValue));
|
||||
ability.addTarget(new TargetPlayerOrPlaneswalker());
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -12,15 +11,13 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect;
|
|||
import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public final class AuroraEidolon extends CardImpl {
|
||||
|
|
@ -37,7 +34,12 @@ public final class AuroraEidolon extends CardImpl {
|
|||
ability.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(ability);
|
||||
// Whenever you cast a multicolored spell, you may return Aurora Eidolon from your graveyard to your hand.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), StaticFilters.FILTER_SPELL_A_MULTICOLORED, true, false));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
Zone.GRAVEYARD,
|
||||
new ReturnSourceFromGraveyardToHandEffect(),
|
||||
StaticFilters.FILTER_SPELL_A_MULTICOLORED,
|
||||
true, SetTargetPointer.NONE
|
||||
));
|
||||
}
|
||||
|
||||
private AuroraEidolon(final AuroraEidolon card) {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
|
|
@ -42,7 +43,7 @@ public final class AuroraPhoenix extends CardImpl {
|
|||
// Whenever you cast a spell with cascade, return Aurora Phoenix from your graveyard to your hand.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(),
|
||||
filter, false, false
|
||||
filter, false, SetTargetPointer.NONE
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -18,8 +17,9 @@ import mage.constants.SubType;
|
|||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public final class BattlegateMimic extends CardImpl {
|
||||
|
|
@ -34,7 +34,7 @@ public final class BattlegateMimic extends CardImpl {
|
|||
private static final String rule = "Whenever you cast a spell that's both red and white, {this} has base power and toughness 4/2 until end of turn and gains first strike until end of turn.";
|
||||
|
||||
public BattlegateMimic(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R/W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R/W}");
|
||||
this.subtype.add(SubType.SHAPESHIFTER);
|
||||
|
||||
this.power = new MageInt(2);
|
||||
|
|
@ -42,7 +42,7 @@ public final class BattlegateMimic extends CardImpl {
|
|||
|
||||
// Whenever you cast a spell that's both red and white, Battlegate Mimic has base power and toughness 4/2 and gains first strike until end of turn.
|
||||
SetBasePowerToughnessSourceEffect baseToughnessSourceEffect = new SetBasePowerToughnessSourceEffect(4, 2, Duration.EndOfTurn, SubLayer.SetPT_7b);
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(baseToughnessSourceEffect, filter, false, rule);
|
||||
Ability ability = SpellCastControllerTriggeredAbility.createWithRule(baseToughnessSourceEffect, filter, false, rule);
|
||||
ability.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, false, true));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
|
|
@ -10,13 +9,15 @@ import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class BloodFunnel extends CardImpl {
|
||||
|
|
@ -36,11 +37,12 @@ public final class BloodFunnel extends CardImpl {
|
|||
// Whenever you cast a noncreature spell, counter that spell unless you sacrifice a creature.
|
||||
Effect effect = new CounterUnlessPaysEffect(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
effect.setText("counter that spell unless you sacrifice a creature");
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD,
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
effect,
|
||||
StaticFilters.FILTER_SPELL_A_NON_CREATURE,
|
||||
false,
|
||||
true));
|
||||
SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
||||
private BloodFunnel(final BloodFunnel card) {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public final class BloodlordOfVaasgoth extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever you cast a Vampire creature spell, it gains bloodthirst 3.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new BloodlordOfVaasgothEffect(), filter, false, true));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new BloodlordOfVaasgothEffect(), filter, false, SetTargetPointer.SPELL));
|
||||
}
|
||||
|
||||
private BloodlordOfVaasgoth(final BloodlordOfVaasgoth card) {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,8 @@ public final class BorealOutrider extends CardImpl {
|
|||
// Whenever you cast a creature spell, if {S} of any of that spell's color was spent to cast it, that creature enters the battlefield with an additional +1/+1 counter on it.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new SpellCastControllerTriggeredAbility(
|
||||
new BorealOutriderEffect(), StaticFilters.FILTER_SPELL_A_CREATURE, false, true
|
||||
new BorealOutriderEffect(), StaticFilters.FILTER_SPELL_A_CREATURE,
|
||||
false, SetTargetPointer.SPELL
|
||||
), BorealOutriderCondition.instance, "Whenever you cast a creature spell, " +
|
||||
"if {S} of any of that spell's colors was spent to cast it, that creature " +
|
||||
"enters the battlefield with an additional +1/+1 counter on it."
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
|
|
@ -15,8 +14,9 @@ import mage.game.Game;
|
|||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class BounteousKirin extends CardImpl {
|
||||
|
|
@ -32,7 +32,10 @@ public final class BounteousKirin extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// Whenever you cast a Spirit or Arcane spell, you may gain life equal to that spell's converted mana cost.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, new BounteousKirinEffect(), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true, true));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new BounteousKirinEffect(), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD,
|
||||
true, SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
||||
private BounteousKirin(final BounteousKirin card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
|
|
@ -17,8 +16,9 @@ import mage.filter.predicate.mageobject.ManaValuePredicate;
|
|||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class CelestialKirin extends CardImpl {
|
||||
|
|
@ -35,7 +35,10 @@ public final class CelestialKirin extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// Whenever you cast a Spirit or Arcane spell, destroy all permanents with that spell's converted mana cost.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, new CelestialKirinEffect(), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false, true));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new CelestialKirinEffect(), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD,
|
||||
false, SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
||||
private CelestialKirin(final CelestialKirin card) {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@ public class ChandraHopesBeacon extends CardImpl {
|
|||
//triggers only once each turn.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new CopyTargetSpellEffect(true).withSpellName("it"),
|
||||
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false, true
|
||||
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY,
|
||||
false, SetTargetPointer.SPELL
|
||||
).setTriggersOnceEachTurn(true));
|
||||
|
||||
//+2: Add two mana in any combination of colors.
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public final class CloudhoofKirin extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// Whenever you cast a Spirit or Arcane spell, you may have target player put the top X cards of their library into their graveyard, where X is that spell's converted mana cost.
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, new CloudhoofKirinEffect(), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true, true);
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, new CloudhoofKirinEffect(), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true, SetTargetPointer.SPELL);
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import mage.abilities.effects.common.DoIfCostPaid;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.MulticoloredPredicate;
|
||||
|
|
@ -34,7 +35,10 @@ public final class ClovenCasting extends CardImpl {
|
|||
// 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.setText("copy that spell. You may choose new targets for the copy");
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(effect, new GenericManaCost(1)), filter, false, true));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new DoIfCostPaid(effect, new GenericManaCost(1)),
|
||||
filter, false, SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
||||
private ClovenCasting(final ClovenCasting card) {
|
||||
|
|
|
|||
|
|
@ -35,18 +35,15 @@ public class CrypticPursuit extends CardImpl {
|
|||
public CrypticPursuit(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{R}");
|
||||
|
||||
// Whenever you cast an instant or sorcery spell from your hand, manifest the top card of your library.
|
||||
// (Put that card onto the battlefield face down as a 2/2 creature.
|
||||
// Turn it face up any time for its mana cost if it’s a creature card.)
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
// Whenever you cast an instant or sorcery spell from your hand, manifest the top card of your library. (Put that card onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it’s a creature card.)
|
||||
this.addAbility(SpellCastControllerTriggeredAbility.createWithFromZone(
|
||||
new ManifestEffect(1),
|
||||
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY,
|
||||
false,
|
||||
Zone.HAND)
|
||||
);
|
||||
Zone.HAND
|
||||
));
|
||||
|
||||
// Whenever a face-down creature you control dies, exile it if it’s an instant or sorcery card.
|
||||
// You may cast that card until the end of your next turn.
|
||||
// Whenever a face-down creature you control dies, exile it if it’s an instant or sorcery card. You may cast that card until the end of your next turn.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(
|
||||
new CrypticPursuitExileAndPlayEffect(),
|
||||
false,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
|
|
@ -28,8 +25,11 @@ import mage.target.TargetPermanent;
|
|||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class DarkIntimations extends CardImpl {
|
||||
|
|
@ -48,7 +48,10 @@ public final class DarkIntimations extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new DarkIntimationsEffect());
|
||||
|
||||
// When you cast a Bolas planeswalker spell, exile Dark Intimations from your graveyard. That planeswalker enters the battlefield with an additional loyalty counter on it.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(Zone.GRAVEYARD, new DarkIntimationsGraveyardEffect(), filter, false, true).setTriggerPhrase("When you cast a Bolas planeswalker spell, "));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
Zone.GRAVEYARD, new DarkIntimationsGraveyardEffect(),
|
||||
filter, false, SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
||||
private DarkIntimations(final DarkIntimations card) {
|
||||
|
|
@ -188,7 +191,7 @@ class DarkIntimationsReplacementEffect extends ReplacementEffectImpl {
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
return creature != null
|
||||
return creature != null
|
||||
&& event.getTargetId().equals(getTargetPointer().getFirst(game, source));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
|
|
@ -13,8 +12,9 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class Dreamcatcher extends CardImpl {
|
||||
|
|
@ -27,8 +27,12 @@ public final class Dreamcatcher extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever you cast a Spirit or Arcane spell, you may sacrifice Dreamcatcher. If you do, draw a card.
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true,
|
||||
"Whenever you cast a Spirit or Arcane spell, you may sacrifice {this}. If you do, draw a card.");
|
||||
Ability ability = SpellCastControllerTriggeredAbility.createWithRule(
|
||||
new SacrificeSourceEffect(),
|
||||
StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD,
|
||||
true,
|
||||
"Whenever you cast a Spirit or Arcane spell, you may sacrifice {this}. If you do, draw a card."
|
||||
);
|
||||
ability.addEffect(new DrawCardSourceControllerEffect(1));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
|
|
@ -14,18 +13,15 @@ import mage.abilities.keyword.FirstStrikeAbility;
|
|||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.permanent.token.EdgarMarkovToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class EdgarMarkov extends CardImpl {
|
||||
|
|
@ -49,7 +45,10 @@ public final class EdgarMarkov extends CardImpl {
|
|||
|
||||
// Eminence - Whenever you cast another Vampire spell, if Edgar Markov is in the command zone or on the battlefield, create a 1/1 black Vampire creature token.
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||
new SpellCastControllerTriggeredAbility(Zone.ALL, new CreateTokenEffect(new EdgarMarkovToken()), filter2, false, false),
|
||||
new SpellCastControllerTriggeredAbility(
|
||||
Zone.ALL, new CreateTokenEffect(new EdgarMarkovToken()),
|
||||
filter2, false, SetTargetPointer.NONE
|
||||
),
|
||||
SourceOnBattlefieldOrCommandZoneCondition.instance,
|
||||
"Whenever you cast another Vampire spell, if {this} is in the command zone or on the battlefield, create a 1/1 black Vampire creature token.");
|
||||
ability.setAbilityWord(AbilityWord.EMINENCE);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility;
|
||||
|
|
@ -18,6 +17,8 @@ import mage.game.Game;
|
|||
import mage.game.permanent.token.ThrullToken;
|
||||
import mage.game.stack.Spell;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
|
@ -33,7 +34,11 @@ public final class EndrekSahrMasterBreeder extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// Whenever you cast a creature spell, create X 1/1 black Thrull creature tokens, where X is that spell's converted mana cost.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new EndrekSahrMasterBreederEffect(), StaticFilters.FILTER_SPELL_A_CREATURE, false, true));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new EndrekSahrMasterBreederEffect(),
|
||||
StaticFilters.FILTER_SPELL_A_CREATURE,
|
||||
false, SetTargetPointer.SPELL
|
||||
));
|
||||
// When you control seven or more Thrulls, sacrifice Endrek Sahr, Master Breeder.
|
||||
this.addAbility(new ControlsPermanentsControllerTriggeredAbility(
|
||||
new FilterCreaturePermanent(SubType.THRULL, "seven or more Thrulls"), ComparisonType.MORE_THAN, 6,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -13,13 +12,15 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public final class EnigmaEidolon extends CardImpl {
|
||||
|
|
@ -36,8 +37,12 @@ public final class EnigmaEidolon extends CardImpl {
|
|||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
// Whenever you cast a multicolored spell, you may return Enigma Eidolon from your graveyard to your hand.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(Zone.GRAVEYARD,
|
||||
new ReturnSourceFromGraveyardToHandEffect(), StaticFilters.FILTER_SPELL_A_MULTICOLORED, true, false));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
Zone.GRAVEYARD,
|
||||
new ReturnSourceFromGraveyardToHandEffect(),
|
||||
StaticFilters.FILTER_SPELL_A_MULTICOLORED,
|
||||
true, SetTargetPointer.NONE
|
||||
));
|
||||
}
|
||||
|
||||
private EnigmaEidolon(final EnigmaEidolon card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -15,13 +14,15 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public final class EntropicEidolon extends CardImpl {
|
||||
|
|
@ -41,8 +42,11 @@ public final class EntropicEidolon extends CardImpl {
|
|||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
// Whenever you cast a multicolored spell, you may return Entropic Eidolon from your graveyard to your hand.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(Zone.GRAVEYARD,
|
||||
new ReturnSourceFromGraveyardToHandEffect(), StaticFilters.FILTER_SPELL_A_MULTICOLORED, true, false));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
Zone.GRAVEYARD,
|
||||
new ReturnSourceFromGraveyardToHandEffect(),
|
||||
StaticFilters.FILTER_SPELL_A_MULTICOLORED,
|
||||
true, SetTargetPointer.NONE));
|
||||
}
|
||||
|
||||
private EntropicEidolon(final EntropicEidolon card) {
|
||||
|
|
|
|||
116
Mage.Sets/src/mage/cards/g/GandalfWestwardVoyager.java
Normal file
116
Mage.Sets/src/mage/cards/g/GandalfWestwardVoyager.java
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardAllEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.*;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class GandalfWestwardVoyager extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("a spell with mana value 5 or greater");
|
||||
|
||||
static {
|
||||
filter.add(new ManaValuePredicate(ComparisonType.OR_GREATER, 5));
|
||||
}
|
||||
|
||||
public GandalfWestwardVoyager(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{U}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.AVATAR);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Whenever you cast a spell with mana value 5 or greater, each opponent reveals the top card of their library. If any of those cards shares a card type with that spell, copy that spell, you may choose new targets for the copy, and each opponent draws a card. Otherwise, you draw a card.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new GandalfWestwardVoyagerEffect(),
|
||||
filter, false, SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
||||
private GandalfWestwardVoyager(final GandalfWestwardVoyager card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GandalfWestwardVoyager copy() {
|
||||
return new GandalfWestwardVoyager(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GandalfWestwardVoyagerEffect extends OneShotEffect {
|
||||
|
||||
GandalfWestwardVoyagerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "each opponent reveals the top card of their library. If any of those cards "
|
||||
+ "shares a card type with that spell, copy that spell, you may choose new targets for "
|
||||
+ "the copy, and each opponent draws a card. Otherwise, you draw a card";
|
||||
}
|
||||
|
||||
private GandalfWestwardVoyagerEffect(final GandalfWestwardVoyagerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GandalfWestwardVoyagerEffect copy() {
|
||||
return new GandalfWestwardVoyagerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Spell spell = game.getSpellOrLKIStack(targetPointer.getFirst(game, source));
|
||||
List<CardType> typesSpell = spell == null ? new ArrayList<>() : spell.getCardType(game);
|
||||
|
||||
boolean foundCard = false;
|
||||
for (UUID playerId : game.getOpponents(source.getControllerId())) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Card card = player.getLibrary().getFromTop(game);
|
||||
if (card == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// each opponent reveals the top card of their library.
|
||||
player.revealCards(source, " — " + player.getName(), new CardsImpl(card), game, true);
|
||||
|
||||
List<CardType> types = card.getCardType(game);
|
||||
types.retainAll(typesSpell);
|
||||
foundCard |= !types.isEmpty();
|
||||
}
|
||||
|
||||
if (foundCard) {
|
||||
// If any of those cards shares a card type with that spell,
|
||||
// copy that spell, you may choose new targets for the copy,
|
||||
if (spell != null) {
|
||||
spell.createCopyOnStack(game, source, source.getControllerId(), true);
|
||||
}
|
||||
|
||||
// and each opponent draws a card.
|
||||
new DrawCardAllEffect(1, TargetController.OPPONENT).apply(game, source);
|
||||
} else {
|
||||
// Otherwise, you draw a card
|
||||
new DrawCardSourceControllerEffect(1).apply(game, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@ import mage.abilities.keyword.VigilanceAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterSpell;
|
||||
|
|
@ -40,7 +41,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"),
|
||||
filter, true, true
|
||||
filter, true, SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,10 @@ public final class InfernalKirin extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever you cast a Spirit or Arcane spell, target player reveals their hand and discards all cards with that spell's converted mana cost.
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, new InfernalKirinEffect(), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false, true);
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(
|
||||
new InfernalKirinEffect(), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD,
|
||||
false, SetTargetPointer.SPELL
|
||||
);
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,10 +12,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
|
@ -55,8 +52,11 @@ public final class JayasPhoenix extends CardImpl {
|
|||
|
||||
|
||||
// Whenever you cast a planeswalker spell, you may return Jaya's Phoenix from your graveyard to the battlefield.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect()
|
||||
.setText("you may return {this} from your graveyard to the battlefield"), filter, true, false
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
Zone.GRAVEYARD,
|
||||
new ReturnSourceFromGraveyardToBattlefieldEffect()
|
||||
.setText("you may return {this} from your graveyard to the battlefield"),
|
||||
filter, true, SetTargetPointer.NONE
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.common.CopySourceSpellEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
|
|
@ -46,7 +43,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 CopySourceSpellEffect().setText("copy that spell. You may choose new targets for the copy"),
|
||||
filter, false, true
|
||||
filter, false, SetTargetPointer.SPELL
|
||||
).setTriggersOnceEachTurn(true));
|
||||
|
||||
// Whenever an opponent casts an artifact, instant, or sorcery spell, counter that spell. This ability triggers only once each turn.
|
||||
|
|
@ -85,7 +82,8 @@ class JinGitaxiasProgressTyrantEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Spell spell = (Spell) getValue("spellCast");
|
||||
if (spell != null) {
|
||||
game.getStack().counter(spell.getId(), source, game);;
|
||||
game.getStack().counter(spell.getId(), source, game);
|
||||
;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public final class KioraSovereignOfTheDeep extends CardImpl {
|
|||
this.addAbility(new WardAbility(new ManaCostsImpl<>("{3}"), false));
|
||||
|
||||
// Whenever you cast a Kraken, Leviathan, Octopus, or Serpent spell from your hand, look at the top X cards of your library, where X is that spell's mana value. You may cast a spell with mana value less than X from among them without paying its mana cost. Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
this.addAbility(SpellCastControllerTriggeredAbility.createWithFromZone(
|
||||
new KioraSovereignOfTheDeepEffect(), filter, false, Zone.HAND
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.costs.common.ExileSourceFromGraveCost;
|
||||
import mage.abilities.effects.common.DamageAllEffect;
|
||||
|
|
@ -9,20 +8,18 @@ import mage.abilities.effects.common.DoIfCostPaid;
|
|||
import mage.abilities.keyword.DevoidAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class KozileksReturn extends CardImpl {
|
||||
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("an Eldrazi creature spell with mana value 7 or greater");
|
||||
|
||||
static {
|
||||
|
|
@ -32,18 +29,24 @@ public final class KozileksReturn extends CardImpl {
|
|||
}
|
||||
|
||||
public KozileksReturn(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}");
|
||||
|
||||
// Devoid
|
||||
this.addAbility(new DevoidAbility(this.color));
|
||||
|
||||
|
||||
// Kozilek's Return deals 2 damage to each creature.
|
||||
this.getSpellAbility().addEffect(new DamageAllEffect(2, new FilterCreaturePermanent()));
|
||||
|
||||
|
||||
// Whenever you cast an Eldrazi creature spell with converted mana cost 7 or greater, you may exile Kozilek's Return from your graveyard.
|
||||
// If you do, Kozilek's Return deals 5 damage to each creature.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(Zone.GRAVEYARD, new DoIfCostPaid(new DamageAllEffect(5, new FilterCreaturePermanent()),
|
||||
new ExileSourceFromGraveCost()), filter, false, false));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
Zone.GRAVEYARD,
|
||||
new DoIfCostPaid(
|
||||
new DamageAllEffect(5, new FilterCreaturePermanent()),
|
||||
new ExileSourceFromGraveCost()
|
||||
),
|
||||
filter, false, SetTargetPointer.NONE
|
||||
));
|
||||
}
|
||||
|
||||
private KozileksReturn(final KozileksReturn card) {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public final class KrarkTheThumbless extends CardImpl {
|
|||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new KrarkTheThumblessEffect(),
|
||||
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY,
|
||||
false, true
|
||||
false, SetTargetPointer.SPELL
|
||||
));
|
||||
|
||||
// Partner
|
||||
|
|
|
|||
|
|
@ -62,9 +62,12 @@ public final class LiberatorUrzasBattlethopter extends CardImpl {
|
|||
// than Liberator, Urza's Battlethopter's power, put a +1/+1 counter on Liberator.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new SpellCastControllerTriggeredAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), StaticFilters.FILTER_SPELL_A, false, true
|
||||
), LiberatorUrzasBattlethopterCondition.instance, "Whenever you cast a spell, if the amount of mana spent to cast " +
|
||||
"that spell is greater than {this}'s power, put a +1/+1 counter on {this}"
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
|
||||
StaticFilters.FILTER_SPELL_A, false, SetTargetPointer.SPELL
|
||||
),
|
||||
LiberatorUrzasBattlethopterCondition.instance,
|
||||
"Whenever you cast a spell, if the amount of mana spent to cast "
|
||||
+ "that spell is greater than {this}'s power, put a +1/+1 counter on {this}"
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
|
|
@ -38,7 +39,7 @@ public final class LingeringPhantom extends CardImpl {
|
|||
Zone.GRAVEYARD, new DoIfCostPaid(new ReturnSourceFromGraveyardToHandEffect()
|
||||
.setText("return {this} from your graveyard to your hand. <i>(Artifacts, legendaries, and Sagas are historic.)</i>"),
|
||||
new ManaCostsImpl<>("{B}")),
|
||||
filter, false, false
|
||||
filter, false, SetTargetPointer.NONE
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import mage.abilities.effects.common.CopyTargetSpellEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterInstantOrSorcerySpell;
|
||||
|
|
@ -29,7 +30,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"),
|
||||
filter, false, true
|
||||
filter, false, SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,11 +38,11 @@ public final class LuxArtillery extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||
|
||||
// Whenever you cast an artifact creature spell, it gains sunburst.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new LuxArtilleryEffect(this), filter, false, true));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new LuxArtilleryEffect(this), filter, false, SetTargetPointer.SPELL));
|
||||
|
||||
// At the beginning of your end step, if there are thirty or more counters among artifacts
|
||||
// and creatures you control, Lux Artillery deals 10 damage to each opponent.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility (new BeginningOfYourEndStepTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfYourEndStepTriggeredAbility(
|
||||
Zone.BATTLEFIELD, new DamagePlayersEffect(10, TargetController.OPPONENT), false), LuxArtilleryCondition.instance,
|
||||
"At the beginning of your end step, if there are thirty or more counters among artifacts " +
|
||||
"and creatures you control, {this} deals 10 damage to each opponent"
|
||||
|
|
|
|||
|
|
@ -1,25 +1,26 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.DragonIllusionToken;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.watchers.common.ManaPaidSourceWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class ManaformHellkite extends CardImpl {
|
||||
|
|
@ -36,7 +37,11 @@ public final class ManaformHellkite extends CardImpl {
|
|||
|
||||
// Whenever you cast a noncreature spell, create an X/X red Dragon Illusion creature token with flying and haste, where X is the amount of mana spent to cast that spell.
|
||||
// Exile that token at the beginning of the next end step.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new ManaformHellkitEffect(), StaticFilters.FILTER_SPELL_A_NON_CREATURE, false, true));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new ManaformHellkitEffect(),
|
||||
StaticFilters.FILTER_SPELL_A_NON_CREATURE,
|
||||
false, SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
||||
private ManaformHellkite(final ManaformHellkite card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
|
|
@ -13,12 +12,14 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class MaskedAdmirers extends CardImpl {
|
||||
|
|
@ -37,7 +38,11 @@ public final class MaskedAdmirers extends CardImpl {
|
|||
OneShotEffect effect = new ReturnToHandSourceEffect();
|
||||
effect.setText("return {this} from your graveyard to your hand");
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
Zone.GRAVEYARD, new DoIfCostPaid(effect, new ManaCostsImpl<>("{G}{G}")), StaticFilters.FILTER_SPELL_A_CREATURE, false, false));
|
||||
Zone.GRAVEYARD,
|
||||
new DoIfCostPaid(effect, new ManaCostsImpl<>("{G}{G}")),
|
||||
StaticFilters.FILTER_SPELL_A_CREATURE,
|
||||
false, SetTargetPointer.NONE
|
||||
));
|
||||
}
|
||||
|
||||
private MaskedAdmirers(final MaskedAdmirers card) {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public final class MerrowBonegnawer extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Whenever you cast a black spell, you may untap Merrow Bonegnawer.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), filter, true, false));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), filter, true));
|
||||
}
|
||||
|
||||
private MerrowBonegnawer(final MerrowBonegnawer card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
|
|
@ -12,10 +11,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.filter.common.FilterInstantOrSorceryCard;
|
||||
|
|
@ -25,8 +21,9 @@ import mage.game.permanent.token.MetallurgicSummoningsConstructToken;
|
|||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class MetallurgicSummonings extends CardImpl {
|
||||
|
|
@ -43,14 +40,14 @@ public final class MetallurgicSummonings extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{U}");
|
||||
|
||||
// Whenever you cast an instant or sorcery spell, create an X/X colorless Construct artifact creature token, where X is that spell's converted mana cost.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new MetallurgicSummoningsTokenEffect(), filter, false, true));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new MetallurgicSummoningsTokenEffect(), filter, false, SetTargetPointer.SPELL));
|
||||
|
||||
// {3}{U}{U}, Exile Metallurgic Summons: Return all instant and sorcery cards from your graveyard to your hand. Activate this ability only if you control six or more artifacts.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new MetallurgicSummoningsReturnEffect(), new ManaCostsImpl<>("{3}{U}{U}"),
|
||||
new PermanentsOnTheBattlefieldCondition(new FilterControlledArtifactPermanent(), ComparisonType.MORE_THAN, 5),
|
||||
"{3}{U}{U}, Exile {this}: Return all instant and sorcery cards from your graveyard to your hand."
|
||||
+ " Activate only if you control six or more artifacts.");
|
||||
+ " Activate only if you control six or more artifacts.");
|
||||
ability.addCost(new ExileSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
|
|
@ -42,11 +43,15 @@ public final class MoonveilRegent extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever you cast a spell, you may discard your hand. If you do, draw a card for each of that spell's colors.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(
|
||||
new DrawCardSourceControllerEffect(MoonveilRegentSpellValue.instance)
|
||||
.setText("draw a card for each of that spell's colors"),
|
||||
new DiscardHandCost()
|
||||
), StaticFilters.FILTER_SPELL_A, false, true));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new DoIfCostPaid(
|
||||
new DrawCardSourceControllerEffect(MoonveilRegentSpellValue.instance)
|
||||
.setText("draw a card for each of that spell's colors"),
|
||||
new DiscardHandCost()
|
||||
),
|
||||
StaticFilters.FILTER_SPELL_A,
|
||||
false, SetTargetPointer.SPELL
|
||||
));
|
||||
|
||||
// When Moonveil Regent dies, it deals X damage to any target, where X is the number of colors among permanents you control.
|
||||
Ability ability = new DiesSourceTriggeredAbility(new DamageTargetEffect(
|
||||
|
|
|
|||
|
|
@ -9,10 +9,7 @@ import mage.cards.Card;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
|
|
@ -35,13 +32,11 @@ public final class NeeraWildMage extends CardImpl {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(7);
|
||||
|
||||
// Whenever you cast a spell, you may put it on the bottom of its owner's library.
|
||||
// If you do, reveal cards from the top of your library until you reveal a nonland card.
|
||||
// You may cast that card without paying its mana cost.
|
||||
// Then put the rest on the bottom of your library in a random order.
|
||||
// This ability triggers only once each turn.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new NeeraWildMageEffect(), StaticFilters.FILTER_SPELL_A,
|
||||
true, true).setTriggersOnceEachTurn(true));
|
||||
// Whenever you cast a spell, you may put it on the bottom of its owner's library. If you do, reveal cards from the top of your library until you reveal a nonland card. You may cast that card without paying its mana cost. Then put the rest on the bottom of your library in a random order. This ability triggers only once each turn.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new NeeraWildMageEffect(), StaticFilters.FILTER_SPELL_A,
|
||||
true, SetTargetPointer.SPELL
|
||||
).setTriggersOnceEachTurn(true));
|
||||
}
|
||||
|
||||
private NeeraWildMage(final NeeraWildMage card) {
|
||||
|
|
@ -77,7 +72,7 @@ class NeeraWildMageEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
|
||||
if(!spellController.putCardsOnBottomOfLibrary(spell, game, source, true)) {
|
||||
if (!spellController.putCardsOnBottomOfLibrary(spell, game, source, true)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.n;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -12,16 +11,16 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*
|
||||
*/
|
||||
public final class NightskyMimic extends CardImpl {
|
||||
|
||||
|
|
@ -44,11 +43,10 @@ public final class NightskyMimic extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever you cast a spell that's both white and black, Nightsky Mimic has base power and toughness 4/4 until end of turn and gains flying until end of turn.
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(
|
||||
Ability ability = SpellCastControllerTriggeredAbility.createWithRule(
|
||||
new SetBasePowerToughnessSourceEffect(4, 4, Duration.EndOfTurn, SubLayer.SetPT_7b),
|
||||
filter,
|
||||
false,
|
||||
rule);
|
||||
filter, false, rule
|
||||
);
|
||||
ability.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn, false, true));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,10 +14,7 @@ import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
|
|||
import mage.abilities.keyword.ChangelingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
|
@ -61,10 +58,12 @@ public final class OrvarTheAllForm extends CardImpl {
|
|||
new SpellCastControllerTriggeredAbility(
|
||||
new OrvarTheAllFormEffect(),
|
||||
StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY,
|
||||
false, true
|
||||
), OrvarTheAllFormCondition.instance, "Whenever you cast an instant or sorcery spell, " +
|
||||
"if it targets one or more other permanents you control, " +
|
||||
"create a token that's a copy of one of those permanents."
|
||||
false, SetTargetPointer.SPELL
|
||||
),
|
||||
OrvarTheAllFormCondition.instance,
|
||||
"Whenever you cast an instant or sorcery spell, "
|
||||
+ "if it targets one or more other permanents you control, "
|
||||
+ "create a token that's a copy of one of those permanents."
|
||||
));
|
||||
|
||||
// When a spell or ability an opponent controls causes you to discard this card, create a token that's a copy of target permanent.
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public final class PollywogSymbiote extends CardImpl {
|
|||
.setText("each creature spell you cast costs {1} less to cast if it has mutate")));
|
||||
|
||||
// Whenever you cast a creature spell, if it has mutate, draw a card, then discard a card.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
this.addAbility(SpellCastControllerTriggeredAbility.createWithRule(
|
||||
new DrawDiscardControllerEffect(1, 1), filter2, false,
|
||||
"Whenever you cast a creature spell, if it has mutate, draw a card, then discard a card."
|
||||
));
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import mage.abilities.keyword.DeathtouchAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
|
|
@ -39,7 +40,7 @@ public final class Poxwalkers extends CardImpl {
|
|||
// Curse of the Walking Pox -- Whenever you cast a spell from anywhere other than your hand, return Poxwalkers from your graveyard to the battlefield tapped.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true),
|
||||
filter, false, false
|
||||
filter, false, SetTargetPointer.NONE
|
||||
).withFlavorWord("Curse of the Walking Pox"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -13,21 +12,17 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.abilities.mana.ActivateOncePerTurnManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public final class RamosDragonEngine extends CardImpl {
|
||||
|
|
@ -43,7 +38,11 @@ public final class RamosDragonEngine extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// Whenever you cast a spell, put a +1/+1 counter on Ramos, Dragon Engine for each of that spell's colors.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new RamosDragonEngineAddCountersEffect(), StaticFilters.FILTER_SPELL_A, false, true));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new RamosDragonEngineAddCountersEffect(),
|
||||
StaticFilters.FILTER_SPELL_A,
|
||||
false, SetTargetPointer.SPELL
|
||||
));
|
||||
|
||||
// Remove five +1/+1 counters from Ramos: Add {W}{W}{U}{U}{B}{B}{R}{R}{G}{G}. Activate this ability only once each turn.
|
||||
Ability ability = new ActivateOncePerTurnManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(2, 2, 2, 2, 2, 0, 0, 0)), new RemoveCountersSourceCost(CounterType.P1P1.createInstance(5)));
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ChosenSubtypePredicate;
|
||||
|
||||
|
|
@ -31,9 +32,11 @@ public final class ReflectionsOfLittjara extends CardImpl {
|
|||
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.Neutral)));
|
||||
|
||||
// Whenever you cast a spell of the chosen type, copy that spell.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new CopyTargetSpellEffect(
|
||||
false, true, false
|
||||
).setText("copy that spell"), filter, false, true));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new CopyTargetSpellEffect(false, true, false)
|
||||
.setText("copy that spell"),
|
||||
filter, false, SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
||||
private ReflectionsOfLittjara(final ReflectionsOfLittjara card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -14,14 +13,15 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.permanent.token.TokenImpl;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public final class Riddleform extends CardImpl {
|
||||
|
|
@ -31,7 +31,7 @@ public final class Riddleform extends CardImpl {
|
|||
|
||||
// Whenever you cast a noncreature spell, you may have Riddleform become a 3/3 Sphinx creature with flying in addition to its other types until end of turn.
|
||||
Effect effect = new BecomesCreatureSourceEffect(new RiddleformToken(), CardType.ENCHANTMENT, Duration.EndOfTurn);
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, effect, StaticFilters.FILTER_SPELL_A_NON_CREATURE, true, true));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(effect, StaticFilters.FILTER_SPELL_A_NON_CREATURE, true));
|
||||
|
||||
// {2}{U}: Scry 1.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryEffect(1), new ManaCostsImpl<>("{2}{U}"));
|
||||
|
|
@ -59,6 +59,7 @@ class RiddleformToken extends TokenImpl {
|
|||
toughness = new MageInt(3);
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
|
||||
public RiddleformToken(final RiddleformToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,10 @@ public final class RikuOfTwoReflections extends CardImpl {
|
|||
|
||||
// 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);
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(effect, new ManaCostsImpl<>("{U}{R}")), filter, false, true));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new DoIfCostPaid(effect, new ManaCostsImpl<>("{U}{R}")),
|
||||
filter, false, SetTargetPointer.SPELL
|
||||
));
|
||||
|
||||
// Whenever another nontoken creature enters the battlefield under your control, you may pay {G}{U}. If you do, create a token that's a copy of that creature.
|
||||
effect = new DoIfCostPaid(new CreateTokenCopyTargetEffect(true),
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.CastFromGraveyardOnceStaticAbility;
|
||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.ExileSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.abilities.mana.ConditionalAnyColorManaAbility;
|
||||
import mage.abilities.mana.conditional.ConditionalSpellManaBuilder;
|
||||
import mage.constants.*;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.common.FilterCreatureSpell;
|
||||
import mage.filter.predicate.card.CastFromZonePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class RivazOfTheClaw extends CardImpl {
|
||||
|
|
@ -61,7 +61,7 @@ public final class RivazOfTheClaw extends CardImpl {
|
|||
"it gains \"When this creature dies, exile it.\"",
|
||||
true
|
||||
),
|
||||
spellCastFilter, false, true, true
|
||||
spellCastFilter, false, SetTargetPointer.CARD
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -12,16 +11,16 @@ import mage.abilities.keyword.CantBeBlockedSourceAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*
|
||||
*/
|
||||
public final class RiverfallMimic extends CardImpl {
|
||||
|
||||
|
|
@ -35,7 +34,7 @@ public final class RiverfallMimic extends CardImpl {
|
|||
private static final String rule = "Whenever you cast a spell that's both blue and red, {this} has base power and toughness 3/3 until end of turn and can't be blocked this turn.";
|
||||
|
||||
public RiverfallMimic(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U/R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U/R}");
|
||||
this.subtype.add(SubType.SHAPESHIFTER);
|
||||
|
||||
this.color.setRed(true);
|
||||
|
|
@ -44,7 +43,10 @@ public final class RiverfallMimic extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever you cast a spell that's both blue and red, Riverfall Mimic has base power and toughness 3/3 until end of turn and can't be blocked this turn.
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(new SetBasePowerToughnessSourceEffect(3, 3, Duration.EndOfTurn, SubLayer.SetPT_7b), filter, false, rule);
|
||||
Ability ability = SpellCastControllerTriggeredAbility.createWithRule(
|
||||
new SetBasePowerToughnessSourceEffect(3, 3, Duration.EndOfTurn, SubLayer.SetPT_7b),
|
||||
filter, false, rule
|
||||
);
|
||||
ability.addEffect(new GainAbilitySourceEffect(new CantBeBlockedSourceAbility(), Duration.EndOfTurn, false, true));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -12,15 +11,13 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
|
|||
import mage.abilities.effects.common.combat.CantBlockTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public final class SandstormEidolon extends CardImpl {
|
||||
|
|
@ -37,8 +34,12 @@ public final class SandstormEidolon extends CardImpl {
|
|||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
// Whenever you cast a multicolored spell, you may return Sandstorm Eidolon from your graveyard to your hand.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(Zone.GRAVEYARD,
|
||||
new ReturnSourceFromGraveyardToHandEffect(), StaticFilters.FILTER_SPELL_A_MULTICOLORED, true, false));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
Zone.GRAVEYARD,
|
||||
new ReturnSourceFromGraveyardToHandEffect(),
|
||||
StaticFilters.FILTER_SPELL_A_MULTICOLORED,
|
||||
true, SetTargetPointer.NONE
|
||||
));
|
||||
}
|
||||
|
||||
private SandstormEidolon(final SandstormEidolon card) {
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public final class SevinneTheChronoclasm extends CardImpl {
|
|||
class SevinneTheChronoclasmTriggeredAbility extends SpellCastControllerTriggeredAbility {
|
||||
|
||||
SevinneTheChronoclasmTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, null, StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY, false, false);
|
||||
super(null, StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY, false);
|
||||
}
|
||||
|
||||
private SevinneTheChronoclasmTriggeredAbility(final SevinneTheChronoclasmTriggeredAbility ability) {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
|
|
@ -31,7 +32,9 @@ public final class SharkTyphoon extends CardImpl {
|
|||
|
||||
// Whenever you cast a noncreature spell, create an X/X blue Shark creature token with flying, where X is that spell's converted mana cost.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new SharkTyphoonCastEffect(), StaticFilters.FILTER_SPELL_A_NON_CREATURE, false, true
|
||||
new SharkTyphoonCastEffect(),
|
||||
StaticFilters.FILTER_SPELL_A_NON_CREATURE,
|
||||
false, SetTargetPointer.SPELL
|
||||
));
|
||||
|
||||
// Cycling {X}{1}{U}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -12,16 +11,16 @@ import mage.abilities.keyword.TrampleAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*
|
||||
*/
|
||||
public final class ShorecrasherMimic extends CardImpl {
|
||||
|
||||
|
|
@ -44,11 +43,10 @@ public final class ShorecrasherMimic extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever you cast a spell that's both green and blue, Shorecrasher Mimic has base power and toughness 5/3 until end of turn and gains trample until end of turn.
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(
|
||||
Ability ability = SpellCastControllerTriggeredAbility.createWithRule(
|
||||
new SetBasePowerToughnessSourceEffect(5, 3, Duration.EndOfTurn, SubLayer.SetPT_7b),
|
||||
filter,
|
||||
false,
|
||||
rule);
|
||||
filter, false, rule
|
||||
);
|
||||
ability.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, false, true));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,7 @@ import mage.abilities.keyword.FlashAbility;
|
|||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorlessPredicate;
|
||||
|
|
@ -50,14 +47,14 @@ public final class SkitteringCicada extends CardImpl {
|
|||
|
||||
// You may cast colorless spells as though they had flash.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
new CastAsThoughItHadFlashAllEffect(Duration.WhileOnBattlefield, filterCard)
|
||||
new CastAsThoughItHadFlashAllEffect(Duration.WhileOnBattlefield, filterCard)
|
||||
));
|
||||
|
||||
// Whenever you cast a colorless spell, until end of turn, Skittering Cicada gains trample and gets +X/+X, where X is that spell's mana value.
|
||||
TriggeredAbility trigger = new SpellCastControllerTriggeredAbility(
|
||||
new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)
|
||||
.setText("until end of turn, {this} gains trample"),
|
||||
filterSpell, false, true
|
||||
new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)
|
||||
.setText("until end of turn, {this} gains trample"),
|
||||
filterSpell, false, SetTargetPointer.SPELL
|
||||
);
|
||||
trigger.addEffect(new SkitteringCicadaBoostEffect());
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ public final class SkitteringMonstrosity extends CardImpl {
|
|||
|
||||
// When you cast a creature spell, sacrifice Skittering Monstrosity.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new SacrificeSourceEffect(), StaticFilters.FILTER_SPELL_A_CREATURE,
|
||||
false, "When you cast a creature spell, sacrifice {this}."
|
||||
new SacrificeSourceEffect(), StaticFilters.FILTER_SPELL_A_CREATURE, false
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
|
|
@ -24,6 +23,8 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
import mage.target.targetadjustment.TargetAdjuster;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
|
@ -42,8 +43,9 @@ public final class SkyfireKirin extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
// Whenever you cast a Spirit or Arcane spell, you may gain control of target creature with that spell's converted mana cost until end of turn.
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(
|
||||
Zone.BATTLEFIELD, new SkyfireKirinEffect(),
|
||||
StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true, true
|
||||
new SkyfireKirinEffect(),
|
||||
StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD,
|
||||
true, SetTargetPointer.SPELL
|
||||
);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
ability.setTargetAdjuster(SkyfireKirinAdjuster.instance);
|
||||
|
|
|
|||
|
|
@ -7,10 +7,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.CommanderCardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
|
@ -53,8 +50,10 @@ public final class SkyfirePhoenix extends CardImpl {
|
|||
class SkyfirePhoenixTriggeredAbility extends SpellCastControllerTriggeredAbility {
|
||||
|
||||
SkyfirePhoenixTriggeredAbility() {
|
||||
super(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(), StaticFilters.FILTER_SPELL, false, false);
|
||||
this.rule = "When you cast your commander, return {this} from your graveyard to the battlefield.";
|
||||
super(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(),
|
||||
StaticFilters.FILTER_SPELL, false, SetTargetPointer.NONE,
|
||||
"When you cast your commander, return {this} from your graveyard to the battlefield.",
|
||||
null);
|
||||
}
|
||||
|
||||
private SkyfirePhoenixTriggeredAbility(final SkyfirePhoenixTriggeredAbility ability) {
|
||||
|
|
|
|||
|
|
@ -9,9 +9,7 @@ import mage.abilities.keyword.DefenderAbility;
|
|||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
|
|
@ -41,7 +39,8 @@ public final class SmolderingEgg extends CardImpl {
|
|||
// Whenever you cast an instant or sorcery spell, put a number of ember counters on Smoldering Egg equal to the amount of mana spent to cast that spell. Then if Smoldering Egg has seven or more ember counters on it, remove them and transform Smoldering Egg.
|
||||
this.addAbility(new TransformAbility());
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new SmolderingEggEffect(), StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false, true
|
||||
new SmolderingEggEffect(), StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY,
|
||||
false, SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public final class SorcererClass extends CardImpl {
|
|||
new SpellCastControllerTriggeredAbility(
|
||||
new SorcererClassEffect(),
|
||||
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY,
|
||||
false, true
|
||||
false, SetTargetPointer.SPELL
|
||||
), 3
|
||||
)), new SorcererClassWatcher());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.filter.common.FilterInstantOrSorcerySpell;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class SwarmIntelligence extends CardImpl {
|
||||
|
|
@ -20,7 +21,11 @@ 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).setText("you may copy that spell. You may choose new targets for the copy"), new FilterInstantOrSorcerySpell("an instant or sorcery spell"), true, true));
|
||||
new CopyTargetSpellEffect(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
|
||||
));
|
||||
}
|
||||
|
||||
private SwarmIntelligence(final SwarmIntelligence card) {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
|
||||
package mage.cards.t;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
|
|
@ -13,15 +11,17 @@ import mage.cards.CardSetInfo;
|
|||
import mage.choices.ChoiceColor;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class TabletOfTheGuilds extends CardImpl {
|
||||
|
|
@ -33,7 +33,12 @@ public final class TabletOfTheGuilds extends CardImpl {
|
|||
this.addAbility(new AsEntersBattlefieldAbility(new TabletOfTheGuildsEntersBattlefieldEffect()));
|
||||
|
||||
// Whenever you cast a spell, if it's at least one of the chosen colors, you gain 1 life for each of the chosen colors it is.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new TabletOfTheGuildsGainLifeEffect(), StaticFilters.FILTER_SPELL_A, false, true));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new TabletOfTheGuildsGainLifeEffect(),
|
||||
StaticFilters.FILTER_SPELL_A,
|
||||
false,
|
||||
SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
||||
private TabletOfTheGuilds(final TabletOfTheGuilds card) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package mage.cards.t;
|
|||
import mage.MageObject;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
|
|
@ -11,21 +10,14 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.watchers.Watcher;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author jasc7636
|
||||
|
|
@ -54,7 +46,7 @@ class ThousandYearStormAbility extends SpellCastControllerTriggeredAbility {
|
|||
private String stormCountInfo;
|
||||
|
||||
public ThousandYearStormAbility() {
|
||||
super(Zone.BATTLEFIELD, new ThousandYearStormEffect(), StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false, true);
|
||||
super(new ThousandYearStormEffect(), StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false, SetTargetPointer.SPELL);
|
||||
this.addHint(new ValueHint("You've cast instant and sorcery this turn", ThousandYearStormSpellsCastThatTurnValue.instance));
|
||||
this.stormCountInfo = null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,9 +69,15 @@ public final class TuvasaTheSunlit extends CardImpl {
|
|||
|
||||
class TuvasaTheSunlitTriggeredAbility extends SpellCastControllerTriggeredAbility {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("an enchantment spell");
|
||||
|
||||
static {
|
||||
filter.add(CardType.ENCHANTMENT.getPredicate());
|
||||
}
|
||||
|
||||
public TuvasaTheSunlitTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1),
|
||||
(FilterSpell) new FilterSpell("an enchantment spell").add(CardType.ENCHANTMENT.getPredicate()), false, true);
|
||||
filter, false, SetTargetPointer.SPELL);
|
||||
}
|
||||
|
||||
public TuvasaTheSunlitTriggeredAbility(final TuvasaTheSunlitTriggeredAbility ability) {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,10 @@ public final class UvildaDeanOfPerfection extends ModalDoubleFacedCard {
|
|||
));
|
||||
|
||||
// Whenever you cast a spell from exile, put a +1/+1 counter on Nassari, Dean of Expression.
|
||||
this.getRightHalfCard().addAbility(new NassariDeanOfExpressionTriggeredAbility());
|
||||
this.getRightHalfCard().addAbility(SpellCastControllerTriggeredAbility.createWithFromZone(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
|
||||
null, false, Zone.EXILED
|
||||
));
|
||||
}
|
||||
|
||||
private UvildaDeanOfPerfection(final UvildaDeanOfPerfection card) {
|
||||
|
|
@ -297,26 +300,4 @@ class NassariDeanOfExpressionEffect extends OneShotEffect {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class NassariDeanOfExpressionTriggeredAbility extends SpellCastControllerTriggeredAbility {
|
||||
|
||||
NassariDeanOfExpressionTriggeredAbility() {
|
||||
super(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false);
|
||||
this.rule = "Whenever you cast a spell from exile, put a +1/+1 counter on {this}.";
|
||||
}
|
||||
|
||||
private NassariDeanOfExpressionTriggeredAbility(final NassariDeanOfExpressionTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NassariDeanOfExpressionTriggeredAbility copy() {
|
||||
return new NassariDeanOfExpressionTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return event.getZone() == Zone.EXILED && super.checkTrigger(event, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,26 +1,32 @@
|
|||
package mage.cards.v;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.card.CastFromZonePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class VegaTheWatcher extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("a spell from anywhere other than your hand");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CastFromZonePredicate(Zone.HAND)));
|
||||
}
|
||||
|
||||
public VegaTheWatcher(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{U}");
|
||||
|
||||
|
|
@ -34,7 +40,9 @@ public final class VegaTheWatcher extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever you cast a spell from anywhere other than your hand, draw a card.
|
||||
this.addAbility(new VegaTheWatcherTriggeredAbility(new DrawCardSourceControllerEffect(1), false));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new DrawCardSourceControllerEffect(1), filter, false
|
||||
));
|
||||
}
|
||||
|
||||
private VegaTheWatcher(final VegaTheWatcher card) {
|
||||
|
|
@ -45,26 +53,4 @@ public final class VegaTheWatcher extends CardImpl {
|
|||
public VegaTheWatcher copy() {
|
||||
return new VegaTheWatcher(this);
|
||||
}
|
||||
}
|
||||
|
||||
class VegaTheWatcherTriggeredAbility extends SpellCastControllerTriggeredAbility {
|
||||
|
||||
public VegaTheWatcherTriggeredAbility(Effect effect, boolean optional) {
|
||||
super(effect, optional);
|
||||
this.rule = "Whenever you cast a spell from anywhere other than your hand, draw a card.";
|
||||
}
|
||||
|
||||
public VegaTheWatcherTriggeredAbility(final VegaTheWatcherTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VegaTheWatcherTriggeredAbility copy() {
|
||||
return new VegaTheWatcherTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return event.getZone() != Zone.HAND && super.checkTrigger(event, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -11,6 +11,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.counters.CounterType;
|
||||
|
|
@ -42,7 +43,7 @@ public final class VerazolTheSplitCurrent extends CardImpl {
|
|||
new CopyTargetSpellEffect(false, 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, true
|
||||
), StaticFilters.FILTER_SPELL_KICKED_A, false, SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.v;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
|
|
@ -13,12 +12,14 @@ import mage.abilities.mana.SimpleManaAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public final class VerdantEidolon extends CardImpl {
|
||||
|
|
@ -34,8 +35,10 @@ public final class VerdantEidolon extends CardImpl {
|
|||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
// Whenever you cast a multicolored spell, you may return Verdant Eidolon from your graveyard to your hand.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(Zone.GRAVEYARD,
|
||||
new ReturnSourceFromGraveyardToHandEffect(), StaticFilters.FILTER_SPELL_A_MULTICOLORED, true, false));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
Zone.GRAVEYARD,
|
||||
new ReturnSourceFromGraveyardToHandEffect(), StaticFilters.FILTER_SPELL_A_MULTICOLORED,
|
||||
true, SetTargetPointer.NONE));
|
||||
}
|
||||
|
||||
private VerdantEidolon(final VerdantEidolon card) {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import mage.abilities.effects.common.CopyTargetSpellEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterSpell;
|
||||
|
|
@ -45,7 +46,7 @@ public final class VoloGuideToMonsters extends CardImpl {
|
|||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new CopyTargetSpellEffect(true)
|
||||
.setText("copy that spell"),
|
||||
filter, false, true
|
||||
filter, false, SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.w;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
|
|
@ -15,8 +14,9 @@ import mage.constants.SubType;
|
|||
import mage.filter.FilterSpell;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class WaspOfTheBitterEnd extends CardImpl {
|
||||
|
|
@ -40,8 +40,11 @@ public final class WaspOfTheBitterEnd extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever you cast a Bolas planeswalker spell, you may sacrifice Wasp of the Bitter End. If you do, destroy target creature.
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), filter, true,
|
||||
"Whenever you cast a Bolas planeswalker spell, you may sacrifice {this}. If you do, destroy target creature.");
|
||||
Ability ability = SpellCastControllerTriggeredAbility.createWithRule(
|
||||
new SacrificeSourceEffect(),
|
||||
filter, true,
|
||||
"Whenever you cast a Bolas planeswalker spell, you may sacrifice {this}. If you do, destroy target creature."
|
||||
);
|
||||
ability.addEffect(new DestroyTargetEffect());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -29,12 +29,12 @@ public final class WindriderWizard extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever you cast an instant, sorcery, or Wizard spell, you may draw a card. If you do, discard a card.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
this.addAbility(SpellCastControllerTriggeredAbility.createWithRule(
|
||||
new DrawDiscardControllerEffect(1, 1, true),
|
||||
StaticFilters.FILTER_SPELL_INSTANT_SORCERY_WIZARD,
|
||||
false,
|
||||
"Whenever you cast an instant, sorcery, or Wizard spell, you may draw a card. " +
|
||||
"If you do, discard a card.")
|
||||
"Whenever you cast an instant, sorcery, or Wizard spell, you may draw a card. "
|
||||
+ "If you do, discard a card.")
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.w;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -12,16 +11,16 @@ import mage.abilities.keyword.WitherAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*
|
||||
*/
|
||||
public final class WoodlurkerMimic extends CardImpl {
|
||||
|
||||
|
|
@ -35,7 +34,7 @@ public final class WoodlurkerMimic extends CardImpl {
|
|||
private static final String rule = "Whenever you cast a spell that's both black and green, {this} has base power and toughness 4/5 until end of turn and gains wither until end of turn.";
|
||||
|
||||
public WoodlurkerMimic(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B/G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B/G}");
|
||||
this.subtype.add(SubType.SHAPESHIFTER);
|
||||
|
||||
this.color.setGreen(true);
|
||||
|
|
@ -44,7 +43,10 @@ public final class WoodlurkerMimic extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever you cast a spell that's both black and green, Woodlurker Mimic has base power and toughness 4/5 until end of turn and gains wither until end of turn.
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(new SetBasePowerToughnessSourceEffect(4, 5, Duration.EndOfTurn, SubLayer.SetPT_7b), filter, false, rule);
|
||||
Ability ability = SpellCastControllerTriggeredAbility.createWithRule(
|
||||
new SetBasePowerToughnessSourceEffect(4, 5, Duration.EndOfTurn, SubLayer.SetPT_7b),
|
||||
filter, false, rule
|
||||
);
|
||||
ability.addEffect(new GainAbilitySourceEffect(WitherAbility.getInstance(), Duration.EndOfTurn, false, true));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ public final class TalesOfMiddleEarthCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Fumigate", 170, Rarity.RARE, mage.cards.f.Fumigate.class));
|
||||
cards.add(new SetCardInfo("Furycalm Snarl", 313, Rarity.RARE, mage.cards.f.FurycalmSnarl.class));
|
||||
cards.add(new SetCardInfo("Galadhrim Ambush", 38, Rarity.RARE, mage.cards.g.GaladhrimAmbush.class));
|
||||
cards.add(new SetCardInfo("Gandalf, Westward Voyager", 6, Rarity.MYTHIC, mage.cards.g.GandalfWestwardVoyager.class));
|
||||
cards.add(new SetCardInfo("Galadriel, Elven-Queen", 3, Rarity.MYTHIC, mage.cards.g.GaladrielElvenQueen.class));
|
||||
cards.add(new SetCardInfo("Gemstone Caverns", 364, Rarity.MYTHIC, mage.cards.g.GemstoneCaverns.class));
|
||||
cards.add(new SetCardInfo("Genesis Wave", 245, Rarity.RARE, mage.cards.g.GenesisWave.class));
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
|||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.StaticFilters;
|
||||
|
|
@ -21,7 +22,8 @@ public class CopyPermanentSpellTest extends CardTestPlayerBase {
|
|||
"Forker", playerA,
|
||||
new SpellCastControllerTriggeredAbility(
|
||||
new CopyTargetSpellEffect(true),
|
||||
StaticFilters.FILTER_SPELL, false, true
|
||||
StaticFilters.FILTER_SPELL, false,
|
||||
SetTargetPointer.SPELL
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package mage.abilities.common;
|
|||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.StaticFilters;
|
||||
|
|
@ -11,61 +12,62 @@ import mage.game.stack.Spell;
|
|||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
* @author North
|
||||
* @author North, Susucr
|
||||
*/
|
||||
public class SpellCastControllerTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
protected final FilterSpell filter;
|
||||
protected String rule; // TODO: This sould be final, but is not because of the telescoping contructors
|
||||
protected final String rule;
|
||||
|
||||
// If either the cast spell or the card must be set as TargetPointer of effects.
|
||||
protected final SetTargetPointer setTargetPointer;
|
||||
|
||||
// The source SPELL that triggered the ability will be set as target to effect
|
||||
protected boolean rememberSource;
|
||||
// Use it if you want to remember CARD instead spell
|
||||
protected boolean rememberSourceAsCard;
|
||||
// Trigger only for spells cast from this zone. Default is from any zone.
|
||||
private Zone fromZone = Zone.ALL;
|
||||
private final Zone fromZone;
|
||||
|
||||
public SpellCastControllerTriggeredAbility(Effect effect, boolean optional) {
|
||||
this(Zone.BATTLEFIELD, effect, StaticFilters.FILTER_SPELL_A, optional, false);
|
||||
this(effect, null, optional);
|
||||
}
|
||||
|
||||
public SpellCastControllerTriggeredAbility(Effect effect, FilterSpell filter, boolean optional) {
|
||||
this(effect, filter, optional, false);
|
||||
this(effect, filter, optional, SetTargetPointer.NONE);
|
||||
}
|
||||
|
||||
public SpellCastControllerTriggeredAbility(Effect effect, FilterSpell filter, boolean optional, Zone fromZone) {
|
||||
this(effect, filter, optional, false);
|
||||
this.fromZone = fromZone;
|
||||
makeTriggerPhrase();
|
||||
public SpellCastControllerTriggeredAbility(Effect effect, FilterSpell filter,
|
||||
boolean optional, SetTargetPointer setTargetPointer) {
|
||||
this(Zone.BATTLEFIELD, effect, filter, optional, setTargetPointer);
|
||||
}
|
||||
|
||||
public SpellCastControllerTriggeredAbility(Effect effect, FilterSpell filter, boolean optional, String rule) {
|
||||
this(effect, filter, optional, false);
|
||||
this.rule = rule;
|
||||
public SpellCastControllerTriggeredAbility(Zone zone, Effect effect, FilterSpell filter,
|
||||
boolean optional, SetTargetPointer setTargetPointer) {
|
||||
this(zone, effect, filter, optional, setTargetPointer, null, null);
|
||||
}
|
||||
|
||||
public SpellCastControllerTriggeredAbility(Effect effect, FilterSpell filter, boolean optional, boolean rememberSource) {
|
||||
this(Zone.BATTLEFIELD, effect, filter, optional, rememberSource);
|
||||
}
|
||||
|
||||
public SpellCastControllerTriggeredAbility(Zone zone, Effect effect, FilterSpell filter, boolean optional, boolean rememberSource) {
|
||||
this(zone, effect, filter, optional, rememberSource, false);
|
||||
}
|
||||
|
||||
public SpellCastControllerTriggeredAbility(Zone zone, Effect effect, FilterSpell filter, boolean optional, boolean rememberSource, boolean rememberSourceAsCard) {
|
||||
public SpellCastControllerTriggeredAbility(Zone zone, Effect effect, FilterSpell filter,
|
||||
boolean optional, SetTargetPointer setTargetPointer,
|
||||
String rule, Zone fromZone) {
|
||||
super(zone, effect, optional);
|
||||
this.filter = filter;
|
||||
this.rememberSource = rememberSource;
|
||||
this.rememberSourceAsCard = rememberSourceAsCard;
|
||||
this.filter = filter == null ? StaticFilters.FILTER_SPELL_A : filter;
|
||||
this.setTargetPointer = setTargetPointer;
|
||||
this.rule = rule;
|
||||
this.fromZone = fromZone == null ? Zone.ALL : fromZone;
|
||||
makeTriggerPhrase();
|
||||
}
|
||||
|
||||
public static SpellCastControllerTriggeredAbility createWithFromZone(Effect effect, FilterSpell filter, boolean optional, Zone fromZone) {
|
||||
return new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, effect, filter, optional, null, null, fromZone);
|
||||
}
|
||||
|
||||
public static SpellCastControllerTriggeredAbility createWithRule(Effect effect, FilterSpell filter, boolean optional, String rule) {
|
||||
return new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, effect, filter, optional, null, rule, null);
|
||||
}
|
||||
|
||||
protected SpellCastControllerTriggeredAbility(final SpellCastControllerTriggeredAbility ability) {
|
||||
super(ability);
|
||||
this.filter = ability.filter;
|
||||
this.rule = ability.rule;
|
||||
this.rememberSource = ability.rememberSource;
|
||||
this.rememberSourceAsCard = ability.rememberSourceAsCard;
|
||||
this.setTargetPointer = ability.setTargetPointer;
|
||||
this.fromZone = ability.fromZone;
|
||||
}
|
||||
|
||||
|
|
@ -86,8 +88,17 @@ public class SpellCastControllerTriggeredAbility extends TriggeredAbilityImpl {
|
|||
return false;
|
||||
}
|
||||
this.getEffects().setValue("spellCast", spell);
|
||||
if (rememberSource) {
|
||||
this.getEffects().setTargetPointer(new FixedTarget(rememberSourceAsCard ? spell.getCard().getId() : spell.getId(), game));
|
||||
switch (setTargetPointer) {
|
||||
case NONE:
|
||||
break;
|
||||
case SPELL:
|
||||
getEffects().setTargetPointer(new FixedTarget(spell.getId(), game));
|
||||
break;
|
||||
case CARD:
|
||||
getEffects().setTargetPointer(new FixedTarget(spell.getCard().getId()));
|
||||
break;
|
||||
default:
|
||||
throw new UnsupportedOperationException("Unexpected setTargetPointer " + setTargetPointer);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -103,6 +114,19 @@ public class SpellCastControllerTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
|
||||
private void makeTriggerPhrase() {
|
||||
setTriggerPhrase("Whenever you cast " + filter.getMessage() + (fromZone != Zone.ALL ? " from your " + fromZone.toString().toLowerCase() : "") + ", ");
|
||||
String text = "Whenever you cast " + filter.getMessage();
|
||||
|
||||
switch (fromZone) {
|
||||
case ALL:
|
||||
break;
|
||||
case EXILED:
|
||||
text += " from exile";
|
||||
break;
|
||||
default:
|
||||
text += " from your " + fromZone.toString().toLowerCase();
|
||||
break;
|
||||
}
|
||||
|
||||
setTriggerPhrase(text + ", ");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.counter.AddPoisonCounterTargetEffect;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
|
@ -21,7 +22,10 @@ public final class AjaniSleeperAgentEmblem extends Emblem {
|
|||
// You get an emblem with "Whenever you cast a creature or planeswalker spell, target opponent gets two poison counters."
|
||||
public AjaniSleeperAgentEmblem() {
|
||||
super("Emblem Ajani");
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(Zone.COMMAND, new AddPoisonCounterTargetEffect(2), filter, false, false);
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(
|
||||
Zone.COMMAND, new AddPoisonCounterTargetEffect(2),
|
||||
filter, false, SetTargetPointer.NONE
|
||||
);
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.getAbilities().add(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
|
@ -30,7 +31,9 @@ public class ChandraDressedToKillEmblem extends Emblem {
|
|||
// Whenever you cast a red spell, this emblem deals X damage to any target, where X is the amount of mana spent to cast that spell.
|
||||
public ChandraDressedToKillEmblem() {
|
||||
super("Emblem Chandra");
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(Zone.COMMAND, new ChandraDressedToKillEmblemEffect(), filter, false, true);
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(
|
||||
Zone.COMMAND, new ChandraDressedToKillEmblemEffect(),
|
||||
filter, false, SetTargetPointer.SPELL);
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
this.getAbilities().add(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.command.Emblem;
|
||||
|
|
@ -19,7 +20,7 @@ public final class ChandraTorchOfDefianceEmblem extends Emblem {
|
|||
super("Emblem Chandra");
|
||||
Effect effect = new DamageTargetEffect(5);
|
||||
effect.setText("this emblem deals 5 damage to any target");
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(Zone.COMMAND, effect, StaticFilters.FILTER_SPELL_A, false, false);
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(Zone.COMMAND, effect, StaticFilters.FILTER_SPELL_A, false, SetTargetPointer.NONE);
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
getAbilities().add(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
|
|
@ -23,7 +24,11 @@ public final class GarrukCallerOfBeastsEmblem extends Emblem {
|
|||
public GarrukCallerOfBeastsEmblem() {
|
||||
super("Emblem Garruk");
|
||||
Effect effect = new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterCreatureCard("creature card")), false);
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(Zone.COMMAND, effect, StaticFilters.FILTER_SPELL_A_CREATURE, true, false);
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(
|
||||
Zone.COMMAND, effect,
|
||||
StaticFilters.FILTER_SPELL_A_CREATURE,
|
||||
true, SetTargetPointer.NONE
|
||||
);
|
||||
this.getAbilities().add(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.MillCardsTargetEffect;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.command.Emblem;
|
||||
|
|
@ -19,7 +20,10 @@ public final class JaceTelepathUnboundEmblem extends Emblem {
|
|||
super("Emblem Jace");
|
||||
Effect effect = new MillCardsTargetEffect(5);
|
||||
effect.setText("target opponent mills five cards");
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(Zone.COMMAND, effect, StaticFilters.FILTER_SPELL_A, false, false);
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(
|
||||
Zone.COMMAND, effect, StaticFilters.FILTER_SPELL_A,
|
||||
false, SetTargetPointer.NONE
|
||||
);
|
||||
ability.addTarget(new TargetOpponent());
|
||||
getAbilities().add(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package mage.game.command.emblems;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.command.Emblem;
|
||||
|
|
@ -18,7 +19,7 @@ public final class NarsetOfTheAncientWayEmblem extends Emblem {
|
|||
super("Emblem Narset");
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(
|
||||
Zone.COMMAND, new DamageTargetEffect(2, "this emblem"),
|
||||
StaticFilters.FILTER_SPELL_A_NON_CREATURE, false, false
|
||||
StaticFilters.FILTER_SPELL_A_NON_CREATURE, false, SetTargetPointer.NONE
|
||||
);
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
this.getAbilities().add(ability);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.command.Emblem;
|
||||
|
|
@ -19,7 +20,8 @@ public final class RalIzzetViceroyEmblem extends Emblem {
|
|||
super("Emblem Ral");
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(
|
||||
Zone.COMMAND, new DamageTargetEffect(4, "this emblem"),
|
||||
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false, false
|
||||
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY,
|
||||
false, SetTargetPointer.NONE
|
||||
);
|
||||
ability.addEffect(
|
||||
new DrawCardSourceControllerEffect(2)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
|||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.command.Emblem;
|
||||
|
|
@ -18,7 +19,7 @@ public final class RowanScholarOfSparksEmblem extends Emblem {
|
|||
super("Emblem Rowan");
|
||||
this.getAbilities().add(new SpellCastControllerTriggeredAbility(
|
||||
Zone.COMMAND, new DoIfCostPaid(new CopyTargetSpellEffect(true), new GenericManaCost(2)),
|
||||
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false, true
|
||||
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false, SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
|||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
|
|
@ -30,7 +31,7 @@ public final class TyvarKellEmblem extends Emblem {
|
|||
Zone.COMMAND,
|
||||
new GainAbilityTargetEffect(
|
||||
HasteAbility.getInstance(), Duration.EndOfTurn, null, true
|
||||
).setText("it gains haste until end of turn"), filter, false, true, true
|
||||
).setText("it gains haste until end of turn"), filter, false, SetTargetPointer.CARD
|
||||
);
|
||||
ability.addEffect(new DrawCardSourceControllerEffect(2, "you").concatBy("and"));
|
||||
this.getAbilities().add(ability);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package mage.game.command.emblems;
|
|||
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.command.Emblem;
|
||||
|
|
@ -19,7 +20,7 @@ public final class WillKenrithEmblem extends Emblem {
|
|||
new CopyTargetSpellEffect(true).withSpellName("it"),
|
||||
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY,
|
||||
false,
|
||||
true
|
||||
SetTargetPointer.SPELL
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue