From 60ac2af0f6bbb1e781ec5966267151bccc068d06 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 16 Dec 2016 18:05:41 +0100 Subject: [PATCH] * Extractor Demon - Fixed triggered ability to trigger correctly for leaving battlefield instead of dying. --- .../src/mage/cards/e/ExtractorDemon.java | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Mage.Sets/src/mage/cards/e/ExtractorDemon.java b/Mage.Sets/src/mage/cards/e/ExtractorDemon.java index e723f7f2490..c86208519dc 100644 --- a/Mage.Sets/src/mage/cards/e/ExtractorDemon.java +++ b/Mage.Sets/src/mage/cards/e/ExtractorDemon.java @@ -28,27 +28,35 @@ package mage.cards.e; import java.util.UUID; -import mage.constants.CardType; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.DiesCreatureTriggeredAbility; -import mage.abilities.keyword.FlyingAbility; +import mage.abilities.common.LeavesBattlefieldAllTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; +import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.TargetPlayer; /** * * @author jeffwadsworth - + * */ public class ExtractorDemon extends CardImpl { + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature"); + + static { + filter.add(new AnotherPredicate()); + } + public ExtractorDemon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); this.subtype.add("Demon"); this.power = new MageInt(5); @@ -56,12 +64,12 @@ public class ExtractorDemon extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - + // Whenever another creature leaves the battlefield, you may have target player put the top two cards of his or her library into his or her graveyard. - Ability ability = new DiesCreatureTriggeredAbility(new PutLibraryIntoGraveTargetEffect(2), true, true, false); + Ability ability = new LeavesBattlefieldAllTriggeredAbility(new PutLibraryIntoGraveTargetEffect(2), filter, true); ability.addTarget(new TargetPlayer()); this.addAbility(ability); - + // Unearth {2}{B} this.addAbility(new UnearthAbility(new ManaCostsImpl("{2}{B}"))); }