From 3bf7eaa1c3243a82c5ff365df6b94e2eda055e97 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 3 Apr 2021 07:57:22 -0400 Subject: [PATCH] [STX] Implemented Tangletrap --- Mage.Sets/src/mage/cards/t/Tangletrap.java | 51 +++++++++++++++++++ .../mage/sets/StrixhavenSchoolOfMages.java | 1 + 2 files changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/Tangletrap.java diff --git a/Mage.Sets/src/mage/cards/t/Tangletrap.java b/Mage.Sets/src/mage/cards/t/Tangletrap.java new file mode 100644 index 0000000000..b053c3a75c --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/Tangletrap.java @@ -0,0 +1,51 @@ +package mage.cards.t; + +import mage.abilities.Mode; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetArtifactPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class Tangletrap extends CardImpl { + + private static final FilterPermanent filter = new FilterCreaturePermanent("creature with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public Tangletrap(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}"); + + // Choose one — + // • Tangletrap deals 5 damage to target creature with flying. + this.getSpellAbility().addEffect(new DamageTargetEffect(5)); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + + // • Destroy target artifact. + Mode mode = new Mode(new DestroyTargetEffect()); + mode.addTarget(new TargetArtifactPermanent()); + this.getSpellAbility().addMode(mode); + } + + private Tangletrap(final Tangletrap card) { + super(card); + } + + @Override + public Tangletrap copy() { + return new Tangletrap(this); + } +} diff --git a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java index d0e9b07d6e..33dc93754f 100644 --- a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java +++ b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java @@ -174,6 +174,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet { cards.add(new SetCardInfo("Swamp", 370, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Symmetry Sage", 56, Rarity.UNCOMMON, mage.cards.s.SymmetrySage.class)); cards.add(new SetCardInfo("Tanazir Quandrix", 240, Rarity.MYTHIC, mage.cards.t.TanazirQuandrix.class)); + cards.add(new SetCardInfo("Tangletrap", 145, Rarity.COMMON, mage.cards.t.Tangletrap.class)); cards.add(new SetCardInfo("Teach by Example", 241, Rarity.COMMON, mage.cards.t.TeachByExample.class)); cards.add(new SetCardInfo("Team Pennant", 260, Rarity.UNCOMMON, mage.cards.t.TeamPennant.class)); cards.add(new SetCardInfo("Tenured Inkcaster", 88, Rarity.UNCOMMON, mage.cards.t.TenuredInkcaster.class));