mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
[TDM] Implement Magmatic Hellkite
This commit is contained in:
parent
86fe23e396
commit
8dd8953a85
2 changed files with 109 additions and 0 deletions
108
Mage.Sets/src/mage/cards/m/MagmaticHellkite.java
Normal file
108
Mage.Sets/src/mage/cards/m/MagmaticHellkite.java
Normal file
|
|
@ -0,0 +1,108 @@
|
||||||
|
package mage.cards.m;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.*;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
import mage.counters.Counters;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.filter.common.FilterLandPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class MagmaticHellkite extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterLandPermanent("nonbasic land an opponent controls");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(Predicates.not(SuperType.BASIC.getPredicate()));
|
||||||
|
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagmaticHellkite(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.DRAGON);
|
||||||
|
this.power = new MageInt(4);
|
||||||
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// When this creature enters, destroy target nonbasic land an opponent controls. Its controller searches their library for a basic land card, puts it onto the battlefield tapped with a stun counter on it, then shuffles.
|
||||||
|
Ability ability = new EntersBattlefieldTriggeredAbility(new MagmaticHellkiteEffect());
|
||||||
|
ability.addTarget(new TargetPermanent(filter));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private MagmaticHellkite(final MagmaticHellkite card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MagmaticHellkite copy() {
|
||||||
|
return new MagmaticHellkite(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MagmaticHellkiteEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
MagmaticHellkiteEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "destroy target nonbasic land an opponent controls. " +
|
||||||
|
"Its controller searches their library for a basic land card, " +
|
||||||
|
"puts it onto the battlefield tapped with a stun counter on it, then shuffles";
|
||||||
|
}
|
||||||
|
|
||||||
|
private MagmaticHellkiteEffect(final MagmaticHellkiteEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MagmaticHellkiteEffect copy() {
|
||||||
|
return new MagmaticHellkiteEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||||
|
if (permanent == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Player player = game.getPlayer(permanent.getControllerId());
|
||||||
|
permanent.destroy(source, game);
|
||||||
|
if (player == null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND);
|
||||||
|
player.searchLibrary(target, source, game);
|
||||||
|
Card card = player.getLibrary().getCard(target.getFirstTarget(), game);
|
||||||
|
if (card == null) {
|
||||||
|
player.shuffleLibrary(source, game);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
game.setEnterWithCounters(card.getId(), new Counters().addCounter(CounterType.STUN.createInstance()));
|
||||||
|
player.moveCards(
|
||||||
|
card, Zone.BATTLEFIELD, source, game, true,
|
||||||
|
false, false, null
|
||||||
|
);
|
||||||
|
player.shuffleLibrary(source, game);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -159,6 +159,7 @@ public final class TarkirDragonstorm extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Lotuslight Dancers", 363, Rarity.RARE, mage.cards.l.LotuslightDancers.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Lotuslight Dancers", 363, Rarity.RARE, mage.cards.l.LotuslightDancers.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Loxodon Battle Priest", 15, Rarity.UNCOMMON, mage.cards.l.LoxodonBattlePriest.class));
|
cards.add(new SetCardInfo("Loxodon Battle Priest", 15, Rarity.UNCOMMON, mage.cards.l.LoxodonBattlePriest.class));
|
||||||
cards.add(new SetCardInfo("Maelstrom of the Spirit Dragon", 260, Rarity.RARE, mage.cards.m.MaelstromOfTheSpiritDragon.class));
|
cards.add(new SetCardInfo("Maelstrom of the Spirit Dragon", 260, Rarity.RARE, mage.cards.m.MaelstromOfTheSpiritDragon.class));
|
||||||
|
cards.add(new SetCardInfo("Magmatic Hellkite", 111, Rarity.RARE, mage.cards.m.MagmaticHellkite.class));
|
||||||
cards.add(new SetCardInfo("Mammoth Bellow", 205, Rarity.UNCOMMON, mage.cards.m.MammothBellow.class));
|
cards.add(new SetCardInfo("Mammoth Bellow", 205, Rarity.UNCOMMON, mage.cards.m.MammothBellow.class));
|
||||||
cards.add(new SetCardInfo("Marang River Regent", 51, Rarity.RARE, mage.cards.m.MarangRiverRegent.class));
|
cards.add(new SetCardInfo("Marang River Regent", 51, Rarity.RARE, mage.cards.m.MarangRiverRegent.class));
|
||||||
cards.add(new SetCardInfo("Mardu Devotee", 16, Rarity.COMMON, mage.cards.m.MarduDevotee.class));
|
cards.add(new SetCardInfo("Mardu Devotee", 16, Rarity.COMMON, mage.cards.m.MarduDevotee.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue