mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* Added another general static filter class.
This commit is contained in:
parent
fa4cf8161d
commit
4dd023716e
20 changed files with 133 additions and 230 deletions
|
@ -38,8 +38,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.SetTargetPointer;
|
import mage.constants.SetTargetPointer;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
|
@ -49,22 +48,12 @@ import mage.players.Player;
|
||||||
*/
|
*/
|
||||||
public class AetherBarrier extends CardImpl {
|
public class AetherBarrier extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("a creature spell");
|
|
||||||
static {
|
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public AetherBarrier(UUID ownerId, CardSetInfo setInfo) {
|
public AetherBarrier(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
|
||||||
|
|
||||||
// Whenever a player casts a creature spell, that player sacrifices a permanent unless he or she pays {1}.
|
// Whenever a player casts a creature spell, that player sacrifices a permanent unless he or she pays {1}.
|
||||||
this.addAbility(new SpellCastAllTriggeredAbility(
|
this.addAbility(new SpellCastAllTriggeredAbility(Zone.BATTLEFIELD, new AetherBarrierEffect(),
|
||||||
Zone.BATTLEFIELD,
|
StaticFilters.FILTER_SPELL_A_CREATURE, false, SetTargetPointer.PLAYER));
|
||||||
new AetherBarrierEffect(),
|
|
||||||
filter,
|
|
||||||
false,
|
|
||||||
SetTargetPointer.PLAYER
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public AetherBarrier(final AetherBarrier card) {
|
public AetherBarrier(final AetherBarrier card) {
|
||||||
|
@ -105,4 +94,4 @@ class AetherBarrierEffect extends SacrificeEffect {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,8 +47,7 @@ import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.util.CardUtil;
|
import mage.util.CardUtil;
|
||||||
|
@ -59,13 +58,8 @@ import mage.util.CardUtil;
|
||||||
*/
|
*/
|
||||||
public class AnimarSoulOfElements extends CardImpl {
|
public class AnimarSoulOfElements extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filterSpell = new FilterSpell("a creature spell");
|
|
||||||
static {
|
|
||||||
filterSpell.add(new CardTypePredicate(CardType.CREATURE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public AnimarSoulOfElements(UUID ownerId, CardSetInfo setInfo) {
|
public AnimarSoulOfElements(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{R}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{R}{G}");
|
||||||
this.supertype.add("Legendary");
|
this.supertype.add("Legendary");
|
||||||
this.subtype.add("Elemental");
|
this.subtype.add("Elemental");
|
||||||
|
|
||||||
|
@ -76,7 +70,7 @@ public class AnimarSoulOfElements extends CardImpl {
|
||||||
this.addAbility(ProtectionAbility.from(ObjectColor.WHITE, ObjectColor.BLACK));
|
this.addAbility(ProtectionAbility.from(ObjectColor.WHITE, ObjectColor.BLACK));
|
||||||
|
|
||||||
// Whenever you cast a creature spell, put a +1/+1 counter on Animar, Soul of Elements.
|
// Whenever you cast a creature spell, put a +1/+1 counter on Animar, Soul of Elements.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filterSpell, false));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), StaticFilters.FILTER_SPELL_A_CREATURE, false));
|
||||||
|
|
||||||
// Creature spells you cast cost {1} less to cast for each +1/+1 counter on Animar.
|
// Creature spells you cast cost {1} less to cast for each +1/+1 counter on Animar.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AnimarCostReductionEffect()));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AnimarCostReductionEffect()));
|
||||||
|
|
|
@ -41,9 +41,8 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.Filter;
|
import mage.filter.Filter;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.token.ThrullToken;
|
import mage.game.permanent.token.ThrullToken;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
|
@ -55,14 +54,8 @@ import mage.target.targetpointer.FixedTarget;
|
||||||
*/
|
*/
|
||||||
public class EndrekSahrMasterBreeder extends CardImpl {
|
public class EndrekSahrMasterBreeder extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("a creature spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public EndrekSahrMasterBreeder(UUID ownerId, CardSetInfo setInfo) {
|
public EndrekSahrMasterBreeder(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
|
||||||
this.supertype.add("Legendary");
|
this.supertype.add("Legendary");
|
||||||
this.subtype.add("Human");
|
this.subtype.add("Human");
|
||||||
this.subtype.add("Wizard");
|
this.subtype.add("Wizard");
|
||||||
|
@ -71,7 +64,7 @@ public class EndrekSahrMasterBreeder extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
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.
|
// 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(), filter, false, true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new EndrekSahrMasterBreederEffect(), StaticFilters.FILTER_SPELL_A_CREATURE, false, true));
|
||||||
// When you control seven or more Thrulls, sacrifice Endrek Sahr, Master Breeder.
|
// When you control seven or more Thrulls, sacrifice Endrek Sahr, Master Breeder.
|
||||||
this.addAbility(new ControlsPermanentsControllerTriggeredAbility(
|
this.addAbility(new ControlsPermanentsControllerTriggeredAbility(
|
||||||
new FilterCreaturePermanent("Thrull", "seven or more Thrulls"), Filter.ComparisonType.GreaterThan, 6,
|
new FilterCreaturePermanent("Thrull", "seven or more Thrulls"), Filter.ComparisonType.GreaterThan, 6,
|
||||||
|
|
|
@ -28,36 +28,28 @@
|
||||||
package mage.cards.e;
|
package mage.cards.e;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||||
import mage.abilities.costs.mana.GenericManaCost;
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.effects.common.DoIfCostPaid;
|
import mage.abilities.effects.common.DoIfCostPaid;
|
||||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.filter.FilterSpell;
|
import mage.constants.CardType;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public class Equilibrium extends CardImpl {
|
public class Equilibrium extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("a creature spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public Equilibrium(UUID ownerId, CardSetInfo setInfo) {
|
public Equilibrium(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}{U}");
|
||||||
|
|
||||||
|
|
||||||
// Whenever you cast a creature spell, you may pay {1}. If you do, return target creature to its owner's hand.
|
// Whenever you cast a creature spell, you may pay {1}. If you do, return target creature to its owner's hand.
|
||||||
Ability ability = new SpellCastControllerTriggeredAbility(new DoIfCostPaid(new ReturnToHandTargetEffect(), new GenericManaCost(1)), filter, false);
|
Ability ability = new SpellCastControllerTriggeredAbility(new DoIfCostPaid(new ReturnToHandTargetEffect(), new GenericManaCost(1)), StaticFilters.FILTER_SPELL_A_CREATURE, false);
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,9 +43,8 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
import mage.game.command.Emblem;
|
import mage.game.command.Emblem;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
@ -95,16 +94,10 @@ public class GarrukCallerOfBeasts extends CardImpl {
|
||||||
*/
|
*/
|
||||||
class GarrukCallerOfBeastsEmblem extends Emblem {
|
class GarrukCallerOfBeastsEmblem extends Emblem {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("a creature spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public GarrukCallerOfBeastsEmblem() {
|
public GarrukCallerOfBeastsEmblem() {
|
||||||
this.setName("Emblem Garruk");
|
this.setName("Emblem Garruk");
|
||||||
Effect effect = new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterCreatureCard("creature card")), false, true, Outcome.PutCreatureInPlay);
|
Effect effect = new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterCreatureCard("creature card")), false, true, Outcome.PutCreatureInPlay);
|
||||||
Ability ability = new SpellCastControllerTriggeredAbility(Zone.COMMAND, effect, filter, true, false);
|
Ability ability = new SpellCastControllerTriggeredAbility(Zone.COMMAND, effect, StaticFilters.FILTER_SPELL_A_CREATURE, true, false);
|
||||||
this.getAbilities().add(ability);
|
this.getAbilities().add(ability);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,8 +37,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,20 +46,13 @@ import mage.game.permanent.token.Token;
|
||||||
*/
|
*/
|
||||||
public class HalcyonGlaze extends CardImpl {
|
public class HalcyonGlaze extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("a creature spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public HalcyonGlaze(UUID ownerId, CardSetInfo setInfo) {
|
public HalcyonGlaze(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}{U}");
|
||||||
|
|
||||||
|
|
||||||
// Whenever you cast a creature spell, Halcyon Glaze becomes a 4/4 Illusion creature with flying in addition to its other types until end of turn.
|
// Whenever you cast a creature spell, Halcyon Glaze becomes a 4/4 Illusion creature with flying in addition to its other types until end of turn.
|
||||||
Effect effect = new BecomesCreatureSourceEffect(new HalcyonGlazeToken(), "enchantment", Duration.EndOfTurn);
|
Effect effect = new BecomesCreatureSourceEffect(new HalcyonGlazeToken(), "enchantment", Duration.EndOfTurn);
|
||||||
effect.setText("Whenever you cast a creature spell, {this} becomes a 4/4 Illusion creature with flying in addition to its other types until end of turn");
|
effect.setText("Whenever you cast a creature spell, {this} becomes a 4/4 Illusion creature with flying in addition to its other types until end of turn");
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(effect, filter, false));
|
this.addAbility(new SpellCastControllerTriggeredAbility(effect, StaticFilters.FILTER_SPELL_A_CREATURE, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public HalcyonGlaze(final HalcyonGlaze card) {
|
public HalcyonGlaze(final HalcyonGlaze card) {
|
||||||
|
@ -74,6 +66,7 @@ public class HalcyonGlaze extends CardImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
class HalcyonGlazeToken extends Token {
|
class HalcyonGlazeToken extends Token {
|
||||||
|
|
||||||
HalcyonGlazeToken() {
|
HalcyonGlazeToken() {
|
||||||
super("", "4/4 Illusion creature with flying");
|
super("", "4/4 Illusion creature with flying");
|
||||||
cardType.add(CardType.CREATURE);
|
cardType.add(CardType.CREATURE);
|
||||||
|
|
|
@ -42,7 +42,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.ColoredManaSymbol;
|
import mage.constants.ColoredManaSymbol;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.common.FilterCreatureSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
@ -54,13 +54,15 @@ import mage.target.common.TargetCardInLibrary;
|
||||||
public class KarametraGodOfHarvests extends CardImpl {
|
public class KarametraGodOfHarvests extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCard filter = new FilterCard("a Forest or Plains card");
|
private static final FilterCard filter = new FilterCard("a Forest or Plains card");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(Predicates.or(
|
filter.add(Predicates.or(
|
||||||
new SubtypePredicate("Forest"),
|
new SubtypePredicate("Forest"),
|
||||||
new SubtypePredicate("Plains")));
|
new SubtypePredicate("Plains")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public KarametraGodOfHarvests(UUID ownerId, CardSetInfo setInfo) {
|
public KarametraGodOfHarvests(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{G}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{G}{W}");
|
||||||
this.supertype.add("Legendary");
|
this.supertype.add("Legendary");
|
||||||
this.subtype.add("God");
|
this.subtype.add("God");
|
||||||
|
|
||||||
|
@ -75,7 +77,7 @@ public class KarametraGodOfHarvests extends CardImpl {
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||||
// Whenever you cast a creature spell, you may search your library for a Forest or Plains card, put it onto the battlefield tapped, then shuffle your library.
|
// Whenever you cast a creature spell, you may search your library for a Forest or Plains card, put it onto the battlefield tapped, then shuffle your library.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||||
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), true), new FilterCreatureSpell("a creature spell"), true));
|
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), true), StaticFilters.FILTER_SPELL_A_CREATURE, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public KarametraGodOfHarvests(final KarametraGodOfHarvests card) {
|
public KarametraGodOfHarvests(final KarametraGodOfHarvests card) {
|
||||||
|
|
|
@ -39,7 +39,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureSpell;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -47,8 +47,6 @@ import mage.filter.common.FilterCreatureSpell;
|
||||||
*/
|
*/
|
||||||
public class LifecraftersBestiary extends CardImpl {
|
public class LifecraftersBestiary extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreatureSpell filter = new FilterCreatureSpell("a creature spell");
|
|
||||||
|
|
||||||
public LifecraftersBestiary(UUID ownerId, CardSetInfo setInfo) {
|
public LifecraftersBestiary(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||||
|
|
||||||
|
@ -56,7 +54,7 @@ public class LifecraftersBestiary extends CardImpl {
|
||||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ScryEffect(1), TargetController.YOU, false));
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ScryEffect(1), TargetController.YOU, false));
|
||||||
|
|
||||||
// Whenever you cast a creature spell, you may pay {G}. If you do, draw a card.
|
// Whenever you cast a creature spell, you may pay {G}. If you do, draw a card.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{G}")), filter, false));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{G}")), StaticFilters.FILTER_SPELL_A_CREATURE, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public LifecraftersBestiary(final LifecraftersBestiary card) {
|
public LifecraftersBestiary(final LifecraftersBestiary card) {
|
||||||
|
|
|
@ -40,8 +40,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -49,13 +48,8 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
*/
|
*/
|
||||||
public class MaskedAdmirers extends CardImpl {
|
public class MaskedAdmirers extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("a creature spell");
|
|
||||||
static {
|
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public MaskedAdmirers(UUID ownerId, CardSetInfo setInfo) {
|
public MaskedAdmirers(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
|
||||||
this.subtype.add("Elf");
|
this.subtype.add("Elf");
|
||||||
this.subtype.add("Shaman");
|
this.subtype.add("Shaman");
|
||||||
|
|
||||||
|
@ -68,7 +62,7 @@ public class MaskedAdmirers extends CardImpl {
|
||||||
OneShotEffect effect = new ReturnToHandSourceEffect();
|
OneShotEffect effect = new ReturnToHandSourceEffect();
|
||||||
effect.setText("return {this} from your graveyard to your hand");
|
effect.setText("return {this} from your graveyard to your hand");
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||||
Zone.GRAVEYARD, new DoIfCostPaid(effect, new ManaCostsImpl("{G}{G}")), filter, false, false));
|
Zone.GRAVEYARD, new DoIfCostPaid(effect, new ManaCostsImpl("{G}{G}")), StaticFilters.FILTER_SPELL_A_CREATURE, false, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public MaskedAdmirers(final MaskedAdmirers card) {
|
public MaskedAdmirers(final MaskedAdmirers card) {
|
||||||
|
|
|
@ -34,8 +34,7 @@ import mage.abilities.effects.common.TapTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -44,17 +43,11 @@ import mage.target.common.TargetCreaturePermanent;
|
||||||
*/
|
*/
|
||||||
public class Onslaught extends CardImpl {
|
public class Onslaught extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("a creature spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public Onslaught(UUID ownerId, CardSetInfo setInfo) {
|
public Onslaught(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{R}");
|
||||||
|
|
||||||
// Whenever you cast a creature spell, tap target creature.
|
// Whenever you cast a creature spell, tap target creature.
|
||||||
Ability ability = new SpellCastControllerTriggeredAbility(new TapTargetEffect(), filter, false);
|
Ability ability = new SpellCastControllerTriggeredAbility(new TapTargetEffect(), StaticFilters.FILTER_SPELL_A_CREATURE, false);
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.common.FilterLandPermanent;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
@ -52,19 +53,17 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
*/
|
*/
|
||||||
public class PrimevalBounty extends CardImpl {
|
public class PrimevalBounty extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filterCreature = new FilterSpell("a creature spell");
|
|
||||||
private static final FilterSpell filterNonCreature = new FilterSpell("a noncreature spell");
|
private static final FilterSpell filterNonCreature = new FilterSpell("a noncreature spell");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filterCreature.add(new CardTypePredicate(CardType.CREATURE));
|
|
||||||
filterNonCreature.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
filterNonCreature.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public PrimevalBounty(UUID ownerId, CardSetInfo setInfo) {
|
public PrimevalBounty(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{5}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{G}");
|
||||||
|
|
||||||
|
|
||||||
// Whenever you cast a creature spell, create a 3/3 green Beast creature token.
|
// Whenever you cast a creature spell, create a 3/3 green Beast creature token.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new CreateTokenEffect(new BeastToken()), filterCreature, false));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new CreateTokenEffect(new BeastToken()), StaticFilters.FILTER_SPELL_A_CREATURE, false));
|
||||||
|
|
||||||
// Whenever you cast a noncreature spell, put three +1/+1 counters on target creature you control.
|
// Whenever you cast a noncreature spell, put three +1/+1 counters on target creature you control.
|
||||||
Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(3));
|
Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(3));
|
||||||
|
@ -72,7 +71,7 @@ public class PrimevalBounty extends CardImpl {
|
||||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// Whenever a land enters the battlefield under your control, you gain 3 life.
|
// Whenever a land enters the battlefield under your control, you gain 3 life.
|
||||||
effect = new GainLifeEffect(3);
|
effect = new GainLifeEffect(3);
|
||||||
ability = new EntersBattlefieldControlledTriggeredAbility(effect, new FilterLandPermanent("a land"));
|
ability = new EntersBattlefieldControlledTriggeredAbility(effect, new FilterLandPermanent("a land"));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
@ -28,14 +28,13 @@
|
||||||
package mage.cards.p;
|
package mage.cards.p;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.filter.FilterSpell;
|
import mage.constants.CardType;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -43,21 +42,15 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
*/
|
*/
|
||||||
public class PrimordialSage extends CardImpl {
|
public class PrimordialSage extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("a creature spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public PrimordialSage(UUID ownerId, CardSetInfo setInfo) {
|
public PrimordialSage(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
|
||||||
this.subtype.add("Spirit");
|
this.subtype.add("Spirit");
|
||||||
|
|
||||||
this.power = new MageInt(4);
|
this.power = new MageInt(4);
|
||||||
this.toughness = new MageInt(5);
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
// Whenever you cast a creature spell, you may draw a card.
|
// Whenever you cast a creature spell, you may draw a card.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new DrawCardSourceControllerEffect(1), filter, true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new DrawCardSourceControllerEffect(1), StaticFilters.FILTER_SPELL_A_CREATURE, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public PrimordialSage(final PrimordialSage card) {
|
public PrimordialSage(final PrimordialSage card) {
|
||||||
|
|
|
@ -43,8 +43,7 @@ import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
@ -59,17 +58,11 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
*/
|
*/
|
||||||
public class QuestForTheHolyRelic extends CardImpl {
|
public class QuestForTheHolyRelic extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("a creature spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public QuestForTheHolyRelic(UUID ownerId, CardSetInfo setInfo) {
|
public QuestForTheHolyRelic(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}");
|
||||||
|
|
||||||
// Whenever you cast a creature spell, you may put a quest counter on Quest for the Holy Relic.
|
// Whenever you cast a creature spell, you may put a quest counter on Quest for the Holy Relic.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.QUEST.createInstance()), filter, true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.QUEST.createInstance()), StaticFilters.FILTER_SPELL_A_CREATURE, true));
|
||||||
// Remove five quest counters from Quest for the Holy Relic and sacrifice it: Search your library for an Equipment card, put it onto the battlefield, and attach it to a creature you control. Then shuffle your library.
|
// Remove five quest counters from Quest for the Holy Relic and sacrifice it: Search your library for an Equipment card, put it onto the battlefield, and attach it to a creature you control. Then shuffle your library.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new QuestForTheHolyRelicEffect(), new RemoveCountersSourceCost(CounterType.QUEST.createInstance(5)));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new QuestForTheHolyRelicEffect(), new RemoveCountersSourceCost(CounterType.QUEST.createInstance(5)));
|
||||||
ability.addCost(new SacrificeSourceCost());
|
ability.addCost(new SacrificeSourceCost());
|
||||||
|
|
|
@ -34,8 +34,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -43,20 +42,14 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
*/
|
*/
|
||||||
public class SkitteringHorror extends CardImpl {
|
public class SkitteringHorror extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("a creature spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public SkitteringHorror(UUID ownerId, CardSetInfo setInfo) {
|
public SkitteringHorror(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||||
this.subtype.add("Horror");
|
this.subtype.add("Horror");
|
||||||
this.power = new MageInt(4);
|
this.power = new MageInt(4);
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
// When you cast a creature spell, sacrifice Skittering Horror.
|
// When you cast a creature spell, sacrifice Skittering Horror.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), filter, false));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), StaticFilters.FILTER_SPELL_A_CREATURE, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public SkitteringHorror(final SkitteringHorror card) {
|
public SkitteringHorror(final SkitteringHorror card) {
|
||||||
|
|
|
@ -34,8 +34,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -43,20 +42,14 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
*/
|
*/
|
||||||
public class SkitteringMonstrosity extends CardImpl {
|
public class SkitteringMonstrosity extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("a creature spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public SkitteringMonstrosity(UUID ownerId, CardSetInfo setInfo) {
|
public SkitteringMonstrosity(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
|
||||||
this.subtype.add("Horror");
|
this.subtype.add("Horror");
|
||||||
this.power = new MageInt(5);
|
this.power = new MageInt(5);
|
||||||
this.toughness = new MageInt(5);
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
// When you cast a creature spell, sacrifice Skittering Monstrosity.
|
// When you cast a creature spell, sacrifice Skittering Monstrosity.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), filter, false));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), StaticFilters.FILTER_SPELL_A_CREATURE, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public SkitteringMonstrosity(final SkitteringMonstrosity card) {
|
public SkitteringMonstrosity(final SkitteringMonstrosity card) {
|
||||||
|
|
|
@ -35,32 +35,25 @@ import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author hanasu
|
* @author hanasu
|
||||||
*/
|
*/
|
||||||
public class SkitteringSkirge extends CardImpl {
|
public class SkitteringSkirge extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("a creature spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public SkitteringSkirge(UUID ownerId, CardSetInfo setInfo) {
|
public SkitteringSkirge(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{B}");
|
||||||
this.subtype.add("Imp");
|
this.subtype.add("Imp");
|
||||||
this.power = new MageInt(3);
|
this.power = new MageInt(3);
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// Flying
|
// Flying
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// When you cast a creature spell, sacrifice Skittering Skirge.
|
// When you cast a creature spell, sacrifice Skittering Skirge.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), filter, false));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), StaticFilters.FILTER_SPELL_A_CREATURE, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public SkitteringSkirge(final SkitteringSkirge card) {
|
public SkitteringSkirge(final SkitteringSkirge card) {
|
||||||
|
|
|
@ -1,63 +1,63 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without modification, are
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
* permitted provided that the following conditions are met:
|
* permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
* conditions and the following disclaimer.
|
* conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
* provided with the distribution.
|
* provided with the distribution.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* The views and conclusions contained in the software and documentation are those of the
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
* authors and should not be interpreted as representing official policies, either expressed
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
* or implied, of BetaSteward_at_googlemail.com.
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
*/
|
*/
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.SpellCastOpponentTriggeredAbility;
|
import mage.abilities.common.SpellCastOpponentTriggeredAbility;
|
||||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterCreatureSpell;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Derpthemeus
|
* @author Derpthemeus
|
||||||
*/
|
*/
|
||||||
public class StrawGolem extends CardImpl {
|
public class StrawGolem extends CardImpl {
|
||||||
|
|
||||||
public StrawGolem(UUID ownerId, CardSetInfo setInfo) {
|
public StrawGolem(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}");
|
||||||
this.subtype.add("Golem");
|
this.subtype.add("Golem");
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
// When an opponent casts a creature spell, sacrifice Straw Golem.
|
// When an opponent casts a creature spell, sacrifice Straw Golem.
|
||||||
this.addAbility(new SpellCastOpponentTriggeredAbility(new SacrificeSourceEffect(), new FilterCreatureSpell("a creature spell"), false));
|
this.addAbility(new SpellCastOpponentTriggeredAbility(new SacrificeSourceEffect(), StaticFilters.FILTER_SPELL_A_CREATURE, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public StrawGolem(final StrawGolem card) {
|
public StrawGolem(final StrawGolem card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StrawGolem copy() {
|
public StrawGolem copy() {
|
||||||
return new StrawGolem(this);
|
return new StrawGolem(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SetTargetPointer;
|
import mage.constants.SetTargetPointer;
|
||||||
import mage.filter.common.FilterCreatureSpell;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -44,10 +44,11 @@ import mage.filter.common.FilterCreatureSpell;
|
||||||
public class Tangleroot extends CardImpl {
|
public class Tangleroot extends CardImpl {
|
||||||
|
|
||||||
public Tangleroot(UUID ownerId, CardSetInfo setInfo) {
|
public Tangleroot(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||||
|
|
||||||
// Whenever a player casts a creature spell, that player adds {G} to his or her mana pool.
|
// Whenever a player casts a creature spell, that player adds {G} to his or her mana pool.
|
||||||
this.addAbility(new SpellCastAllTriggeredAbility(new AddManaToManaPoolTargetControllerEffect(Mana.GreenMana(1), "his or her"), new FilterCreatureSpell("a creature spell"), false, SetTargetPointer.PLAYER));
|
this.addAbility(new SpellCastAllTriggeredAbility(
|
||||||
|
new AddManaToManaPoolTargetControllerEffect(Mana.GreenMana(1), "his or her"), StaticFilters.FILTER_SPELL_A_CREATURE, false, SetTargetPointer.PLAYER));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Tangleroot(final Tangleroot card) {
|
public Tangleroot(final Tangleroot card) {
|
||||||
|
@ -58,5 +59,5 @@ public class Tangleroot extends CardImpl {
|
||||||
public Tangleroot copy() {
|
public Tangleroot copy() {
|
||||||
return new Tangleroot(this);
|
return new Tangleroot(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,9 +36,8 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SetTargetPointer;
|
import mage.constants.SetTargetPointer;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterControlledLandPermanent;
|
import mage.filter.common.FilterControlledLandPermanent;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -46,14 +45,8 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
*/
|
*/
|
||||||
public class ZendikarResurgent extends CardImpl {
|
public class ZendikarResurgent extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell FILTER = new FilterSpell("a creature spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
FILTER.add(new CardTypePredicate(CardType.CREATURE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public ZendikarResurgent(UUID ownerId, CardSetInfo setInfo) {
|
public ZendikarResurgent(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{5}{G}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{G}{G}");
|
||||||
|
|
||||||
// Whenever you tap a land for mana, add one mana to your mana pool of any type that land produced. (<i>The types of mana are white, blue, black, red, green, and colorless.)</i>
|
// Whenever you tap a land for mana, add one mana to your mana pool of any type that land produced. (<i>The types of mana are white, blue, black, red, green, and colorless.)</i>
|
||||||
AddManaOfAnyTypeProducedEffect effect = new AddManaOfAnyTypeProducedEffect();
|
AddManaOfAnyTypeProducedEffect effect = new AddManaOfAnyTypeProducedEffect();
|
||||||
|
@ -64,7 +57,8 @@ public class ZendikarResurgent extends CardImpl {
|
||||||
SetTargetPointer.PERMANENT));
|
SetTargetPointer.PERMANENT));
|
||||||
|
|
||||||
// Whenever you cast a creature spell, draw a card.
|
// Whenever you cast a creature spell, draw a card.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new DrawCardSourceControllerEffect(1), FILTER, false));
|
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||||
|
new DrawCardSourceControllerEffect(1), StaticFilters.FILTER_SPELL_A_CREATURE, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ZendikarResurgent(final ZendikarResurgent card) {
|
public ZendikarResurgent(final ZendikarResurgent card) {
|
||||||
|
|
|
@ -11,6 +11,7 @@ import mage.filter.common.FilterArtifactCreaturePermanent;
|
||||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.common.FilterCreatureSpell;
|
||||||
import mage.filter.common.FilterNonlandCard;
|
import mage.filter.common.FilterNonlandCard;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
@ -32,6 +33,8 @@ public class StaticFilters {
|
||||||
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_GOBLINS = new FilterCreaturePermanent("Goblin", "Goblin creatures");
|
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_GOBLINS = new FilterCreaturePermanent("Goblin", "Goblin creatures");
|
||||||
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_SLIVERS = new FilterCreaturePermanent("Sliver", "Sliver creatures");
|
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_SLIVERS = new FilterCreaturePermanent("Sliver", "Sliver creatures");
|
||||||
|
|
||||||
|
public static final FilterCreatureSpell FILTER_SPELL_A_CREATURE = new FilterCreatureSpell("a creature spell");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
FILTER_PERMANENT_ARTIFACT_OR_CREATURE.add(Predicates.or(
|
FILTER_PERMANENT_ARTIFACT_OR_CREATURE.add(Predicates.or(
|
||||||
new CardTypePredicate(CardType.ARTIFACT),
|
new CardTypePredicate(CardType.ARTIFACT),
|
||||||
|
|
Loading…
Reference in a new issue