From 4fbfb68c096099f6b86aa1fbb6d02295a1d294e4 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Tue, 4 Apr 2023 22:10:01 -0400 Subject: [PATCH] [MOM] Implement Attentive Skywarden --- .../src/mage/cards/a/AttentiveSkywarden.java | 57 +++++++++++++++++++ .../src/mage/sets/MarchOfTheMachine.java | 1 + 2 files changed, 58 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/AttentiveSkywarden.java diff --git a/Mage.Sets/src/mage/cards/a/AttentiveSkywarden.java b/Mage.Sets/src/mage/cards/a/AttentiveSkywarden.java new file mode 100644 index 0000000000..3f72a0d403 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AttentiveSkywarden.java @@ -0,0 +1,57 @@ +package mage.cards.a; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.common.TransformTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class AttentiveSkywarden extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledPermanent(SubType.INCUBATOR, "Incubator token you control"); + + static { + filter.add(TokenPredicate.TRUE); + } + + public AttentiveSkywarden(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.PHYREXIAN); + this.subtype.add(SubType.KOR); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever Attentive Skywarden deals combat damage to a player or battle, transform up to one target Incubator token you control. + Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility( + new TransformTargetEffect(), false + ).setOrBattle(true); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + private AttentiveSkywarden(final AttentiveSkywarden card) { + super(card); + } + + @Override + public AttentiveSkywarden copy() { + return new AttentiveSkywarden(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java index 8619dae7fb..0e2162af1b 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java @@ -30,6 +30,7 @@ public final class MarchOfTheMachine extends ExpansionSet { cards.add(new SetCardInfo("Archpriest of Shadows", 89, Rarity.RARE, mage.cards.a.ArchpriestOfShadows.class)); cards.add(new SetCardInfo("Artistic Refusal", 46, Rarity.UNCOMMON, mage.cards.a.ArtisticRefusal.class)); cards.add(new SetCardInfo("Astral Wingspan", 48, Rarity.UNCOMMON, mage.cards.a.AstralWingspan.class)); + cards.add(new SetCardInfo("Attentive Skywarden", 7, Rarity.COMMON, mage.cards.a.AttentiveSkywarden.class)); cards.add(new SetCardInfo("Beamtown Beatstick", 131, Rarity.COMMON, mage.cards.b.BeamtownBeatstick.class)); cards.add(new SetCardInfo("Bloodfell Caves", 267, Rarity.COMMON, mage.cards.b.BloodfellCaves.class)); cards.add(new SetCardInfo("Blossoming Sands", 268, Rarity.COMMON, mage.cards.b.BlossomingSands.class));