From 237eea79c80d32b28fc265da0c66921006f1b908 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Tue, 9 Jul 2024 16:39:49 -0400 Subject: [PATCH] [BLB] Implement Repel Calamity --- Mage.Sets/src/mage/cards/r/RepelCalamity.java | 48 +++++++++++++++++++ Mage.Sets/src/mage/sets/Bloomburrow.java | 1 + 2 files changed, 49 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/RepelCalamity.java diff --git a/Mage.Sets/src/mage/cards/r/RepelCalamity.java b/Mage.Sets/src/mage/cards/r/RepelCalamity.java new file mode 100644 index 00000000000..a04aea6aff1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RepelCalamity.java @@ -0,0 +1,48 @@ +package mage.cards.r; + +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.filter.predicate.mageobject.ToughnessPredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class RepelCalamity extends CardImpl { + + private static final FilterPermanent filter + = new FilterCreaturePermanent("creature with power or toughness 4 or greater"); + + static { + filter.add(Predicates.or( + new PowerPredicate(ComparisonType.MORE_THAN, 3), + new ToughnessPredicate(ComparisonType.MORE_THAN, 3) + )); + } + + public RepelCalamity(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}"); + + // Destroy target creature with power or toughness 4 or greater. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + } + + private RepelCalamity(final RepelCalamity card) { + super(card); + } + + @Override + public RepelCalamity copy() { + return new RepelCalamity(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Bloomburrow.java b/Mage.Sets/src/mage/sets/Bloomburrow.java index c34c7552c77..accf417b1ff 100644 --- a/Mage.Sets/src/mage/sets/Bloomburrow.java +++ b/Mage.Sets/src/mage/sets/Bloomburrow.java @@ -38,6 +38,7 @@ public final class Bloomburrow extends ExpansionSet { cards.add(new SetCardInfo("Oakhollow Village", 258, Rarity.UNCOMMON, mage.cards.o.OakhollowVillage.class)); cards.add(new SetCardInfo("Pearl of Wisdom", 64, Rarity.COMMON, mage.cards.p.PearlOfWisdom.class)); cards.add(new SetCardInfo("Plains", 262, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS)); + cards.add(new SetCardInfo("Repel Calamity", 27, Rarity.UNCOMMON, mage.cards.r.RepelCalamity.class)); cards.add(new SetCardInfo("Rockface Village", 259, Rarity.UNCOMMON, mage.cards.r.RockfaceVillage.class)); cards.add(new SetCardInfo("Run Away Together", 67, Rarity.COMMON, mage.cards.r.RunAwayTogether.class)); cards.add(new SetCardInfo("Salvation Swan", 28, Rarity.RARE, mage.cards.s.SalvationSwan.class));