[MOM] Implement Grafted Butcher

This commit is contained in:
theelk801 2023-04-08 14:18:29 -04:00
parent f4ae69299c
commit d010f4e3e5
17 changed files with 125 additions and 209 deletions

View file

@ -1,8 +1,5 @@
package mage.cards.a;
import java.util.List;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.costs.Cost;
import mage.abilities.costs.common.SacrificeTargetCost;
@ -15,30 +12,26 @@ import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.StaticFilters;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetCardInLibrary;
import java.util.List;
import java.util.UUID;
/**
*
* @author weirddan455
*/
public final class AnchorToReality extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an artifact or creature");
static {
filter.add(Predicates.or(CardType.ARTIFACT.getPredicate(), CardType.CREATURE.getPredicate()));
}
public AnchorToReality(UUID ownerId, CardSetInfo setInfo) {
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(filter));
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
// 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());

View file

@ -1,35 +1,26 @@
package mage.cards.a;
import java.util.UUID;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.target.common.TargetControlledPermanent;
import mage.filter.StaticFilters;
import mage.target.common.TargetAnyTarget;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/**
*
* @author North
*/
public final class Artillerize extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an artifact or creature");
static {
filter.add(Predicates.or(
CardType.ARTIFACT.getPredicate(),
CardType.CREATURE.getPredicate()));
}
public Artillerize(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}");
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT)));
this.getSpellAbility().addTarget(new TargetAnyTarget());
this.getSpellAbility().addEffect(new DamageTargetEffect(5));
}

View file

@ -12,8 +12,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
@ -23,16 +22,6 @@ import java.util.UUID;
*/
public final class BloodboilSorcerer extends CardImpl {
private static final FilterControlledPermanent filter
= new FilterControlledPermanent("an artifact or creature");
static {
filter.add(Predicates.or(
CardType.ARTIFACT.getPredicate(),
CardType.CREATURE.getPredicate()
));
}
public BloodboilSorcerer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
@ -46,7 +35,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(filter));
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability.withFlavorWord("Crown of Madness"));
}

View file

@ -1,37 +1,25 @@
package mage.cards.c;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.LimitedTimesPerTurnActivatedAbility;
import mage.abilities.condition.common.CorruptedCondition;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.constants.AbilityWord;
import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ChitteringSkitterling extends CardImpl {
private static final FilterControlledPermanent filter
= new FilterControlledPermanent("an artifact or creature");
static {
filter.add(Predicates.or(
CardType.ARTIFACT.getPredicate(),
CardType.CREATURE.getPredicate()
));
}
public ChitteringSkitterling(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
@ -43,7 +31,8 @@ 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(filter), 1, CorruptedCondition.instance
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT),
1, CorruptedCondition.instance
).setAbilityWord(AbilityWord.CORRUPTED).addHint(CorruptedCondition.getHint()));
}

View file

@ -1,36 +1,24 @@
package mage.cards.c;
import java.util.UUID;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.target.common.TargetControlledPermanent;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
*
* @author TheElk801
*/
public final class CostlyPlunder extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an artifact or creature");
static {
filter.add(Predicates.or(
CardType.ARTIFACT.getPredicate(),
CardType.CREATURE.getPredicate()
));
}
public CostlyPlunder(UUID ownerId, CardSetInfo setInfo) {
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(new TargetControlledPermanent(1, 1, filter, true)));
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
// Draw two cards.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));

View file

@ -1,35 +1,26 @@
package mage.cards.d;
import java.util.UUID;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import mage.game.permanent.token.TreasureToken;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/**
*
* @author weirddan455
*/
public final class DeadlyDispute extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("artifact or creature");
static {
filter.add(Predicates.or(CardType.ARTIFACT.getPredicate(), CardType.CREATURE.getPredicate()));
}
public DeadlyDispute(UUID ownerId, CardSetInfo setInfo) {
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(new TargetControlledPermanent(filter)));
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
// Draw two cards and create a Treasure token.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));

View file

@ -1,7 +1,5 @@
package mage.cards.d;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
@ -11,24 +9,16 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.target.common.TargetControlledPermanent;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public final class DefiantSalvager extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an artifact or creature");
static {
filter.add(Predicates.or(CardType.ARTIFACT.getPredicate(), CardType.CREATURE.getPredicate()));
}
public DefiantSalvager(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
@ -38,8 +28,10 @@ public final class DefiantSalvager extends CardImpl {
this.toughness = new MageInt(2);
// 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(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, true)));
Ability ability = new ActivateAsSorceryActivatedAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT)
);
this.addAbility(ability);
}

