Skip to content

Commit

Permalink
* Leeching Sliver - Fixed that the triggered ability did not work if …
Browse files Browse the repository at this point in the history
…a planswalker was attacked (fixes magefree#1858).
  • Loading branch information
LevelX2 committed Apr 14, 2016
1 parent b415d5e commit d00f1ad
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Mage.Sets/src/mage/sets/magic2015/LeechingSliver.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,26 @@

import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.AttacksCreatureYouControlTriggeredAbility;
import mage.abilities.common.AttacksAllTriggeredAbility;
import mage.abilities.effects.common.LoseLifeDefendingPlayerEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.constants.SetTargetPointer;
import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.ControllerPredicate;

/**
* @author noxx
*/
public class LeechingSliver extends CardImpl {

private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Sliver you control");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver you control");

static {
filter.add(new ControllerPredicate(TargetController.YOU));
filter.add(new SubtypePredicate("Sliver"));
}

Expand All @@ -57,7 +61,7 @@ public LeechingSliver(UUID ownerId) {
this.toughness = new MageInt(1);

// Whenever a Sliver you control attacks, defending player loses 1 life.
this.addAbility(new AttacksCreatureYouControlTriggeredAbility(new LoseLifeDefendingPlayerEffect(1, true), false, filter, true));
this.addAbility(new AttacksAllTriggeredAbility(new LoseLifeDefendingPlayerEffect(1, true), false, filter, SetTargetPointer.PERMANENT, true));
}

public LeechingSliver(final LeechingSliver card) {
Expand Down

0 comments on commit d00f1ad

Please sign in to comment.