mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
refactor: clean up static filters for sacrifice targets (#12120)
* simplify sacrifice target filters, part 1 * minor cleanup * adjust SacrificeXTargetCost * adjust Arctic Merfolk * more cleanup * remove unused * adjust filters not used for sacrifice * fix Hew the Entwood * fix Nahiri's Lithoforming * remove unused * remove another * cleanup more * fix MegatronDestructiveForce * remove next * next batch of replacements * remove next * rename filter to match text * finish removing * use existing static filter
This commit is contained in:
parent
5c9d1cd205
commit
8853e7d875
372 changed files with 489 additions and 712 deletions
|
|
@ -41,7 +41,7 @@ public final class AbueloAncestralEcho extends CardImpl {
|
|||
new ExileReturnBattlefieldNextEndStepTargetEffect().withTextThatCard(false),
|
||||
new ManaCostsImpl<>("{1}{W}{U}")
|
||||
);
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_ARTIFACT_OR_CREATURE));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE_OR_ARTIFACT));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public final class AcolyteOfAclazotz extends CardImpl {
|
|||
|
||||
// {T}, Sacrifice another creature or artifact: Each opponent loses 1 life and you gain 1 life.
|
||||
Ability ability = new SimpleActivatedAbility(new LoseLifeOpponentsEffect(1), new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE_OR_ARTIFACT_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE_OR_ARTIFACT));
|
||||
ability.addEffect(new GainLifeEffect(1).concatBy("and"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public final class AgentOfTheFates extends CardImpl {
|
|||
// Deathtouch
|
||||
this.addAbility(DeathtouchAbility.getInstance());
|
||||
// Heroic - Whenever you cast a spell that targets Agent of the Fates, each opponent sacrifices a creature.
|
||||
this.addAbility(new HeroicAbility(new SacrificeOpponentsEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
|
||||
this.addAbility(new HeroicAbility(new SacrificeOpponentsEffect(StaticFilters.FILTER_PERMANENT_CREATURE)));
|
||||
}
|
||||
|
||||
private AgentOfTheFates(final AgentOfTheFates card) {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class AllegiantGeneralPryde extends CardImpl {
|
|||
// Trooper creatures you control have "When this creature enters the battlefield, you may sacrifice a creature. If you do, draw two cards and lose 2 life."
|
||||
Ability gainedAbility = new EntersBattlefieldTriggeredAbility(new DoIfCostPaid(
|
||||
new DrawCardSourceControllerEffect(2),
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE)
|
||||
).addEffect(new LoseLifeSourceControllerEffect(2).concatBy("and")))
|
||||
.setTriggerPhrase("When this creature enters the battlefield, ");
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(gainedAbility, Duration.WhileOnBattlefield, filter)));
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public final class AltarOfBone extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}{W}");
|
||||
|
||||
// As an additional cost to cast Altar of Bone, sacrifice a creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
// Search your library for a creature card, reveal that card, and put it into your hand. Then shuffle your library.
|
||||
this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public final class AltarOfDementia extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
|
||||
// Sacrifice a creature: Target player puts a number of cards equal to the sacrificed creature's power from the top of their library into their graveyard.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AltarOfDementiaEffect(), new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AltarOfDementiaEffect(), new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public final class AltarsReap extends CardImpl {
|
|||
|
||||
|
||||
// As an additional cost to cast Altar's Reap, sacrifice a creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
// Draw two cards.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public final class AnchorToReality extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}{U}");
|
||||
|
||||
// As an additional cost to cast this spell, sacrifice an artifact or creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE));
|
||||
|
||||
// Search your library for an Equipment or Vehicle card, put that card onto the battlefield, then shuffle. If it has mana value less than the sacrificed permanent's mana value, scry 2.
|
||||
this.getSpellAbility().addEffect(new AnchorToRealityEffect());
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public final class AnimalBoneyard extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
// Enchanted land has "{T}, Sacrifice a creature: You gain life equal to that creature's toughness."
|
||||
Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AnimalBoneyardEffect(), new TapSourceCost());
|
||||
gainedAbility.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
gainedAbility.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield,
|
||||
"Enchanted land has \"{T}, Sacrifice a creature: You gain life equal to the sacrificed creature's toughness.\"");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -14,23 +12,16 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class AphettoAlchemist extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or creature");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
CardType.ARTIFACT.getPredicate(),
|
||||
CardType.CREATURE.getPredicate()));
|
||||
}
|
||||
|
||||
public AphettoAlchemist(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
|
||||
|
|
@ -41,7 +32,7 @@ public final class AphettoAlchemist extends CardImpl {
|
|||
|
||||
// {tap}: Untap target artifact or creature.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Morph {U}
|
||||
|
|
@ -56,4 +47,4 @@ public final class AphettoAlchemist extends CardImpl {
|
|||
public AphettoAlchemist copy() {
|
||||
return new AphettoAlchemist(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@ public final class ArcticMerfolk extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Kicker—Return a creature you control to its owner's hand. (You may return a creature you control to its owner's hand in addition to any other costs as you cast this spell.)
|
||||
this.addAbility(new KickerAbility(new ReturnToHandChosenControlledPermanentCost(new TargetControlledCreaturePermanent(1,1,StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT,true))));
|
||||
this.addAbility(new KickerAbility(new ReturnToHandChosenControlledPermanentCost(
|
||||
new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_CREATURE, true)
|
||||
)));
|
||||
|
||||
// If Arctic Merfolk was kicked, it enters the battlefield with a +1/+1 counter on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public final class ArmyAnts extends CardImpl {
|
|||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new DestroyTargetEffect(),
|
||||
new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_LAND));
|
||||
ability.addTarget(new TargetLandPermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public final class Artillerize extends CardImpl {
|
|||
public Artillerize(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}");
|
||||
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE));
|
||||
this.getSpellAbility().addTarget(new TargetAnyTarget());
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(5));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public final class AshnodsAltar extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
||||
// Sacrifice a creature: Add {C}{C}.
|
||||
SacrificeTargetCost cost = new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT);
|
||||
SacrificeTargetCost cost = new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE);
|
||||
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD,
|
||||
new BasicManaEffect(Mana.ColorlessMana(2), CreaturesYouControlCount.instance),
|
||||
cost));
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public final class Attrition extends CardImpl {
|
|||
|
||||
//{B}, Sacrifice a creature: Destroy target nonblack creature.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(new DestroyTargetEffect(), new ColoredManaCost(ColoredManaSymbol.B));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK).withChooseHint("to destroy"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public final class AyaraWidowOfTheRealm extends CardImpl {
|
|||
// {T}, Sacrifice another creature or artifact: Ayara, Widow of the Realm deals X damage to target opponent or battle and you gain X life, where X is the sacrificed permanent's mana value.
|
||||
Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(xValue)
|
||||
.setText("{this} deals X damage to target opponent or battle"), new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE_OR_ARTIFACT_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE_OR_ARTIFACT));
|
||||
ability.addEffect(new GainLifeEffect(xValue).setText("and you gain X life, where X is the sacrificed permanent's mana value"));
|
||||
ability.addTarget(new TargetPermanentOrPlayer(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public final class BaronBertramGraywater extends CardImpl {
|
|||
|
||||
// {1}{B}, Sacrifice another creature or artifact: Draw a card.
|
||||
Ability ability = new SimpleActivatedAbility(new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{1}{B}"));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE_OR_ARTIFACT_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE_OR_ARTIFACT));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public final class BarrageOfExpendables extends CardImpl {
|
|||
|
||||
// {R}, Sacrifice a creature: Barrage of Expendables deals 1 damage to any target.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl<>("{R}"));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public final class BarrinMasterWizard extends CardImpl {
|
|||
|
||||
//{2}, Sacrifice a permanent: Return target creature to its owner's hand.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl<>("{2}"));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_PERMANENT_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public final class BartolomeDelPresidio extends CardImpl {
|
|||
// Sacrifice another creature or artifact: Put a +1/+1 counter on Bartolome del Presidio.
|
||||
this.addAbility(new SimpleActivatedAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE_OR_ARTIFACT_SHORT_TEXT)
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE_OR_ARTIFACT)
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public final class BayouGroff extends CardImpl {
|
|||
|
||||
// As an additional cost to cast this spell, sacrifice a creature or pay {3}.
|
||||
this.getSpellAbility().addCost(new OrCost(
|
||||
"sacrifice a creature or pay {3}", new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT), new GenericManaCost(3)
|
||||
"sacrifice a creature or pay {3}", new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE), new GenericManaCost(3)
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public final class BenalishSleeper extends CardImpl {
|
|||
|
||||
// When Benalish Sleeper enters the battlefield, if it was kicked, each player sacrifices a creature.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new SacrificeAllEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)
|
||||
new SacrificeAllEffect(StaticFilters.FILTER_PERMANENT_CREATURE)
|
||||
), KickedCondition.ONCE, "When {this} enters the battlefield, " +
|
||||
"if it was kicked, each player sacrifices a creature."));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public final class BirthingPod extends CardImpl {
|
|||
Zone.BATTLEFIELD, new BirthingPodEffect(), new ManaCostsImpl<>("{1}{G/P}")
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public final class BlackCarriage extends CardImpl {
|
|||
|
||||
// Sacrifice a creature: Untap Black Carriage. Activate this ability only during your upkeep.
|
||||
this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new UntapSourceEffect(), new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT),
|
||||
new UntapSourceEffect(), new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE),
|
||||
new IsStepCondition(PhaseStep.UPKEEP), "Sacrifice a creature: Untap {this}. Activate only during your upkeep."));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public final class BlastingStation extends CardImpl {
|
|||
|
||||
// {tap}, Sacrifice a creature: Blasting Station deals 1 damage to any target.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public final class BlightedShaman extends CardImpl {
|
|||
|
||||
// {tap}, Sacrifice a creature: Target creature gets +2/+2 until end of turn.
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 2, Duration.EndOfTurn), new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public final class BloodDivination extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}");
|
||||
|
||||
// As an additional cost to cast this spell, sacrifice a creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
|
||||
// Draw three cards.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(3));
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public final class BloodForBones extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}");
|
||||
|
||||
// As an additional cost to cast this spell, sacrifice a creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
|
||||
// Return a creature card from your graveyard to the battlefield, then return another creature card from your graveyard to your hand.
|
||||
this.getSpellAbility().addEffect(new BloodForBonesEffect());
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public final class BloodFunnel extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionControllerEffect(filter, 2)));
|
||||
|
||||
// Whenever you cast a noncreature spell, counter that spell unless you sacrifice a creature.
|
||||
Effect effect = new CounterUnlessPaysEffect(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
Effect effect = new CounterUnlessPaysEffect(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
effect.setText("counter that spell unless you sacrifice a creature");
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
effect,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public final class BloodRites extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}{R}");
|
||||
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl<>("{1}{R}"));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public final class BloodboilSorcerer extends CardImpl {
|
|||
|
||||
// Crown of Madness — {1}{R}, Sacrifice an artifact or creature: Goad target creature.
|
||||
Ability ability = new SimpleActivatedAbility(new GoadTargetEffect(), new ManaCostsImpl<>("{1}{R}"));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability.withFlavorWord("Crown of Madness"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public final class BloodflowConnoisseur extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Sacrifice a creature: Put a +1/+1 counter on Bloodflow Connoisseur.
|
||||
Cost abilityCost = new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT);
|
||||
Cost abilityCost = new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE);
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public final class BloodshotCyclops extends CardImpl {
|
|||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new DamageTargetEffect(SacrificeCostCreaturesPower.instance).setText("{this} deals damage equal to the sacrificed creature's power to any target"),
|
||||
new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public final class BloodsoakedAltar extends CardImpl {
|
|||
);
|
||||
ability.addCost(new PayLifeCost(2));
|
||||
ability.addCost(new DiscardCardCost());
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public final class BloodthroneVampire extends CardImpl {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn),
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE)));
|
||||
}
|
||||
|
||||
private BloodthroneVampire(final BloodthroneVampire card) {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public final class BogElemental extends CardImpl {
|
|||
|
||||
// At the beginning of your upkeep, sacrifice Bog Elemental unless you sacrifice a land.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD,
|
||||
new SacrificeSourceUnlessPaysEffect(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT)),
|
||||
new SacrificeSourceUnlessPaysEffect(new SacrificeTargetCost(StaticFilters.FILTER_LAND)),
|
||||
TargetController.YOU,
|
||||
false));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public final class BoneSplinters extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}");
|
||||
|
||||
// As an additional cost to cast Bone Splinters, sacrifice a creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
// Destroy target creature.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent().withChooseHint("to destroy"));
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.permanent.token.Ox22Token;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
|
@ -17,20 +16,11 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class BovineIntervention extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or creature");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
CardType.ARTIFACT.getPredicate(),
|
||||
CardType.CREATURE.getPredicate())
|
||||
);
|
||||
}
|
||||
|
||||
public BovineIntervention(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
|
||||
|
||||
// Destroy target artifact or creature. Its controller creates a 2/2 white Ox creature token.
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE));
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addEffect(new CreateTokenControllerTargetPermanentEffect(new Ox22Token()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public final class BraidssFrightfulReturn extends CardImpl {
|
|||
this, SagaChapter.CHAPTER_I,
|
||||
new DoIfCostPaid(
|
||||
new DiscardEachPlayerEffect(TargetController.OPPONENT),
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE)
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class BrainGorgersCounterSourceEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
MageObject sourceObject = source.getSourceObject(game);
|
||||
if (sourceObject != null) {
|
||||
SacrificeTargetCost cost = new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT);
|
||||
SacrificeTargetCost cost = new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE);
|
||||
for (UUID playerId : game.getState().getPlayerList(source.getControllerId())) {
|
||||
cost.clearPaid();
|
||||
Player player = game.getPlayer(playerId);
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ enum BraveTheWildsTargetAdjuster implements TargetAdjuster {
|
|||
public void adjustTargets(Ability ability, Game game) {
|
||||
ability.getTargets().clear();
|
||||
if (BargainedCondition.instance.apply(game, ability)) {
|
||||
ability.addTarget(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT));
|
||||
ability.addTarget(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,13 +34,13 @@ public final class BrineShaman extends CardImpl {
|
|||
|
||||
// {tap}, Sacrifice a creature: Target creature gets +2/+2 until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(new BoostTargetEffect(2, 2), new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
// {1}{U}{U}, Sacrifice a creature: Counter target creature spell.
|
||||
ability = new SimpleActivatedAbility(new CounterTargetEffect(), new ManaCostsImpl<>("{1}{U}{U}"));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
ability.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public final class BroadsideBombardiers extends CardImpl {
|
|||
Ability ability = new BoastAbility(new DamageTargetEffect(
|
||||
new IntPlusDynamicValue(2, SacrificeCostManaValue.PERMANENT))
|
||||
.setText("{this} deals damage equal to 2 plus the sacrificed permanent's mana value to any target."),
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE_OR_ARTIFACT_SHORT_TEXT)
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE_OR_ARTIFACT)
|
||||
);
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public final class BroodButcher extends CardImpl {
|
|||
|
||||
// {B}{G}, Sacrifice a creature: Target creature gets -2/-2 until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-2, -2, Duration.EndOfTurn), new ManaCostsImpl<>("{B}{G}"));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public final class BubblingCauldron extends CardImpl {
|
|||
// {1}, {T}, Sacrifice a creature: You gain 4 life.
|
||||
Ability ability1 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(4), new ManaCostsImpl<>("{1}"));
|
||||
ability1.addCost(new TapSourceCost());
|
||||
ability1.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability1.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
this.addAbility(ability1);
|
||||
// {1}, {T}, Sacrifice a creature named Festering Newt: Each opponent loses 4 life. You gain life equal to the life lost this way.
|
||||
Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeOpponentsYouGainLifeLostEffect(4), new ManaCostsImpl<>("{1}"));
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public final class BurntOffering extends CardImpl {
|
|||
super(ownerID, setInfo, new CardType[]{CardType.INSTANT}, "{B}");
|
||||
|
||||
//As an additional cost to cast Burnt Offering, sacrifice a creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
//Add an amount of {B} and/or {R} equal to the sacrificed creature's converted mana cost.
|
||||
SacrificeCostManaValue xValue = SacrificeCostManaValue.CREATURE;
|
||||
this.getSpellAbility().addEffect(new AddManaInAnyCombinationEffect(
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public final class ButcherOfMalakir extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever Butcher of Malakir or another creature you control dies, each opponent sacrifices a creature.
|
||||
this.addAbility(new DiesThisOrAnotherCreatureTriggeredAbility(new SacrificeOpponentsEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT), false, filter));
|
||||
this.addAbility(new DiesThisOrAnotherCreatureTriggeredAbility(new SacrificeOpponentsEffect(StaticFilters.FILTER_PERMANENT_CREATURE), false, filter));
|
||||
}
|
||||
|
||||
private ButcherOfMalakir(final ButcherOfMalakir card) {
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class ByInvitationOnlyEffect extends OneShotEffect {
|
|||
0, 13, "Choose a number between 0 and 13", game
|
||||
);
|
||||
return new SacrificeAllEffect(
|
||||
number, StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT
|
||||
number, StaticFilters.FILTER_PERMANENT_CREATURE
|
||||
).apply(game, source);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public final class CabalPatriarch extends CardImpl {
|
|||
|
||||
// {2}{B}, Sacrifice a creature: Target creature gets -2/-2 until end of turn.
|
||||
Ability ability1 = new SimpleActivatedAbility(new BoostTargetEffect(-2, -2), new ManaCostsImpl<>("{2}{B}"));
|
||||
ability1.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability1.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
ability1.addTarget(new TargetCreaturePermanent().withChooseHint("gets -2/-2"));
|
||||
this.addAbility(ability1);
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public final class CabalTherapist extends CardImpl {
|
|||
ability.addEffect(new CabalTherapistDiscardEffect());
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(new BeginningOfPreCombatMainTriggeredAbility(
|
||||
new DoWhenCostPaid(ability, new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT
|
||||
new DoWhenCostPaid(ability, new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE
|
||||
), "Sacrifice a creature?"), TargetController.YOU, false
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public final class CabalTherapy extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CabalTherapyEffect());
|
||||
|
||||
// Flashback-Sacrifice a creature.
|
||||
this.addAbility(new FlashbackAbility(this, new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
|
||||
this.addAbility(new FlashbackAbility(this, new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE)));
|
||||
}
|
||||
|
||||
private CabalTherapy(final CabalTherapy card) {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public final class CallForBlood extends CardImpl {
|
|||
this.subtype.add(SubType.ARCANE);
|
||||
|
||||
// As an additional cost to cast this spell, sacrifice a creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
// Target creature gets -X/-X until end of turn, where X is the sacrificed creature's power.
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public final class Caregiver extends CardImpl {
|
|||
|
||||
// {W}, Sacrifice a creature: Prevent the next 1 damage that would be dealt to any target this turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new ColoredManaCost(ColoredManaSymbol.W));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public final class CarnageAltar extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(3));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public final class Carrion extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}{B}");
|
||||
|
||||
// As an additional cost to cast Carrion, sacrifice a creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
|
||||
// Put X 0/1 black Insect creature tokens onto the battlefield, where X is the sacrificed creature's power.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new CarrionBlackInsectToken(), SacrificeCostCreaturesPower.instance));
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public final class CarrionFeeder extends CardImpl {
|
|||
// Sacrifice a creature: Put a +1/+1 counter on Carrion Feeder.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE)));
|
||||
}
|
||||
|
||||
private CarrionFeeder(final CarrionFeeder card) {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public final class CateranOverlord extends CardImpl {
|
|||
|
||||
// Sacrifice a creature: Regenerate Cateran Overlord.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(),
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE)));
|
||||
|
||||
// {6}, {T}: Search your library for a Mercenary permanent card with converted mana cost 6 or less and put it onto the battlefield. Then shuffle your library.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter)), new TapSourceCost());
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public final class CephalidScout extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
// {2}{U}, Sacrifice a land: Draw a card.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{2}{U}"));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_LAND));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class Charforger extends CardImpl {
|
|||
//Whenever another creature or artifact you control is put into a graveyard from the battlefield, put an oil counter on Charforger.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(
|
||||
new AddCountersSourceEffect(CounterType.OIL.createInstance()), false,
|
||||
StaticFilters.FILTER_CONTROLLED_ANOTHER_ARTIFACT_OR_CREATURE, false
|
||||
StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE_OR_ARTIFACT, false
|
||||
));
|
||||
|
||||
//Remove three oil counters from Charforger: Exile the top card of your library. You may play that card this turn.
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public final class ChitteringHarvester extends CardImpl {
|
|||
|
||||
// Whenever this creature mutates, each opponent sacrifices a creature.
|
||||
this.addAbility(new MutatesSourceTriggeredAbility(
|
||||
new SacrificeOpponentsEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)
|
||||
new SacrificeOpponentsEffect(StaticFilters.FILTER_PERMANENT_CREATURE)
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public final class ChitteringSkitterling extends CardImpl {
|
|||
// Corrupted -- Sacrifice an artifact or creature: Draw a card. Activate only if an opponent has three or more poison counters and only once each turn.
|
||||
this.addAbility(new LimitedTimesPerTurnActivatedAbility(
|
||||
Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1),
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT),
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE),
|
||||
1, CorruptedCondition.instance
|
||||
).setAbilityWord(AbilityWord.CORRUPTED).addHint(CorruptedCondition.getHint()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public final class ChitteringWitch extends CardImpl {
|
|||
|
||||
// {1}{B}, Sacrifice a creature: Target creature gets -2/-2 until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-2, -2, Duration.EndOfTurn), new ManaCostsImpl<>("{1}{B}"));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public final class CircleOfDespair extends CardImpl {
|
|||
// {1}, Sacrifice a creature: The next time a source of your choice would deal damage to any target this turn, prevent that damage.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
Zone.BATTLEFIELD, new PreventNextDamageFromChosenSourceToTargetEffect(Duration.EndOfTurn), new GenericManaCost(1));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public final class ClawsOfGix extends CardImpl {
|
|||
|
||||
//{1}, Sacrifice a permanent: You gain 1 life.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), new GenericManaCost(1));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_PERMANENT_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public final class CollateralDamage extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}");
|
||||
|
||||
// As an additional cost to cast Collateral Damge, sacrifice a creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
|
||||
// Collateral Damage deals 3 damage to any target.
|
||||
this.getSpellAbility().addTarget(new TargetAnyTarget());
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect;
|
||||
|
|
@ -9,33 +7,26 @@ import mage.abilities.keyword.EnchantAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public final class ComaVeil extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or creature");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
CardType.ARTIFACT.getPredicate(),
|
||||
CardType.CREATURE.getPredicate()));
|
||||
}
|
||||
|
||||
public ComaVeil(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{U}");
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// Enchant artifact or creature
|
||||
TargetPermanent auraTarget = new TargetPermanent(filter);
|
||||
TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE);
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||
EnchantAbility ability = new EnchantAbility(auraTarget);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public final class CompleatedHuntmaster extends CardImpl {
|
|||
// {1}, {T}, Sacrifice another creature or artifact: Incubate 3.
|
||||
Ability ability = new SimpleActivatedAbility(new IncubateEffect(3), new GenericManaCost(1));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE_OR_ARTIFACT_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE_OR_ARTIFACT));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.PayEnergyCost;
|
||||
|
|
@ -14,32 +12,27 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class ConfiscationCoup extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or creature");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(CardType.CREATURE.getPredicate(), CardType.ARTIFACT.getPredicate()));
|
||||
}
|
||||
|
||||
public ConfiscationCoup(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{U}{U}");
|
||||
|
||||
// Choose target creature or artifact. You get {E}{E}{E}{E}, then you may pay an amount of {E} equal to that permanent's converted mana cost. If you do, gain control of it.
|
||||
this.getSpellAbility().addEffect(new ConfiscationCoupEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE));
|
||||
}
|
||||
|
||||
private ConfiscationCoup(final ConfiscationCoup card) {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public final class Contamination extends CardImpl {
|
|||
|
||||
// At the beginning of your upkeep, sacrifice Contamination unless you sacrifice a creature.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
|
||||
new SacrificeSourceUnlessPaysEffect(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)), TargetController.YOU, false)
|
||||
new SacrificeSourceUnlessPaysEffect(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE)), TargetController.YOU, false)
|
||||
);
|
||||
|
||||
// If a land is tapped for mana, it produces {B} instead of any other type and amount.
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public final class CorpseHarvester extends CardImpl {
|
|||
new CorpseHarvesterTarget(), true
|
||||
).setText(ruleText), new ManaCostsImpl<>("{1}{B}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public final class CorpseTraders extends CardImpl {
|
|||
// {2}{B}, Sacrifice a creature: Target opponent reveals their hand. You choose a card from it. That player discards that card. Activate this ability only any time you could cast a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardCardYouChooseTargetEffect(), new ManaCostsImpl<>("{2}{B}"));
|
||||
ability.addTarget(new TargetOpponent());
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public final class CorruptedConviction extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}");
|
||||
|
||||
// As an additional cost to cast this spell, sacrifice a creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
|
||||
// Draw two cards.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public final class CorruptedHarvester extends CardImpl {
|
|||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(3);
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl<>("{B}"));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public final class CostlyPlunder extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
|
||||
|
||||
// As an additional cost to cast Costly Plunder, sacrifice an artifact or creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE));
|
||||
|
||||
// Draw two cards.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public final class CropRotation extends CardImpl {
|
|||
|
||||
|
||||
// As an additional cost to cast Crop Rotation, sacrifice a land.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_LAND));
|
||||
|
||||
// Search your library for a land card and put that card onto the battlefield. Then shuffle your library.
|
||||
this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterLandCard()), false, true));
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public final class CryptLurker extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTriggeredAbility(new DoIfCostPaid(
|
||||
new DrawCardSourceControllerEffect(1),
|
||||
new OrCost(
|
||||
"sacrifice a creature or discard a creature card", new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT), new DiscardTargetCost(new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE_A))
|
||||
"sacrifice a creature or discard a creature card", new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE), new DiscardTargetCost(new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE_A))
|
||||
)
|
||||
)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public final class CullingDais extends CardImpl {
|
|||
public CullingDais(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CullingDaisEffect(), new GenericManaCost(1));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public final class CullingTheWeak extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}");
|
||||
|
||||
// As an additional cost to cast Culling the Weak, sacrifice a creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
|
||||
// Add {B}{B}{B}{B}.
|
||||
this.getSpellAbility().addEffect(new BasicManaEffect(Mana.BlackMana(4)));
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public final class CultistOfTheAbsolute extends CardImpl {
|
|||
).setText(", \"Ward—Pay 3 life,\""));
|
||||
ability.addEffect(new GainAbilityAllEffect(
|
||||
new BeginningOfUpkeepTriggeredAbility(new SacrificeControllerEffect(
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT, 1, null
|
||||
StaticFilters.FILTER_PERMANENT_CREATURE, 1, null
|
||||
), TargetController.YOU, false),
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_CREATURES_OWNED_COMMANDER
|
||||
).setText("and \"At the beginning of your upkeep, sacrifice a creature.\""));
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public final class DaemogothWoeEater extends CardImpl {
|
|||
|
||||
// At the beginning of your upkeep, sacrifice a creature.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeControllerEffect(
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT, 1, ""
|
||||
StaticFilters.FILTER_PERMANENT_CREATURE, 1, ""
|
||||
), TargetController.YOU, false));
|
||||
|
||||
// When you sacrifice Daemogoth Woe-Eater, each opponent discards a card, you draw a card, and you gain 2 life.
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public final class DarkDwellerOracle extends CardImpl {
|
|||
new ExileTopXMayPlayUntilEffect(1, Duration.EndOfTurn).withTextOptions("that card", true),
|
||||
new GenericManaCost(1)
|
||||
);
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public final class DarkPrivilege extends CardImpl {
|
|||
|
||||
// Sacrifice a creature: Regenerate enchanted creature.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateAttachedEffect(AttachmentType.AURA),
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE)));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public final class DarkTriumph extends CardImpl {
|
|||
|
||||
// If you control a Swamp, you may sacrifice a creature rather than pay Dark Triumph's mana cost.
|
||||
this.addAbility(new AlternativeCostSourceAbility(
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT), condition
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE), condition
|
||||
));
|
||||
|
||||
// Creatures you control get +2/+0 until end of turn.
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public final class DeadlyDispute extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
|
||||
|
||||
// As an additional cost to cast this spell, sacrifice an artifact or creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE));
|
||||
|
||||
// Draw two cards and create a Treasure token.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public final class DeathBomb extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{B}");
|
||||
|
||||
// As an additional cost to cast Death Bomb, sacrifice a creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
// Destroy target nonblack creature. It can't be regenerated. Its controller loses 2 life.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
|
||||
this.getSpellAbility().addEffect(new LoseLifeTargetControllerEffect(2));
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public final class DefiantSalvager extends CardImpl {
|
|||
// Sacrifice an artifact or creature: Put a +1/+1 counter on Defiant Salvager. Activate this ability only any time you could cast a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT)
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE)
|
||||
);
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public final class DemandingDragon extends CardImpl {
|
|||
// When Demanding Dragon enters the battlefield, it deals 5 damage to target opponent unless that player sacrifices a creature.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DoUnlessTargetPlayerOrTargetsControllerPaysEffect(
|
||||
new DamageTargetEffect(5),
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE)
|
||||
).setText("it deals 5 damage to target opponent unless that player sacrifices a creature"));
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public final class DemonOfCatastrophes extends CardImpl {
|
|||
this.toughness = new MageInt(6);
|
||||
|
||||
// As an additional cost to cast this spell, sacrifice a creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
|
|
@ -40,6 +42,11 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class DemonOfFatesDesign extends CardImpl {
|
||||
|
||||
private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent("another enchantment");
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public DemonOfFatesDesign(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{4}{B}{B}");
|
||||
|
||||
|
|
@ -72,9 +79,7 @@ public final class DemonOfFatesDesign extends CardImpl {
|
|||
SacrificeCostManaValue.ENCHANTMENT,
|
||||
StaticValue.get(0), Duration.EndOfTurn
|
||||
), new ManaCostsImpl<>("{2}{B}"));
|
||||
ability.addCost(new SacrificeTargetCost(
|
||||
StaticFilters.FILTER_CONTROLLED_ANOTHER_ENCHANTMENT_SHORT_TEXT
|
||||
));
|
||||
ability.addCost(new SacrificeTargetCost(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
@ -133,8 +138,6 @@ enum DemonOfFatesDesignCost implements DynamicCost {
|
|||
|
||||
class DemonOfFatesDesignAlternativeCostSourceAbility extends AlternativeCostSourceAbility {
|
||||
|
||||
private MageObjectReference mor;
|
||||
|
||||
DemonOfFatesDesignAlternativeCostSourceAbility() {
|
||||
super(
|
||||
new CompoundCondition(SourceIsSpellCondition.instance, IsBeingCastFromHandCondition.instance),
|
||||
|
|
@ -156,7 +159,7 @@ class DemonOfFatesDesignAlternativeCostSourceAbility extends AlternativeCostSour
|
|||
protected void doActivate(Game game, Ability ability) {
|
||||
super.doActivate(game, ability);
|
||||
for (Cost cost : ability.getCosts()) {
|
||||
if (cost != null && cost instanceof DemonOfFatesDesignPayLifeCost) {
|
||||
if (cost instanceof DemonOfFatesDesignPayLifeCost) {
|
||||
((DemonOfFatesDesignPayLifeCost) cost).setMor(getMor(game));
|
||||
}
|
||||
}
|
||||
|
|
@ -219,7 +222,7 @@ class DemonOfFatesDesignWatcher extends Watcher {
|
|||
Spell spell = game.getSpell(event.getTargetId());
|
||||
if (spell != null) {
|
||||
for (Cost cost : spell.getStackAbility().getCosts()) {
|
||||
if (cost != null && cost instanceof DemonOfFatesDesignPayLifeCost) {
|
||||
if (cost instanceof DemonOfFatesDesignPayLifeCost) {
|
||||
usedFrom.add(((DemonOfFatesDesignPayLifeCost) cost).getMor());
|
||||
}
|
||||
}
|
||||
|
|
@ -248,4 +251,4 @@ enum DemonOfFatesDesignCondition implements Condition {
|
|||
return watcher != null
|
||||
&& watcher.canAbilityBeUsed(game, source, new MageObjectReference(source.getSourceId(), game));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public final class DemonOfWailingAgonies extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Lieutenant - As long as you control your commander, Demon of Wailing Agonies gets +2/+2 and has "Whenever Demon of Wailing Agonies deals combat damage to a player, that player sacrifices a creature."
|
||||
Ability gainedAbility = new DealsCombatDamageToAPlayerTriggeredAbility(new SacrificeEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT, 1, "that player"), false, true);
|
||||
Ability gainedAbility = new DealsCombatDamageToAPlayerTriggeredAbility(new SacrificeEffect(StaticFilters.FILTER_PERMANENT_CREATURE, 1, "that player"), false, true);
|
||||
ContinuousEffect effect = new GainAbilitySourceEffect(gainedAbility);
|
||||
effect.setText("and has \"Whenever {this} deals combat damage to a player, that player sacrifices a creature.\"");
|
||||
this.addAbility(new LieutenantAbility(effect));
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public final class DemonmailHauberk extends CardImpl {
|
|||
// Equip - Sacrifice a creature.
|
||||
this.addAbility(new EquipAbility(
|
||||
Outcome.AddAbility,
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT),
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE),
|
||||
false));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public final class DevouringStrossus extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
// Sacrifice a creature: Regenerate Devouring Strossus.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(),
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE)));
|
||||
}
|
||||
|
||||
private DevouringStrossus(final DevouringStrossus card) {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public final class DevouringSwarm extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn),
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE)));
|
||||
}
|
||||
|
||||
private DevouringSwarm(final DevouringSwarm card) {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public final class DiabolicIntent extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
|
||||
|
||||
// As an additional cost to cast Diabolic Intent, sacrifice a creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
|
||||
// Search your library for a card and put that card into your hand. Then shuffle your library.
|
||||
this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(), false, true));
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public final class DiamondValley extends CardImpl {
|
|||
Effect effect = new GainLifeEffect(SacrificeCostCreaturesToughness.instance);
|
||||
effect.setText("You gain life equal to the sacrificed creature's toughness");
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public final class DimirHouseGuard extends CardImpl {
|
|||
this.addAbility(FearAbility.getInstance());
|
||||
// Sacrifice a creature: Regenerate Dimir House Guard.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(),
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE)));
|
||||
// Transmute {1}{B}{B}
|
||||
this.addAbility(new TransmuteAbility("{1}{B}{B}"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public final class DiscipleOfGriselbrand extends CardImpl {
|
|||
|
||||
// {1}, Sacrifice a creature: You gain life equal to the sacrificed creature's toughness.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DiscipleOfGriselbrandEffect(), new GenericManaCost(1));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public final class DispersingOrb extends CardImpl {
|
|||
|
||||
// {3}{U}, Sacrifice a permanent: Return target permanent to its owner's hand.
|
||||
Ability ability = new SimpleActivatedAbility(new ReturnToHandTargetEffect(), new ManaCostsImpl<>("{3}{U}"));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_PERMANENT_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT));
|
||||
ability.addTarget(new TargetPermanent().withChooseHint("return to hand"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public final class DocksideChef extends CardImpl {
|
|||
Ability ability = new SimpleActivatedAbility(
|
||||
new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{1}{B}")
|
||||
);
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public final class DregRecycler extends CardImpl {
|
|||
|
||||
// {T}, Sacrifice an artifact or creature: Each opponent loses 1 life and you gain 1 life.
|
||||
Ability ability = new SimpleActivatedAbility(new LoseLifeOpponentsEffect(1), new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE));
|
||||
ability.addEffect(new GainLifeEffect(1).concatBy("and"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue