[MID] Implement Rite of Oblivion

This commit is contained in:
ciaccona007 2021-09-12 12:48:06 -04:00 committed by ciaccona007
parent eb065bc0e7
commit af068e2b81
2 changed files with 53 additions and 0 deletions

View file

@ -0,0 +1,52 @@
package mage.cards.r;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.keyword.FlashbackAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetNonlandPermanent;
import java.util.UUID;
/**
* @author ciaccona007
*/
public final class RiteOfOblivion extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("nonland permanent");
static {
filter.add(Predicates.not(CardType.LAND.getPredicate()));
}
public RiteOfOblivion(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{W}{B}");
// As an additional cost to cast this spell, sacrifice a nonland permanent.
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
// Exile target nonland permanent
this.getSpellAbility().addEffect(new ExileTargetEffect());
this.getSpellAbility().addTarget(new TargetNonlandPermanent());
// Flashback {2}{W}{B}
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{2}{W}{B}")));
}
private RiteOfOblivion(final RiteOfOblivion card) {
super(card);
}
@Override
public RiteOfOblivion copy() {
return new RiteOfOblivion(this);
}
}

View file

@ -235,6 +235,7 @@ public final class InnistradMidnightHunt extends ExpansionSet {
cards.add(new SetCardInfo("Revenge of the Drowned", 72, Rarity.COMMON, mage.cards.r.RevengeOfTheDrowned.class));
cards.add(new SetCardInfo("Rise of the Ants", 196, Rarity.UNCOMMON, mage.cards.r.RiseOfTheAnts.class));
cards.add(new SetCardInfo("Rite of Harmony", 236, Rarity.RARE, mage.cards.r.RiteOfHarmony.class));
cards.add(new SetCardInfo("Rite of Oblivion", 237, Rarity.UNCOMMON, mage.cards.r.RiteOfOblivion.class));
cards.add(new SetCardInfo("Ritual Guardian", 30, Rarity.COMMON, mage.cards.r.RitualGuardian.class));
cards.add(new SetCardInfo("Ritual of Hope", 31, Rarity.UNCOMMON, mage.cards.r.RitualOfHope.class));
cards.add(new SetCardInfo("Rockfall Vale", 266, Rarity.RARE, mage.cards.r.RockfallVale.class));