mirror of
https://github.com/correl/mage.git
synced 2024-12-27 20:06:31 +00:00
- [NEO] added Planar Incision
This commit is contained in:
parent
f3d6f4850f
commit
a01169eeb2
2 changed files with 85 additions and 0 deletions
84
Mage.Sets/src/mage/cards/p/PlanarIncision.java
Normal file
84
Mage.Sets/src/mage/cards/p/PlanarIncision.java
Normal file
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package mage.cards.p;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
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.counters.CounterType;
|
||||
import mage.counters.Counters;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public final class PlanarIncision extends CardImpl {
|
||||
|
||||
public PlanarIncision(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||
|
||||
// Exile target artifact or creature, then return it to the battlefield under its owner’s control with a +1/+1 counter on it.
|
||||
this.getSpellAbility().addEffect(new PlanarIncisionEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE));
|
||||
}
|
||||
|
||||
private PlanarIncision(final PlanarIncision card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlanarIncision copy() {
|
||||
return new PlanarIncision(this);
|
||||
}
|
||||
}
|
||||
|
||||
class PlanarIncisionEffect extends OneShotEffect {
|
||||
|
||||
PlanarIncisionEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Exile target artifact or creature, then return it to the battlefield under its owner’s control with a +1/+1 counter on it";
|
||||
}
|
||||
|
||||
private PlanarIncisionEffect(final PlanarIncisionEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlanarIncisionEffect copy() {
|
||||
return new PlanarIncisionEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (permanent != null
|
||||
&& controller != null) {
|
||||
UUID exileId = CardUtil.getExileZoneId("planarIncisionExile" + source.toString(), game);
|
||||
if (controller.moveCardsToExile(permanent, source, game, true, exileId, "")) {
|
||||
Card exiledCard = game.getExile().getExileZone(exileId).get(permanent.getId(), game);
|
||||
if (exiledCard != null) {
|
||||
Counters countersToAdd = new Counters();
|
||||
countersToAdd.addCounter(CounterType.P1P1.createInstance());
|
||||
game.setEnterWithCounters(exiledCard.getId(), countersToAdd);
|
||||
return controller.moveCards(exiledCard, Zone.BATTLEFIELD, source, game, false, false, true, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -217,6 +217,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Patchwork Automaton", 254, Rarity.UNCOMMON, mage.cards.p.PatchworkAutomaton.class));
|
||||
cards.add(new SetCardInfo("Peerless Samurai", 156, Rarity.COMMON, mage.cards.p.PeerlessSamurai.class));
|
||||
cards.add(new SetCardInfo("Plains", 283, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Planar Incision", 72, Rarity.COMMON, mage.cards.p.PlanarIncision.class));
|
||||
cards.add(new SetCardInfo("Portrait of Michiko", 29, Rarity.UNCOMMON, mage.cards.p.PortraitOfMichiko.class));
|
||||
cards.add(new SetCardInfo("Prodigy's Prototype", 231, Rarity.UNCOMMON, mage.cards.p.ProdigysPrototype.class));
|
||||
cards.add(new SetCardInfo("Prosperous Thief", 73, Rarity.UNCOMMON, mage.cards.p.ProsperousThief.class));
|
||||
|
|
Loading…
Reference in a new issue