From e165165a8ecc3f299c7b8c3b830e04f2b07f8eef Mon Sep 17 00:00:00 2001 From: PurpleCrowbar <26198472+PurpleCrowbar@users.noreply.github.com> Date: Fri, 4 Nov 2022 13:57:44 +0000 Subject: [PATCH] [BRO] Implement Teething Wurmlet (#9728) --- .../src/mage/cards/t/TeethingWurmlet.java | 65 +++++++++++++++++++ Mage.Sets/src/mage/sets/TheBrothersWar.java | 1 + 2 files changed, 66 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/TeethingWurmlet.java diff --git a/Mage.Sets/src/mage/cards/t/TeethingWurmlet.java b/Mage.Sets/src/mage/cards/t/TeethingWurmlet.java new file mode 100644 index 00000000000..b1ea37234aa --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TeethingWurmlet.java @@ -0,0 +1,65 @@ +package mage.cards.t; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.IfAbilityHasResolvedXTimesEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.watchers.common.AbilityResolvedWatcher; + +import java.util.UUID; + +/** + * @author PurpleCrowbar + */ +public final class TeethingWurmlet extends CardImpl { + + private static final PermanentsOnTheBattlefieldCondition condition + = new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_PERMANENT_ARTIFACTS, ComparisonType.MORE_THAN, 2, true); + + public TeethingWurmlet(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); + this.subtype.add(SubType.WURM); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Teething Wurmlet has deathtouch as long as you control three or more artifacts. + this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect( + new GainAbilitySourceEffect(DeathtouchAbility.getInstance()), condition, + "{this} has deathtouch as long as you control three or more artifacts" + ))); + + // Whenever an artifact enters the battlefield under your control, you gain 1 life. If this is the + // first time this ability has resolved this turn, put a +1/+1 counter on Teething Wurmlet. + Ability ability = new EntersBattlefieldControlledTriggeredAbility( + new GainLifeEffect(1), StaticFilters.FILTER_PERMANENT_ARTIFACT_AN + ); + ability.addEffect(new IfAbilityHasResolvedXTimesEffect( + Outcome.BoostCreature, 1, new AddCountersSourceEffect(CounterType.P1P1.createInstance()) + ).setText("If this is the first time this ability has resolved this turn, put a +1/+1 counter on {this}")); + this.addAbility(ability, new AbilityResolvedWatcher()); + } + + private TeethingWurmlet(final TeethingWurmlet card) { + super(card); + } + + @Override + public TeethingWurmlet copy() { + return new TeethingWurmlet(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TheBrothersWar.java b/Mage.Sets/src/mage/sets/TheBrothersWar.java index 45aa947afe0..2e0ca89161e 100644 --- a/Mage.Sets/src/mage/sets/TheBrothersWar.java +++ b/Mage.Sets/src/mage/sets/TheBrothersWar.java @@ -158,6 +158,7 @@ public final class TheBrothersWar extends ExpansionSet { cards.add(new SetCardInfo("Swamp", 272, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Symmetry Matrix", 252, Rarity.UNCOMMON, mage.cards.s.SymmetryMatrix.class)); cards.add(new SetCardInfo("Tawnos, the Toymaker", 222, Rarity.RARE, mage.cards.t.TawnosTheToymaker.class)); + cards.add(new SetCardInfo("Teething Wurmlet", 192, Rarity.RARE, mage.cards.t.TeethingWurmlet.class)); cards.add(new SetCardInfo("Teferi, Temporal Pilgrim", 66, Rarity.MYTHIC, mage.cards.t.TeferiTemporalPilgrim.class)); cards.add(new SetCardInfo("Terisian Mindbreaker", 83, Rarity.RARE, mage.cards.t.TerisianMindbreaker.class)); cards.add(new SetCardInfo("Terror Ballista", 290, Rarity.RARE, mage.cards.t.TerrorBallista.class));