View file

@ -10,9 +10,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.target.common.TargetControlledPermanent;
import mage.filter.StaticFilters;
import java.util.UUID;
@ -21,15 +19,6 @@ import java.util.UUID;
*/
public final class DocksideChef extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("artifact or creature");
static {
filter.add(Predicates.or(
CardType.ARTIFACT.getPredicate(),
CardType.CREATURE.getPredicate()
));
}
public DocksideChef(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{B}");
@ -42,7 +31,7 @@ public final class DocksideChef extends CardImpl {
Ability ability = new SimpleActivatedAbility(
new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{1}{B}")
);
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
this.addAbility(ability);
}

View file

@ -0,0 +1,68 @@
package mage.cards.g;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class GraftedButcher extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent(SubType.PHYREXIAN, "Phyrexians");
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent(SubType.PHYREXIAN, "Phyrexians");
public GraftedButcher(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
this.subtype.add(SubType.PHYREXIAN);
this.subtype.add(SubType.SAMURAI);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// When Grafted Butcher enters the battlefield, Phyrexians you control gain menace until end of turn.
this.addAbility(new EntersBattlefieldTriggeredAbility(
new GainAbilityControlledEffect(new MenaceAbility(false), Duration.EndOfTurn, filter)
));
// Other Phyrexians you control get +1/+1.
this.addAbility(new SimpleStaticAbility(new BoostControlledEffect(
1, 1, Duration.WhileOnBattlefield, filter2, true
)));
// {3}{B}, Sacrifice an artifact or creature: Return Grafted Butcher from your graveyard to the battlefield. Activate only as a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(
Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(), new ManaCostsImpl<>("{3}{B}")
);
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
this.addAbility(ability);
}
private GraftedButcher(final GraftedButcher card) {
super(card);
}
@Override
public GraftedButcher copy() {
return new GraftedButcher(this);
}
}

View file

@ -13,9 +13,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.target.common.TargetControlledPermanent;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
@ -25,15 +23,6 @@ import java.util.UUID;
*/
public final class LaurineTheDiversion extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("artifact or creature");
static {
filter.add(Predicates.or(
CardType.ARTIFACT.getPredicate(),
CardType.CREATURE.getPredicate()
));
}
public LaurineTheDiversion(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
@ -51,7 +40,7 @@ public final class LaurineTheDiversion extends CardImpl {
// {2}, Sacrifice an artifact or creature: Goad target creature.
Ability ability = new SimpleActivatedAbility(new GoadTargetEffect(), new GenericManaCost(2));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -8,10 +8,8 @@ import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import mage.target.common.TargetAnyTarget;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
@ -20,21 +18,12 @@ import java.util.UUID;
*/
public final class MakeshiftMunitions extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("artifact or creature");
static {
filter.add(Predicates.or(
CardType.ARTIFACT.getPredicate(),
CardType.CREATURE.getPredicate()
));
}
public MakeshiftMunitions(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}");
// {1}, Sacrifice an artifact or creature: Makeshift Munitions deals 1 damage to any target.
Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(1), new GenericManaCost(1));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
ability.addTarget(new TargetAnyTarget());
this.addAbility(ability);
}

View file

