[MOM] Implement Seer of Stolen Sight

This commit is contained in:
theelk801 2023-04-08 18:58:59 -04:00
parent 1baf6c8e11
commit 6a94896c71
2 changed files with 89 additions and 0 deletions

View file

@ -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);
}
}

View file

@ -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));