mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[C21] Implemented Incarnation Technique
This commit is contained in:
parent
666f33371b
commit
b7c5bcdbdd
2 changed files with 81 additions and 0 deletions
80
Mage.Sets/src/mage/cards/i/IncarnationTechnique.java
Normal file
80
Mage.Sets/src/mage/cards/i/IncarnationTechnique.java
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
package mage.cards.i;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.DemonstrateAbility;
|
||||
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.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class IncarnationTechnique extends CardImpl {
|
||||
|
||||
public IncarnationTechnique(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}");
|
||||
|
||||
// Demonstrate
|
||||
this.addAbility(new DemonstrateAbility());
|
||||
|
||||
// Mill five cards, then return a creature card from your graveyard to the battlefield.
|
||||
this.getSpellAbility().addEffect(new IncarnationTechniqueEffect());
|
||||
}
|
||||
|
||||
private IncarnationTechnique(final IncarnationTechnique card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IncarnationTechnique copy() {
|
||||
return new IncarnationTechnique(this);
|
||||
}
|
||||
}
|
||||
|
||||
class IncarnationTechniqueEffect extends OneShotEffect {
|
||||
|
||||
IncarnationTechniqueEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "mill four cards, then return a creature card from your graveyard to the battlefield";
|
||||
}
|
||||
|
||||
private IncarnationTechniqueEffect(final IncarnationTechniqueEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IncarnationTechniqueEffect copy() {
|
||||
return new IncarnationTechniqueEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
player.millCards(5, source, game);
|
||||
TargetCard target = new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
|
||||
target.setNotTarget(true);
|
||||
if (!target.canChoose(source.getSourceId(), source.getControllerId(), game)) {
|
||||
return true;
|
||||
}
|
||||
player.choose(outcome, target, source.getSourceId(), game);
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
player.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -75,6 +75,7 @@ public final class Commander2021Edition extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Hoard-Smelter Dragon", 173, Rarity.RARE, mage.cards.h.HoardSmelterDragon.class));
|
||||
cards.add(new SetCardInfo("Humble Defector", 174, Rarity.UNCOMMON, mage.cards.h.HumbleDefector.class));
|
||||
cards.add(new SetCardInfo("Ichor Wellspring", 245, Rarity.COMMON, mage.cards.i.IchorWellspring.class));
|
||||
cards.add(new SetCardInfo("Incarnation Technique", 41, Rarity.RARE, mage.cards.i.IncarnationTechnique.class));
|
||||
cards.add(new SetCardInfo("Inferno Project", 52, Rarity.RARE, mage.cards.i.InfernoProject.class));
|
||||
cards.add(new SetCardInfo("Inspiring Refrain", 27, Rarity.RARE, mage.cards.i.InspiringRefrain.class));
|
||||
cards.add(new SetCardInfo("Izzet Boilerworks", 294, Rarity.UNCOMMON, mage.cards.i.IzzetBoilerworks.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue