* Extractor Demon - Fixed triggered ability to trigger correctly for leaving battlefield instead of dying.

This commit is contained in:
LevelX2 2016-12-16 18:05:41 +01:00
parent 1d989a70db
commit 60ac2af0f6

View file

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