Implemented Hieromancer's Cage

This commit is contained in:
Evan Kranzler 2018-06-21 15:14:43 -04:00
parent 950dc59b19
commit c80c736546
2 changed files with 52 additions and 0 deletions

View file

@ -0,0 +1,51 @@
package mage.cards.h;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.delayed.OnLeaveReturnExiledToBattlefieldAbility;
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
import mage.abilities.effects.common.ExileUntilSourceLeavesEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TargetController;
import mage.filter.common.FilterNonlandPermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.TargetPermanent;
/**
*
* @author TheElk801
*/
public final class HieromancersCage extends CardImpl {
private final static FilterNonlandPermanent filter = new FilterNonlandPermanent();
static {
filter.add(new ControllerPredicate(TargetController.OPPONENT));
}
public HieromancersCage(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}");
// When Hieromancer's Cage enters the battlefield, exile target nonland permanent an opponent controls until Hieromancer's Cage leaves the battlefield.
Ability ability = new EntersBattlefieldTriggeredAbility(
new ExileUntilSourceLeavesEffect(filter.getMessage())
);
ability.addTarget(new TargetPermanent(filter));
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(
new OnLeaveReturnExiledToBattlefieldAbility())
);
this.addAbility(ability);
}
public HieromancersCage(final HieromancersCage card) {
super(card);
}
@Override
public HieromancersCage copy() {
return new HieromancersCage(this);
}
}

View file

@ -117,6 +117,7 @@ public final class CoreSet2019 extends ExpansionSet {
cards.add(new SetCardInfo("Havoc Devils", 146, Rarity.COMMON, mage.cards.h.HavocDevils.class));
cards.add(new SetCardInfo("Herald of Faith", 13, Rarity.UNCOMMON, mage.cards.h.HeraldOfFaith.class));
cards.add(new SetCardInfo("Heroic Reinforcements", 217, Rarity.UNCOMMON, mage.cards.h.HeroicReinforcements.class));
cards.add(new SetCardInfo("Hieromancer's Cage", 14, Rarity.UNCOMMON, mage.cards.h.HieromancersCage.class));
cards.add(new SetCardInfo("Highland Game", 188, Rarity.COMMON, mage.cards.h.HighlandGame.class));
cards.add(new SetCardInfo("Horizon Scholar", 59, Rarity.UNCOMMON, mage.cards.h.HorizonScholar.class));
cards.add(new SetCardInfo("Hostile Minotaur", 147, Rarity.COMMON, mage.cards.h.HostileMinotaur.class));