[ZNR] Implemented Orah, Skyclave Hierophant

This commit is contained in:
Evan Kranzler 2020-09-01 22:08:41 -04:00
parent 83d8251acd
commit 28407e1053
2 changed files with 96 additions and 0 deletions

View file

@ -0,0 +1,95 @@
package mage.cards.o;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.abilities.keyword.LifelinkAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class OrahSkyclaveHierophant extends CardImpl {
public OrahSkyclaveHierophant(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{B}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.KOR);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Lifelink
this.addAbility(LifelinkAbility.getInstance());
// Whenever Orah, Skyclave Hierophant or another Cleric you control dies, return target Cleric card with lesser converted mana cost from your graveyard to the battlefield.
this.addAbility(new OrahSkyclaveHierophantTriggeredAbility());
}
private OrahSkyclaveHierophant(final OrahSkyclaveHierophant card) {
super(card);
}
@Override
public OrahSkyclaveHierophant copy() {
return new OrahSkyclaveHierophant(this);
}
}
class OrahSkyclaveHierophantTriggeredAbility extends TriggeredAbilityImpl {
OrahSkyclaveHierophantTriggeredAbility() {
super(Zone.BATTLEFIELD, new ReturnFromGraveyardToBattlefieldTargetEffect());
}
private OrahSkyclaveHierophantTriggeredAbility(final OrahSkyclaveHierophantTriggeredAbility ability) {
super(ability);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.ZONE_CHANGE;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
if (!zEvent.isDiesEvent()
|| (!zEvent.getTarget().hasSubtype(SubType.CLERIC, game)
&& !zEvent.getTarget().getId().equals(getSourceId()))) {
return false;
}
FilterCard filterCard = new FilterCard(
"Cleric card with converted mana cost less than " + (zEvent.getTarget().getConvertedManaCost())
);
filterCard.add(SubType.CLERIC.getPredicate());
filterCard.add(new ConvertedManaCostPredicate(
ComparisonType.FEWER_THAN, zEvent.getTarget().getConvertedManaCost()
));
this.getTargets().clear();
this.addTarget(new TargetCardInYourGraveyard(filterCard));
return true;
}
@Override
public OrahSkyclaveHierophantTriggeredAbility copy() {
return new OrahSkyclaveHierophantTriggeredAbility(this);
}
@Override
public String getRule() {
return "Whenever {this} or another Cleric you control dies, return target Cleric card " +
"with lesser converted mana cost from your graveyard to the battlefield.";
}
}

View file

@ -42,6 +42,7 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Murasa Rootgrazer", 229, Rarity.UNCOMMON, mage.cards.m.MurasaRootgrazer.class));
cards.add(new SetCardInfo("Nahiri, Heir of the Ancients", 230, Rarity.MYTHIC, mage.cards.n.NahiriHeirOfTheAncients.class));
cards.add(new SetCardInfo("Omnath, Locus of Creation", 232, Rarity.MYTHIC, mage.cards.o.OmnathLocusOfCreation.class));
cards.add(new SetCardInfo("Orah, Skyclave Hierophant", 233, Rarity.RARE, mage.cards.o.OrahSkyclaveHierophant.class));
cards.add(new SetCardInfo("Plains", 266, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Ruin Crab", 75, Rarity.UNCOMMON, mage.cards.r.RuinCrab.class));
cards.add(new SetCardInfo("Shell Shield", 79, Rarity.COMMON, mage.cards.s.ShellShield.class));