Implemented Barrier Breach

This commit is contained in:
Evan Kranzler 2020-04-06 17:38:40 -04:00
parent a16be04809
commit 0ab6951b9e
3 changed files with 46 additions and 6 deletions

View file

@ -0,0 +1,37 @@
package mage.cards.b;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.keyword.CyclingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.common.TargetEnchantmentPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BarrierBreach extends CardImpl {
public BarrierBreach(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
// Exile up to three target enchantments.
this.getSpellAbility().addEffect(new ExileTargetEffect());
this.getSpellAbility().addTarget(new TargetEnchantmentPermanent(0, 3));
// Cycling {2}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
}
private BarrierBreach(final BarrierBreach card) {
super(card);
}
@Override
public BarrierBreach copy() {
return new BarrierBreach(this);
}
}

View file

@ -30,6 +30,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
this.maxCardNumberInBooster = 274;
this.hasBasicLands = false; // remove when basics are available
cards.add(new SetCardInfo("Barrier Breach", 145, Rarity.UNCOMMON, mage.cards.b.BarrierBreach.class));
cards.add(new SetCardInfo("Bastion of Remembrance", 73, Rarity.UNCOMMON, mage.cards.b.BastionOfRemembrance.class));
cards.add(new SetCardInfo("Blood Curdle", 75, Rarity.COMMON, mage.cards.b.BloodCurdle.class));
cards.add(new SetCardInfo("Boon of the Wish-Giver", 43, Rarity.UNCOMMON, mage.cards.b.BoonOfTheWishGiver.class));

View file

@ -1,18 +1,16 @@
package mage.target.common;
import mage.filter.StaticFilters;
import mage.filter.common.FilterEnchantmentPermanent;
import mage.target.TargetPermanent;
/**
*
* @author LevelX2
*/
public class TargetEnchantmentPermanent extends TargetPermanent {
public TargetEnchantmentPermanent() {
this(1, 1, new FilterEnchantmentPermanent(), false);
this(1);
}
public TargetEnchantmentPermanent(FilterEnchantmentPermanent filter) {
@ -20,7 +18,11 @@ public class TargetEnchantmentPermanent extends TargetPermanent {
}
public TargetEnchantmentPermanent(int numTargets) {
this(numTargets, numTargets, new FilterEnchantmentPermanent(), false);
this(numTargets, numTargets);
}
public TargetEnchantmentPermanent(int minNumTargets, int maxNumTargets) {
this(minNumTargets, maxNumTargets, StaticFilters.FILTER_ENCHANTMENT_PERMANENT, false);
}
public TargetEnchantmentPermanent(int minNumTargets, int maxNumTargets, FilterEnchantmentPermanent filter, boolean notTarget) {