[CMR] Implemented Triumphant Reckoning

This commit is contained in:
Evan Kranzler 2020-11-05 21:56:49 -05:00
parent ecc369aa29
commit 2c6d66edf8
2 changed files with 74 additions and 0 deletions

View file

@ -0,0 +1,73 @@
package mage.cards.t;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TriumphantReckoning extends CardImpl {
public TriumphantReckoning(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{6}{W}{W}{W}");
// Return all artifact, enchantment, and planeswalker cards from your graveyard to the battlefield.
this.getSpellAbility().addEffect(new TriumphantReckoningEffect());
}
private TriumphantReckoning(final TriumphantReckoning card) {
super(card);
}
@Override
public TriumphantReckoning copy() {
return new TriumphantReckoning(this);
}
}
class TriumphantReckoningEffect extends OneShotEffect {
private static final FilterCard filter = new FilterCard();
static {
filter.add(Predicates.or(
CardType.ARTIFACT.getPredicate(),
CardType.ENCHANTMENT.getPredicate(),
CardType.PLANESWALKER.getPredicate()
));
}
TriumphantReckoningEffect() {
super(Outcome.Benefit);
staticText = "return all artifact, enchantment, and planeswalker cards from your graveyard to the battlefield";
}
private TriumphantReckoningEffect(final TriumphantReckoningEffect effect) {
super(effect);
}
@Override
public TriumphantReckoningEffect copy() {
return new TriumphantReckoningEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
return player != null && player.moveCards(
player.getGraveyard().getCards(filter, game), Zone.BATTLEFIELD, source, game
);
}
}
// on your left

View file

@ -366,6 +366,7 @@ public final class CommanderLegends extends ExpansionSet {
cards.add(new SetCardInfo("Toggo, Goblin Weaponsmith", 204, Rarity.UNCOMMON, mage.cards.t.ToggoGoblinWeaponsmith.class));
cards.add(new SetCardInfo("Tormod, the Desecrator", 155, Rarity.UNCOMMON, mage.cards.t.TormodTheDesecrator.class));
cards.add(new SetCardInfo("Training Center", 358, Rarity.RARE, mage.cards.t.TrainingCenter.class));
cards.add(new SetCardInfo("Triumphant Reckoning", 52, Rarity.MYTHIC, mage.cards.t.TriumphantReckoning.class));
cards.add(new SetCardInfo("Trusty Packbeast", 53, Rarity.COMMON, mage.cards.t.TrustyPackbeast.class));
cards.add(new SetCardInfo("Tymna the Weaver", 539, Rarity.MYTHIC, mage.cards.t.TymnaTheWeaver.class));
cards.add(new SetCardInfo("Undergrowth Stadium", 359, Rarity.RARE, mage.cards.u.UndergrowthStadium.class));