From 41acfbb2fd6a121ce94ebfeacad7724011dcd98a Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 18 Apr 2019 22:26:36 -0400 Subject: [PATCH] Implemented Planewide Celebration --- .../mage/cards/p/PlanewideCelebration.java | 56 +++++++++++++++++++ Mage.Sets/src/mage/sets/WarOfTheSpark.java | 1 + .../token/PlanewideCelebrationToken.java | 34 +++++++++++ 3 files changed, 91 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/p/PlanewideCelebration.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/PlanewideCelebrationToken.java diff --git a/Mage.Sets/src/mage/cards/p/PlanewideCelebration.java b/Mage.Sets/src/mage/cards/p/PlanewideCelebration.java new file mode 100644 index 0000000000..503edf298c --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PlanewideCelebration.java @@ -0,0 +1,56 @@ +package mage.cards.p; + +import mage.abilities.Mode; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.counter.ProliferateEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterCard; +import mage.filter.common.FilterPermanentCard; +import mage.game.permanent.token.PlanewideCelebrationToken; +import mage.target.common.TargetCardInYourGraveyard; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PlanewideCelebration extends CardImpl { + + private static final FilterCard filter = new FilterPermanentCard("permanent card from your graveyard"); + + public PlanewideCelebration(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{G}{G}"); + + // Choose four. You may choose the same mode more than once. + this.getSpellAbility().getModes().setMinModes(4); + this.getSpellAbility().getModes().setMaxModes(4); + this.getSpellAbility().getModes().setEachModeMoreThanOnce(true); + + // • Create a 2/2 Citizen creature token that's all colors. + this.getSpellAbility().addEffect(new CreateTokenEffect(new PlanewideCelebrationToken())); + + // • Return target permanent card from your graveyard to your hand. + Mode mode = new Mode(new ReturnToHandTargetEffect()); + mode.addTarget(new TargetCardInYourGraveyard(filter)); + this.getSpellAbility().addMode(mode); + + // • Proliferate. + this.getSpellAbility().addMode(new Mode(new ProliferateEffect())); + + // • You gain 4 life. + this.getSpellAbility().addMode(new Mode(new GainLifeEffect(4))); + } + + private PlanewideCelebration(final PlanewideCelebration card) { + super(card); + } + + @Override + public PlanewideCelebration copy() { + return new PlanewideCelebration(this); + } +} diff --git a/Mage.Sets/src/mage/sets/WarOfTheSpark.java b/Mage.Sets/src/mage/sets/WarOfTheSpark.java index b852b03ebc..1c2bb15f59 100644 --- a/Mage.Sets/src/mage/sets/WarOfTheSpark.java +++ b/Mage.Sets/src/mage/sets/WarOfTheSpark.java @@ -204,6 +204,7 @@ public final class WarOfTheSpark extends ExpansionSet { cards.add(new SetCardInfo("Plains", 250, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Plains", 251, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Plains", 252, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Planewide Celebration", 172, Rarity.RARE, mage.cards.p.PlanewideCelebration.class)); cards.add(new SetCardInfo("Pledge of Unity", 210, Rarity.UNCOMMON, mage.cards.p.PledgeOfUnity.class)); cards.add(new SetCardInfo("Pollenbright Druid", 173, Rarity.COMMON, mage.cards.p.PollenbrightDruid.class)); cards.add(new SetCardInfo("Pouncing Lynx", 25, Rarity.COMMON, mage.cards.p.PouncingLynx.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/PlanewideCelebrationToken.java b/Mage/src/main/java/mage/game/permanent/token/PlanewideCelebrationToken.java new file mode 100644 index 0000000000..5405ab5235 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/PlanewideCelebrationToken.java @@ -0,0 +1,34 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author TheElk801 + */ +public final class PlanewideCelebrationToken extends TokenImpl { + + public PlanewideCelebrationToken() { + super("Citizen", "2/2 Citizen creature token that's all colors"); + cardType.add(CardType.CREATURE); + color.setWhite(true); + color.setBlue(true); + color.setBlack(true); + color.setRed(true); + color.setGreen(true); + + subtype.add(SubType.CITIZEN); + power = new MageInt(2); + toughness = new MageInt(2); + } + + public PlanewideCelebrationToken(final PlanewideCelebrationToken token) { + super(token); + } + + public PlanewideCelebrationToken copy() { + return new PlanewideCelebrationToken(this); + } +}