From 2f137969ab168e0d9d9316ed53999c6782f3bb24 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 16 Apr 2019 18:40:04 -0400 Subject: [PATCH] Implemented Casualties of War --- .../src/mage/cards/c/CasualtiesOfWar.java | 62 +++++++++++++++++++ Mage.Sets/src/mage/sets/WarOfTheSpark.java | 1 + 2 files changed, 63 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CasualtiesOfWar.java diff --git a/Mage.Sets/src/mage/cards/c/CasualtiesOfWar.java b/Mage.Sets/src/mage/cards/c/CasualtiesOfWar.java new file mode 100644 index 0000000000..f6bc983359 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CasualtiesOfWar.java @@ -0,0 +1,62 @@ +package mage.cards.c; + +import mage.abilities.Mode; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.StaticFilters; +import mage.target.TargetPermanent; +import mage.target.common.TargetArtifactPermanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetEnchantmentPermanent; +import mage.target.common.TargetLandPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class CasualtiesOfWar extends CardImpl { + + public CasualtiesOfWar(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}{B}{G}{G}"); + + // Choose one or more — + this.getSpellAbility().getModes().setMinModes(1); + this.getSpellAbility().getModes().setMaxModes(5); + + // • Destroy target artifact. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetArtifactPermanent()); + + // • Destroy target creature. + Mode mode = new Mode(new DestroyTargetEffect()); + mode.addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addMode(mode); + + // • Destroy target enchantment. + mode = new Mode(new DestroyTargetEffect()); + mode.addTarget(new TargetEnchantmentPermanent()); + this.getSpellAbility().addMode(mode); + + // • Destroy target land. + mode = new Mode(new DestroyTargetEffect()); + mode.addTarget(new TargetLandPermanent()); + this.getSpellAbility().addMode(mode); + + // • Destroy target planeswalker. + mode = new Mode(new DestroyTargetEffect()); + mode.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_PLANESWALKER)); + this.getSpellAbility().addMode(mode); + } + + private CasualtiesOfWar(final CasualtiesOfWar card) { + super(card); + } + + @Override + public CasualtiesOfWar copy() { + return new CasualtiesOfWar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/WarOfTheSpark.java b/Mage.Sets/src/mage/sets/WarOfTheSpark.java index ba1ffd75f9..977fc77d27 100644 --- a/Mage.Sets/src/mage/sets/WarOfTheSpark.java +++ b/Mage.Sets/src/mage/sets/WarOfTheSpark.java @@ -49,6 +49,7 @@ public final class WarOfTheSpark extends ExpansionSet { cards.add(new SetCardInfo("Bond of Revival", 80, Rarity.UNCOMMON, mage.cards.b.BondOfRevival.class)); cards.add(new SetCardInfo("Bulwark Giant", 7, Rarity.COMMON, mage.cards.b.BulwarkGiant.class)); cards.add(new SetCardInfo("Burning Prophet", 117, Rarity.COMMON, mage.cards.b.BurningProphet.class)); + cards.add(new SetCardInfo("Casualties of War", 187, Rarity.RARE, mage.cards.c.CasualtiesOfWar.class)); cards.add(new SetCardInfo("Chainwhip Cyclops", 118, Rarity.COMMON, mage.cards.c.ChainwhipCyclops.class)); cards.add(new SetCardInfo("Challenger Troll", 157, Rarity.UNCOMMON, mage.cards.c.ChallengerTroll.class)); cards.add(new SetCardInfo("Chandra's Pyrohelix", 120, Rarity.COMMON, mage.cards.c.ChandrasPyrohelix.class));