[WHO] Implement Ecstatic Beauty

This commit is contained in:
theelk801 2023-10-14 16:02:03 -04:00
parent 675055d7dc
commit d88137b8cf
2 changed files with 79 additions and 0 deletions

View file

@ -0,0 +1,78 @@
package mage.cards.e;
import mage.abilities.Ability;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.SuspendAbility;
import mage.cards.*;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.game.Game;
import mage.players.Player;
import mage.util.CardUtil;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class EcstaticBeauty extends CardImpl {
public EcstaticBeauty(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}");
// Exile the top three cards of your library. You may play those cards until end of turn. Put four time counters on each of those cards that has suspend.
this.getSpellAbility().addEffect(new EcstaticBeautyEffect());
// Suspend 4--{R}
this.addAbility(new SuspendAbility(4, new ManaCostsImpl<>("{R}"), this));
}
private EcstaticBeauty(final EcstaticBeauty card) {
super(card);
}
@Override
public EcstaticBeauty copy() {
return new EcstaticBeauty(this);
}
}
class EcstaticBeautyEffect extends OneShotEffect {
EcstaticBeautyEffect() {
super(Outcome.Benefit);
staticText = "exile the top three cards of your library. " +
"You may play those cards until end of turn. " +
"Put four time counters on each of those cards that has suspend";
}
private EcstaticBeautyEffect(final EcstaticBeautyEffect effect) {
super(effect);
}
@Override
public EcstaticBeautyEffect copy() {
return new EcstaticBeautyEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 3));
player.moveCards(cards, Zone.EXILED, source, game);
for (Card card : cards.getCards(game)) {
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false);
if (card.getAbilities(game).containsClass(SuspendAbility.class)) {
card.addCounters(CounterType.TIME.createInstance(4), source, game);
}
}
return true;
}
}

View file

@ -67,6 +67,7 @@ public final class DoctorWho extends ExpansionSet {
cards.add(new SetCardInfo("Dragonskull Summit", 272, Rarity.RARE, mage.cards.d.DragonskullSummit.class)); cards.add(new SetCardInfo("Dragonskull Summit", 272, Rarity.RARE, mage.cards.d.DragonskullSummit.class));
cards.add(new SetCardInfo("Dreamroot Cascade", 273, Rarity.RARE, mage.cards.d.DreamrootCascade.class)); cards.add(new SetCardInfo("Dreamroot Cascade", 273, Rarity.RARE, mage.cards.d.DreamrootCascade.class));
cards.add(new SetCardInfo("Drowned Catacomb", 274, Rarity.RARE, mage.cards.d.DrownedCatacomb.class)); cards.add(new SetCardInfo("Drowned Catacomb", 274, Rarity.RARE, mage.cards.d.DrownedCatacomb.class));
cards.add(new SetCardInfo("Ecstatic Beauty", 83, Rarity.RARE, mage.cards.e.EcstaticBeauty.class));
cards.add(new SetCardInfo("Evolving Wilds", 275, Rarity.COMMON, mage.cards.e.EvolvingWilds.class)); cards.add(new SetCardInfo("Evolving Wilds", 275, Rarity.COMMON, mage.cards.e.EvolvingWilds.class));
cards.add(new SetCardInfo("Exotic Orchard", 276, Rarity.RARE, mage.cards.e.ExoticOrchard.class)); cards.add(new SetCardInfo("Exotic Orchard", 276, Rarity.RARE, mage.cards.e.ExoticOrchard.class));
cards.add(new SetCardInfo("Explore", 231, Rarity.COMMON, mage.cards.e.Explore.class)); cards.add(new SetCardInfo("Explore", 231, Rarity.COMMON, mage.cards.e.Explore.class));