@ -1,36 +1,26 @@
package mage.cards.m;
import java.util.UUID;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.dynamicvalue.common.SacrificeCostConvertedMana;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.target.common.TargetControlledPermanent;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public final class MorbidCuriosity extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an artifact or creature");
static {
filter.add(Predicates.or(
CardType.ARTIFACT.getPredicate(),
CardType.CREATURE.getPredicate()));
}
public MorbidCuriosity(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{B}");
// As an additional cost to cast Morbid Curiosity, sacrifice an artifact or creature.
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
// Draw cards equal to the converted mana cost of the sacrificed permanent.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(

View file

@ -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.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreatureOrPlaneswalker;
import java.util.UUID;
@ -16,20 +15,11 @@ import java.util.UUID;
*/
public final class PowerstoneFracture extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("artifact or creature");
static {
filter.add(Predicates.or(
CardType.ARTIFACT.getPredicate(),
CardType.CREATURE.getPredicate()
));
}
public PowerstoneFracture(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
// As an additional cost to cast this spell, sacrifice an artifact or creature.
this.getSpellAbility().addCost(new SacrificeTargetCost(filter));
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
// Destroy target creature or planeswalker.
this.getSpellAbility().addEffect(new DestroyTargetEffect());

View file

@ -14,9 +14,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.target.common.TargetControlledPermanent;
import mage.filter.StaticFilters;
import java.util.UUID;
@ -25,16 +23,6 @@ import java.util.UUID;
*/
public final class RavenousSquirrel extends CardImpl {
private static final FilterControlledPermanent filter
= new FilterControlledPermanent("an artifact or creature");
static {
filter.add(Predicates.or(
CardType.ARTIFACT.getPredicate(),
CardType.CREATURE.getPredicate()
));
}
public RavenousSquirrel(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B/G}");
@ -44,13 +32,14 @@ public final class RavenousSquirrel extends CardImpl {
// Whenever you sacrifice an artifact or creature, put a +1/+1 counter on Ravenous Squirrel.
this.addAbility(new SacrificePermanentTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT
));
// {1}{B}{G}, Sacrifice an artifact or creature: You gain 1 life and draw a card.
Ability ability = new SimpleActivatedAbility(new GainLifeEffect(1), new ManaCostsImpl<>("{1}{B}{G}"));
ability.addEffect(new DrawCardSourceControllerEffect(1).concatBy("and"));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
this.addAbility(ability);
}

View file

@ -10,10 +10,8 @@ import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.target.common.TargetControlledPermanent;
import mage.util.CardUtil;
import java.util.Collection;
@ -25,21 +23,11 @@ import java.util.UUID;
*/
public final class ReckonersBargain extends CardImpl {
private static final FilterControlledPermanent filter
= new FilterControlledPermanent("an artifact or creature");
static {
filter.add(Predicates.or(
CardType.ARTIFACT.getPredicate(),
CardType.CREATURE.getPredicate()
));
}
public ReckonersBargain(UUID ownerId, CardSetInfo setInfo) {
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(new TargetControlledPermanent(filter)));
this.getSpellAbility().addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
// You gain life equal to the sacrificed permanent's mana value. Draw two cards.
this.getSpellAbility().addEffect(new GainLifeEffect(

View file

@ -12,8 +12,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import java.util.UUID;
@ -22,15 +21,6 @@ import java.util.UUID;
*/
public final class WarehouseThief extends CardImpl {
public static final FilterControlledPermanent filter = new FilterControlledPermanent("artifact or creature");
static {
filter.add(Predicates.or(
CardType.ARTIFACT.getPredicate(),
CardType.CREATURE.getPredicate()
));
}
public WarehouseThief(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
@ -44,7 +34,7 @@ public final class WarehouseThief extends CardImpl {
new ExileTopXMayPlayUntilEndOfTurnEffect(1, false, Duration.UntilEndOfYourNextTurn), new GenericManaCost(2)
);
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeTargetCost(filter));
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT));
this.addAbility(ability);
}

View file

@ -104,6 +104,7 @@ public final class MarchOfTheMachine extends ExpansionSet {
cards.add(new SetCardInfo("Gloomfang Mauler", 108, Rarity.COMMON, mage.cards.g.GloomfangMauler.class));
cards.add(new SetCardInfo("Gnottvold Hermit", 188, Rarity.UNCOMMON, mage.cards.g.GnottvoldHermit.class));
cards.add(new SetCardInfo("Golden-Scale Aeronaut", 15, Rarity.COMMON, mage.cards.g.GoldenScaleAeronaut.class));
cards.add(new SetCardInfo("Grafted Butcher", 109, Rarity.RARE, mage.cards.g.GraftedButcher.class));
cards.add(new SetCardInfo("Halo Hopper", 260, Rarity.COMMON, mage.cards.h.HaloHopper.class));
cards.add(new SetCardInfo("Hangar Scrounger", 142, Rarity.COMMON, mage.cards.h.HangarScrounger.class));
cards.add(new SetCardInfo("Harried Artisan", 143, Rarity.UNCOMMON, mage.cards.h.HarriedArtisan.class));