mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
[ZNR] added static filter for kicked spell triggers
This commit is contained in:
parent
cc946a9148
commit
c61f8bcd01
5 changed files with 18 additions and 44 deletions
|
@ -13,9 +13,8 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.filter.predicate.mageobject.KickedPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -24,12 +23,10 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class CoralhelmChronicler extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("a kicked spell");
|
||||
private static final FilterCard filter2 = new FilterCard("card with a kicker ability");
|
||||
private static final FilterCard filter = new FilterCard("card with a kicker ability");
|
||||
|
||||
static {
|
||||
filter.add(KickedPredicate.instance);
|
||||
filter2.add(new AbilityPredicate(KickerAbility.class));
|
||||
filter.add(new AbilityPredicate(KickerAbility.class));
|
||||
}
|
||||
|
||||
public CoralhelmChronicler(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
@ -42,12 +39,13 @@ public final class CoralhelmChronicler extends CardImpl {
|
|||
|
||||
// Whenever you cast a kicked spell, draw a card, then discard a card.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new DrawDiscardControllerEffect(1, 1, false), filter, false
|
||||
new DrawDiscardControllerEffect(1, 1, false),
|
||||
StaticFilters.FILTER_SPELL_KICKED_A, false
|
||||
));
|
||||
|
||||
// When Coralhelm Chronicler enters the battlefield, look at the top five cards of your library. You may reveal a card with a kicker ability from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(5), false, StaticValue.get(1), filter2, Zone.LIBRARY, false,
|
||||
StaticValue.get(5), false, StaticValue.get(1), filter, Zone.LIBRARY, false,
|
||||
true, false, Zone.HAND, true, false, false
|
||||
).setBackInRandomOrder(true).setText("look at the top five cards of your library. " +
|
||||
"You may reveal a card with a kicker ability from among them and put it into your hand. " +
|
||||
|
|
|
@ -9,8 +9,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.KickedPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -19,12 +18,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class LullmagesFamiliar extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("a kicked spell");
|
||||
|
||||
static {
|
||||
filter.add(KickedPredicate.instance);
|
||||
}
|
||||
|
||||
public LullmagesFamiliar(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{U}");
|
||||
|
||||
|
@ -37,7 +30,9 @@ public final class LullmagesFamiliar extends CardImpl {
|
|||
this.addAbility(new BlueManaAbility());
|
||||
|
||||
// Whenever you cast a kicked spell, you gain 2 life.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new GainLifeEffect(2), filter, false));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new GainLifeEffect(2), StaticFilters.FILTER_SPELL_KICKED_A, false
|
||||
));
|
||||
}
|
||||
|
||||
private LullmagesFamiliar(final LullmagesFamiliar card) {
|
||||
|
|
|
@ -8,8 +8,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.KickedPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -18,12 +17,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class MerfolkFalconer extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("a kicked spell");
|
||||
|
||||
static {
|
||||
filter.add(KickedPredicate.instance);
|
||||
}
|
||||
|
||||
public MerfolkFalconer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
|
||||
|
||||
|
@ -36,7 +29,9 @@ public final class MerfolkFalconer extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever you cast a kicked spell, scry 2.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new ScryEffect(2), filter, false));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new ScryEffect(2), StaticFilters.FILTER_SPELL_KICKED_A, false
|
||||
));
|
||||
}
|
||||
|
||||
private MerfolkFalconer(final MerfolkFalconer card) {
|
||||
|
|
|
@ -9,8 +9,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.KickedPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -19,12 +18,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class RisenRiptide extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("a kicked spell");
|
||||
|
||||
static {
|
||||
filter.add(KickedPredicate.instance);
|
||||
}
|
||||
|
||||
public RisenRiptide(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
||||
|
||||
|
@ -35,7 +28,7 @@ public final class RisenRiptide extends CardImpl {
|
|||
// Whenever you cast a kicked spell, Risen Riptide has base power and toughness 5/5 until end of turn.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new SetPowerToughnessSourceEffect(
|
||||
5, 5, Duration.EndOfTurn, SubLayer.SetPT_7b
|
||||
).setText("{this} has base power and toughness 5/5 until end of turn"), filter, false));
|
||||
).setText("{this} has base power and toughness 5/5 until end of turn"), StaticFilters.FILTER_SPELL_KICKED_A, false));
|
||||
}
|
||||
|
||||
private RisenRiptide(final RisenRiptide card) {
|
||||
|
|
|
@ -10,8 +10,7 @@ import mage.abilities.keyword.KickerAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.KickedPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.permanent.token.DrakeToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -21,12 +20,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class RoostOfDrakes extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("a kicked spell");
|
||||
|
||||
static {
|
||||
filter.add(KickedPredicate.instance);
|
||||
}
|
||||
|
||||
public RoostOfDrakes(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}");
|
||||
|
||||
|
@ -42,7 +35,7 @@ public final class RoostOfDrakes extends CardImpl {
|
|||
|
||||
// Whenever you cast a kicked spell, create a 2/2 blue Drake creature token with flying.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new CreateTokenEffect(new DrakeToken()), filter, false
|
||||
new CreateTokenEffect(new DrakeToken()), StaticFilters.FILTER_SPELL_KICKED_A, false
|
||||
));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue