Implemented Planewide Celebration

This commit is contained in:
Evan Kranzler 2019-04-18 22:26:36 -04:00
parent 0a2f68400a
commit 41acfbb2fd
3 changed files with 91 additions and 0 deletions

View file

@ -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);
}
}

View file

@ -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", 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", 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("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("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("Pollenbright Druid", 173, Rarity.COMMON, mage.cards.p.PollenbrightDruid.class));
cards.add(new SetCardInfo("Pouncing Lynx", 25, Rarity.COMMON, mage.cards.p.PouncingLynx.class)); cards.add(new SetCardInfo("Pouncing Lynx", 25, Rarity.COMMON, mage.cards.p.PouncingLynx.class));

View file

@ -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);
}
}