From 6a94896c71a7f36451744b4658e23f5bfd82353e Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sat, 8 Apr 2023 18:58:59 -0400 Subject: [PATCH] [MOM] Implement Seer of Stolen Sight --- .../src/mage/cards/s/SeerOfStolenSight.java | 88 +++++++++++++++++++ .../src/mage/sets/MarchOfTheMachine.java | 1 + 2 files changed, 89 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SeerOfStolenSight.java diff --git a/Mage.Sets/src/mage/cards/s/SeerOfStolenSight.java b/Mage.Sets/src/mage/cards/s/SeerOfStolenSight.java new file mode 100644 index 0000000000..435b71fe13 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SeerOfStolenSight.java @@ -0,0 +1,88 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.MageItem; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.keyword.SurveilEffect; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Controllable; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.ZoneChangeGroupEvent; + +import java.util.Objects; +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SeerOfStolenSight extends CardImpl { + + public SeerOfStolenSight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.PHYREXIAN); + this.subtype.add(SubType.WARLOCK); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Menace + this.addAbility(new MenaceAbility()); + + // Whenever one or more artifacts and/or creatures you control are put into a graveyard from the battlefield, surveil 1. + this.addAbility(new SeerOfStolenSightTriggeredAbility()); + } + + private SeerOfStolenSight(final SeerOfStolenSight card) { + super(card); + } + + @Override + public SeerOfStolenSight copy() { + return new SeerOfStolenSight(this); + } +} + +class SeerOfStolenSightTriggeredAbility extends TriggeredAbilityImpl { + + SeerOfStolenSightTriggeredAbility() { + super(Zone.BATTLEFIELD, new SurveilEffect(1)); + setTriggerPhrase("Whenever one or more artifacts and/or creatures you control are put into a graveyard from the battlefield, "); + } + + private SeerOfStolenSightTriggeredAbility(final SeerOfStolenSightTriggeredAbility ability) { + super(ability); + } + + @Override + public SeerOfStolenSightTriggeredAbility copy() { + return new SeerOfStolenSightTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.ZONE_CHANGE_GROUP; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + ZoneChangeGroupEvent zEvent = (ZoneChangeGroupEvent) event; + return zEvent.getToZone().match(Zone.GRAVEYARD) + && zEvent.getFromZone().match(Zone.BATTLEFIELD) + && zEvent + .getCards() + .stream() + .filter(Objects::nonNull) + .map(MageItem::getId) + .map(game::getPermanentOrLKIBattlefield) + .filter(Objects::nonNull) + .filter(permanent -> permanent.isArtifact(game) || permanent.isCreature(game)) + .map(Controllable::getControllerId) + .anyMatch(this::isControlledBy); + } +} diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java index 857a455dfa..9fdf01a34b 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java @@ -190,6 +190,7 @@ public final class MarchOfTheMachine extends ExpansionSet { cards.add(new SetCardInfo("Searing Barb", 163, Rarity.COMMON, mage.cards.s.SearingBarb.class)); cards.add(new SetCardInfo("Seed of Hope", 204, Rarity.COMMON, mage.cards.s.SeedOfHope.class)); cards.add(new SetCardInfo("Seedpod Caretaker", 325, Rarity.UNCOMMON, mage.cards.s.SeedpodCaretaker.class)); + cards.add(new SetCardInfo("Seer of Stolen Sight", 330, Rarity.UNCOMMON, mage.cards.s.SeerOfStolenSight.class)); cards.add(new SetCardInfo("Seraph of New Capenna", 36, Rarity.UNCOMMON, mage.cards.s.SeraphOfNewCapenna.class)); cards.add(new SetCardInfo("Seraph of New Phyrexia", 36, Rarity.UNCOMMON, mage.cards.s.SeraphOfNewPhyrexia.class)); cards.add(new SetCardInfo("Serpent-Blade Assailant", 205, Rarity.COMMON, mage.cards.s.SerpentBladeAssailant.class));