mirror of
https://github.com/correl/mage.git
synced 2024-11-14 11:09:31 +00:00
Refactored a lot of the artifact/enchantment destruction. Using common filter types to reduce code duplication.
This commit is contained in:
parent
e46439aa47
commit
bea1cee395
56 changed files with 130 additions and 550 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -50,7 +50,8 @@ Mage.Updater/target
|
|||
mage.updater.client/target
|
||||
|
||||
releases
|
||||
Utils/author.txt
|
||||
Utils/author.txt
|
||||
.DS_Store
|
||||
.metadata
|
||||
.project
|
||||
.settings
|
||||
|
|
|
@ -39,9 +39,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.keyword.ExaltedAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
@ -51,22 +49,11 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class QasaliPridemage extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public QasaliPridemage(UUID ownerId) {
|
||||
super(ownerId, 75, "Qasali Pridemage", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}{W}");
|
||||
this.expansionSetCode = "ARB";
|
||||
this.subtype.add("Cat");
|
||||
this.subtype.add("Wizard");
|
||||
|
||||
|
||||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
|
@ -76,7 +63,7 @@ public class QasaliPridemage extends CardImpl {
|
|||
// {1}, Sacrifice Qasali Pridemage: Destroy target artifact or enchantment.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}"));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
Target target = new TargetPermanent(filter);
|
||||
Target target = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent());
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.alarareborn;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -36,8 +35,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -45,11 +43,6 @@ import mage.target.TargetPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class VithianRenegades extends CardImpl {
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
}
|
||||
|
||||
public VithianRenegades (UUID ownerId) {
|
||||
super(ownerId, 64, "Vithian Renegades", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}{G}");
|
||||
|
@ -57,11 +50,12 @@ public class VithianRenegades extends CardImpl {
|
|||
this.subtype.add("Human");
|
||||
this.subtype.add("Shaman");
|
||||
|
||||
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// When Vithian Renegades enters the battlefield, destroy target artifact.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
@ -73,5 +67,4 @@ public class VithianRenegades extends CardImpl {
|
|||
public VithianRenegades copy() {
|
||||
return new VithianRenegades(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.apocalypse;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -65,7 +64,6 @@ public class IllusionReality extends SplitCard {
|
|||
getRightHalfCard().getColor().setGreen(true);
|
||||
getRightHalfCard().getSpellAbility().addTarget(new TargetArtifactPermanent());
|
||||
getRightHalfCard().getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
|
||||
}
|
||||
|
||||
public IllusionReality(final IllusionReality card) {
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.apocalypse;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
|
@ -41,9 +40,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
@ -55,30 +52,20 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public class OrimsThunder extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public OrimsThunder(UUID ownerId) {
|
||||
super(ownerId, 15, "Orim's Thunder", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{W}");
|
||||
this.expansionSetCode = "APC";
|
||||
|
||||
|
||||
// Kicker {R}
|
||||
this.addAbility(new KickerAbility("{R}"));
|
||||
|
||||
// Destroy target artifact or enchantment. If Orim's Thunder was kicked, it deals damage equal to that permanent's converted mana cost to target creature.
|
||||
this.getSpellAbility().addEffect(new OrimsThunderEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||
new OrimsThunderEffect2(),
|
||||
KickedCondition.getInstance(),
|
||||
"If Orim's Thunder was kicked, it deals damage equal to that permanent's converted mana cost to target creature"));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -28,15 +28,12 @@
|
|||
package mage.sets.apocalypse;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -48,7 +45,6 @@ public class Smash extends CardImpl {
|
|||
super(ownerId, 69, "Smash", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{R}");
|
||||
this.expansionSetCode = "APC";
|
||||
|
||||
|
||||
// Destroy target artifact.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactPermanent()));
|
||||
|
|
|
@ -33,9 +33,7 @@ import mage.constants.Rarity;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -44,23 +42,14 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class NaturalEnd extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public NaturalEnd(UUID ownerId) {
|
||||
super(ownerId, 185, "Natural End", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{G}");
|
||||
this.expansionSetCode = "AVR";
|
||||
|
||||
|
||||
// Destroy target artifact or enchantment. You gain 3 life.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addEffect(new GainLifeEffect(3));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
}
|
||||
|
||||
public NaturalEnd(final NaturalEnd card) {
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.betrayersofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
|
@ -36,9 +35,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -50,22 +47,13 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class TerashisGrasp extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public TerashisGrasp(UUID ownerId) {
|
||||
super(ownerId, 26, "Terashi's Grasp", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{W}");
|
||||
this.expansionSetCode = "BOK";
|
||||
this.subtype.add("Arcane");
|
||||
|
||||
|
||||
// Destroy target artifact or enchantment.
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
// You gain life equal to its converted mana cost.
|
||||
this.getSpellAbility().addEffect(new TerashisGraspEffect());
|
||||
|
|
|
@ -33,9 +33,7 @@ import mage.abilities.keyword.SpliceOntoArcaneAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
@ -45,20 +43,14 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class WearAway extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
static {
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public WearAway(UUID ownerId) {
|
||||
super(ownerId, 250, "Wear Away", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}{G}");
|
||||
this.expansionSetCode = "CHK";
|
||||
this.subtype.add("Arcane");
|
||||
|
||||
|
||||
// Destroy target artifact or enchantment.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
Target target = new TargetPermanent(filter);
|
||||
Target target = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent());
|
||||
this.getSpellAbility().addTarget(target);
|
||||
// Splice onto Arcane {3}{G}
|
||||
this.addAbility(new SpliceOntoArcaneAbility("{3}{G}"));
|
||||
|
|
|
@ -31,37 +31,26 @@ import java.util.UUID;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public class AuraShards extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public AuraShards(UUID ownerId) {
|
||||
super(ownerId, 182, "Aura Shards", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}{W}");
|
||||
this.expansionSetCode = "CMD";
|
||||
|
||||
|
||||
// Whenever a creature enters the battlefield under your control, you may destroy target artifact or enchantment.
|
||||
Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new FilterCreaturePermanent(), true, "Whenever a creature enters the battlefield under your control, you may destroy target artifact or enchantment");
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -43,10 +43,8 @@ import mage.cards.CardImpl;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
|
@ -57,13 +55,8 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class FreyaliseLlanowarsFury extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
private static final FilterControlledCreaturePermanent filterGreen = new FilterControlledCreaturePermanent("green creature you control");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
filterGreen.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
|
@ -72,21 +65,19 @@ public class FreyaliseLlanowarsFury extends CardImpl {
|
|||
this.expansionSetCode = "C14";
|
||||
this.subtype.add("Freyalise");
|
||||
|
||||
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(3)), false));
|
||||
|
||||
// +2: Put a 1/1 green Elf Druid creature token onto the battlefield with "{T}: Add {G} to your mana pool."
|
||||
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new FreyaliseLlanowarsFuryToken()), 2));
|
||||
// -2: Destroy target artifact or enchantment.
|
||||
LoyaltyAbility loyaltyAbility = new LoyaltyAbility(new DestroyTargetEffect(), -2);
|
||||
loyaltyAbility.addTarget(new TargetPermanent(filter));
|
||||
loyaltyAbility.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(loyaltyAbility);
|
||||
// -6: Draw a card for each green creature you control.
|
||||
this.addAbility(new LoyaltyAbility(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(filterGreen)), -6));
|
||||
|
||||
// Freyalise, Llanowar's Fury can be your commander.
|
||||
this.addAbility(CanBeYourCommanderAbility.getInstance());
|
||||
|
||||
}
|
||||
|
||||
public FreyaliseLlanowarsFury(final FreyaliseLlanowarsFury card) {
|
||||
|
|
|
@ -36,9 +36,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -50,21 +48,12 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class FiligreeFracture extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public FiligreeFracture(UUID ownerId) {
|
||||
super(ownerId, 82, "Filigree Fracture", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{G}");
|
||||
this.expansionSetCode = "CON";
|
||||
|
||||
|
||||
// Destroy target artifact or enchantment. If that permanent was blue or black, draw a card.
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addEffect(new FiligreeFractureEffect());
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.darkascension;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.darkascension;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.*;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
|
@ -45,6 +44,7 @@ import mage.abilities.keyword.TransformAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -90,17 +90,12 @@ public class WerewolfRansacker extends CardImpl {
|
|||
}
|
||||
|
||||
class WerewolfRansackerAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact");
|
||||
|
||||
public static final String RULE_TEXT = "Whenever this creature transforms into Werewolf Ransacker, you may destroy target artifact. If that artifact is put into a graveyard this way, Werewolf Ransacker deals 3 damage to that artifact's controller";
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
}
|
||||
|
||||
|
||||
public WerewolfRansackerAbility() {
|
||||
super(Zone.BATTLEFIELD, new WerewolfRansackerEffect(), true);
|
||||
Target target = new TargetPermanent(filter);
|
||||
Target target = new TargetPermanent(new FilterArtifactPermanent());
|
||||
this.addTarget(target);
|
||||
}
|
||||
|
||||
|
@ -129,7 +124,6 @@ class WerewolfRansackerAbility extends TriggeredAbilityImpl {
|
|||
public String getRule() {
|
||||
return RULE_TEXT + '.';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class WerewolfRansackerEffect extends OneShotEffect {
|
||||
|
@ -167,5 +161,4 @@ class WerewolfRansackerEffect extends OneShotEffect {
|
|||
}
|
||||
return affectedTargets > 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,17 +25,14 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.darksteel;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -43,18 +40,12 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class Oxidize extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
}
|
||||
|
||||
public Oxidize(UUID ownerId) {
|
||||
super(ownerId, 79, "Oxidize", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{G}");
|
||||
this.expansionSetCode = "DST";
|
||||
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactPermanent()));
|
||||
}
|
||||
|
||||
public Oxidize(final Oxidize card) {
|
||||
|
@ -65,5 +56,4 @@ public class Oxidize extends CardImpl {
|
|||
public Oxidize copy() {
|
||||
return new Oxidize(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,11 +25,9 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.darksteel;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
|
@ -40,9 +38,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -50,14 +46,6 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class ViridianZealot extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public ViridianZealot(UUID ownerId) {
|
||||
super(ownerId, 90, "Viridian Zealot", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{G}{G}");
|
||||
this.expansionSetCode = "DST";
|
||||
|
@ -66,9 +54,11 @@ public class ViridianZealot extends CardImpl {
|
|||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {1}{G}, Sacrifice Viridian Zealot: Destroy target artifact or enchantment.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{G}"));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
@ -80,5 +70,4 @@ public class ViridianZealot extends CardImpl {
|
|||
public ViridianZealot copy() {
|
||||
return new ViridianZealot(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.dissension;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
|
@ -36,9 +35,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -46,14 +43,6 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class IndrikStomphowler extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public IndrikStomphowler(UUID ownerId) {
|
||||
super(ownerId, 86, "Indrik Stomphowler", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{G}");
|
||||
this.expansionSetCode = "DIS";
|
||||
|
@ -62,7 +51,7 @@ public class IndrikStomphowler extends CardImpl {
|
|||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@ public class TelJiladJustice extends CardImpl {
|
|||
super(ownerId, 95, "Tel-Jilad Justice", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{G}");
|
||||
this.expansionSetCode = "5DN";
|
||||
|
||||
|
||||
// Destroy target artifact.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
|
||||
|
|
|
@ -46,7 +46,6 @@ public class ShatteringSpree extends CardImpl {
|
|||
super(ownerId, 75, "Shattering Spree", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{R}");
|
||||
this.expansionSetCode = "GPT";
|
||||
|
||||
|
||||
// Replicate {R}
|
||||
this.addAbility(new ReplicateAbility(this, "{R}"));
|
||||
// Destroy target artifact.
|
||||
|
|
|
@ -34,8 +34,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.TimingRule;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -44,21 +43,13 @@ import java.util.UUID;
|
|||
* @author nantuko
|
||||
*/
|
||||
public class AncientGrudge extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
}
|
||||
|
||||
public AncientGrudge(UUID ownerId) {
|
||||
super(ownerId, 127, "Ancient Grudge", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}");
|
||||
this.expansionSetCode = "ISD";
|
||||
|
||||
|
||||
// Destroy target artifact.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactPermanent()));
|
||||
|
||||
// Flashback {G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{G}"), TimingRule.INSTANT));
|
||||
|
|
|
@ -36,9 +36,7 @@ import mage.abilities.keyword.KickerAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -47,24 +45,15 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class DismantlingBlow extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public DismantlingBlow(UUID ownerId) {
|
||||
super(ownerId, 14, "Dismantling Blow", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{W}");
|
||||
this.expansionSetCode = "INV";
|
||||
|
||||
|
||||
// Kicker {2}{U}
|
||||
this.addAbility(new KickerAbility("{2}{U}"));
|
||||
// Destroy target artifact or enchantment.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
// If Dismantling Blow was kicked, draw two cards.
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||
new DrawCardSourceControllerEffect(2),
|
||||
|
|
|
@ -57,7 +57,6 @@ public class SultaiCharm extends CardImpl {
|
|||
super(ownerId, 204, "Sultai Charm", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{B}{G}{U}");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
|
||||
// Choose one -
|
||||
// <strong>*</strong> Destroy target monocolored creature.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
|
||||
|
@ -73,7 +72,6 @@ public class SultaiCharm extends CardImpl {
|
|||
mode = new Mode();
|
||||
mode.getEffects().add(new DrawDiscardControllerEffect(2,1));
|
||||
this.getSpellAbility().addMode(mode);
|
||||
|
||||
}
|
||||
|
||||
public SultaiCharm(final SultaiCharm card) {
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.magic2010;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -34,9 +33,7 @@ import mage.constants.Rarity;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -45,19 +42,12 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class SolemnOffering extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public SolemnOffering(UUID ownerId) {
|
||||
super(ownerId, 33, "Solemn Offering", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{W}");
|
||||
this.expansionSetCode = "M10";
|
||||
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
// Destroy target artifact or enchantment. You gain 4 life.
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addEffect(new GainLifeEffect(4));
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.magic2011;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -36,8 +35,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
@ -47,12 +45,6 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class ManicVandal extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
}
|
||||
|
||||
public ManicVandal(UUID ownerId) {
|
||||
super(ownerId, 151, "Manic Vandal", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
||||
this.expansionSetCode = "M11";
|
||||
|
@ -63,7 +55,7 @@ public class ManicVandal extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
|
||||
Target target = new TargetPermanent(filter);
|
||||
Target target = new TargetPermanent(new FilterArtifactPermanent());
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
@ -76,5 +68,4 @@ public class ManicVandal extends CardImpl {
|
|||
public ManicVandal copy() {
|
||||
return new ManicVandal(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -44,7 +44,6 @@ public class Smelt extends CardImpl {
|
|||
super(ownerId, 149, "Smelt", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}");
|
||||
this.expansionSetCode = "M13";
|
||||
|
||||
|
||||
// Destroy target artifact.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.mirrodin;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -33,8 +32,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Rarity;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -42,19 +40,13 @@ import mage.target.TargetPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class Shatter extends CardImpl {
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
}
|
||||
|
||||
public Shatter (UUID ownerId) {
|
||||
super(ownerId, 105, "Shatter", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}");
|
||||
this.expansionSetCode = "MRD";
|
||||
|
||||
// Destroy target artifact.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactPermanent()));
|
||||
}
|
||||
|
||||
public Shatter (final Shatter card) {
|
||||
|
@ -65,5 +57,4 @@ public class Shatter extends CardImpl {
|
|||
public Shatter copy() {
|
||||
return new Shatter(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.mirrodinbesieged;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -37,8 +36,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.keyword.InfectAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
@ -48,12 +46,6 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class ViridianCorrupter extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
}
|
||||
|
||||
public ViridianCorrupter (UUID ownerId) {
|
||||
super(ownerId, 94, "Viridian Corrupter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}{G}");
|
||||
this.expansionSetCode = "MBS";
|
||||
|
@ -64,8 +56,9 @@ public class ViridianCorrupter extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
this.addAbility(InfectAbility.getInstance());
|
||||
|
||||
// When Viridian Corrupter enters the battlefield, destroy target artifact.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
|
||||
Target target = new TargetPermanent(filter);
|
||||
Target target = new TargetPermanent(new FilterArtifactPermanent());
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
@ -78,5 +71,4 @@ public class ViridianCorrupter extends CardImpl {
|
|||
public ViridianCorrupter copy() {
|
||||
return new ViridianCorrupter(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.nemesis;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
|
@ -37,9 +36,7 @@ import mage.abilities.costs.common.SacrificeSourceCost;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -47,23 +44,14 @@ import mage.target.TargetPermanent;
|
|||
* @author Plopman
|
||||
*/
|
||||
public class SealOfCleansing extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public SealOfCleansing(UUID ownerId) {
|
||||
super(ownerId, 18, "Seal of Cleansing", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
|
||||
this.expansionSetCode = "NMS";
|
||||
|
||||
|
||||
// Sacrifice Seal of Cleansing: Destroy target artifact or enchantment.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -35,9 +35,7 @@ import mage.cards.CardImpl;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TimingRule;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -46,20 +44,13 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class RayOfDistortion extends CardImpl {
|
||||
|
||||
static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public RayOfDistortion(UUID ownerId) {
|
||||
super(ownerId, 42, "Ray of Distortion", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{W}");
|
||||
this.expansionSetCode = "ODY";
|
||||
|
||||
|
||||
// Destroy target artifact or enchantment.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
// Flashback {4}{W}{W}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{W}{W}"), TimingRule.INSTANT));
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.planarchaos;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
|
@ -37,9 +36,7 @@ import mage.abilities.costs.common.SacrificeSourceCost;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -48,22 +45,13 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class SealOfPrimordium extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public SealOfPrimordium(UUID ownerId) {
|
||||
super(ownerId, 153, "Seal of Primordium", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
|
||||
this.expansionSetCode = "PLC";
|
||||
|
||||
|
||||
// Sacrifice Seal of Primordium: Destroy target artifact or enchantment.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -40,9 +40,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCardInOpponentsGraveyard;
|
||||
import mage.target.targetpointer.SecondTargetPointer;
|
||||
|
@ -53,17 +51,11 @@ import mage.target.targetpointer.SecondTargetPointer;
|
|||
*/
|
||||
public class NullmageAdvocate extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent();
|
||||
static {
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public NullmageAdvocate(UUID ownerId) {
|
||||
super(ownerId, 70, "Nullmage Advocate", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||
this.expansionSetCode = "PC2";
|
||||
this.subtype.add("Insect");
|
||||
this.subtype.add("Druid");
|
||||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
|
@ -76,7 +68,7 @@ public class NullmageAdvocate extends CardImpl {
|
|||
effect.setTargetPointer(new SecondTargetPointer());
|
||||
ability.addEffect(effect);
|
||||
ability.addTarget(new TargetCardInOpponentsGraveyard(2,2, new FilterCard("two target cards from an opponent's graveyard"), true));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.ravnica;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
|
@ -38,10 +37,9 @@ import mage.abilities.costs.common.TapTargetCost;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
@ -53,13 +51,8 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
public class NullmageShepherd extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filterCost = new FilterControlledCreaturePermanent("untapped creatures you control");
|
||||
private static final FilterPermanent filterTarget = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filterCost.add(Predicates.not(new TappedPredicate()));
|
||||
filterTarget.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public NullmageShepherd(UUID ownerId) {
|
||||
|
@ -73,7 +66,7 @@ public class NullmageShepherd extends CardImpl {
|
|||
|
||||
// Tap four untapped creatures you control: Destroy target artifact or enchantment.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(4, 4, filterCost, true)));
|
||||
ability.addTarget(new TargetPermanent(filterTarget));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -33,9 +33,7 @@ import mage.constants.Rarity;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.keyword.ConvokeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -43,24 +41,15 @@ import mage.target.TargetPermanent;
|
|||
* @author jonubuu
|
||||
*/
|
||||
public class SunderingVitae extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public SunderingVitae(UUID ownerId) {
|
||||
super(ownerId, 185, "Sundering Vitae", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{G}");
|
||||
this.expansionSetCode = "RAV";
|
||||
|
||||
|
||||
// Convoke
|
||||
this.addAbility(new ConvokeAbility());
|
||||
// Destroy target artifact or enchantment.
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,6 @@ public class RakdosCharm extends CardImpl {
|
|||
super(ownerId, 184, "Rakdos Charm", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{B}{R}");
|
||||
this.expansionSetCode = "RTR";
|
||||
|
||||
|
||||
// Choose one — Exile all cards from target player's graveyard;
|
||||
this.getSpellAbility().addEffect(new ExileGraveyardAllTargetPlayerEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
|
@ -81,7 +80,6 @@ public class RakdosCharm extends CardImpl {
|
|||
return new RakdosCharm(this);
|
||||
}
|
||||
|
||||
|
||||
private class RakdosCharmDamageEffect extends OneShotEffect {
|
||||
|
||||
public RakdosCharmDamageEffect() {
|
||||
|
@ -113,6 +111,5 @@ public class RakdosCharm extends CardImpl {
|
|||
public RakdosCharmDamageEffect copy() {
|
||||
return new RakdosCharmDamageEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -52,7 +52,6 @@ public class RendingVines extends CardImpl {
|
|||
this.expansionSetCode = "SOK";
|
||||
this.subtype.add("Arcane");
|
||||
|
||||
|
||||
// Destroy target artifact or enchantment if its converted mana cost is less than or equal to the number of cards in your hand.
|
||||
this.getSpellAbility().addEffect(new RendingVinesEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.saviorsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
|
@ -38,9 +37,8 @@ import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -48,13 +46,6 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class YukiOnna extends CardImpl {
|
||||
|
||||
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
|
||||
private static final FilterPermanent filterTarget = new FilterPermanent("artifact");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
}
|
||||
|
||||
public YukiOnna(UUID ownerId) {
|
||||
super(ownerId, 120, "Yuki-Onna", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
this.expansionSetCode = "SOK";
|
||||
|
@ -65,10 +56,10 @@ public class YukiOnna extends CardImpl {
|
|||
|
||||
// When Yuki-Onna enters the battlefield, destroy target artifact.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
|
||||
ability.addTarget(new TargetPermanent(filterTarget));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactPermanent()));
|
||||
this.addAbility(ability);
|
||||
// Whenever you cast a Spirit or Arcane spell, you may return Yuki-Onna to its owner's hand.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), filter, true));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), new FilterSpiritOrArcaneCard(), true));
|
||||
}
|
||||
|
||||
public YukiOnna(final YukiOnna card) {
|
||||
|
|
|
@ -34,9 +34,7 @@ import mage.constants.Rarity;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -44,13 +42,6 @@ import mage.target.TargetPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class SliceinTwain extends CardImpl {
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public SliceinTwain (UUID ownerId) {
|
||||
super(ownerId, 127, "Slice in Twain", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{G}{G}");
|
||||
|
@ -58,7 +49,7 @@ public class SliceinTwain extends CardImpl {
|
|||
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
}
|
||||
|
||||
public SliceinTwain (final SliceinTwain card) {
|
||||
|
@ -69,5 +60,4 @@ public class SliceinTwain extends CardImpl {
|
|||
public SliceinTwain copy() {
|
||||
return new SliceinTwain(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.scarsofmirrodin;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -39,9 +38,7 @@ import mage.abilities.costs.common.SacrificeSourceCost;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -49,13 +46,6 @@ import mage.target.TargetPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class SylvokReplica extends CardImpl {
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public SylvokReplica (UUID ownerId) {
|
||||
super(ownerId, 210, "Sylvok Replica", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}");
|
||||
|
@ -63,9 +53,11 @@ public class SylvokReplica extends CardImpl {
|
|||
this.subtype.add("Shaman");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// {G}, Sacrifice Sylvok Replica: Destroy target artifact or enchantment.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{G}"));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
@ -77,5 +69,4 @@ public class SylvokReplica extends CardImpl {
|
|||
public SylvokReplica copy() {
|
||||
return new SylvokReplica(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -33,9 +33,7 @@ import mage.abilities.keyword.ConspireAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -44,25 +42,16 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class GleefulSabotage extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("target artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT),
|
||||
(new CardTypePredicate(CardType.ENCHANTMENT))));
|
||||
}
|
||||
|
||||
public GleefulSabotage(UUID ownerId) {
|
||||
super(ownerId, 116, "Gleeful Sabotage", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{G}");
|
||||
this.expansionSetCode = "SHM";
|
||||
|
||||
|
||||
// Destroy target artifact or enchantment.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
|
||||
// Conspire
|
||||
this.addAbility(new ConspireAbility(this));
|
||||
|
||||
}
|
||||
|
||||
public GleefulSabotage(final GleefulSabotage card) {
|
||||
|
@ -74,4 +63,3 @@ public class GleefulSabotage extends CardImpl {
|
|||
return new GleefulSabotage(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@ public class SmashToSmithereens extends CardImpl {
|
|||
super(ownerId, 107, "Smash to Smithereens", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}");
|
||||
this.expansionSetCode = "SHM";
|
||||
|
||||
|
||||
// Destroy target artifact. Smash to Smithereens deals 3 damage to that artifact's controller.
|
||||
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
|
|
|
@ -25,11 +25,9 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.shardsofalara;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
|
@ -39,9 +37,7 @@ import mage.abilities.costs.common.SacrificeSourceCost;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -49,21 +45,14 @@ import mage.target.TargetPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class DispellersCapsule extends CardImpl {
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
|
||||
public DispellersCapsule (UUID ownerId) {
|
||||
super(ownerId, 8, "Dispeller's Capsule", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{W}");
|
||||
this.expansionSetCode = "ALA";
|
||||
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{2}{W}"));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,9 +32,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Rarity;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -43,20 +41,13 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class Disenchant extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public Disenchant(UUID ownerId) {
|
||||
super(ownerId, 228, "Disenchant", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{W}");
|
||||
this.expansionSetCode = "TMP";
|
||||
|
||||
// Destroy target artifact or enchantment.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
}
|
||||
|
||||
public Disenchant(final Disenchant card) {
|
||||
|
|
|
@ -32,8 +32,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Rarity;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -42,18 +41,12 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class Verdigris extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
}
|
||||
|
||||
public Verdigris(UUID ownerId) {
|
||||
super(ownerId, 158, "Verdigris", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{G}");
|
||||
this.expansionSetCode = "TMP";
|
||||
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactPermanent()));
|
||||
}
|
||||
|
||||
public Verdigris(final Verdigris card) {
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.tenthedition;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -33,9 +32,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Rarity;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -44,19 +41,12 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class Naturalize extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public Naturalize(UUID ownerId){
|
||||
super(ownerId, 282, "Naturalize", Rarity.COMMON, new CardType[]{CardType.INSTANT},"{1}{G}");
|
||||
this.expansionSetCode = "10E";
|
||||
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
// Destroy target artifact or enchantment.
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
}
|
||||
|
||||
|
|
|
@ -33,9 +33,7 @@ import mage.abilities.effects.keyword.ScryEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -43,20 +41,13 @@ import mage.target.TargetPermanent;
|
|||
* @author LevelX2
|
||||
*/
|
||||
public class ArtisansSorrow extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
static {
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public ArtisansSorrow(UUID ownerId) {
|
||||
super(ownerId, 151, "Artisan's Sorrow", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{G}");
|
||||
this.expansionSetCode = "THS";
|
||||
|
||||
|
||||
// Destroy target artifact or enchantment. Scry 2.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.getSpellAbility().addEffect(new ScryEffect(2));
|
||||
}
|
||||
|
||||
|
|
|
@ -34,9 +34,7 @@ import mage.cards.CardImpl;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -49,19 +47,13 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class DestructiveRevelry extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
static {
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public DestructiveRevelry(UUID ownerId) {
|
||||
super(ownerId, 192, "Destructive Revelry", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{R}{G}");
|
||||
this.expansionSetCode = "THS";
|
||||
|
||||
|
||||
// Destroy target artifact or enchantment. Destructive Revelry deals 2 damage to that permanent's controller.
|
||||
this.getSpellAbility().addEffect(new DestructiveRevelryEffect());
|
||||
Target target = new TargetPermanent(filter);
|
||||
Target target = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent());
|
||||
this.getSpellAbility().addTarget(target);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,10 +39,8 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
@ -53,13 +51,8 @@ import mage.target.TargetPermanent;
|
|||
public class HarmonicSliver extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filterSliver = new FilterCreaturePermanent();
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
static {
|
||||
filterSliver.add(new SubtypePredicate("Sliver"));
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
|
||||
}
|
||||
|
||||
public HarmonicSliver(UUID ownerId) {
|
||||
|
@ -72,7 +65,7 @@ public class HarmonicSliver extends CardImpl {
|
|||
|
||||
// All Slivers have "When this permanent enters the battlefield, destroy target artifact or enchantment."
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
|
||||
TargetPermanent target = new TargetPermanent(filter);
|
||||
TargetPermanent target = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent());
|
||||
ability.addTarget(target);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(
|
||||
ability, Duration.WhileOnBattlefield,
|
||||
|
|
|
@ -33,9 +33,7 @@ import mage.constants.Rarity;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.keyword.SplitSecondAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -43,24 +41,15 @@ import mage.target.TargetPermanent;
|
|||
* @author jonubuu
|
||||
*/
|
||||
public class KrosanGrip extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public KrosanGrip(UUID ownerId) {
|
||||
super(ownerId, 202, "Krosan Grip", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{G}");
|
||||
this.expansionSetCode = "TSP";
|
||||
|
||||
|
||||
// Split second
|
||||
this.addAbility(new SplitSecondAbility());
|
||||
// Destroy target artifact or enchantment.
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
}
|
||||
|
||||
|
|
|
@ -114,5 +114,4 @@ class ViashinoHereticEffect extends OneShotEffect {
|
|||
public String getText(Mode mode) {
|
||||
return "Destroy target artifact. Viashino Heretic deals damage to that artifact's controller equal to the artifact's converted mana cost";
|
||||
}
|
||||
|
||||
}
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.urzassaga;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -35,8 +34,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.keyword.CyclingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -45,18 +43,12 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class Scrap extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
}
|
||||
|
||||
public Scrap(UUID ownerId) {
|
||||
super(ownerId, 213, "Scrap", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{R}");
|
||||
this.expansionSetCode = "USG";
|
||||
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactPermanent()));
|
||||
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
||||
}
|
||||
|
||||
|
|
|
@ -39,9 +39,7 @@ import mage.cards.CardImpl;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -50,14 +48,6 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class DevoutWitness extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public DevoutWitness(UUID ownerId) {
|
||||
super(ownerId, 24, "Devout Witness", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
this.expansionSetCode = "VMA";
|
||||
|
@ -71,7 +61,7 @@ public class DevoutWitness extends CardImpl {
|
|||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{W}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new DiscardCardCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -43,9 +43,7 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.util.CardUtil;
|
||||
|
@ -55,25 +53,16 @@ import mage.util.CardUtil;
|
|||
* @author emerald000
|
||||
*/
|
||||
public class AuraOfSilence extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public AuraOfSilence(UUID ownerId) {
|
||||
super(ownerId, 123, "Aura of Silence", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{W}");
|
||||
this.expansionSetCode = "WTH";
|
||||
|
||||
|
||||
// Artifact and enchantment spells your opponents cast cost {2} more to cast.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AuraOfSilenceCostModificationEffect()));
|
||||
|
||||
// Sacrifice Aura of Silence: Destroy target artifact or enchantment.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -25,11 +25,9 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.worldwake;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
|
@ -38,9 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -51,21 +47,15 @@ import mage.target.TargetPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class NaturesClaim extends CardImpl {
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public NaturesClaim (UUID ownerId) {
|
||||
super(ownerId, 108, "Nature's Claim", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}");
|
||||
this.expansionSetCode = "WWK";
|
||||
|
||||
// Destroy target artifact or enchantment. Its controller gains 4 life.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addEffect(new NaturesClaimEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
}
|
||||
|
||||
public NaturesClaim (final NaturesClaim card) {
|
||||
|
@ -105,5 +95,4 @@ class NaturesClaimEffect extends OneShotEffect {
|
|||
public NaturesClaimEffect copy() {
|
||||
return new NaturesClaimEffect(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.zendikar;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -38,9 +37,7 @@ import mage.abilities.decorator.ConditionalTriggeredAbility;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -48,13 +45,6 @@ import mage.target.TargetPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class KorSanctifiers extends CardImpl {
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public KorSanctifiers (UUID ownerId) {
|
||||
super(ownerId, 22, "Kor Sanctifiers", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
|
@ -68,10 +58,9 @@ public class KorSanctifiers extends CardImpl {
|
|||
// Kicker {W} (You may pay an additional {W} as you cast this spell.)
|
||||
this.addAbility(new KickerAbility("{W}"));
|
||||
|
||||
|
||||
// When Kor Sanctifiers enters the battlefield, if it was kicked, destroy target artifact or enchantment.
|
||||
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.getInstance(), "When {this} enters the battlefield, if it was kicked, destroy target artifact or enchantment."));
|
||||
}
|
||||
|
||||
|
@ -83,5 +72,4 @@ public class KorSanctifiers extends CardImpl {
|
|||
public KorSanctifiers copy() {
|
||||
return new KorSanctifiers(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -35,8 +35,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
@ -47,24 +46,15 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class RelicCrush extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
(new CardTypePredicate(CardType.ARTIFACT)),
|
||||
(new CardTypePredicate(CardType.ENCHANTMENT))));
|
||||
}
|
||||
|
||||
public RelicCrush(UUID ownerId) {
|
||||
super(ownerId, 179, "Relic Crush", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{4}{G}");
|
||||
this.expansionSetCode = "ZEN";
|
||||
|
||||
|
||||
// Destroy target artifact or enchantment and up to one other target artifact or enchantment.
|
||||
FilterPermanent filter = new FilterArtifactOrEnchantmentPermanent();
|
||||
this.getSpellAbility().addEffect(new RelicCrushEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(0, 1, filter, false));
|
||||
|
||||
}
|
||||
|
||||
public RelicCrush(final RelicCrush card) {
|
||||
|
|
|
@ -1,9 +1,30 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 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
|
||||
* provided with the distribution.
|
||||
*
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* 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
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.filter.common;
|
||||
|
||||
import mage.constants.CardType;
|
||||
|
@ -15,7 +36,6 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class FilterArtifactOrEnchantmentPermanent extends FilterPermanent {
|
||||
|
||||
public FilterArtifactOrEnchantmentPermanent() {
|
||||
|
|
Loading…
Reference in a new issue