mirror of
https://github.com/correl/mage.git
synced 2025-03-28 13:00:16 -09:00
Implemented Eat to Extinction
This commit is contained in:
parent
b1bb698fbd
commit
206c7ebfb2
2 changed files with 72 additions and 0 deletions
Mage.Sets/src/mage
71
Mage.Sets/src/mage/cards/e/EatToExtinction.java
Normal file
71
Mage.Sets/src/mage/cards/e/EatToExtinction.java
Normal file
|
@ -0,0 +1,71 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreatureOrPlaneswalker;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class EatToExtinction extends CardImpl {
|
||||
|
||||
public EatToExtinction(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B}");
|
||||
|
||||
// Exile target creature or planeswalker. Look at the top card of your library. You may put that card into your graveyard.
|
||||
this.getSpellAbility().addEffect(new ExileTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreatureOrPlaneswalker());
|
||||
this.getSpellAbility().addEffect(new EatToExtinctionEffect());
|
||||
}
|
||||
|
||||
private EatToExtinction(final EatToExtinction card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EatToExtinction copy() {
|
||||
return new EatToExtinction(this);
|
||||
}
|
||||
}
|
||||
|
||||
class EatToExtinctionEffect extends OneShotEffect {
|
||||
|
||||
EatToExtinctionEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Look at the top card of your library. You may put that card into your graveyard.";
|
||||
}
|
||||
|
||||
private EatToExtinctionEffect(final EatToExtinctionEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EatToExtinctionEffect copy() {
|
||||
return new EatToExtinctionEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null || player.getLibrary().size() == 0) {
|
||||
return false;
|
||||
}
|
||||
Card card = player.getLibrary().getFromTop(game);
|
||||
player.lookAtCards("Top card of your library", card, game);
|
||||
if (player.chooseUse(Outcome.AIDontUseIt, "Put the top card of your library into your graveyard?", source, game)) {
|
||||
player.moveCards(card, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -52,6 +52,7 @@ public final class TherosBeyondDeath extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Demon of Loathing", 292, Rarity.RARE, mage.cards.d.DemonOfLoathing.class));
|
||||
cards.add(new SetCardInfo("Devourer of Memory", 213, Rarity.UNCOMMON, mage.cards.d.DevourerOfMemory.class));
|
||||
cards.add(new SetCardInfo("Drag to the Underworld", 89, Rarity.UNCOMMON, mage.cards.d.DragToTheUnderworld.class));
|
||||
cards.add(new SetCardInfo("Eat to Extinction", 90, Rarity.RARE, mage.cards.e.EatToExtinction.class));
|
||||
cards.add(new SetCardInfo("Eidolon of Philosophy", 48, Rarity.COMMON, mage.cards.e.EidolonOfPhilosophy.class));
|
||||
cards.add(new SetCardInfo("Elspeth, Sun's Nemesis", 14, Rarity.MYTHIC, mage.cards.e.ElspethSunsNemesis.class));
|
||||
cards.add(new SetCardInfo("Elspeth, Undaunted Hero", 270, Rarity.MYTHIC, mage.cards.e.ElspethUndauntedHero.class));
|
||||
|
|
Loading…
Add table
Reference in a new issue