From 5cbc93b67e359efe5bb64dc38907cb529252a3f8 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 29 Jan 2022 17:29:05 -0500 Subject: [PATCH] [NEO] Implemented Imperial Subduer --- .../src/mage/cards/i/ImperialSubduer.java | 47 +++++++++++++++++++ .../src/mage/sets/KamigawaNeonDynasty.java | 1 + .../main/java/mage/filter/StaticFilters.java | 10 ++++ 3 files changed, 58 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/i/ImperialSubduer.java diff --git a/Mage.Sets/src/mage/cards/i/ImperialSubduer.java b/Mage.Sets/src/mage/cards/i/ImperialSubduer.java new file mode 100644 index 0000000000..4e3861885a --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/ImperialSubduer.java @@ -0,0 +1,47 @@ +package mage.cards.i; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksAloneControlledTriggeredAbility; +import mage.abilities.effects.common.TapTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ImperialSubduer extends CardImpl { + + public ImperialSubduer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Whenever a Samurai or Warrior you control attacks alone, tap target creature you don't control. + Ability ability = new AttacksAloneControlledTriggeredAbility( + new TapTargetEffect(), + StaticFilters.FILTER_CONTROLLED_SAMURAI_OR_WARRIOR, + false, false + ); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL)); + this.addAbility(ability); + } + + private ImperialSubduer(final ImperialSubduer card) { + super(card); + } + + @Override + public ImperialSubduer copy() { + return new ImperialSubduer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java index aea36388fa..5b0618a90f 100644 --- a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java +++ b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java @@ -39,6 +39,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet { cards.add(new SetCardInfo("Hand of Enlightenment", 11, Rarity.COMMON, mage.cards.h.HandOfEnlightenment.class)); cards.add(new SetCardInfo("Hidetsugu, Devouring Chaos", 99, Rarity.RARE, mage.cards.h.HidetsuguDevouringChaos.class)); cards.add(new SetCardInfo("Imperial Moth", 4, Rarity.COMMON, mage.cards.i.ImperialMoth.class)); + cards.add(new SetCardInfo("Imperial Subduer", 19, Rarity.COMMON, mage.cards.i.ImperialSubduer.class)); cards.add(new SetCardInfo("Island", 295, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Jukai Naturalist", 225, Rarity.UNCOMMON, mage.cards.j.JukaiNaturalist.class)); cards.add(new SetCardInfo("Junji, the Midnight Sky", 102, Rarity.MYTHIC, mage.cards.j.JunjiTheMidnightSky.class)); diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 721b2284c6..c0f304e4b5 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -603,6 +603,16 @@ public final class StaticFilters { FILTER_PERMANENT_CREATURE_SLIVERS.setLockedFilter(true); } + public static final FilterControlledPermanent FILTER_CONTROLLED_SAMURAI_OR_WARRIOR = new FilterControlledPermanent("a Samurai or Warrior you control"); + + static { + FILTER_CONTROLLED_SAMURAI_OR_WARRIOR.add(Predicates.or( + SubType.SAMURAI.getPredicate(), + SubType.WARRIOR.getPredicate() + )); + FILTER_CONTROLLED_SAMURAI_OR_WARRIOR.setLockedFilter(true); + } + public static final FilterPlaneswalkerPermanent FILTER_PERMANENT_PLANESWALKER = new FilterPlaneswalkerPermanent(); static {