From a1059d2232cbb822409273b470f48b8e5c8e172e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 5 Sep 2019 18:41:24 -0400 Subject: [PATCH] Implemented Corridor Monitor --- .../src/mage/cards/c/CorridorMonitor.java | 55 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 56 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CorridorMonitor.java diff --git a/Mage.Sets/src/mage/cards/c/CorridorMonitor.java b/Mage.Sets/src/mage/cards/c/CorridorMonitor.java new file mode 100644 index 0000000000..9a277adc54 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CorridorMonitor.java @@ -0,0 +1,55 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.UntapTargetEffect; +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.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class CorridorMonitor extends CardImpl { + + private static final FilterPermanent filter + = new FilterControlledPermanent("artifact or creature you control"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.CREATURE) + )); + } + + public CorridorMonitor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.CONSTRUCT); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // When Corridor Monitor enters the battlefield, untap target artifact or creature you control. + Ability ability = new EntersBattlefieldTriggeredAbility(new UntapTargetEffect()); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + private CorridorMonitor(final CorridorMonitor card) { + super(card); + } + + @Override + public CorridorMonitor copy() { + return new CorridorMonitor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index a90fa21fd1..c8c5fcd73d 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -34,6 +34,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Chittering Witch", 319, Rarity.RARE, mage.cards.c.ChitteringWitch.class)); cards.add(new SetCardInfo("Chulane, Teller of Tales", 326, Rarity.MYTHIC, mage.cards.c.ChulaneTellerOfTales.class)); cards.add(new SetCardInfo("Command Tower", 333, Rarity.COMMON, mage.cards.c.CommandTower.class)); + cards.add(new SetCardInfo("Corridor Monitor", 41, Rarity.COMMON, mage.cards.c.CorridorMonitor.class)); cards.add(new SetCardInfo("Crystal Slipper", 119, Rarity.COMMON, mage.cards.c.CrystalSlipper.class)); cards.add(new SetCardInfo("Embereth Paladin", 121, Rarity.COMMON, mage.cards.e.EmberethPaladin.class)); cards.add(new SetCardInfo("Embereth Skyblazer", 321, Rarity.RARE, mage.cards.e.EmberethSkyblazer.class));