diff --git a/Mage.Sets/src/mage/cards/e/EmergencyPowers.java b/Mage.Sets/src/mage/cards/e/EmergencyPowers.java new file mode 100644 index 0000000000..c206d8450f --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EmergencyPowers.java @@ -0,0 +1,58 @@ +package mage.cards.e; + +import mage.abilities.condition.common.MyMainPhaseCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DrawCardAllEffect; +import mage.abilities.effects.common.ExileSpellEffect; +import mage.abilities.effects.common.PutCardFromHandOntoBattlefieldEffect; +import mage.abilities.effects.common.ShuffleHandGraveyardAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.filter.common.FilterPermanentCard; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class EmergencyPowers extends CardImpl { + + public static final FilterPermanentCard filter + = new FilterPermanentCard("a permanent card with converted mana cost 7 or less"); + + static { + filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 8)); + } + + public EmergencyPowers(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{5}{W}{U}"); + + // Each player shuffles their hand and graveyard into their library, then draws seven cards. Exile Emergency Powers. + this.getSpellAbility().addEffect(new ShuffleHandGraveyardAllEffect()); + this.getSpellAbility().addEffect(new DrawCardAllEffect(7).setText(", then draws seven cards")); + this.getSpellAbility().addEffect(ExileSpellEffect.getInstance()); + + // Addendum — If you cast this spell during your main phase, you may put a permanent card with converted mana cost 7 or less from your hand onto the battlefield. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new PutCardFromHandOntoBattlefieldEffect(filter), + MyMainPhaseCondition.instance, + "
Addendum — " + + "If you cast this spell during your main phase, " + + "you may put a permanent card with converted mana cost 7 or less " + + "from your hand onto the battlefield." + )); + } + + private EmergencyPowers(final EmergencyPowers card) { + super(card); + } + + @Override + public EmergencyPowers copy() { + return new EmergencyPowers(this); + } +} +// I am the senate! diff --git a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java index 0fe56b225e..b8c3a9a763 100644 --- a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java +++ b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java @@ -34,6 +34,7 @@ public final class RavnicaAllegiance extends ExpansionSet { cards.add(new SetCardInfo("Aeromunculus", 152, Rarity.COMMON, mage.cards.a.Aeromunculus.class)); cards.add(new SetCardInfo("Bedevil", 157, Rarity.RARE, mage.cards.b.Bedevil.class)); + cards.add(new SetCardInfo("Emergency Powers", 169, Rarity.MYTHIC, mage.cards.e.EmergencyPowers.class)); cards.add(new SetCardInfo("Frenzied Arynx", 173, Rarity.COMMON, mage.cards.f.FrenziedArynx.class)); cards.add(new SetCardInfo("Gate Colossus", 232, Rarity.UNCOMMON, mage.cards.g.GateColossus.class)); cards.add(new SetCardInfo("Growth Spiral", 178, Rarity.COMMON, mage.cards.g.GrowthSpiral.class));