mirror of
https://github.com/correl/mage.git
synced 2024-12-30 19:10:36 +00:00
[MOM] Implement Temporal Cleansing
This commit is contained in:
parent
96f6d3b011
commit
6e9319d268
2 changed files with 78 additions and 0 deletions
77
Mage.Sets/src/mage/cards/t/TemporalCleansing.java
Normal file
77
Mage.Sets/src/mage/cards/t/TemporalCleansing.java
Normal file
|
@ -0,0 +1,77 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.ConvokeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TemporalCleansing extends CardImpl {
|
||||
|
||||
public TemporalCleansing(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U}");
|
||||
|
||||
// Convoke
|
||||
this.addAbility(new ConvokeAbility());
|
||||
|
||||
// The owner of target nonland permanent puts it into their library second from the top or on the bottom.
|
||||
this.getSpellAbility().addEffect(new TemporalCleansingEffect());
|
||||
this.getSpellAbility().addTarget(new TargetNonlandPermanent());
|
||||
}
|
||||
|
||||
private TemporalCleansing(final TemporalCleansing card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TemporalCleansing copy() {
|
||||
return new TemporalCleansing(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TemporalCleansingEffect extends OneShotEffect {
|
||||
|
||||
TemporalCleansingEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "the owner of target nonland permanent puts it into their library second from the top or on the bottom";
|
||||
}
|
||||
|
||||
private TemporalCleansingEffect(final TemporalCleansingEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TemporalCleansingEffect copy() {
|
||||
return new TemporalCleansingEffect(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.getOwnerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
if (player.chooseUse(
|
||||
outcome, "Put " + permanent.getIdName() + " second from the top or on the bottom?",
|
||||
null, "Second from top", "Bottom", source, game
|
||||
)) {
|
||||
return player.putCardOnTopXOfLibrary(permanent, game, source, 2, true);
|
||||
}
|
||||
return player.putCardsOnBottomOfLibrary(permanent, game, source, false);
|
||||
}
|
||||
}
|
|
@ -224,6 +224,7 @@ public final class MarchOfTheMachine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Swordsworn Cavalier", 42, Rarity.COMMON, mage.cards.s.SwordswornCavalier.class));
|
||||
cards.add(new SetCardInfo("Tangled Skyline", 209, Rarity.UNCOMMON, mage.cards.t.TangledSkyline.class));
|
||||
cards.add(new SetCardInfo("Tarkir Duneshaper", 43, Rarity.COMMON, mage.cards.t.TarkirDuneshaper.class));
|
||||
cards.add(new SetCardInfo("Temporal Cleansing", 80, Rarity.COMMON, mage.cards.t.TemporalCleansing.class));
|
||||
cards.add(new SetCardInfo("Tenured Oilcaster", 126, Rarity.COMMON, mage.cards.t.TenuredOilcaster.class));
|
||||
cards.add(new SetCardInfo("Thornwood Falls", 274, Rarity.COMMON, mage.cards.t.ThornwoodFalls.class));
|
||||
cards.add(new SetCardInfo("Thrashing Frontliner", 167, Rarity.COMMON, mage.cards.t.ThrashingFrontliner.class));
|
||||
|
|
Loading…
Reference in a new issue