Some rework to Framework.

This commit is contained in:
LevelX2 2018-01-03 11:40:07 +01:00
parent bdd7cc48d1
commit 32fb2507c3
101 changed files with 426 additions and 497 deletions

View file

@ -40,7 +40,7 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -49,10 +49,8 @@ import mage.target.common.TargetCardInYourGraveyard;
*/
public class AdunOakenshield extends CardImpl {
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card from your graveyard");
public AdunOakenshield(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{R}{G}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{R}{G}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.KNIGHT);
@ -61,8 +59,8 @@ public class AdunOakenshield extends CardImpl {
this.toughness = new MageInt(2);
//{B}{R}{G}, {T}: Return target creature card from your graveyard to your hand.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(),new ManaCostsImpl("{B}{R}{G}"));
ability.addTarget(new TargetCardInYourGraveyard(filter));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{B}{R}{G}"));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -45,7 +45,7 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -70,7 +70,7 @@ public class ApprenticeNecromancer extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ApprenticeNecromancerEffect(), new ColoredManaCost(ColoredManaSymbol.B));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.a;
import java.util.UUID;
@ -38,7 +37,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -47,20 +46,20 @@ import mage.target.common.TargetCardInYourGraveyard;
*/
public class ArtisanOfKozilek extends CardImpl {
public ArtisanOfKozilek (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{9}");
public ArtisanOfKozilek(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{9}");
this.subtype.add(SubType.ELDRAZI);
this.power = new MageInt(10);
this.toughness = new MageInt(9);
// When you cast Artisan of Kozilek, you may return target creature card from your graveyard to the battlefield.
Ability ability = new CastSourceTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), true);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
// Annihilator 2
this.addAbility(new AnnihilatorAbility(2));
}
public ArtisanOfKozilek (final ArtisanOfKozilek card) {
public ArtisanOfKozilek(final ArtisanOfKozilek card) {
super(card);
}

View file

@ -40,7 +40,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.Target;
@ -76,7 +76,7 @@ public class BackFromTheBrink extends CardImpl {
class BackFromTheBrinkCost extends CostImpl {
public BackFromTheBrinkCost() {
Target target = new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"));
Target target = new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
target.setNotTarget(true);
this.addTarget(target);
this.text = "Exile a creature card from your graveyard and pay its mana cost";

View file

@ -36,8 +36,8 @@ import mage.abilities.keyword.EntwineAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.common.FilterCreatureCard;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetCreaturePermanent;
@ -45,12 +45,12 @@ import mage.target.common.TargetCreaturePermanent;
/**
*
* @author LoneFox
*
*/
public class BetrayalOfFlesh extends CardImpl {
public BetrayalOfFlesh(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{5}{B}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{5}{B}");
// Choose one -
this.getSpellAbility().getModes().setMinModes(1);
@ -61,7 +61,7 @@ public class BetrayalOfFlesh extends CardImpl {
// or return target creature card from your graveyard to the battlefield.
Mode mode = new Mode();
mode.getEffects().add(new ReturnFromGraveyardToBattlefieldTargetEffect());
mode.getTargets().add(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
mode.getTargets().add(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().getModes().addMode(mode);
// Entwine-Sacrifice three lands.
this.addAbility(new EntwineAbility(new SacrificeTargetCost(new TargetControlledPermanent(3, 3, new FilterControlledLandPermanent("three lands"), true))));

View file

@ -41,6 +41,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.target.common.TargetCardInHand;
import mage.target.common.TargetCardInYourGraveyard;
@ -52,20 +53,20 @@ import mage.target.common.TargetCardInYourGraveyard;
public class BodySnatcher extends CardImpl {
public BodySnatcher(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
this.subtype.add(SubType.MINION);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// When Body Snatcher enters the battlefield, exile it unless you discard a creature card.
this.addAbility(new EntersBattlefieldTriggeredAbility(new ExileSourceUnlessPaysEffect(new DiscardTargetCost(new TargetCardInHand(new FilterCreatureCard("a creature card"))))));
// When Body Snatcher dies, exile Body Snatcher and return target creature card from your graveyard to the battlefield.
Effect effect = new ReturnFromGraveyardToBattlefieldTargetEffect();
effect.setText("and return target creature card from your graveyard to the battlefield");
Ability ability = new DiesTriggeredAbility(new ExileSourceEffect(), false);
ability.addEffect(effect);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}

View file

@ -32,7 +32,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -42,12 +42,11 @@ import mage.target.common.TargetCardInYourGraveyard;
public class BreathOfLife extends CardImpl {
public BreathOfLife(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{W}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}");
// Return target creature card from your graveyard to the battlefield.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
}
public BreathOfLife(final BreathOfLife card) {

View file

@ -41,7 +41,7 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -50,21 +50,19 @@ import mage.target.common.TargetCardInYourGraveyard;
*/
public class CabalSurgeon extends CardImpl {
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card from your graveyard");
public CabalSurgeon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.MINION);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
// {2}{B}{B}, {tap}, Exile two cards from your graveyard: Return target creature card from your graveyard to your hand.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(),new ManaCostsImpl("{2}{B}{B}"));
ability.addTarget(new TargetCardInYourGraveyard(filter));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{2}{B}{B}"));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
ability.addCost(new TapSourceCost());
ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(2, new FilterCard("cards from your graveyard"))));
this.addAbility(ability);
this.addAbility(ability);
}
public CabalSurgeon(final CabalSurgeon card) {

View file

@ -37,7 +37,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -47,15 +47,18 @@ import mage.target.common.TargetCardInYourGraveyard;
public class CadaverImp extends CardImpl {
public CadaverImp(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
this.subtype.add(SubType.IMP);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Flying
this.addAbility(FlyingAbility.getInstance());
// When Cadaver Imp enters the battlefield, you may return target creature card from your graveyard to your hand.
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}

View file

@ -42,6 +42,7 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -56,14 +57,14 @@ import mage.target.targetpointer.FixedTarget;
public class CauldronDance extends CardImpl {
public CauldronDance(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{B}{R}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{B}{R}");
// Cast Cauldron Dance only during combat.
this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(TurnPhase.COMBAT));
// Return target creature card from your graveyard to the battlefield. That creature gains haste. Return it to your hand at the beginning of the next end step.
this.getSpellAbility().addEffect(new CauldronDanceReturnFromGraveyardToBattlefieldTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
// You may put a creature card from your hand onto the battlefield. That creature gains haste. Its controller sacrifices it at the beginning of the next end step.
this.getSpellAbility().addEffect(new CauldronDancePutCreatureFromHandOntoBattlefieldEffect());

View file

@ -27,6 +27,7 @@
*/
package mage.cards.c;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
@ -36,13 +37,11 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/**
*
* @author fireshoes
@ -50,11 +49,11 @@ import java.util.UUID;
public class CemeteryRecruitment extends CardImpl {
public CemeteryRecruitment(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
// Return target creature card from your graveyard to your hand. If it's a Zombie card, draw a card.
this.getSpellAbility().addEffect(new CemeteryRecruitmentEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
}
public CemeteryRecruitment(final CemeteryRecruitment card) {

View file

@ -37,7 +37,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInYourGraveyard;
@ -49,7 +49,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class CorpseChurn extends CardImpl {
public CorpseChurn(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
// Put the top three cards of your library into your graveyard, then you may return a creature card from your graveyard to your hand.
getSpellAbility().addEffect(new PutTopCardOfLibraryIntoGraveControllerEffect(3));
@ -88,7 +88,7 @@ class CorpseChurnEffect extends OneShotEffect {
if (controller == null) {
return false;
}
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"));
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
target.setNotTarget(true);
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)
&& controller.chooseUse(outcome, "Return a creature card from your graveyard to hand?", source, game)

View file

@ -37,7 +37,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCardInYourGraveyard;
@ -50,11 +50,10 @@ import mage.target.common.TargetCreaturePermanent;
public class CorpseLunge extends CardImpl {
public CorpseLunge(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}");
// As an additional cost to cast Corpse Lunge, exile a creature card from your graveyard.
this.getSpellAbility().addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))));
this.getSpellAbility().addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)));
// Corpse Lunge deals damage equal to the exiled card's power to target creature.
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new CorpseLungeEffect());

View file

@ -42,7 +42,6 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInYourGraveyard;
@ -101,7 +100,7 @@ class CruelUltimatumEffect extends OneShotEffect {
if (controller == null) {
return false;
}
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"));
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
if (target.canChoose(source.getSourceId(), source.getControllerId(), game) && controller.choose(Outcome.ReturnToHand, target, source.getSourceId(), game)) {
Card card = game.getCard(target.getFirstTarget());
if (card == null) {

View file

@ -42,7 +42,7 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -56,7 +56,7 @@ import mage.target.targetpointer.FixedTarget;
public class DawnOfTheDead extends CardImpl {
public DawnOfTheDead(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{B}{B}");
// At the beginning of your upkeep, you lose 1 life.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new LoseLifeSourceControllerEffect(1), TargetController.YOU, false));
@ -64,7 +64,7 @@ public class DawnOfTheDead extends CardImpl {
// At the beginning of your upkeep, you may return target creature card from your graveyard to the battlefield.
// That creature gains haste until end of turn. Exile it at the beginning of the next end step.
Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DawnOfTheDeadEffect(), TargetController.YOU, true);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}

View file

@ -37,7 +37,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCardInYourGraveyard;
@ -49,13 +49,12 @@ import mage.target.common.TargetCardInYourGraveyard;
public class DefyDeath extends CardImpl {
public DefyDeath(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{W}{W}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}{W}");
// Return target creature card from your graveyard to the battlefield. If it's an Angel, put two +1/+1 counters on it.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
this.getSpellAbility().addEffect(new DefyDeathEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
}
public DefyDeath(final DefyDeath card) {

View file

@ -44,7 +44,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
@ -59,12 +59,11 @@ import mage.target.targetpointer.FixedTarget;
public class DiabolicServitude extends CardImpl {
public DiabolicServitude(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}");
// When Diabolic Servitude enters the battlefield, return target creature card from your graveyard to the battlefield.
Ability ability = new EntersBattlefieldTriggeredAbility(new DiabolicServitudeReturnCreatureEffect());
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
// When the creature put onto the battlefield with Diabolic Servitude dies, exile it and return Diabolic Servitude to its owner's hand.
@ -138,10 +137,10 @@ class DiabolicServitudeCreatureDiesTriggeredAbility extends TriggeredAbilityImpl
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (((ZoneChangeEvent)event).isDiesEvent()) {
if (((ZoneChangeEvent) event).isDiesEvent()) {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
Object object = game.getState().getValue(getSourceId().toString() + "returnedCreature");
if ((object instanceof MageObjectReference) && ((MageObjectReference)object).refersTo(zEvent.getTarget(), game)) {
if ((object instanceof MageObjectReference) && ((MageObjectReference) object).refersTo(zEvent.getTarget(), game)) {
return true;
}
}
@ -175,7 +174,7 @@ class DiabolicServitudeExileCreatureEffect extends OneShotEffect {
Object object = game.getState().getValue(source.getSourceId().toString() + "returnedCreature");
if ((object instanceof MageObjectReference)) {
Effect effect = new ExileTargetEffect();
effect.setTargetPointer(new FixedTarget(((MageObjectReference)object).getSourceId()));
effect.setTargetPointer(new FixedTarget(((MageObjectReference) object).getSourceId()));
effect.apply(game, source);
return new ReturnToHandSourceEffect(true).apply(game, source);
}
@ -204,7 +203,7 @@ class DiabolicServitudeSourceLeftBattlefieldEffect extends OneShotEffect {
Object object = game.getState().getValue(source.getSourceId().toString() + "returnedCreature");
if ((object instanceof MageObjectReference)) {
Effect effect = new ExileTargetEffect(null, "", Zone.BATTLEFIELD);
effect.setTargetPointer(new FixedTarget(((MageObjectReference)object).getSourceId()));
effect.setTargetPointer(new FixedTarget(((MageObjectReference) object).getSourceId()));
effect.apply(game, source);
}
return false;

View file

@ -1,16 +1,16 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
@ -20,12 +20,11 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.d;
import java.util.UUID;
@ -33,7 +32,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -42,12 +41,10 @@ import mage.target.common.TargetCardInYourGraveyard;
*/
public class Disentomb extends CardImpl {
private static FilterCreatureCard filter = new FilterCreatureCard("creature card from your graveyard");
public Disentomb(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}");
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
}

View file

@ -33,7 +33,7 @@ import mage.abilities.keyword.BuybackAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -41,16 +41,14 @@ import mage.target.common.TargetCardInYourGraveyard;
* @author fireshoes
*/
public class DisturbedBurial extends CardImpl {
private static FilterCreatureCard filter = new FilterCreatureCard("creature card from your graveyard");
public DisturbedBurial(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
// Buyback {3}
this.addAbility(new BuybackAbility("{3}"));
this.addAbility(new BuybackAbility("{3}"));
// Return target creature card from your graveyard to your hand.
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
}

View file

@ -38,10 +38,10 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.ColoredManaSymbol;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -51,7 +51,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class DoomedNecromancer extends CardImpl {
public DoomedNecromancer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.CLERIC);
this.subtype.add(SubType.MERCENARY);
@ -63,9 +63,9 @@ public class DoomedNecromancer extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToBattlefieldTargetEffect(), new ColoredManaCost(ColoredManaSymbol.B));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}
public DoomedNecromancer(final DoomedNecromancer card) {

View file

@ -40,10 +40,10 @@ import mage.cards.Card;
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.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInYourGraveyard;
@ -56,17 +56,17 @@ import mage.target.common.TargetOpponent;
public class DreadDefiler extends CardImpl {
public DreadDefiler(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{B}");
this.subtype.add(SubType.ELDRAZI);
this.power = new MageInt(6);
this.toughness = new MageInt(8);
// Devoid
this.addAbility(new DevoidAbility(this.color));
// {3}{C}, Exile a creature card from your graveyard: Target opponent loses life equal to the exiled card's power.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DreadDefilerEffect(), new ManaCostsImpl("{3}{C}"));
ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))));
ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)));
ability.addTarget(new TargetOpponent());
this.addAbility(ability);
}

View file

@ -35,8 +35,8 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TimingRule;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreatureCard;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetControlledCreaturePermanent;
@ -47,14 +47,13 @@ import mage.target.common.TargetControlledCreaturePermanent;
public class DreadReturn extends CardImpl {
public DreadReturn(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}{B}");
// Return target creature card from your graveyard to the battlefield.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
// Flashback-Sacrifice three creatures.
this.addAbility(new FlashbackAbility(new SacrificeTargetCost(new TargetControlledCreaturePermanent(3,3,new FilterControlledCreaturePermanent("three creatures"),true)), TimingRule.SORCERY));
this.addAbility(new FlashbackAbility(new SacrificeTargetCost(new TargetControlledCreaturePermanent(3, 3, new FilterControlledCreaturePermanent("three creatures"), true)), TimingRule.SORCERY));
}
public DreadReturn(final DreadReturn card) {

View file

@ -37,7 +37,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game;
@ -48,12 +48,12 @@ import mage.target.common.TargetCardInYourGraveyard;
/**
*
* @author North
* @author LevelX - changed to checkInterveningIfClause
* @author LevelX - changed to checkInterveningIfClause
*/
public class EmeriaTheSkyRuin extends CardImpl {
public EmeriaTheSkyRuin(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// Emeria, the Sky Ruin enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
@ -83,7 +83,7 @@ class EmeriaTheSkyRuinTriggeredAbility extends TriggeredAbilityImpl {
public EmeriaTheSkyRuinTriggeredAbility() {
super(Zone.BATTLEFIELD, new ReturnFromGraveyardToBattlefieldTargetEffect(), true);
this.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
}
public EmeriaTheSkyRuinTriggeredAbility(final EmeriaTheSkyRuinTriggeredAbility ability) {
@ -107,7 +107,7 @@ class EmeriaTheSkyRuinTriggeredAbility extends TriggeredAbilityImpl {
@Override
public boolean checkInterveningIfClause(Game game) {
return game.getBattlefield().countAll(filter, this.controllerId, game) >= 7;
return game.getBattlefield().countAll(filter, this.controllerId, game) >= 7;
}
@Override

View file

@ -38,11 +38,11 @@ import mage.cards.Card;
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.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.Game;
@ -58,7 +58,7 @@ import mage.target.common.TargetOpponent;
public class EntomberExarch extends CardImpl {
public EntomberExarch(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(2);
@ -66,7 +66,7 @@ public class EntomberExarch extends CardImpl {
// When Entomber Exarch enters the battlefield, choose one - Return target creature card from your graveyard to your hand; or target opponent reveals his or her hand, you choose a noncreature card from it, then that player discards that card.
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
Mode mode = new Mode();
mode.getEffects().add(new EntomberExarchEffect());
mode.getTargets().add(new TargetOpponent());
@ -85,6 +85,7 @@ public class EntomberExarch extends CardImpl {
}
class EntomberExarchEffect extends OneShotEffect {
private static final FilterCard filter = new FilterCard("noncreature card");
static {

View file

@ -37,7 +37,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.target.common.TargetCardInLibrary;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetCreaturePermanent;
@ -49,21 +48,19 @@ import java.util.UUID;
* @author fireshoes
*/
public class EvolutionCharm extends CardImpl {
private static FilterCreatureCard filter = new FilterCreatureCard("creature card from your graveyard");
public EvolutionCharm(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}");
// Choose one - Search your library for a basic land card, reveal it, put it into your hand, then shuffle your library;
this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_BASIC_LAND_CARD), true, true));
// or return target creature card from your graveyard to your hand;
// or return target creature card from your graveyard to your hand;
Mode mode = new Mode();
mode.getEffects().add(new ReturnToHandTargetEffect());
mode.getTargets().add(new TargetCardInYourGraveyard(filter));
mode.getTargets().add(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().addMode(mode);
// or target creature gains flying until end of turn.
mode = new Mode();
mode.getEffects().add(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));

View file

@ -32,7 +32,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -42,11 +42,11 @@ import mage.target.common.TargetCardInYourGraveyard;
public class FalseDefeat extends CardImpl {
public FalseDefeat(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{W}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}");
// Return target creature card from your graveyard to the battlefield.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
}
public FalseDefeat(final FalseDefeat card) {

View file

@ -27,6 +27,7 @@
*/
package mage.cards.f;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
@ -36,13 +37,11 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/**
*
* @author fireshoes
@ -50,12 +49,12 @@ import java.util.UUID;
public class FearsomeAwakening extends CardImpl {
public FearsomeAwakening(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}");
// Return target creature card from your graveyard to the battlefield. If it's a Dragon, put two +1/+1 counters on it.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
this.getSpellAbility().addEffect(new FearsomeAwakeningEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
}
public FearsomeAwakening(final FearsomeAwakening card) {
@ -93,4 +92,4 @@ class FearsomeAwakeningEffect extends OneShotEffect {
}
return false;
}
}
}

View file

@ -33,8 +33,8 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterArtifactCard;
import mage.filter.common.FilterCreatureCard;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -44,7 +44,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class FortuitousFind extends CardImpl {
public FortuitousFind(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}");
// Choose one or both —
this.getSpellAbility().getModes().setMinModes(1);
@ -57,7 +57,7 @@ public class FortuitousFind extends CardImpl {
// or Return target creature card from your graveyard to your hand.
Mode mode = new Mode();
mode.getEffects().add(new ReturnToHandTargetEffect());
mode.getTargets().add(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
mode.getTargets().add(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().addMode(mode);
}

View file

@ -39,7 +39,7 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInYourGraveyard;
@ -53,11 +53,11 @@ import mage.target.targetpointer.FixedTarget;
public class FoulRenewal extends CardImpl {
public FoulRenewal(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{B}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B}");
// Return target creature card from your graveyard to your hand. Target creature gets -X/-X until end of turn, where X is the toughness of the card returned this way.
this.getSpellAbility().addEffect(new FoulRenewalEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}

View file

@ -40,7 +40,7 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -50,7 +50,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class Genesis extends CardImpl {
public Genesis(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}");
this.subtype.add(SubType.INCARNATION);
this.power = new MageInt(4);
@ -58,8 +58,8 @@ public class Genesis extends CardImpl {
// At the beginning of your upkeep, if Genesis is in your graveyard, you may pay {2}{G}. If you do, return target creature card from your graveyard to your hand.
Ability ability = new BeginningOfUpkeepTriggeredAbility(
Zone.GRAVEYARD, new DoIfCostPaid(new ReturnFromGraveyardToHandTargetEffect(), new ManaCostsImpl("{2}{G}")),TargetController.YOU, false, false);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
Zone.GRAVEYARD, new DoIfCostPaid(new ReturnFromGraveyardToHandTargetEffect(), new ManaCostsImpl("{2}{G}")), TargetController.YOU, false, false);
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}

View file

@ -35,7 +35,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCardInYourGraveyard;
@ -56,7 +56,7 @@ public class GhoulcallersChant extends CardImpl {
// Choose one - Return target creature card from your graveyard to your hand
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
// or return two target Zombie cards from your graveyard to your hand.
Mode mode = new Mode();
mode.getEffects().add(new ReturnToHandTargetEffect());

View file

@ -45,7 +45,7 @@ import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.EmptyToken;
@ -80,7 +80,6 @@ public class GodPharaohsGift extends CardImpl {
class GodPharaohsGiftEffect extends OneShotEffect {
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card from your graveyard");
private final UUID exileId = UUID.randomUUID();
public GodPharaohsGiftEffect() {
@ -102,9 +101,9 @@ class GodPharaohsGiftEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = source.getSourceObject(game);
if (controller != null && sourceObject != null) {
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(filter);
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
target.setNotTarget(true);
if (!controller.getGraveyard().getCards(filter, game).isEmpty()
if (!controller.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD, game).isEmpty()
&& controller.choose(Outcome.PutCreatureInPlay, target, source.getId(), game)) {
Card cardChosen = game.getCard(target.getFirstTarget());
if (cardChosen != null

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.g;
import java.util.UUID;
@ -42,7 +41,7 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
@ -53,24 +52,23 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class GolgariGuildmage extends CardImpl {
public GolgariGuildmage (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B/G}{B/G}");
public GolgariGuildmage(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B/G}{B/G}");
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.SHAMAN);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{4}{B}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{4}{G}"));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}
public GolgariGuildmage (final GolgariGuildmage card) {
public GolgariGuildmage(final GolgariGuildmage card) {
super(card);
}

View file

@ -35,8 +35,8 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -51,15 +51,12 @@ import mage.target.common.TargetControlledPermanent;
*/
public class GraveExchange extends CardImpl {
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card from your graveyard");
public GraveExchange(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}{B}");
// Return target creature card from your graveyard to your hand.
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
// Target player sacrifices a creature.
this.getSpellAbility().addEffect(new GraveExchangeEffect());
this.getSpellAbility().addTarget(new TargetPlayer());

View file

@ -1,16 +1,16 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
@ -20,12 +20,11 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.g;
import java.util.UUID;
@ -37,7 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -47,14 +46,14 @@ import mage.target.common.TargetCardInYourGraveyard;
public class Gravedigger extends CardImpl {
public Gravedigger(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
this.subtype.add(SubType.ZOMBIE);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}

View file

@ -1,4 +1,4 @@
/*
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
@ -27,15 +27,15 @@
*/
package mage.cards.g;
import java.util.UUID;
import mage.abilities.Mode;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterLandCard;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
import mage.abilities.Mode;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterLandCard;
import mage.target.common.TargetCardInYourGraveyard;
/**
*
@ -43,19 +43,17 @@ package mage.cards.g;
*/
public class GrimDiscovery extends CardImpl {
private static final FilterCreatureCard filterCreatureCard = new FilterCreatureCard("creature card from your graveyard");
private static final FilterLandCard filterLandCard = new FilterLandCard("land card from your graveyard");
public GrimDiscovery(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
// Choose one or both -
this.getSpellAbility().getModes().setMinModes(1);
this.getSpellAbility().getModes().setMaxModes(2);
// Return target creature card from your graveyard to your hand;
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filterCreatureCard));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
// and/or return target land card from your graveyard to your hand.
Mode mode1 = new Mode();
mode1.getEffects().add(new ReturnToHandTargetEffect());

View file

@ -34,7 +34,7 @@ import mage.abilities.keyword.RecoverAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -42,16 +42,14 @@ import mage.target.common.TargetCardInYourGraveyard;
* @author fireshoes
*/
public class GrimHarvest extends CardImpl {
private static FilterCreatureCard filter = new FilterCreatureCard("creature card from your graveyard");
public GrimHarvest(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
// Return target creature card from your graveyard to your hand.
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
// Recover {2}{B}
this.addAbility(new RecoverAbility(new ManaCostsImpl("{2}{B}"), this));
}

View file

@ -36,7 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -46,11 +46,11 @@ import mage.target.common.TargetCardInYourGraveyard;
public class HauntedCrossroads extends CardImpl {
public HauntedCrossroads(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}");
// {B}: Put target creature card from your graveyard on top of your library.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutOnLibraryTargetEffect(true), new ManaCostsImpl("{B}"));
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}

View file

@ -35,7 +35,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -45,7 +45,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class HeadlessSkaab extends CardImpl {
public HeadlessSkaab(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.WARRIOR);
@ -53,7 +53,7 @@ public class HeadlessSkaab extends CardImpl {
this.toughness = new MageInt(6);
// As an additional cost to cast Headless Skaab, exile a creature card from your graveyard.
this.getSpellAbility().addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))));
this.getSpellAbility().addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)));
// Headless Skaab enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
}

View file

@ -38,10 +38,10 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.PhaseStep;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetControlledCreaturePermanent;
@ -52,18 +52,18 @@ import mage.target.common.TargetControlledCreaturePermanent;
public class HellsCaretaker extends CardImpl {
public HellsCaretaker(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
this.subtype.add(SubType.HORROR);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// {tap}, Sacrifice a creature: Return target creature card from your graveyard to the battlefield. Activate this ability only during your upkeep.
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new ReturnFromGraveyardToBattlefieldTargetEffect(),
new TapSourceCost(),
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new ReturnFromGraveyardToBattlefieldTargetEffect(),
new TapSourceCost(),
new IsStepCondition(PhaseStep.UPKEEP), null);
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}

View file

@ -40,7 +40,7 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -50,7 +50,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class HuaTuoHonoredPhysician extends CardImpl {
public HuaTuoHonoredPhysician(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
@ -59,7 +59,7 @@ public class HuaTuoHonoredPhysician extends CardImpl {
// {tap}: Put target creature card from your graveyard on top of your library. Activate this ability only during your turn, before attackers are declared.
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new PutOnLibraryTargetEffect(true), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}

View file

@ -40,7 +40,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -50,7 +50,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class KarmicGuide extends CardImpl {
public KarmicGuide(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}");
this.subtype.add(SubType.ANGEL);
this.subtype.add(SubType.SPIRIT);
@ -64,7 +64,7 @@ public class KarmicGuide extends CardImpl {
this.addAbility(new EchoAbility("{3}{W}{W}"));
// When Karmic Guide enters the battlefield, return target creature card from your graveyard to the battlefield.
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), false);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}

View file

@ -37,7 +37,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.target.TargetPermanent;
import mage.target.TargetPlayer;
@ -49,7 +49,7 @@ import mage.target.common.TargetCreatureOrPlayer;
* @author fireshoes
*/
public class KolaghansCommand extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("artifact");
static {
@ -57,33 +57,33 @@ public class KolaghansCommand extends CardImpl {
}
public KolaghansCommand(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}{R}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}{R}");
// Choose two -
// Choose two -
this.getSpellAbility().getModes().setMinModes(2);
this.getSpellAbility().getModes().setMaxModes(2);
// Return target creature card from your graveyard to your hand;
this.getSpellAbility().getEffects().add(new ReturnFromGraveyardToHandTargetEffect());
this.getSpellAbility().getTargets().add(new TargetCardInYourGraveyard(1, new FilterCreatureCard("creature card from your graveyard")));
// or Target player discards a card;
this.getSpellAbility().getTargets().add(new TargetCardInYourGraveyard(1, StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
// or Target player discards a card;
Mode mode = new Mode();
mode.getEffects().add(new DiscardTargetEffect(1));
mode.getTargets().add(new TargetPlayer());
this.getSpellAbility().getModes().addMode(mode);
this.getSpellAbility().getModes().addMode(mode);
// or Destroy target artifact;
mode = new Mode();
mode.getEffects().add(new DestroyTargetEffect());
mode.getTargets().add(new TargetPermanent(filter));
this.getSpellAbility().getModes().addMode(mode);
this.getSpellAbility().getModes().addMode(mode);
// or Kolaghan's Command deals 2 damage to target creature or player.
mode = new Mode();
mode.getEffects().add(new DamageTargetEffect(2));
mode.getTargets().add(new TargetCreatureOrPlayer());
this.getSpellAbility().getModes().addMode(mode);
this.getSpellAbility().getModes().addMode(mode);
}
public KolaghansCommand(final KolaghansCommand card) {

View file

@ -40,8 +40,8 @@ import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SpellAbilityType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.game.permanent.token.Token;
import mage.players.Player;
@ -64,7 +64,7 @@ public class LifeDeath extends SplitCard {
// Death
// Return target creature card from your graveyard to the battlefield. You lose life equal to its converted mana cost.
Target target = new TargetCardInYourGraveyard(1, new FilterCreatureCard("creature card from your graveyard"));
Target target = new TargetCardInYourGraveyard(1, StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
getRightHalfCard().getSpellAbility().addTarget(target);
getRightHalfCard().getSpellAbility().addEffect(new DeathEffect());

View file

@ -40,7 +40,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
@ -75,7 +75,7 @@ public class LilianaDeathsMajesty extends CardImpl {
// -3: Return target creature card from your graveyard to the battlefield. That creature is a black Zombie in addition to its other colors and types.
ability = new LoyaltyAbility(new BecomesBlackZombieAdditionEffect() // because the effect has to be active for triggered effects that e.g. check if the creature entering is a Zombie, the continuous effect needs to be added before the card moving effect is applied
.setText(""), -3);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
ability.addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()
.setText("Return target creature card from your graveyard to the battlefield. That creature is a black Zombie in addition to its other colors and types"));
this.addAbility(ability);

View file

@ -40,12 +40,12 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.command.emblems.LilianaTheLastHopeEmblem;
import mage.players.Player;
@ -114,7 +114,7 @@ class LilianaTheLastHopeEffect extends OneShotEffect {
if (controller == null) {
return false;
}
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"));
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
target.setNotTarget(true);
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)
&& controller.chooseUse(outcome, "Return a creature card from your graveyard to hand?", source, game)

View file

@ -45,7 +45,7 @@ import mage.constants.SubLayer;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.counters.Counters;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -59,11 +59,11 @@ import mage.target.targetpointer.FixedTarget;
public class MakeshiftMannequin extends CardImpl {
public MakeshiftMannequin(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{B}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B}");
// Return target creature card from your graveyard to the battlefield with a mannequin counter on it. For as long as that creature has a mannequin counter on it, it has "When this creature becomes the target of a spell or ability, sacrifice it."
this.getSpellAbility().addEffect(new MakeshiftMannequinEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
}
public MakeshiftMannequin(final MakeshiftMannequin card) {

View file

@ -34,7 +34,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -44,7 +44,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class MakeshiftMauler extends CardImpl {
public MakeshiftMauler(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.HORROR);
@ -52,7 +52,7 @@ public class MakeshiftMauler extends CardImpl {
this.toughness = new MageInt(5);
// As an additional cost to cast Makeshift Mauler, exile a creature card from your graveyard.
this.getSpellAbility().addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))));
this.getSpellAbility().addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)));
}
public MakeshiftMauler(final MakeshiftMauler card) {

View file

@ -35,7 +35,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCardInYourGraveyard;
@ -57,7 +57,7 @@ public class MarchOfTheDrowned extends CardImpl {
// Choose one
// • Return target creature card from your graveyard to your hand.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
// • Return two target Pirate cards from your graveyard to your hand.
Mode mode = new Mode();
mode.getEffects().add(new ReturnFromGraveyardToHandTargetEffect());

View file

@ -33,7 +33,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -42,13 +42,12 @@ import mage.target.common.TargetCardInYourGraveyard;
*/
public class MidnightRecovery extends CardImpl {
public MidnightRecovery (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}");
public MidnightRecovery(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}");
// Return target creature card from your graveyard to your hand.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
// Cipher (Then you may exilce this spell card encoded on a creature you control. Whenever that creature deals combat damage to a player, its controller may cast a copy of the encoded card without paying its mana cost.)
this.getSpellAbility().addEffect(new CipherEffect());
@ -60,7 +59,7 @@ public class MidnightRecovery extends CardImpl {
}
@Override
public MidnightRecovery copy() {
public MidnightRecovery copy() {
return new MidnightRecovery(this);
}
}

View file

@ -38,7 +38,7 @@ import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.token.ZombieToken;
import mage.players.Player;
@ -50,14 +50,12 @@ import mage.target.common.TargetCardInYourGraveyard;
*/
public class MidnightRitual extends CardImpl {
private final FilterCreatureCard filter = new FilterCreatureCard("creature card from your graveyard");
public MidnightRitual(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{2}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{2}{B}");
// Exile X target creature cards from your graveyard.
// For each creature card exiled this way, create a 2/2 black Zombie creature token.
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().addEffect(new MidnightRitualEffect());
}
@ -65,7 +63,7 @@ public class MidnightRitual extends CardImpl {
public void adjustTargets(Ability ability, Game game) {
if (ability instanceof SpellAbility) {
ability.getTargets().clear();
ability.addTarget(new TargetCardInYourGraveyard(ability.getManaCostsToPay().getX(), filter));
ability.addTarget(new TargetCardInYourGraveyard(ability.getManaCostsToPay().getX(), StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
}
}

View file

@ -37,7 +37,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -51,11 +51,11 @@ import mage.target.common.TargetCreatureOrPlayer;
public class MorgueBurst extends CardImpl {
public MorgueBurst(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}{R}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}{R}");
// Return target creature card from your graveyard to your hand. Morgue Burst deals damage to target creature or player equal to the power of the card returned this way.
this.getSpellAbility().addEffect(new MorgueBurstEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
}

View file

@ -36,7 +36,7 @@ import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -46,14 +46,14 @@ import mage.target.common.TargetCardInYourGraveyard;
public class MortuaryMire extends CardImpl {
public MortuaryMire(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// Mortuary Mire enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// When Mortuary Mire enters the battlefield, you may put target creature card from your graveyard on top of your library.
Ability ability = new EntersBattlefieldTriggeredAbility(new PutOnLibraryTargetEffect(true), true);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
// {T}: Add {B} to your mana pool.

View file

@ -36,10 +36,10 @@ 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.TargetController;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetCreaturePermanent;
@ -51,7 +51,7 @@ import mage.target.common.TargetCreaturePermanent;
public class NecromanticThirst extends CardImpl {
public NecromanticThirst(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{B}");
this.subtype.add(SubType.AURA);
// Enchant creature
@ -59,13 +59,13 @@ public class NecromanticThirst extends CardImpl {
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit));
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
// Whenever enchanted creature deals combat damage to a player, you may return target creature card from your graveyard to your hand.
Ability ability = new DealsDamageToAPlayerAttachedTriggeredAbility(
new ReturnFromGraveyardToHandTargetEffect(),
new ReturnFromGraveyardToHandTargetEffect(),
"enchanted creature", true, false, true, TargetController.ANY);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.addAbility(ability);
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}
public NecromanticThirst(final NecromanticThirst card) {

View file

@ -39,7 +39,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.permanent.token.ZombieToken;
import mage.target.common.TargetCardInYourGraveyard;
@ -50,7 +50,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class NullCaller extends CardImpl {
public NullCaller(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
this.subtype.add(SubType.VAMPIRE);
this.subtype.add(SubType.SHAMAN);
this.power = new MageInt(2);
@ -60,7 +60,7 @@ public class NullCaller extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new CreateTokenEffect(new ZombieToken(), 1, true, false),
new ManaCostsImpl<>("{3}{B}"));
ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))));
ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)));
this.addAbility(ability);
}

View file

@ -38,6 +38,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.target.common.TargetCardInGraveyard;
@ -48,12 +49,12 @@ import mage.target.common.TargetCardInGraveyard;
public class OversoldCemetery extends CardImpl {
public OversoldCemetery(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
// At the beginning of your upkeep, if you have four or more creature cards in your graveyard, you may return target creature card from your graveyard to your hand.
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), TargetController.YOU, true);
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), TargetController.YOU, true);
ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard()));
CardsInControllerGraveCondition condition = new CardsInControllerGraveCondition(4, new FilterCreatureCard("creature card from your graveyard"));
CardsInControllerGraveCondition condition = new CardsInControllerGraveCondition(4, StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
this.addAbility(new ConditionalTriggeredAbility(ability, condition, "At the beginning of your upkeep, if you have four or more creature cards in your graveyard, you may return target creature card from your graveyard to your hand."));
}

View file

@ -36,10 +36,10 @@ import mage.cards.Card;
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.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.Target;
@ -52,7 +52,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class PhyrexianDelver extends CardImpl {
public PhyrexianDelver(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
this.subtype.add(SubType.ZOMBIE);
this.power = new MageInt(3);
@ -60,7 +60,7 @@ public class PhyrexianDelver extends CardImpl {
// When Phyrexian Delver enters the battlefield, return target creature card from your graveyard to the battlefield. You lose life equal to that card's converted mana cost.
Ability ability = new EntersBattlefieldTriggeredAbility(new PhyrexianDelverEffect(), false);
Target target = new TargetCardInYourGraveyard(1, new FilterCreatureCard("creature card from your graveyard"));
Target target = new TargetCardInYourGraveyard(1, StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
ability.addTarget(target);
this.addAbility(ability);
}

View file

@ -37,7 +37,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -47,13 +47,12 @@ import mage.target.common.TargetCardInYourGraveyard;
public class PhyrexianReclamation extends CardImpl {
public PhyrexianReclamation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}");
// {1}{B}, Pay 2 life: Return target creature card from your graveyard to your hand.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{1}{B}"));
ability.addCost(new PayLifeCost(2));
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}

View file

@ -39,6 +39,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.players.Player;
@ -51,7 +52,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class PitKeeper extends CardImpl {
public PitKeeper(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(2);
@ -59,7 +60,7 @@ public class PitKeeper extends CardImpl {
// When Pit Keeper enters the battlefield, if you have four or more creature cards in your graveyard, you may return target creature card from your graveyard to your hand.
TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true);
triggeredAbility.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
triggeredAbility.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(new ConditionalTriggeredAbility(
triggeredAbility,
new CreatureCardsInControllerGraveCondition(4),
@ -77,6 +78,7 @@ public class PitKeeper extends CardImpl {
}
class CreatureCardsInControllerGraveCondition implements Condition {
private int value;
public CreatureCardsInControllerGraveCondition(int value) {
@ -86,10 +88,9 @@ class CreatureCardsInControllerGraveCondition implements Condition {
@Override
public boolean apply(Game game, Ability source) {
Player p = game.getPlayer(source.getControllerId());
if (p != null && p.getGraveyard().count(new FilterCreatureCard(), game) >= value)
{
return true;
if (p != null && p.getGraveyard().count(new FilterCreatureCard(), game) >= value) {
return true;
}
return false;
}
}
}

View file

@ -40,6 +40,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.game.Game;
@ -58,7 +59,7 @@ public class PostmortemLunge extends CardImpl {
// Return target creature card with converted mana cost X from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step.
this.getSpellAbility().addEffect(new PostmortemLungeEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
}
public PostmortemLunge(final PostmortemLunge card) {

View file

@ -39,12 +39,12 @@ import mage.cards.CardSetInfo;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.filter.predicate.other.OwnerPredicate;
import mage.game.Game;
import mage.players.Player;
@ -58,12 +58,13 @@ import mage.target.common.TargetCardInYourGraveyard;
public class PulsemageAdvocate extends CardImpl {
private static final FilterCard filter = new FilterCard("cards from an opponent's graveyard");
static {
filter.add(new OwnerPredicate(TargetController.NOT_YOU));
}
public PulsemageAdvocate(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(1);
@ -72,7 +73,7 @@ public class PulsemageAdvocate extends CardImpl {
// {tap}: Return three target cards from an opponent's graveyard to his or her hand. Return target creature card from your graveyard to the battlefield.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PulsemageAdvocateEffect(), new TapSourceCost());
ability.addTarget(new TargetCardInASingleGraveyard(3, 3, filter));
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}

View file

@ -32,7 +32,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -41,15 +41,11 @@ import mage.target.common.TargetCardInYourGraveyard;
*/
public class RaiseDead extends CardImpl {
private static FilterCreatureCard filter = new FilterCreatureCard("creature card from your graveyard");
public RaiseDead(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}");
// Return target creature card from your graveyard to your hand.
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
}

View file

@ -39,7 +39,7 @@ import mage.abilities.keyword.PartnerAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -51,7 +51,7 @@ public class RavosSoultender extends CardImpl {
public RavosSoultender(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{B}");
addSuperType(SuperType.LEGENDARY);
addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(2);
@ -65,7 +65,7 @@ public class RavosSoultender extends CardImpl {
// At the beginning of your upkeep, you may return target creature card from your graveyard to your hand.
Ability ability = new BeginningOfUpkeepTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), TargetController.YOU, true);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
// Partner

View file

@ -33,7 +33,7 @@ import mage.abilities.keyword.StormAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -45,8 +45,8 @@ public class ReapingTheGraves extends CardImpl {
public ReapingTheGraves(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}");
// Return target creature card from your graveyard to your hand.
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
// Return target creature card from your graveyard to your hand.
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect().setText("Return target creature card from your graveyard to your hand."));
// Storm
this.addAbility(new StormAbility());

View file

@ -33,7 +33,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -42,14 +42,11 @@ import mage.target.common.TargetCardInYourGraveyard;
*/
public class Recover extends CardImpl {
private static FilterCreatureCard filter = new FilterCreatureCard("creature card from your graveyard");
public Recover(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}");
// Return target creature card from your graveyard to your hand.
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
// Draw a card.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));

View file

@ -35,7 +35,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -45,14 +45,14 @@ import mage.target.common.TargetCardInYourGraveyard;
public class RelentlessSkaabs extends CardImpl {
public RelentlessSkaabs(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
this.subtype.add(SubType.ZOMBIE);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// As an additional cost to cast Relentless Skaabs, exile a creature card from your graveyard.
this.getSpellAbility().addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))));
this.getSpellAbility().addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)));
// Undying
this.addAbility(new UndyingAbility());
}

View file

@ -27,22 +27,14 @@
*/
package mage.cards.r;
import java.util.List;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterArtifactCard;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.target.Target;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -51,26 +43,25 @@ import mage.target.common.TargetCardInYourGraveyard;
*/
public class RememberTheFallen extends CardImpl {
private static final FilterCreatureCard filterCreature = new FilterCreatureCard("creature card from your graveyard");
private static final FilterArtifactCard filterArtifact = new FilterArtifactCard("artifact card from your graveyard");
public RememberTheFallen(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{W}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{W}");
// Choose one or both
this.getSpellAbility().getModes().setMinModes(1);
this.getSpellAbility().getModes().setMaxModes(2);
// Return target creature card from your graveyard to your hand.
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filterCreature));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
// Return target artifact card from your graveyard to your hand.
Mode mode = new Mode();
mode.getEffects().add(new ReturnToHandTargetEffect());
mode.getTargets().add(new TargetCardInYourGraveyard(filterArtifact));
this.getSpellAbility().addMode(mode);
mode = new Mode();
mode.getTargets().add(new TargetCardInYourGraveyard(filterCreature));
mode.getTargets().add(new TargetCardInYourGraveyard(filterArtifact));
mode.getEffects().add(new RememberTheFallenEffect());
this.getSpellAbility().addMode(mode);
}
public RememberTheFallen(final RememberTheFallen card) {
@ -82,34 +73,3 @@ public class RememberTheFallen extends CardImpl {
return new RememberTheFallen(this);
}
}
class RememberTheFallenEffect extends OneShotEffect {
public RememberTheFallenEffect() {
super(Outcome.ReturnToHand);
this.staticText = "Return target creature card and target artifact card from your graveyard to your hand";
}
public RememberTheFallenEffect(final RememberTheFallenEffect effect) {
super(effect);
}
@Override
public RememberTheFallenEffect copy() {
return new RememberTheFallenEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
for (Target target : source.getTargets()) {
List<UUID> targets = target.getTargets();
for (UUID targetId : targets) {
Card card = game.getCard(targetId);
if (card != null) {
card.moveToZone(Zone.HAND, source.getSourceId(), game, true);
}
}
}
return true;
}
}

View file

@ -34,7 +34,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetCreaturePermanent;
import mage.target.targetpointer.SecondTargetPointer;
@ -46,7 +46,7 @@ import mage.target.targetpointer.SecondTargetPointer;
public class Repurpose extends CardImpl {
public Repurpose(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}{B}");
// Destroy target creature.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
@ -57,7 +57,7 @@ public class Repurpose extends CardImpl {
effect.setTargetPointer(SecondTargetPointer.getInstance());
effect.setText("Return up to one target creature card from graveyard to your hand.");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 1, new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 1, StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
}
public Repurpose(final Repurpose card) {

View file

@ -27,6 +27,7 @@
*/
package mage.cards.r;
import java.util.UUID;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
@ -34,12 +35,10 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledArtifactPermanent;
import mage.filter.common.FilterCreatureCard;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/**
*
* @author LevelX2
@ -50,7 +49,7 @@ public class ResourcefulReturn extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
// Return target creature card from your graveyard to your hand. If you control an artifact, draw a card.
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1),
new PermanentsOnTheBattlefieldCondition(new FilterControlledArtifactPermanent()),

View file

@ -37,7 +37,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.target.Target;
import mage.target.common.TargetCardInYourGraveyard;
@ -49,7 +49,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class RestlessDreams extends CardImpl {
public RestlessDreams(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}");
// As an additional cost to cast Restless Dreams, discard X cards.
this.getSpellAbility().addCost(new DiscardXTargetCost(new FilterCard("cards"), true));
@ -62,14 +62,14 @@ public class RestlessDreams extends CardImpl {
public RestlessDreams(final RestlessDreams card) {
super(card);
}
@Override
public void adjustTargets(Ability ability, Game game) {
int xValue = new GetXValue().calculate(game, ability, null);
Target target = new TargetCardInYourGraveyard(xValue, new FilterCreatureCard("creature card from your graveyard"));
ability.addTarget(target);
Target target = new TargetCardInYourGraveyard(xValue, StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
ability.addTarget(target);
}
@Override
public RestlessDreams copy() {
return new RestlessDreams(this);

View file

@ -32,7 +32,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -42,12 +42,11 @@ import mage.target.common.TargetCardInYourGraveyard;
public class Resurrection extends CardImpl {
public Resurrection(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{W}{W}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{W}{W}");
// Return target creature card from your graveyard to the battlefield.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
}

View file

@ -32,7 +32,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -42,11 +42,11 @@ import mage.target.common.TargetCardInYourGraveyard;
public class ReturnToBattle extends CardImpl {
public ReturnToBattle(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}");
// Return target creature card from your graveyard to your hand.
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
}
public ReturnToBattle(final ReturnToBattle card) {

View file

@ -34,7 +34,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.target.common.TargetCardInYourGraveyard;
@ -51,16 +51,15 @@ public class RevivingMelody extends CardImpl {
}
public RevivingMelody(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}");
// Choose one or both -
// Choose one or both -
this.getSpellAbility().getModes().setMinModes(1);
this.getSpellAbility().getModes().setMaxModes(2);
//Return target creature card from your graveyard to your hand;
this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
// and/or return target enchantment card from your graveyard to your hand.
Mode mode = new Mode();
mode.getEffects().add(new ReturnFromGraveyardToHandTargetEffect());

View file

@ -39,7 +39,7 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.TargetController;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -49,7 +49,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class ReyaDawnbringer extends CardImpl {
public ReyaDawnbringer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{W}{W}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{W}{W}{W}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.ANGEL);
@ -57,7 +57,7 @@ public class ReyaDawnbringer extends CardImpl {
this.toughness = new MageInt(6);
this.addAbility(FlyingAbility.getInstance());
Ability ability = new BeginningOfUpkeepTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), TargetController.YOU, true);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}

View file

@ -41,7 +41,6 @@ import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.TargetController;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -63,7 +62,7 @@ public class SheoldredWhisperingOne extends CardImpl {
// At the beginning of your upkeep, return target creature card from your graveyard to the battlefield.
Ability ability = new BeginningOfUpkeepTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(false), TargetController.YOU, false);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
// At the beginning of each opponent's upkeep, that player sacrifices a creature.

View file

@ -37,7 +37,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -47,7 +47,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class SibsigMuckdraggers extends CardImpl {
public SibsigMuckdraggers(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{8}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{8}{B}");
this.subtype.add(SubType.ZOMBIE);
this.power = new MageInt(3);
this.toughness = new MageInt(6);
@ -56,7 +56,7 @@ public class SibsigMuckdraggers extends CardImpl {
this.addAbility(new DelveAbility());
// When Sibsig Muckdraggers enters the battlefield, return target creature card from your graveyard to your hand.
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}

View file

@ -35,7 +35,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -45,7 +45,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class SkaabGoliath extends CardImpl {
public SkaabGoliath(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}");
this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.GIANT);
@ -53,7 +53,7 @@ public class SkaabGoliath extends CardImpl {
this.toughness = new MageInt(9);
// As an additional cost to cast Skaab Goliath, exile two creature cards from your graveyard.
this.getSpellAbility().addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(2, 2, new FilterCreatureCard("creature card from your graveyard"))));
this.getSpellAbility().addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(2, 2, StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)));
this.addAbility(TrampleAbility.getInstance());
}

View file

@ -39,11 +39,11 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AsThoughEffectType;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.target.common.TargetCardInYourGraveyard;
@ -54,7 +54,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class SkaabRuinator extends CardImpl {
public SkaabRuinator(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}");
this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.HORROR);
@ -62,11 +62,11 @@ public class SkaabRuinator extends CardImpl {
this.toughness = new MageInt(6);
// As an additional cost to cast Skaab Ruinator, exile three creature cards from your graveyard.
this.getSpellAbility().addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(3, 3, new FilterCreatureCard("creature card from your graveyard"))));
this.getSpellAbility().addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(3, 3, StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)));
// Flying
this.addAbility(FlyingAbility.getInstance());
// You may cast Skaab Ruinator from your graveyard.
this.addAbility(new SimpleStaticAbility(Zone.GRAVEYARD, new SkaabRuinatorPlayEffect()));
}
@ -81,7 +81,6 @@ public class SkaabRuinator extends CardImpl {
}
}
class SkaabRuinatorPlayEffect extends AsThoughEffectImpl {
public SkaabRuinatorPlayEffect() {
@ -105,8 +104,8 @@ class SkaabRuinatorPlayEffect extends AsThoughEffectImpl {
@Override
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
if (objectId.equals(source.getSourceId()) &&
affectedControllerId.equals(source.getControllerId())) {
if (objectId.equals(source.getSourceId())
&& affectedControllerId.equals(source.getControllerId())) {
Card card = game.getCard(source.getSourceId());
if (card != null && game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) {
return true;

View file

@ -27,6 +27,7 @@
*/
package mage.cards.s;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.costs.Cost;
import mage.abilities.costs.common.ExileTargetCost;
@ -38,14 +39,12 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
/**
* @author MarcoMarin
*/
@ -58,7 +57,7 @@ public class SoulExchange extends CardImpl {
Cost cost = new ExileTargetCost(new TargetControlledCreaturePermanent());
this.getSpellAbility().addCost(cost);
// Return target creature card from your graveyard to the battlefield. Put a +2/+2 counter on that creature if the exiled creature was a Thrull.
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().addEffect(new SoulExchangeEffect());
}
@ -92,10 +91,12 @@ class SoulExchangeEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
ReturnFromGraveyardToBattlefieldTargetEffect effect = new ReturnFromGraveyardToBattlefieldTargetEffect();
if (!effect.apply(game, source)) return false;
if (!effect.apply(game, source)) {
return false;
}
for (Cost c : source.getCosts()) {
/* if (!c.getTargets().isEmpty()){
/* if (!c.getTargets().isEmpty()){
UUID t = c.getTargets().getFirstTarget();
Permanent exiled = game.getPermanentOrLKIBattlefield(t);*/
if (c.isPaid() && c instanceof ExileTargetCost) {
@ -105,10 +106,12 @@ class SoulExchangeEffect extends OneShotEffect {
game.getPermanent(source.getFirstTarget()).addCounters(CounterType.P2P2.createInstance(), source, game);
return true;
}
} else return false;
} else {
return false;
}
}
}
}
return true;
}
}
}

View file

@ -35,7 +35,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterSpell;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.target.TargetSpell;
import mage.target.common.TargetCardInYourGraveyard;
@ -45,34 +45,30 @@ import mage.target.common.TargetCardInYourGraveyard;
* @author jeffwadsworth
*/
public class SoulManipulation extends CardImpl {
private static final FilterSpell filter = new FilterSpell("creature spell");
private static final FilterCreatureCard filter2 = new FilterCreatureCard("creature card from your graveyard");
static {
filter.add(new CardTypePredicate(CardType.CREATURE));
}
public SoulManipulation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}{B}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}{B}");
// Choose one or both -
this.getSpellAbility().getModes().setMinModes(1);
this.getSpellAbility().getModes().setMaxModes(2);
// Counter target creature spell;
this.getSpellAbility().addEffect(new CounterTargetEffect());
this.getSpellAbility().addTarget(new TargetSpell(filter));
// and/or return target creature card from your graveyard to your hand.
Mode mode = new Mode();
mode.getEffects().add(new ReturnFromGraveyardToHandTargetEffect());
mode.getTargets().add(new TargetCardInYourGraveyard(filter2));
mode.getTargets().add(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().addMode(mode);
}
public SoulManipulation(final SoulManipulation card) {

View file

@ -42,7 +42,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.token.ZombieToken2;
import mage.players.Player;
@ -55,7 +55,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class SoulSeparator extends CardImpl {
public SoulSeparator(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
// {5}, {T}, Sacrifice Soul Separator: Exile target creature card from your graveyard.
// Create a token that's a copy of that card except it's 1/1, it's a Spirit in addition to its other types, and it has flying.
@ -66,7 +66,7 @@ public class SoulSeparator extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, copyEffect, new ManaCostsImpl("{5}"));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
ability.addEffect(new SoulSeparatorEffect());
this.addAbility(ability);
}

View file

@ -27,17 +27,16 @@
*/
package mage.cards.s;
import java.util.UUID;
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.abilities.keyword.SpliceOntoArcaneAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/**
*
* @author LevelX2
@ -45,13 +44,12 @@ import java.util.UUID;
public class SoullessRevival extends CardImpl {
public SoullessRevival(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
this.subtype.add(SubType.ARCANE);
// Return target creature card from your graveyard to your hand.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
// Splice onto Arcane {1}{B}
this.addAbility(new SpliceOntoArcaneAbility("{1}{B}"));
}

View file

@ -36,7 +36,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -46,7 +46,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class StitchTogether extends CardImpl {
public StitchTogether(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}{B}");
// Return target creature card from your graveyard to your hand.
// Threshold - Return that card from your graveyard to the battlefield instead if seven or more cards are in your graveyard.
@ -56,7 +56,7 @@ public class StitchTogether extends CardImpl {
new CardsInControllerGraveCondition(7),
"Return target creature card from your graveyard to your hand. <br/><br/><i>Threshold</i> - Return that card from your graveyard to the battlefield instead if seven or more cards are in your graveyard.");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
}
public StitchTogether(final StitchTogether card) {

View file

@ -35,7 +35,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -44,7 +44,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class StitchedDrake extends CardImpl {
public StitchedDrake(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}");
this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.DRAKE);
@ -54,7 +54,7 @@ public class StitchedDrake extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// As an additional cost to cast Stitched Drake, exile a creature card from your graveyard.
this.getSpellAbility().addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))));
this.getSpellAbility().addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)));
}
public StitchedDrake(final StitchedDrake card) {

View file

@ -39,8 +39,8 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetControlledPermanent;
@ -56,16 +56,15 @@ public class StrandsOfNight extends CardImpl {
static {
filter.add(new SubtypePredicate(SubType.SWAMP));
}
public StrandsOfNight(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}{B}");
public StrandsOfNight(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{B}");
// {B}{B}, Pay 2 life, Sacrifice a Swamp: Return target creature card from your graveyard to the battlefield.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToBattlefieldTargetEffect(), new ManaCostsImpl("{B}{B}"));
ability.addCost(new PayLifeCost(2));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}

View file

@ -39,7 +39,7 @@ import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterLandCard;
import mage.game.Game;
import mage.players.Player;
@ -53,7 +53,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class SuddenReclamation extends CardImpl {
public SuddenReclamation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{G}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}");
// Put the top four cards of your library into your graveyard, then return a creature card and a land card from your graveyard to your hand.
this.getSpellAbility().addEffect(new PutTopCardOfLibraryIntoGraveControllerEffect(4));
@ -91,7 +91,7 @@ class SuddenReclamationEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Cards cardsToHand = new CardsImpl();
Target target = new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"));
Target target = new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
target.setNotTarget(true);
if (target.canChoose(source.getSourceId(), controller.getId(), game)
&& controller.chooseTarget(outcome, target, source, game)) {

View file

@ -44,10 +44,10 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.DamagedPlayerEvent;
import mage.game.events.GameEvent;
@ -70,7 +70,7 @@ public class SwordOfLightAndShadow extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ProtectionAbility.from(ObjectColor.WHITE, ObjectColor.BLACK), AttachmentType.EQUIPMENT)));
// Whenever equipped creature deals combat damage to a player, you gain 3 life and you may return up to one target creature card from your graveyard to your hand.
Ability ability = new SwordOfLightAndShadowAbility();
ability.addTarget(new TargetCardInYourGraveyard(0, 1, new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(0, 1, StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
// Equip {2}
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2)));

View file

@ -37,6 +37,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.target.common.TargetCardInYourGraveyard;
@ -47,13 +48,13 @@ import mage.target.common.TargetCardInYourGraveyard;
public class TorturedExistence extends CardImpl {
public TorturedExistence(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}");
// {B}, Discard a creature card: Return target creature card from your graveyard to your hand.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), new ManaCostsImpl("{B}"));
ability.addCost(new DiscardCardCost(new FilterCreatureCard()));
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.addAbility(ability);
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}
public TorturedExistence(final TorturedExistence card) {

View file

@ -44,6 +44,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.target.Target;
import mage.target.common.TargetCardInYourGraveyard;
@ -55,29 +56,29 @@ import mage.target.common.TargetCardInYourGraveyard;
public class TriassicEgg extends CardImpl {
public TriassicEgg(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
// {3}, {tap}: Put a hatchling counter on Triassic Egg.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new AddCountersSourceEffect(CounterType.HATCHLING.createInstance(), true),
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new AddCountersSourceEffect(CounterType.HATCHLING.createInstance(), true),
new GenericManaCost(3));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
// Sacrifice Triassic Egg: Choose one - You may put a creature card from your hand onto the battlefield;
ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new PutPermanentOnBattlefieldEffect(new FilterCreatureCard("a creature card")),
new SacrificeSourceCost(),
new SourceHasCounterCondition(CounterType.HATCHLING, 2, Integer.MAX_VALUE),
"Sacrifice Triassic Egg: Choose one - You may put a creature card from your hand onto the battlefield; or return target creature card from your graveyard to the battlefield. Activate this ability only if two or more hatchling counters are on {this}.");
// or return target creature card from your graveyard to the battlefield. Activate this ability only if two or more hatchling counters are on Triassic Egg.
Mode mode = new Mode();
mode.getEffects().add(new ReturnFromGraveyardToBattlefieldTargetEffect());
Target target = new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"));
Target target = new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
mode.getTargets().add(target);
ability.addMode(mode);
this.addAbility(ability);
}
@ -89,4 +90,4 @@ public class TriassicEgg extends CardImpl {
public TriassicEgg copy() {
return new TriassicEgg(this);
}
}
}

View file

@ -35,7 +35,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TimingRule;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -44,12 +44,11 @@ import mage.target.common.TargetCardInYourGraveyard;
public class UnburialRites extends CardImpl {
public UnburialRites(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}");
// Return target creature card from your graveyard to the battlefield.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
// Flashback {3}{W}
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{3}{W}"), TimingRule.SORCERY));

View file

@ -40,7 +40,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -49,10 +49,8 @@ import mage.target.common.TargetCardInYourGraveyard;
*/
public class Undertaker extends CardImpl {
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card from your graveyard");
public Undertaker(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SPELLSHAPER);
@ -60,8 +58,8 @@ public class Undertaker extends CardImpl {
this.toughness = new MageInt(1);
// {B}, {tap}, Discard a card: Return target creature card from your graveyard to your hand.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(),new ManaCostsImpl("{B}"));
ability.addTarget(new TargetCardInYourGraveyard(filter));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{B}"));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
ability.addCost(new TapSourceCost());
ability.addCost(new DiscardCardCost());
this.addAbility(ability);

View file

@ -38,7 +38,7 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.target.common.TargetCardInYourGraveyard;
@ -49,7 +49,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class WarrenPilferers extends CardImpl {
public WarrenPilferers(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
this.subtype.add(SubType.GOBLIN);
this.subtype.add(SubType.ROGUE);
@ -58,7 +58,7 @@ public class WarrenPilferers extends CardImpl {
// When Warren Pilferers enters the battlefield, return target creature card from your graveyard to your hand. If that card is a Goblin card, Warren Pilferers gains haste until end of turn.
Ability ability = new EntersBattlefieldTriggeredAbility(new WarrenPilferersReturnEffect(), false);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}

View file

@ -48,7 +48,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
@ -64,7 +63,7 @@ import mage.target.targetpointer.FixedTarget;
public class WhipOfErebos extends CardImpl {
public WhipOfErebos(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.ARTIFACT},"{2}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.ARTIFACT}, "{2}{B}{B}");
addSuperType(SuperType.LEGENDARY);
// Creatures you control have lifelink.
@ -75,7 +74,7 @@ public class WhipOfErebos extends CardImpl {
// Activate this ability only any time you could cast a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new WhipOfErebosEffect(), new ManaCostsImpl("{2}{B}{B}"));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
ability.addEffect(new WhipOfErebosReplacementEffect());
this.addAbility(ability);
}

View file

@ -32,7 +32,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInGraveyard;
/**
@ -42,12 +42,11 @@ import mage.target.common.TargetCardInGraveyard;
public class WildwoodRebirth extends CardImpl {
public WildwoodRebirth(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}");
// Return target creature card from your graveyard to your hand.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
}
public WildwoodRebirth(final WildwoodRebirth card) {

View file

@ -37,7 +37,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -47,7 +47,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class Woebearer extends CardImpl {
public Woebearer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
this.subtype.add(SubType.ZOMBIE);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
@ -56,7 +56,7 @@ public class Woebearer extends CardImpl {
this.addAbility(FearAbility.getInstance());
// Whenever Woebearer deals combat damage to a player, you may return target creature card from your graveyard to your hand.
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new ReturnToHandTargetEffect(), true);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability);
}

View file

@ -38,7 +38,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.TargetPlayer;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetCreaturePermanent;
@ -50,30 +50,30 @@ import mage.target.common.TargetCreaturePermanent;
public class WretchedConfluence extends CardImpl {
public WretchedConfluence(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B}{B}");
// Choose three. You may choose the same mode more than once.
// Choose three. You may choose the same mode more than once.
this.getSpellAbility().getModes().setMinModes(3);
this.getSpellAbility().getModes().setMaxModes(3);
this.getSpellAbility().getModes().setEachModeMoreThanOnce(true);
// - Target player draws a card and loses 1 life;
// - Target player draws a card and loses 1 life;
Effect effect = new LoseLifeTargetEffect(1);
effect.setText("and loses 1 life");
this.getSpellAbility().addEffect(new DrawCardTargetEffect(1));
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetPlayer());
// Target creature gets -2/-2 until end of turn;
// Target creature gets -2/-2 until end of turn;
Mode mode = new Mode();
mode.getEffects().add(new BoostTargetEffect(-2, -2, Duration.EndOfTurn));
mode.getTargets().add(new TargetCreaturePermanent());
this.getSpellAbility().getModes().addMode(mode);
// Return target creature card from your graveyard to your hand.
mode = new Mode();
mode.getEffects().add(new ReturnFromGraveyardToHandTargetEffect());
mode.getTargets().add(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
mode.getTargets().add(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().getModes().addMode(mode);
}

View file

@ -32,7 +32,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -42,12 +42,11 @@ import mage.target.common.TargetCardInYourGraveyard;
public class Zombify extends CardImpl {
public Zombify(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}");
// Return target creature card from your graveyard to the battlefield.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
}
public Zombify(final Zombify card) {

View file

@ -89,6 +89,9 @@ public class AuraReplacementEffect extends ReplacementEffectImpl {
if (game.getState().getValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + card.getId()) != null) {
card = card.getSecondCardFace();
if (!card.isEnchantment() || !card.hasSubtype(SubType.AURA, game)) {
return false;
}
}
// Aura cards that go to battlefield face down (Manifest) don't have to select targets
@ -210,9 +213,9 @@ public class AuraReplacementEffect extends ReplacementEffectImpl {
if (card != null && (card.isEnchantment() && card.hasSubtype(SubType.AURA, game)
|| // in case of transformable enchantments
(game.getState().getValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + card.getId()) != null
&& card.getSecondCardFace() != null
&& card.getSecondCardFace().isEnchantment()
&& card.getSecondCardFace().hasSubtype(SubType.AURA, game)))) {
&& card.getSecondCardFace() != null
&& card.getSecondCardFace().isEnchantment()
&& card.getSecondCardFace().hasSubtype(SubType.AURA, game)))) {
return true;
}
}

View file

@ -43,8 +43,17 @@ import mage.players.Player;
public class ReturnToBattlefieldUnderYourControlAttachedEffect extends OneShotEffect {
public ReturnToBattlefieldUnderYourControlAttachedEffect() {
this("that card");
}
/**
*
* @param objectText text for the object to return (default: "that card") if
* you use constructor without this param
*/
public ReturnToBattlefieldUnderYourControlAttachedEffect(String objectText) {
super(Outcome.Benefit);
staticText = "return that card to the battlefield under your control";
staticText = "return " + objectText + " to the battlefield under your control";
}
public ReturnToBattlefieldUnderYourControlAttachedEffect(final ReturnToBattlefieldUnderYourControlAttachedEffect effect) {

View file

@ -43,9 +43,9 @@ public enum Zone {
OUTSIDE(false),
COMMAND(true);
private boolean isPublic;
private final boolean isPublic;
Zone(boolean isPublic){
Zone(boolean isPublic) {
this.isPublic = isPublic;
}
@ -61,7 +61,7 @@ public enum Zone {
return super.toString();
}
public boolean isPublicZone(){
public boolean isPublicZone() {
return isPublic;
}
}

Some files were not shown because too many files have changed in this diff Show more