* Blood Speaker - fixed that it able to search library after sacrificed/countered by another spell
-
-
package mage.cards.b;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
+import mage.abilities.costs.common.SacrificeSourceCost;
+import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
-import mage.abilities.effects.common.SacrificeSourceEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -21,14 +19,16 @@ import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCardInLibrary;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class BloodSpeaker extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Demon under your control");
private static final FilterCard filterCard = new FilterCard("Demon card");
+
static {
filter.add(new SubtypePredicate(SubType.DEMON));
filterCard.add(new SubtypePredicate(SubType.DEMON));
@@ -42,8 +42,13 @@ public final class BloodSpeaker extends CardImpl {
this.toughness = new MageInt(2);
// At the beginning of your upkeep, you may sacrifice Blood Speaker. If you do, search your library for a Demon card, reveal that card, and put it into your hand. Then shuffle your library.
- Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU, true);
- ability.addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filterCard), true, true, "If you do, search your library for "));
+ Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD,
+ new DoIfCostPaid(
+ new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filterCard), true, true, "search your library for "),
+ new SacrificeSourceCost()
+ ),
+ TargetController.YOU,
+ false);
this.addAbility(ability);
// Whenever a Demon enters the battlefield under your control, return Blood Speaker from your graveyard to your hand.
