mirror of
https://github.com/correl/mage.git
synced 2025-03-17 01:06:26 -09:00
* Replaced some filters by StaticFilters instances.
This commit is contained in:
parent
43a11cd115
commit
0a8a9ed00d
122 changed files with 518 additions and 710 deletions
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -19,7 +18,7 @@ import mage.constants.SubType;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -41,7 +40,7 @@ public final class AjaniValiantProtector extends CardImpl {
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// +1: Reveal cards from the top of your library until you reveal a creature card. Put that card into your hand and the rest on the bottom of your library in a random order.
|
// +1: Reveal cards from the top of your library until you reveal a creature card. Put that card into your hand and the rest on the bottom of your library in a random order.
|
||||||
this.addAbility(new LoyaltyAbility(new RevealCardsFromLibraryUntilEffect(new FilterCreatureCard(), Zone.HAND, Zone.LIBRARY), 1));
|
this.addAbility(new LoyaltyAbility(new RevealCardsFromLibraryUntilEffect(StaticFilters.FILTER_CARD_CREATURE, Zone.HAND, Zone.LIBRARY), 1));
|
||||||
|
|
||||||
// -11: Put X +1/+1 counters on target creature, where X is your life total. That creature gains trample until end of turn.
|
// -11: Put X +1/+1 counters on target creature, where X is your life total. That creature gains trample until end of turn.
|
||||||
Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(), ControllerLifeCount.instance);
|
Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(), ControllerLifeCount.instance);
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -7,8 +6,8 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
|
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
|
||||||
|
@ -24,7 +23,7 @@ public final class AltarOfBone extends CardImpl {
|
||||||
// As an additional cost to cast Altar of Bone, sacrifice a creature.
|
// As an additional cost to cast Altar of Bone, sacrifice a creature.
|
||||||
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
|
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
|
||||||
// Search your library for a creature card, reveal that card, and put it into your hand. Then shuffle your library.
|
// Search your library for a creature card, reveal that card, and put it into your hand. Then shuffle your library.
|
||||||
this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterCreatureCard()), true));
|
this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public AltarOfBone(final AltarOfBone card) {
|
public AltarOfBone(final AltarOfBone card) {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -10,7 +9,7 @@ import mage.cards.*;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.Target;
|
import mage.target.Target;
|
||||||
|
@ -76,7 +75,7 @@ class AnimalMagnetismEffect extends OneShotEffect {
|
||||||
controller.chooseTarget(Outcome.Detriment, target, source, game);
|
controller.chooseTarget(Outcome.Detriment, target, source, game);
|
||||||
opponent = game.getPlayer(target.getFirstTarget());
|
opponent = game.getPlayer(target.getFirstTarget());
|
||||||
}
|
}
|
||||||
TargetCard target = new TargetCard(1, Zone.LIBRARY, new FilterCreatureCard());
|
TargetCard target = new TargetCard(1, Zone.LIBRARY, StaticFilters.FILTER_CARD_CREATURE);
|
||||||
opponent.chooseTarget(outcome, cards, target, source, game);
|
opponent.chooseTarget(outcome, cards, target, source, game);
|
||||||
cardToBattlefield = game.getCard(target.getFirstTarget());
|
cardToBattlefield = game.getCard(target.getFirstTarget());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -16,7 +15,7 @@ import mage.abilities.keyword.FearAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
@ -85,7 +84,7 @@ class AvatarOfWoeCostReductionEffect extends CostModificationEffectImpl {
|
||||||
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||||
return abilityToModify.getSourceId().equals(source.getSourceId())
|
return abilityToModify.getSourceId().equals(source.getSourceId())
|
||||||
&& (abilityToModify instanceof SpellAbility)
|
&& (abilityToModify instanceof SpellAbility)
|
||||||
&& new CardsInAllGraveyardsCount(new FilterCreatureCard()).calculate(game, source, this) >= 10;
|
&& new CardsInAllGraveyardsCount(StaticFilters.FILTER_CARD_CREATURE).calculate(game, source, this) >= 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -18,7 +17,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.game.permanent.token.BalduvianToken;
|
import mage.game.permanent.token.BalduvianToken;
|
||||||
|
@ -39,7 +38,7 @@ public final class BalduvianDead extends CardImpl {
|
||||||
|
|
||||||
// {2}{R}, Exile a creature card from your graveyard: Create a 3/1 black and red Graveborn creature token with haste. Sacrifice it at the beginning of the next end step.
|
// {2}{R}, Exile a creature card from your graveyard: Create a 3/1 black and red Graveborn creature token with haste. Sacrifice it at the beginning of the next end step.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BalduvianDeadEffect(), new ManaCostsImpl("{2}{R}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BalduvianDeadEffect(), new ManaCostsImpl("{2}{R}"));
|
||||||
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(new FilterCreatureCard());
|
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
ability.addCost(new ExileFromGraveCost(target));
|
ability.addCost(new ExileFromGraveCost(target));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -8,7 +7,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
|
@ -54,7 +53,7 @@ public final class BlossomingWreath extends CardImpl {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
controller.gainLife(controller.getGraveyard().count(new FilterCreatureCard(), game), game, source);
|
controller.gainLife(controller.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game), game, source);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -16,7 +15,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
@ -72,7 +71,7 @@ class BoldwyrHeavyweightsEffect extends OneShotEffect {
|
||||||
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
|
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
|
||||||
Player opponent = game.getPlayer(opponentId);
|
Player opponent = game.getPlayer(opponentId);
|
||||||
if (opponent != null && opponent.chooseUse(Outcome.PutCreatureInPlay, "Search your library for a creature card and put it onto the battlefield?", source, game)) {
|
if (opponent != null && opponent.chooseUse(Outcome.PutCreatureInPlay, "Search your library for a creature card and put it onto the battlefield?", source, game)) {
|
||||||
TargetCardInLibrary target = new TargetCardInLibrary(new FilterCreatureCard());
|
TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
if (opponent.searchLibrary(target, source, game)) {
|
if (opponent.searchLibrary(target, source, game)) {
|
||||||
Card targetCard = opponent.getLibrary().getCard(target.getFirstTarget(), game);
|
Card targetCard = opponent.getLibrary().getCard(target.getFirstTarget(), game);
|
||||||
if (targetCard != null) {
|
if (targetCard != null) {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -15,7 +14,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author North
|
* @author North
|
||||||
|
@ -30,7 +29,7 @@ public final class Bonehoard extends CardImpl {
|
||||||
this.addAbility(new LivingWeaponAbility());
|
this.addAbility(new LivingWeaponAbility());
|
||||||
|
|
||||||
// Equipped creature gets +X/+X, where X is the number of creature cards in all graveyards.
|
// Equipped creature gets +X/+X, where X is the number of creature cards in all graveyards.
|
||||||
CardsInAllGraveyardsCount value = new CardsInAllGraveyardsCount(new FilterCreatureCard());
|
CardsInAllGraveyardsCount value = new CardsInAllGraveyardsCount(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(value, value)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(value, value)));
|
||||||
|
|
||||||
// Equip {2}
|
// Equip {2}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -12,7 +11,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author nantuko
|
* @author nantuko
|
||||||
|
@ -23,9 +22,8 @@ public final class BoneyardWurm extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||||
this.subtype.add(SubType.WURM);
|
this.subtype.add(SubType.WURM);
|
||||||
|
|
||||||
|
|
||||||
// Boneyard Wurm's power and toughness are each equal to the number of creature cards in your graveyard.
|
// Boneyard Wurm's power and toughness are each equal to the number of creature cards in your graveyard.
|
||||||
DynamicValue value = new CardsInControllerGraveyardCount(new FilterCreatureCard());
|
DynamicValue value = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value, Duration.EndOfGame)));
|
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value, Duration.EndOfGame)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -16,7 +15,7 @@ import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SpellAbilityType;
|
import mage.constants.SpellAbilityType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.Target;
|
import mage.target.Target;
|
||||||
|
@ -70,7 +69,7 @@ class EnteringReturnFromGraveyardToBattlefieldEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
Target target = new TargetCardInGraveyard(new FilterCreatureCard());
|
Target target = new TargetCardInGraveyard(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
target.setNotTarget(true);
|
target.setNotTarget(true);
|
||||||
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)
|
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)
|
||||||
&& controller.chooseTarget(outcome, target, source, game)) {
|
&& controller.chooseTarget(outcome, target, source, game)) {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -10,7 +9,7 @@ import mage.cards.CardsImpl;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
@ -21,11 +20,9 @@ import mage.target.common.TargetCardInLibrary;
|
||||||
*/
|
*/
|
||||||
public final class BuriedAlive extends CardImpl {
|
public final class BuriedAlive extends CardImpl {
|
||||||
|
|
||||||
|
|
||||||
public BuriedAlive(UUID ownerId, CardSetInfo setInfo) {
|
public BuriedAlive(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}");
|
||||||
|
|
||||||
|
|
||||||
// Search your library for up to three creature cards and put them into your graveyard. Then shuffle your library.
|
// Search your library for up to three creature cards and put them into your graveyard. Then shuffle your library.
|
||||||
this.getSpellAbility().addEffect(new BuriedAliveEffect());
|
this.getSpellAbility().addEffect(new BuriedAliveEffect());
|
||||||
|
|
||||||
|
@ -44,7 +41,7 @@ public final class BuriedAlive extends CardImpl {
|
||||||
class BuriedAliveEffect extends SearchEffect {
|
class BuriedAliveEffect extends SearchEffect {
|
||||||
|
|
||||||
public BuriedAliveEffect() {
|
public BuriedAliveEffect() {
|
||||||
super(new TargetCardInLibrary(0, 3, new FilterCreatureCard()), Outcome.Detriment);
|
super(new TargetCardInLibrary(0, 3, StaticFilters.FILTER_CARD_CREATURE), Outcome.Detriment);
|
||||||
staticText = "Search your library for up to three creature cards and put them into your graveyard. Then shuffle your library";
|
staticText = "Search your library for up to three creature cards and put them into your graveyard. Then shuffle your library";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -17,7 +16,6 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -120,7 +118,7 @@ class CauldronDancePutCreatureFromHandOntoBattlefieldEffect extends OneShotEffec
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
if (controller.chooseUse(Outcome.PutCreatureInPlay, CHOICE_TEXT, source, game)) {
|
if (controller.chooseUse(Outcome.PutCreatureInPlay, CHOICE_TEXT, source, game)) {
|
||||||
TargetCardInHand target = new TargetCardInHand(new FilterCreatureCard());
|
TargetCardInHand target = new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
if (controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
|
if (controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
|
||||||
Card card = game.getCard(target.getFirstTarget());
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||||
|
@ -14,8 +15,8 @@ import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
@ -28,8 +29,6 @@ import mage.target.targetpointer.FixedTarget;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
import mage.watchers.common.CastFromHandWatcher;
|
import mage.watchers.common.CastFromHandWatcher;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author goesta
|
* @author goesta
|
||||||
*/
|
*/
|
||||||
|
@ -86,7 +85,7 @@ class ChainerNightmareAdeptContinuousEffect extends ContinuousEffectImpl {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Card card : player.getGraveyard().getCards(new FilterCreatureCard(), game)) {
|
for (Card card : player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game)) {
|
||||||
ContinuousEffect effect = new ChainerNightmareAdeptCastFromGraveyardEffect();
|
ContinuousEffect effect = new ChainerNightmareAdeptCastFromGraveyardEffect();
|
||||||
effect.setTargetPointer(new FixedTarget(card.getId()));
|
effect.setTargetPointer(new FixedTarget(card.getId()));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
|
@ -174,8 +173,8 @@ class ChainerNightmareAdeptWatcher extends Watcher {
|
||||||
|
|
||||||
class ChainerNightmareAdeptTriggeredAbility extends EntersBattlefieldAllTriggeredAbility {
|
class ChainerNightmareAdeptTriggeredAbility extends EntersBattlefieldAllTriggeredAbility {
|
||||||
|
|
||||||
private final static String abilityText = "Whenever a nontoken creature enters the battlefield under your control, " +
|
private final static String abilityText = "Whenever a nontoken creature enters the battlefield under your control, "
|
||||||
"if you didn't cast it from your hand, it gains haste until your next turn.";
|
+ "if you didn't cast it from your hand, it gains haste until your next turn.";
|
||||||
private final static ContinuousEffect gainHasteUntilNextTurnEffect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.UntilYourNextTurn);
|
private final static ContinuousEffect gainHasteUntilNextTurnEffect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.UntilYourNextTurn);
|
||||||
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another nontoken creature");
|
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another nontoken creature");
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -7,7 +6,7 @@ import mage.abilities.keyword.ConvokeAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -22,7 +21,7 @@ public final class ChordOfCalling extends CardImpl {
|
||||||
this.addAbility(new ConvokeAbility());
|
this.addAbility(new ConvokeAbility());
|
||||||
|
|
||||||
// Search your library for a creature card with converted mana cost X or less and put it onto the battlefield. Then shuffle your library.
|
// Search your library for a creature card with converted mana cost X or less and put it onto the battlefield. Then shuffle your library.
|
||||||
this.getSpellAbility().addEffect(new SearchLibraryWithLessCMCPutInPlayEffect(new FilterCreatureCard()));
|
this.getSpellAbility().addEffect(new SearchLibraryWithLessCMCPutInPlayEffect(StaticFilters.FILTER_CARD_CREATURE));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChordOfCalling(final ChordOfCalling card) {
|
public ChordOfCalling(final ChordOfCalling card) {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -12,10 +11,10 @@ import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
@ -53,7 +52,7 @@ public final class CorpseConnoisseur extends CardImpl {
|
||||||
class SearchLibraryPutInGraveyard extends SearchEffect {
|
class SearchLibraryPutInGraveyard extends SearchEffect {
|
||||||
|
|
||||||
public SearchLibraryPutInGraveyard() {
|
public SearchLibraryPutInGraveyard() {
|
||||||
super(new TargetCardInLibrary(new FilterCreatureCard()), Outcome.Neutral);
|
super(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), Outcome.Neutral);
|
||||||
staticText = "search your library for a card and put that card into your graveyard. Then shuffle your library";
|
staticText = "search your library for a card and put that card into your graveyard. Then shuffle your library";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,5 +83,4 @@ class SearchLibraryPutInGraveyard extends SearchEffect {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -10,7 +8,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
|
@ -19,19 +17,15 @@ import mage.target.TargetPlayer;
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
public final class CryptIncursion extends CardImpl {
|
public final class CryptIncursion extends CardImpl {
|
||||||
|
|
||||||
public CryptIncursion(UUID ownerId, CardSetInfo setInfo) {
|
public CryptIncursion(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}");
|
||||||
|
|
||||||
|
|
||||||
// Exile all creature cards from target player's graveyard. You gain 3 life for each card exiled this way.
|
// Exile all creature cards from target player's graveyard. You gain 3 life for each card exiled this way.
|
||||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||||
this.getSpellAbility().addEffect(new CryptIncursionEffect());
|
this.getSpellAbility().addEffect(new CryptIncursionEffect());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public CryptIncursion(final CryptIncursion card) {
|
public CryptIncursion(final CryptIncursion card) {
|
||||||
|
@ -47,8 +41,6 @@ public final class CryptIncursion extends CardImpl {
|
||||||
|
|
||||||
class CryptIncursionEffect extends OneShotEffect {
|
class CryptIncursionEffect extends OneShotEffect {
|
||||||
|
|
||||||
private static final FilterCreatureCard filter = new FilterCreatureCard();
|
|
||||||
|
|
||||||
public CryptIncursionEffect() {
|
public CryptIncursionEffect() {
|
||||||
super(Outcome.Detriment);
|
super(Outcome.Detriment);
|
||||||
staticText = "Exile all creature cards from target player's graveyard. You gain 3 life for each card exiled this way";
|
staticText = "Exile all creature cards from target player's graveyard. You gain 3 life for each card exiled this way";
|
||||||
|
@ -65,7 +57,7 @@ class CryptIncursionEffect extends OneShotEffect {
|
||||||
if (player != null && targetPlayer != null) {
|
if (player != null && targetPlayer != null) {
|
||||||
int exiledCards = 0;
|
int exiledCards = 0;
|
||||||
for (Card card : targetPlayer.getGraveyard().getCards(game)) {
|
for (Card card : targetPlayer.getGraveyard().getCards(game)) {
|
||||||
if (filter.match(card, game)) {
|
if (StaticFilters.FILTER_CARD_CREATURE.match(card, game)) {
|
||||||
if (card.moveToExile(null, "", source.getSourceId(), game)) {
|
if (card.moveToExile(null, "", source.getSourceId(), game)) {
|
||||||
exiledCards++;
|
exiledCards++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -11,9 +10,9 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
|
||||||
import mage.target.common.TargetAnyTarget;
|
import mage.target.common.TargetAnyTarget;
|
||||||
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,7 +28,7 @@ public final class DarigaazsCharm extends CardImpl {
|
||||||
Effect effect = new ReturnToHandTargetEffect();
|
Effect effect = new ReturnToHandTargetEffect();
|
||||||
effect.setText("Return target creature card from your graveyard to your hand");
|
effect.setText("Return target creature card from your graveyard to your hand");
|
||||||
this.getSpellAbility().addEffect(effect);
|
this.getSpellAbility().addEffect(effect);
|
||||||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard()));
|
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE));
|
||||||
|
|
||||||
// or Darigaaz's Charm deals 3 damage to any target;
|
// or Darigaaz's Charm deals 3 damage to any target;
|
||||||
Mode mode = new Mode();
|
Mode mode = new Mode();
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -18,7 +17,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.Target;
|
import mage.target.Target;
|
||||||
|
@ -68,7 +67,7 @@ class DeathOrGloryEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
Cards cards = new CardsImpl(controller.getGraveyard().getCards(new FilterCreatureCard(), game));
|
Cards cards = new CardsImpl(controller.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game));
|
||||||
if (!cards.isEmpty()) {
|
if (!cards.isEmpty()) {
|
||||||
TargetCard targetCards = new TargetCard(0, cards.size(), Zone.EXILED, new FilterCard("cards to put in the first pile"));
|
TargetCard targetCards = new TargetCard(0, cards.size(), Zone.EXILED, new FilterCard("cards to put in the first pile"));
|
||||||
List<Card> pile1 = new ArrayList<>();
|
List<Card> pile1 = new ArrayList<>();
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -16,8 +15,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -72,8 +70,7 @@ class DeathrenderEffect extends OneShotEffect {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||||
if (controller != null && sourcePermanent != null) {
|
if (controller != null && sourcePermanent != null) {
|
||||||
FilterCard filter = new FilterCreatureCard();
|
TargetCardInHand target = new TargetCardInHand(0, 1, StaticFilters.FILTER_CARD_CREATURE);
|
||||||
TargetCardInHand target = new TargetCardInHand(0, 1, filter);
|
|
||||||
if (controller.choose(Outcome.PutCardInPlay, target, source.getSourceId(), game)) {
|
if (controller.choose(Outcome.PutCardInPlay, target, source.getSourceId(), game)) {
|
||||||
Card creatureInHand = game.getCard(target.getFirstTarget());
|
Card creatureInHand = game.getCard(target.getFirstTarget());
|
||||||
if (creatureInHand != null) {
|
if (creatureInHand != null) {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -17,7 +16,6 @@ import mage.constants.Outcome;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
|
@ -32,7 +30,7 @@ public final class DefenseOfTheHeart extends CardImpl {
|
||||||
|
|
||||||
// At the beginning of your upkeep, if an opponent controls three or more creatures, sacrifice Defense of the Heart, search your library for up to two creature cards, and put those cards onto the battlefield. Then shuffle your library.
|
// At the beginning of your upkeep, if an opponent controls three or more creatures, sacrifice Defense of the Heart, search your library for up to two creature cards, and put those cards onto the battlefield. Then shuffle your library.
|
||||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU, false);
|
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU, false);
|
||||||
ability.addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 2, new FilterCreatureCard()), false, Outcome.PutLandInPlay));
|
ability.addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 2, StaticFilters.FILTER_CARD_CREATURE), false, Outcome.PutLandInPlay));
|
||||||
DefenseOfTheHeartCondition contition = new DefenseOfTheHeartCondition();
|
DefenseOfTheHeartCondition contition = new DefenseOfTheHeartCondition();
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, contition, "At the beginning of your upkeep, if an opponent controls three or more creatures, sacrifice {this}, search your library for up to two creature cards, and put those cards onto the battlefield. Then shuffle your library"));
|
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, contition, "At the beginning of your upkeep, if an opponent controls three or more creatures, sacrifice {this}, search your library for up to two creature cards, and put those cards onto the battlefield. Then shuffle your library"));
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -14,11 +13,11 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,7 +36,7 @@ public final class DrakestownForgotten extends CardImpl {
|
||||||
this.addAbility(new EntersBattlefieldAbility(
|
this.addAbility(new EntersBattlefieldAbility(
|
||||||
new AddCountersSourceEffect(
|
new AddCountersSourceEffect(
|
||||||
CounterType.P1P1.createInstance(),
|
CounterType.P1P1.createInstance(),
|
||||||
new CardsInAllGraveyardsCount(new FilterCreatureCard()),
|
new CardsInAllGraveyardsCount(StaticFilters.FILTER_CARD_CREATURE),
|
||||||
false),
|
false),
|
||||||
"with X +1/+1 counters on it, where X is the number of creature cards in all graveyards"));
|
"with X +1/+1 counters on it, where X is the number of creature cards in all graveyards"));
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -22,11 +21,11 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.AbilityType;
|
import mage.constants.AbilityType;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -47,7 +46,7 @@ public final class DralnusPet extends CardImpl {
|
||||||
// Kicker-{2}{B}, Discard a creature card.
|
// Kicker-{2}{B}, Discard a creature card.
|
||||||
Costs<Cost> kickerCosts = new CostsImpl<>();
|
Costs<Cost> kickerCosts = new CostsImpl<>();
|
||||||
kickerCosts.add(new ManaCostsImpl<>("{2}{B}"));
|
kickerCosts.add(new ManaCostsImpl<>("{2}{B}"));
|
||||||
kickerCosts.add(new DiscardCardCost(new FilterCreatureCard()));
|
kickerCosts.add(new DiscardCardCost(StaticFilters.FILTER_CARD_CREATURE));
|
||||||
this.addAbility(new KickerAbility(kickerCosts));
|
this.addAbility(new KickerAbility(kickerCosts));
|
||||||
// If Dralnu's Pet was kicked, it enters the battlefield with flying and with X +1/+1 counters on it, where X is the discarded card's converted mana cost.
|
// If Dralnu's Pet was kicked, it enters the battlefield with flying and with X +1/+1 counters on it, where X is the discarded card's converted mana cost.
|
||||||
Ability ability = new EntersBattlefieldAbility(new DralnusPetEffect(), KickedCondition.instance,
|
Ability ability = new EntersBattlefieldAbility(new DralnusPetEffect(), KickedCondition.instance,
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -9,7 +8,7 @@ import mage.cards.*;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetCard;
|
import mage.target.TargetCard;
|
||||||
|
@ -65,7 +64,7 @@ class DubiousChallengeEffect extends OneShotEffect {
|
||||||
Cards topCards = new CardsImpl();
|
Cards topCards = new CardsImpl();
|
||||||
topCards.addAll(controller.getLibrary().getTopCards(game, 10));
|
topCards.addAll(controller.getLibrary().getTopCards(game, 10));
|
||||||
controller.lookAtCards(sourceObject.getIdName(), topCards, game);
|
controller.lookAtCards(sourceObject.getIdName(), topCards, game);
|
||||||
TargetCard targetCreatures = new TargetCard(0, 2, Zone.LIBRARY, new FilterCreatureCard());
|
TargetCard targetCreatures = new TargetCard(0, 2, Zone.LIBRARY, StaticFilters.FILTER_CARD_CREATURE);
|
||||||
controller.choose(outcome, topCards, targetCreatures, game);
|
controller.choose(outcome, topCards, targetCreatures, game);
|
||||||
Cards exiledCards = new CardsImpl(targetCreatures.getTargets());
|
Cards exiledCards = new CardsImpl(targetCreatures.getTargets());
|
||||||
if (!exiledCards.isEmpty()) {
|
if (!exiledCards.isEmpty()) {
|
||||||
|
@ -73,7 +72,7 @@ class DubiousChallengeEffect extends OneShotEffect {
|
||||||
controller.shuffleLibrary(source, game);
|
controller.shuffleLibrary(source, game);
|
||||||
Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));
|
Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||||
if (opponent != null) {
|
if (opponent != null) {
|
||||||
TargetCard targetOpponentCreature = new TargetCard(0, 1, Zone.EXILED, new FilterCreatureCard());
|
TargetCard targetOpponentCreature = new TargetCard(0, 1, Zone.EXILED, StaticFilters.FILTER_CARD_CREATURE);
|
||||||
DubiousChallengeMoveToBattlefieldEffect opponentEffect = (DubiousChallengeMoveToBattlefieldEffect) source.getEffects().get(1);
|
DubiousChallengeMoveToBattlefieldEffect opponentEffect = (DubiousChallengeMoveToBattlefieldEffect) source.getEffects().get(1);
|
||||||
DubiousChallengeMoveToBattlefieldEffect controllerEffect = (DubiousChallengeMoveToBattlefieldEffect) source.getEffects().get(2);
|
DubiousChallengeMoveToBattlefieldEffect controllerEffect = (DubiousChallengeMoveToBattlefieldEffect) source.getEffects().get(2);
|
||||||
if (opponent.choose(outcome, exiledCards, targetOpponentCreature, game)) {
|
if (opponent.choose(outcome, exiledCards, targetOpponentCreature, game)) {
|
||||||
|
@ -111,8 +110,7 @@ class DubiousChallengeMoveToBattlefieldEffect extends OneShotEffect {
|
||||||
return new DubiousChallengeMoveToBattlefieldEffect(this);
|
return new DubiousChallengeMoveToBattlefieldEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPlayerAndCards(Player targetPlayer, Cards targetCards)
|
public void setPlayerAndCards(Player targetPlayer, Cards targetCards) {
|
||||||
{
|
|
||||||
this.player = targetPlayer;
|
this.player = targetPlayer;
|
||||||
this.cards = targetCards;
|
this.cards = targetCards;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.e;
|
package mage.cards.e;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -11,10 +10,10 @@ import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.common.TargetCardInGraveyard;
|
import mage.target.common.TargetCardInGraveyard;
|
||||||
|
@ -33,7 +32,7 @@ public final class EaterOfTheDead extends CardImpl {
|
||||||
|
|
||||||
// {0}: If Eater of the Dead is tapped, exile target creature card from a graveyard and untap Eater of the Dead.
|
// {0}: If Eater of the Dead is tapped, exile target creature card from a graveyard and untap Eater of the Dead.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new EaterOfTheDeadEffect(), new GenericManaCost(0));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new EaterOfTheDeadEffect(), new GenericManaCost(0));
|
||||||
ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard()));
|
ability.addTarget(new TargetCardInGraveyard(StaticFilters.FILTER_CARD_CREATURE));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +47,7 @@ public final class EaterOfTheDead extends CardImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
class EaterOfTheDeadEffect extends OneShotEffect {
|
class EaterOfTheDeadEffect extends OneShotEffect {
|
||||||
|
|
||||||
EaterOfTheDeadEffect() {
|
EaterOfTheDeadEffect() {
|
||||||
super(Outcome.DestroyPermanent);
|
super(Outcome.DestroyPermanent);
|
||||||
staticText = "If {this} is tapped, exile target creature card from a graveyard and untap {this}";
|
staticText = "If {this} is tapped, exile target creature card from a graveyard and untap {this}";
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.e;
|
package mage.cards.e;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -8,7 +7,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -20,7 +19,7 @@ public final class EnshrinedMemories extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{G}");
|
||||||
|
|
||||||
// Reveal the top X cards of your library. Put all creature cards revealed this way into your hand and the rest on the bottom of your library in any order.
|
// Reveal the top X cards of your library. Put all creature cards revealed this way into your hand and the rest on the bottom of your library in any order.
|
||||||
this.getSpellAbility().addEffect(new RevealLibraryPutIntoHandEffect(ManacostVariableValue.instance, new FilterCreatureCard(), Zone.LIBRARY, true));
|
this.getSpellAbility().addEffect(new RevealLibraryPutIntoHandEffect(ManacostVariableValue.instance, StaticFilters.FILTER_CARD_CREATURE, Zone.LIBRARY, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public EnshrinedMemories(final EnshrinedMemories card) {
|
public EnshrinedMemories(final EnshrinedMemories card) {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.e;
|
package mage.cards.e;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -17,7 +16,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.common.TargetCardInHand;
|
import mage.target.common.TargetCardInHand;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -41,7 +40,7 @@ public final class ErebossEmissary extends CardImpl {
|
||||||
new BoostSourceEffect(2, 2, Duration.EndOfTurn),
|
new BoostSourceEffect(2, 2, Duration.EndOfTurn),
|
||||||
new SourceHasSubtypeCondition(SubType.AURA),
|
new SourceHasSubtypeCondition(SubType.AURA),
|
||||||
"{this} gets +2/+2 until end of turn. If Erebos's Emissary is an Aura, enchanted creature gets +2/+2 until end of turn instead"),
|
"{this} gets +2/+2 until end of turn. If Erebos's Emissary is an Aura, enchanted creature gets +2/+2 until end of turn instead"),
|
||||||
new DiscardTargetCost(new TargetCardInHand(new FilterCreatureCard()))));
|
new DiscardTargetCost(new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE))));
|
||||||
|
|
||||||
// Enchanted creature gets +3/+3
|
// Enchanted creature gets +3/+3
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 3, Duration.WhileOnBattlefield)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 3, Duration.WhileOnBattlefield)));
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.e;
|
package mage.cards.e;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -11,8 +10,8 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
|
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -25,7 +24,7 @@ public final class EvolutionaryLeap extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
|
||||||
|
|
||||||
// {G}, Sacrifice a creature: Reveal cards from the top of your library until you reveal a creature card. Put that card into your hand and the rest on the bottom of your library in a random order.
|
// {G}, Sacrifice a creature: Reveal cards from the top of your library until you reveal a creature card. Put that card into your hand and the rest on the bottom of your library in a random order.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RevealCardsFromLibraryUntilEffect(new FilterCreatureCard(), Zone.HAND, Zone.LIBRARY), new ManaCostsImpl("{G}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RevealCardsFromLibraryUntilEffect(StaticFilters.FILTER_CARD_CREATURE, Zone.HAND, Zone.LIBRARY), new ManaCostsImpl("{G}"));
|
||||||
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
|
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.e;
|
package mage.cards.e;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -16,7 +15,7 @@ import mage.constants.SubType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
@ -37,7 +36,7 @@ public final class ExoskeletalArmor extends CardImpl {
|
||||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
// Enchanted creature gets +X/+X, where X is the number of creature cards in all graveyards.
|
// Enchanted creature gets +X/+X, where X is the number of creature cards in all graveyards.
|
||||||
CardsInAllGraveyardsCount count = new CardsInAllGraveyardsCount(new FilterCreatureCard());
|
CardsInAllGraveyardsCount count = new CardsInAllGraveyardsCount(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
Effect effect = new BoostEnchantedEffect(count, count, Duration.WhileOnBattlefield);
|
Effect effect = new BoostEnchantedEffect(count, count, Duration.WhileOnBattlefield);
|
||||||
effect.setText("Enchanted creature gets +X/+X, where X is the number of creature cards in all graveyards");
|
effect.setText("Enchanted creature gets +X/+X, where X is the number of creature cards in all graveyards");
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.e;
|
package mage.cards.e;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -9,7 +8,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.Target;
|
import mage.target.Target;
|
||||||
|
@ -88,7 +87,7 @@ class ExtractFromDarknessReturnFromGraveyardToBattlefieldEffect extends OneShotE
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
Target target = new TargetCardInGraveyard(new FilterCreatureCard());
|
Target target = new TargetCardInGraveyard(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
target.setNotTarget(true);
|
target.setNotTarget(true);
|
||||||
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)
|
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)
|
||||||
&& controller.chooseTarget(outcome, target, source, game)) {
|
&& controller.chooseTarget(outcome, target, source, game)) {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -13,10 +11,10 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.ColoredManaSymbol;
|
import mage.constants.ColoredManaSymbol;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.common.TargetCardInHand;
|
import mage.target.common.TargetCardInHand;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
|
@ -36,10 +34,10 @@ public final class FaunaShaman extends CardImpl {
|
||||||
|
|
||||||
// {G}, {tap}, Discard a creature card: Search your library for a creature card, reveal it, and put it into your hand. Then shuffle your library.
|
// {G}, {tap}, Discard a creature card: Search your library for a creature card, reveal it, and put it into your hand. Then shuffle your library.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||||
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterCreatureCard()), true),
|
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true),
|
||||||
new ColoredManaCost(ColoredManaSymbol.G));
|
new ColoredManaCost(ColoredManaSymbol.G));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addCost(new DiscardTargetCost(new TargetCardInHand(new FilterCreatureCard())));
|
ability.addCost(new DiscardTargetCost(new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE)));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -9,12 +8,12 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author LoneFox
|
* @author LoneFox
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public final class FerozsBan extends CardImpl {
|
public final class FerozsBan extends CardImpl {
|
||||||
|
|
||||||
|
@ -22,7 +21,7 @@ public final class FerozsBan extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}");
|
||||||
|
|
||||||
// Creature spells cost {2} more to cast.
|
// Creature spells cost {2} more to cast.
|
||||||
Effect effect = new SpellsCostIncreasementAllEffect(new FilterCreatureCard(), 2);
|
Effect effect = new SpellsCostIncreasementAllEffect(StaticFilters.FILTER_CARD_CREATURE, 2);
|
||||||
effect.setText("Creature spells cost {2} more to cast.");
|
effect.setText("Creature spells cost {2} more to cast.");
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -12,7 +11,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -67,7 +66,7 @@ class FlashEffect extends OneShotEffect {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
TargetCardInHand target = new TargetCardInHand(new FilterCreatureCard());
|
TargetCardInHand target = new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
if (controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
|
if (controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
|
||||||
Card card = game.getCard(target.getFirstTarget());
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -12,7 +11,7 @@ import mage.constants.Outcome;
|
||||||
import mage.constants.SpellAbilityType;
|
import mage.constants.SpellAbilityType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -29,7 +28,7 @@ public final class FleshBlood extends SplitCard {
|
||||||
|
|
||||||
// Flesh
|
// Flesh
|
||||||
// Exile target creature card from a graveyard. Put X +1/+1 counters on target creature, where X is the power of the card you exiled.
|
// Exile target creature card from a graveyard. Put X +1/+1 counters on target creature, where X is the power of the card you exiled.
|
||||||
Target target = new TargetCardInGraveyard(new FilterCreatureCard());
|
Target target = new TargetCardInGraveyard(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
getLeftHalfCard().getSpellAbility().addTarget(target);
|
getLeftHalfCard().getSpellAbility().addTarget(target);
|
||||||
getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
|
getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
getLeftHalfCard().getSpellAbility().addEffect(new FleshEffect());
|
getLeftHalfCard().getSpellAbility().addEffect(new FleshEffect());
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -10,7 +9,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.stack.StackObject;
|
import mage.game.stack.StackObject;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -66,7 +65,7 @@ class FoldIntoAetherEffect extends OneShotEffect {
|
||||||
spellController = game.getPlayer(stackObject.getControllerId());
|
spellController = game.getPlayer(stackObject.getControllerId());
|
||||||
}
|
}
|
||||||
if (game.getStack().counter(targetId, source.getSourceId(), game)) {
|
if (game.getStack().counter(targetId, source.getSourceId(), game)) {
|
||||||
TargetCardInHand target = new TargetCardInHand(new FilterCreatureCard());
|
TargetCardInHand target = new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
if (spellController != null
|
if (spellController != null
|
||||||
&& target.canChoose(source.getSourceId(), spellController.getId(), game)
|
&& target.canChoose(source.getSourceId(), spellController.getId(), game)
|
||||||
&& spellController.chooseUse(Outcome.Neutral, "Put a creature card from your hand in play?", source, game)
|
&& spellController.chooseUse(Outcome.Neutral, "Put a creature card from your hand in play?", source, game)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.DelayedTriggeredAbility;
|
import mage.abilities.DelayedTriggeredAbility;
|
||||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||||
|
@ -14,15 +14,13 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author dustinconrad
|
* @author dustinconrad
|
||||||
|
@ -35,7 +33,7 @@ public final class FootstepsOfTheGoryo extends CardImpl {
|
||||||
|
|
||||||
// Return target creature card from your graveyard to the battlefield. Sacrifice that creature at the beginning of the next end step.
|
// Return target creature card from your graveyard to the battlefield. Sacrifice that creature at the beginning of the next end step.
|
||||||
this.getSpellAbility().addEffect(new FootstepsOfTheGoryoEffect());
|
this.getSpellAbility().addEffect(new FootstepsOfTheGoryoEffect());
|
||||||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard()));
|
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE));
|
||||||
}
|
}
|
||||||
|
|
||||||
public FootstepsOfTheGoryo(final FootstepsOfTheGoryo card) {
|
public FootstepsOfTheGoryo(final FootstepsOfTheGoryo card) {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -10,11 +9,8 @@ import mage.abilities.effects.common.RevealCardsFromLibraryUntilEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.TargetController;
|
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -22,19 +18,13 @@ import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
*/
|
*/
|
||||||
public final class Foster extends CardImpl {
|
public final class Foster extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature you control");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
|
||||||
}
|
|
||||||
|
|
||||||
public Foster(UUID ownerId, CardSetInfo setInfo) {
|
public Foster(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{G}");
|
||||||
|
|
||||||
// Whenever a creature you control dies, you may pay {1}. If you do, reveal cards from the top of your library until you reveal a creature card. Put that card into your hand and the rest into your graveyard.
|
// Whenever a creature you control dies, you may pay {1}. If you do, reveal cards from the top of your library until you reveal a creature card. Put that card into your hand and the rest into your graveyard.
|
||||||
Ability ability = new DiesCreatureTriggeredAbility(
|
Ability ability = new DiesCreatureTriggeredAbility(
|
||||||
new DoIfCostPaid(new RevealCardsFromLibraryUntilEffect(new FilterCreatureCard(), Zone.HAND, Zone.GRAVEYARD), new GenericManaCost(1)),
|
new DoIfCostPaid(new RevealCardsFromLibraryUntilEffect(StaticFilters.FILTER_CARD_CREATURE, Zone.HAND, Zone.GRAVEYARD), new GenericManaCost(1)),
|
||||||
false, filter);
|
false, StaticFilters.FILTER_CONTROLLED_A_CREATURE);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -13,7 +12,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -28,7 +27,7 @@ public final class Gamekeeper extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// When Gamekeeper dies, you may exile it. If you do, reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield and put all other cards revealed this way into your graveyard.
|
// When Gamekeeper dies, you may exile it. If you do, reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield and put all other cards revealed this way into your graveyard.
|
||||||
Ability ability = new DiesTriggeredAbility(new DoIfCostPaid(new RevealCardsFromLibraryUntilEffect(new FilterCreatureCard(), Zone.BATTLEFIELD, Zone.GRAVEYARD), new ExileSourceFromGraveCost(), "Exile to reveal cards from the top of your library until you reveal a creature card?"), false);
|
Ability ability = new DiesTriggeredAbility(new DoIfCostPaid(new RevealCardsFromLibraryUntilEffect(StaticFilters.FILTER_CARD_CREATURE, Zone.BATTLEFIELD, Zone.GRAVEYARD), new ExileSourceFromGraveCost(), "Exile to reveal cards from the top of your library until you reveal a creature card?"), false);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -19,8 +18,8 @@ import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
@ -82,7 +81,7 @@ class GarrukTheVeilCursedValue implements DynamicValue {
|
||||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||||
Player player = game.getPlayer(sourceAbility.getControllerId());
|
Player player = game.getPlayer(sourceAbility.getControllerId());
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
return player.getGraveyard().getCards(new FilterCreatureCard(), game).size();
|
return player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game).size();
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -142,8 +141,7 @@ class GarrukTheVeilCursedEffect extends OneShotEffect {
|
||||||
|
|
||||||
if (sacrificed) {
|
if (sacrificed) {
|
||||||
// search
|
// search
|
||||||
FilterCreatureCard filter = new FilterCreatureCard();
|
TargetCardInLibrary targetInLibrary = new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
TargetCardInLibrary targetInLibrary = new TargetCardInLibrary(filter);
|
|
||||||
Cards cards = new CardsImpl();
|
Cards cards = new CardsImpl();
|
||||||
if (controller.searchLibrary(targetInLibrary, source, game)) {
|
if (controller.searchLibrary(targetInLibrary, source, game)) {
|
||||||
for (UUID cardId : targetInLibrary.getTargets()) {
|
for (UUID cardId : targetInLibrary.getTargets()) {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -13,7 +12,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author nantuko
|
* @author nantuko
|
||||||
|
@ -31,7 +30,7 @@ public final class GarruksHorde extends CardImpl {
|
||||||
// Play with the top card of your library revealed.
|
// Play with the top card of your library revealed.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PlayWithTheTopCardRevealedEffect()));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PlayWithTheTopCardRevealedEffect()));
|
||||||
// You may cast the top card of your library if it's a creature card.
|
// You may cast the top card of your library if it's a creature card.
|
||||||
Effect effect = new PlayTheTopCardEffect(new FilterCreatureCard());
|
Effect effect = new PlayTheTopCardEffect(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
effect.setText("You may cast the top card of your library if it's a creature card");
|
effect.setText("You may cast the top card of your library if it's a creature card");
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -21,7 +20,7 @@ import mage.constants.Outcome;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.NamePredicate;
|
import mage.filter.predicate.mageobject.NamePredicate;
|
||||||
|
@ -58,7 +57,7 @@ public final class GateToTheAfterlife extends CardImpl {
|
||||||
// {2}, {T}, Sacrifice Gate to the Afterlife: Search your graveyard, hand, and/or library for a card named God-Pharaoh's Gift and put it onto the battlefield. If you seearch your library this way, shuffle it. Activate this ability only if there are six or more creature cards in your graveyard.
|
// {2}, {T}, Sacrifice Gate to the Afterlife: Search your graveyard, hand, and/or library for a card named God-Pharaoh's Gift and put it onto the battlefield. If you seearch your library this way, shuffle it. Activate this ability only if there are six or more creature cards in your graveyard.
|
||||||
ability = new ConditionalActivatedAbility(
|
ability = new ConditionalActivatedAbility(
|
||||||
Zone.BATTLEFIELD, new GateToTheAfterlifeEffect(), new GenericManaCost(2),
|
Zone.BATTLEFIELD, new GateToTheAfterlifeEffect(), new GenericManaCost(2),
|
||||||
new CardsInControllerGraveCondition(6, new FilterCreatureCard())
|
new CardsInControllerGraveCondition(6, StaticFilters.FILTER_CARD_CREATURE)
|
||||||
);
|
);
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addCost(new SacrificeSourceCost());
|
ability.addCost(new SacrificeSourceCost());
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -13,6 +12,7 @@ import mage.cards.CardsImpl;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -64,7 +64,7 @@ class GatherThePackEffect extends OneShotEffect {
|
||||||
Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, 5));
|
Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, 5));
|
||||||
if (!cards.isEmpty()) {
|
if (!cards.isEmpty()) {
|
||||||
controller.revealCards(sourceObject.getIdName(), cards, game);
|
controller.revealCards(sourceObject.getIdName(), cards, game);
|
||||||
int creatures = cards.count(new FilterCreatureCard(), source.getSourceId(), source.getControllerId(), game);
|
int creatures = cards.count(StaticFilters.FILTER_CARD_CREATURE, source.getSourceId(), source.getControllerId(), game);
|
||||||
if (creatures > 0) {
|
if (creatures > 0) {
|
||||||
int max = 1;
|
int max = 1;
|
||||||
if (SpellMasteryCondition.instance.apply(game, source) && creatures > 1) {
|
if (SpellMasteryCondition.instance.apply(game, source) && creatures > 1) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
import mage.MageObjectReference;
|
import mage.MageObjectReference;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.costs.mana.ManaCosts;
|
import mage.abilities.costs.mana.ManaCosts;
|
||||||
|
@ -15,13 +15,11 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
|
@ -68,7 +66,7 @@ class GhastlyConscriptionEffect extends OneShotEffect {
|
||||||
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
|
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||||
if (controller != null && targetPlayer != null) {
|
if (controller != null && targetPlayer != null) {
|
||||||
List<Card> cardsToManifest = new ArrayList<>();
|
List<Card> cardsToManifest = new ArrayList<>();
|
||||||
for (Card card : targetPlayer.getGraveyard().getCards(new FilterCreatureCard(), game)) {
|
for (Card card : targetPlayer.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game)) {
|
||||||
cardsToManifest.add(card);
|
cardsToManifest.add(card);
|
||||||
controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD, true);
|
controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -11,7 +10,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.TimingRule;
|
import mage.constants.TimingRule;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -22,9 +21,8 @@ public final class GnawToTheBone extends CardImpl {
|
||||||
public GnawToTheBone(UUID ownerId, CardSetInfo setInfo) {
|
public GnawToTheBone(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
|
||||||
|
|
||||||
|
|
||||||
// You gain 2 life for each creature card in your graveyard.
|
// You gain 2 life for each creature card in your graveyard.
|
||||||
DynamicValue value = new CardsInControllerGraveyardCount(new FilterCreatureCard(), 2);
|
DynamicValue value = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE, 2);
|
||||||
this.getSpellAbility().addEffect(new GainLifeEffect(value));
|
this.getSpellAbility().addEffect(new GainLifeEffect(value));
|
||||||
|
|
||||||
// Flashback {2}{G}
|
// Flashback {2}{G}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -11,9 +10,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.common.FilterArtifactCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.filter.common.FilterEnchantmentCard;
|
|
||||||
import mage.filter.common.FilterInstantOrSorceryCard;
|
import mage.filter.common.FilterInstantOrSorceryCard;
|
||||||
import mage.filter.predicate.mageobject.NamePredicate;
|
import mage.filter.predicate.mageobject.NamePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
@ -80,11 +77,11 @@ class GoblinTutorEffect extends OneShotEffect {
|
||||||
if (amount == 2) {
|
if (amount == 2) {
|
||||||
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, filter), true);
|
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, filter), true);
|
||||||
} else if (amount == 3) {
|
} else if (amount == 3) {
|
||||||
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterEnchantmentCard()), true);
|
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_CARD_ENTCHANTMENT), true);
|
||||||
} else if (amount == 4) {
|
} else if (amount == 4) {
|
||||||
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterArtifactCard()), true);
|
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_CARD_ARTIFACT), true);
|
||||||
} else if (amount == 5) {
|
} else if (amount == 5) {
|
||||||
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterCreatureCard()), true);
|
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_CARD_CREATURE), true);
|
||||||
} else if (amount == 6) {
|
} else if (amount == 6) {
|
||||||
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterInstantOrSorceryCard()), true);
|
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterInstantOrSorceryCard()), true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -14,12 +13,11 @@ import mage.abilities.keyword.DredgeAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -60,13 +58,6 @@ public final class GolgariGraveTroll extends CardImpl {
|
||||||
|
|
||||||
class GolgariGraveTrollEffect extends OneShotEffect {
|
class GolgariGraveTrollEffect extends OneShotEffect {
|
||||||
|
|
||||||
private static final FilterCreatureCard filter = new FilterCreatureCard();
|
|
||||||
|
|
||||||
static {
|
|
||||||
|
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public GolgariGraveTrollEffect() {
|
public GolgariGraveTrollEffect() {
|
||||||
super(Outcome.BoostCreature);
|
super(Outcome.BoostCreature);
|
||||||
}
|
}
|
||||||
|
@ -80,7 +71,7 @@ class GolgariGraveTrollEffect extends OneShotEffect {
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
Permanent permanent = game.getPermanentEntering(source.getSourceId());
|
Permanent permanent = game.getPermanentEntering(source.getSourceId());
|
||||||
if (permanent != null && player != null) {
|
if (permanent != null && player != null) {
|
||||||
int amount = player.getGraveyard().count(filter, game);
|
int amount = player.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game);
|
||||||
if (amount > 0) {
|
if (amount > 0) {
|
||||||
permanent.addCounters(CounterType.P1P1.createInstance(amount), source, game);
|
permanent.addCounters(CounterType.P1P1.createInstance(amount), source, game);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -10,7 +9,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,7 +26,7 @@ public final class GraveStrength extends CardImpl {
|
||||||
Effect effect = new PutTopCardOfLibraryIntoGraveControllerEffect(3);
|
Effect effect = new PutTopCardOfLibraryIntoGraveControllerEffect(3);
|
||||||
effect.setText("Choose target creature. Put the top three cards of your library into your graveyard");
|
effect.setText("Choose target creature. Put the top three cards of your library into your graveyard");
|
||||||
this.getSpellAbility().addEffect(effect);
|
this.getSpellAbility().addEffect(effect);
|
||||||
effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(0), new CardsInControllerGraveyardCount(new FilterCreatureCard()));
|
effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(0), new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE));
|
||||||
effect.setText(", then put a +1/+1 counter on that creature for each creature card in your graveyard");
|
effect.setText(", then put a +1/+1 counter on that creature for each creature card in your graveyard");
|
||||||
this.getSpellAbility().addEffect(effect);
|
this.getSpellAbility().addEffect(effect);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -16,7 +15,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -34,7 +33,7 @@ public final class GraveUpheaval extends CardImpl {
|
||||||
|
|
||||||
// Put target creature card from a graveyard onto the battlefield under your control. It gains haste.
|
// Put target creature card from a graveyard onto the battlefield under your control. It gains haste.
|
||||||
this.getSpellAbility().addEffect(new GraveUpheavalEffect());
|
this.getSpellAbility().addEffect(new GraveUpheavalEffect());
|
||||||
this.getSpellAbility().addTarget(new TargetCardInGraveyard(new FilterCreatureCard()));
|
this.getSpellAbility().addTarget(new TargetCardInGraveyard(StaticFilters.FILTER_CARD_CREATURE));
|
||||||
|
|
||||||
// Basic landcycling {2}
|
// Basic landcycling {2}
|
||||||
this.addAbility(new BasicLandcyclingAbility(new ManaCostsImpl("{2}")));
|
this.addAbility(new BasicLandcyclingAbility(new ManaCostsImpl("{2}")));
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -10,9 +9,9 @@ import mage.abilities.keyword.DeathtouchAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.constants.SubType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
|
@ -67,7 +66,7 @@ class GravebladeMarauderEffect extends OneShotEffect {
|
||||||
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
|
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (targetPlayer != null && controller != null) {
|
if (targetPlayer != null && controller != null) {
|
||||||
targetPlayer.loseLife(controller.getGraveyard().count(new FilterCreatureCard(), game), game, false);
|
targetPlayer.loseLife(controller.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game), game, false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -7,7 +6,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -18,9 +17,8 @@ public final class GrimFlowering extends CardImpl {
|
||||||
public GrimFlowering(UUID ownerId, CardSetInfo setInfo) {
|
public GrimFlowering(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{G}");
|
||||||
|
|
||||||
|
|
||||||
// Draw a card for each creature card in your graveyard.
|
// Draw a card for each creature card in your graveyard.
|
||||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new CardsInControllerGraveyardCount(new FilterCreatureCard())));
|
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public GrimFlowering(final GrimFlowering card) {
|
public GrimFlowering(final GrimFlowering card) {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -15,8 +14,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterLandCard;
|
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
@ -96,8 +94,8 @@ class GuidedPassageEffect extends OneShotEffect {
|
||||||
controller.chooseTarget(Outcome.Detriment, target, source, game);
|
controller.chooseTarget(Outcome.Detriment, target, source, game);
|
||||||
opponent = game.getPlayer(target.getFirstTarget());
|
opponent = game.getPlayer(target.getFirstTarget());
|
||||||
}
|
}
|
||||||
TargetCard target1 = new TargetCard(1, Zone.LIBRARY, new FilterCreatureCard());
|
TargetCard target1 = new TargetCard(1, Zone.LIBRARY, StaticFilters.FILTER_CARD_CREATURE);
|
||||||
TargetCard target2 = new TargetCard(1, Zone.LIBRARY, new FilterLandCard());
|
TargetCard target2 = new TargetCard(1, Zone.LIBRARY, StaticFilters.FILTER_CARD_LAND);
|
||||||
TargetCard target3 = new TargetCard(1, Zone.LIBRARY, new FilterCard(filter));
|
TargetCard target3 = new TargetCard(1, Zone.LIBRARY, new FilterCard(filter));
|
||||||
opponent.chooseTarget(Outcome.Detriment, cards, target1, source, game);
|
opponent.chooseTarget(Outcome.Detriment, cards, target1, source, game);
|
||||||
opponent.chooseTarget(Outcome.Detriment, cards, target2, source, game);
|
opponent.chooseTarget(Outcome.Detriment, cards, target2, source, game);
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.h;
|
package mage.cards.h;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -15,7 +14,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.util.RandomUtil;
|
import mage.util.RandomUtil;
|
||||||
|
@ -68,7 +67,7 @@ class HauntedFengrafEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
Card[] cards = player.getGraveyard().getCards(new FilterCreatureCard(), game).toArray(new Card[0]);
|
Card[] cards = player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game).toArray(new Card[0]);
|
||||||
if (cards.length > 0) {
|
if (cards.length > 0) {
|
||||||
Card card = cards[RandomUtil.nextInt(cards.length)];
|
Card card = cards[RandomUtil.nextInt(cards.length)];
|
||||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, true);
|
card.moveToZone(Zone.HAND, source.getSourceId(), game, true);
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.h;
|
package mage.cards.h;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -8,7 +7,7 @@ import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.common.TargetPlayerOrPlaneswalker;
|
import mage.target.common.TargetPlayerOrPlaneswalker;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,7 +20,7 @@ public final class HauntingMisery extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{B}");
|
||||||
|
|
||||||
// As an additional cost to cast Haunting Misery, exile X creature cards from your graveyard.
|
// As an additional cost to cast Haunting Misery, exile X creature cards from your graveyard.
|
||||||
this.getSpellAbility().addCost(new ExileXFromYourGraveCost(new FilterCreatureCard()));
|
this.getSpellAbility().addCost(new ExileXFromYourGraveCost(StaticFilters.FILTER_CARD_CREATURE));
|
||||||
// Haunting Misery deals X damage to target player.
|
// Haunting Misery deals X damage to target player.
|
||||||
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
|
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
|
||||||
this.getSpellAbility().addEffect(new DamageTargetEffect(GetXValue.instance));
|
this.getSpellAbility().addEffect(new DamageTargetEffect(GetXValue.instance));
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
package mage.cards.h;
|
package mage.cards.h;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -10,6 +8,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -18,7 +17,6 @@ import mage.players.Player;
|
||||||
*
|
*
|
||||||
* @author L_J
|
* @author L_J
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public final class HonorTheFallen extends CardImpl {
|
public final class HonorTheFallen extends CardImpl {
|
||||||
|
|
||||||
public HonorTheFallen(UUID ownerId, CardSetInfo setInfo) {
|
public HonorTheFallen(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
@ -61,7 +59,7 @@ class HonorTheFallenEffect extends OneShotEffect {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
for (Card card : player.getGraveyard().getCards(game)) {
|
for (Card card : player.getGraveyard().getCards(game)) {
|
||||||
if (filter.match(card, game)) {
|
if (StaticFilters.FILTER_CARD_CREATURE.match(card, source.getSourceId(), controller.getId(), game)) {
|
||||||
if (card.moveToExile(null, "", source.getSourceId(), game)) {
|
if (card.moveToExile(null, "", source.getSourceId(), game)) {
|
||||||
exiledCards++;
|
exiledCards++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.i;
|
package mage.cards.i;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -11,7 +10,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
|
@ -58,7 +57,7 @@ class ImmortalServitudeEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player you = game.getPlayer(source.getControllerId());
|
Player you = game.getPlayer(source.getControllerId());
|
||||||
int count = source.getManaCostsToPay().getX();
|
int count = source.getManaCostsToPay().getX();
|
||||||
Set<Card> cards = you.getGraveyard().getCards(new FilterCreatureCard(), game);
|
Set<Card> cards = you.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game);
|
||||||
for (Card card : cards) {
|
for (Card card : cards) {
|
||||||
if (card != null && card.getConvertedManaCost() == count) {
|
if (card != null && card.getConvertedManaCost() == count) {
|
||||||
card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, false);
|
card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, false);
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.i;
|
package mage.cards.i;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -8,7 +7,7 @@ import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -20,7 +19,7 @@ public final class InvigoratingFalls extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}{G}");
|
||||||
|
|
||||||
// You gain life equal to the number of creature cards in all graveyards.
|
// You gain life equal to the number of creature cards in all graveyards.
|
||||||
Effect effect = new GainLifeEffect(new CardsInAllGraveyardsCount(new FilterCreatureCard()));
|
Effect effect = new GainLifeEffect(new CardsInAllGraveyardsCount(StaticFilters.FILTER_CARD_CREATURE));
|
||||||
effect.setText("You gain life equal to the number of creature cards in all graveyards.");
|
effect.setText("You gain life equal to the number of creature cards in all graveyards.");
|
||||||
this.getSpellAbility().addEffect(effect);
|
this.getSpellAbility().addEffect(effect);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.j;
|
package mage.cards.j;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -19,7 +18,6 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
@ -48,7 +46,7 @@ public final class JaradGolgariLichLord extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// Jarad, Golgari Lich Lord gets +1/+1 for each creature card in your graveyard.
|
// Jarad, Golgari Lich Lord gets +1/+1 for each creature card in your graveyard.
|
||||||
DynamicValue amount = new CardsInControllerGraveyardCount(new FilterCreatureCard());
|
DynamicValue amount = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield));
|
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.k;
|
package mage.cards.k;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -13,11 +12,9 @@ import mage.cards.Cards;
|
||||||
import mage.cards.CardsImpl;
|
import mage.cards.CardsImpl;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.token.BearToken;
|
import mage.game.permanent.token.BearToken;
|
||||||
import mage.game.permanent.token.TokenImpl;
|
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetCardInHand;
|
import mage.target.common.TargetCardInHand;
|
||||||
|
@ -47,8 +44,6 @@ public final class KamahlsSummons extends CardImpl {
|
||||||
|
|
||||||
class KamahlsSummonsEffect extends OneShotEffect {
|
class KamahlsSummonsEffect extends OneShotEffect {
|
||||||
|
|
||||||
private static final FilterCard filter = new FilterCreatureCard();
|
|
||||||
|
|
||||||
public KamahlsSummonsEffect() {
|
public KamahlsSummonsEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
this.staticText = "Each player may reveal any number of creature cards from their hand. Then each player creates a 2/2 green Bear creature token for each card they revealed this way";
|
this.staticText = "Each player may reveal any number of creature cards from their hand. Then each player creates a 2/2 green Bear creature token for each card they revealed this way";
|
||||||
|
@ -72,8 +67,8 @@ class KamahlsSummonsEffect extends OneShotEffect {
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
if (player.getHand().count(filter, game) > 0) {
|
if (player.getHand().count(StaticFilters.FILTER_CARD_CREATURE, game) > 0) {
|
||||||
TargetCardInHand target = new TargetCardInHand(0, Integer.MAX_VALUE, filter);
|
TargetCardInHand target = new TargetCardInHand(0, Integer.MAX_VALUE, StaticFilters.FILTER_CARD_CREATURE);
|
||||||
if (player.choose(outcome, target, source.getSourceId(), game)) {
|
if (player.choose(outcome, target, source.getSourceId(), game)) {
|
||||||
Cards cards = new CardsImpl(target.getTargets());
|
Cards cards = new CardsImpl(target.getTargets());
|
||||||
controller.revealCards(sourceObject.getIdName(), cards, game);
|
controller.revealCards(sourceObject.getIdName(), cards, game);
|
||||||
|
|
|
@ -13,7 +13,7 @@ import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
|
@ -72,7 +72,7 @@ class KaradorGhostChieftainCostReductionEffect extends CostModificationEffectImp
|
||||||
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
int reductionAmount = player.getGraveyard().count(new FilterCreatureCard(), game);
|
int reductionAmount = player.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game);
|
||||||
CardUtil.reduceCost(abilityToModify, reductionAmount);
|
CardUtil.reduceCost(abilityToModify, reductionAmount);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ class KaradorGhostChieftainContinuousEffect extends ContinuousEffectImpl {
|
||||||
|| !game.isActivePlayer(player.getId())) {
|
|| !game.isActivePlayer(player.getId())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (Card card : player.getGraveyard().getCards(new FilterCreatureCard(), game)) {
|
for (Card card : player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game)) {
|
||||||
ContinuousEffect effect = new KaradorGhostChieftainCastFromGraveyardEffect();
|
ContinuousEffect effect = new KaradorGhostChieftainCastFromGraveyardEffect();
|
||||||
effect.setTargetPointer(new FixedTarget(card.getId()));
|
effect.setTargetPointer(new FixedTarget(card.getId()));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
|
@ -160,8 +160,8 @@ class KaradorGhostChieftainCastFromGraveyardEffect extends AsThoughEffectImpl {
|
||||||
&& affectedControllerId != null
|
&& affectedControllerId != null
|
||||||
&& objectCard.getSpellAbility().spellCanBeActivatedRegularlyNow(affectedControllerId, game)) {
|
&& objectCard.getSpellAbility().spellCanBeActivatedRegularlyNow(affectedControllerId, game)) {
|
||||||
if (affectedControllerId.equals(source.getControllerId())) {
|
if (affectedControllerId.equals(source.getControllerId())) {
|
||||||
KaradorGhostChieftainWatcher watcher =
|
KaradorGhostChieftainWatcher watcher
|
||||||
game.getState().getWatcher(KaradorGhostChieftainWatcher.class, source.getSourceId());
|
= game.getState().getWatcher(KaradorGhostChieftainWatcher.class, source.getSourceId());
|
||||||
return watcher != null
|
return watcher != null
|
||||||
&& !watcher.isAbilityUsed();
|
&& !watcher.isAbilityUsed();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.k;
|
package mage.cards.k;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -11,7 +10,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.token.WolfToken;
|
import mage.game.permanent.token.WolfToken;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -65,7 +64,7 @@ class KessigCagebreakersEffect extends OneShotEffect {
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
WolfToken token = new WolfToken();
|
WolfToken token = new WolfToken();
|
||||||
int count = player.getGraveyard().count(new FilterCreatureCard(), game);
|
int count = player.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game);
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId(), true, true);
|
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId(), true, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.k;
|
package mage.cards.k;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -28,7 +27,7 @@ import mage.constants.Outcome;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.ZoneChangeEvent;
|
import mage.game.events.ZoneChangeEvent;
|
||||||
|
@ -85,7 +84,7 @@ class KheruLichLordEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
Cards cards = new CardsImpl(controller.getGraveyard().getCards(new FilterCreatureCard(), source.getSourceId(), source.getControllerId(), game));
|
Cards cards = new CardsImpl(controller.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, source.getSourceId(), source.getControllerId(), game));
|
||||||
Card card = cards.getRandom(game);
|
Card card = cards.getRandom(game);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
controller.moveCards(card, Zone.BATTLEFIELD, source, game);
|
controller.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||||
|
|
|
@ -9,7 +9,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -27,7 +27,7 @@ public final class KraulForagers extends CardImpl {
|
||||||
|
|
||||||
// Undergrowth — When Kraul Foragers enters the battlefield, you gain 1 life for each creature card in your graveyard.
|
// Undergrowth — When Kraul Foragers enters the battlefield, you gain 1 life for each creature card in your graveyard.
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(
|
this.addAbility(new EntersBattlefieldTriggeredAbility(
|
||||||
new GainLifeEffect(new CardsInControllerGraveyardCount(new FilterCreatureCard())),
|
new GainLifeEffect(new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE)),
|
||||||
false, "<i>Undergrowth</i> — "
|
false, "<i>Undergrowth</i> — "
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.l;
|
package mage.cards.l;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -10,13 +9,13 @@ import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Layer;
|
import mage.constants.Layer;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SubLayer;
|
import mage.constants.SubLayer;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
|
@ -73,7 +72,7 @@ class LhurgoyfEffect extends ContinuousEffectImpl {
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
number += player.getGraveyard().count(new FilterCreatureCard(), game);
|
number += player.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
|
||||||
package mage.cards.l;
|
package mage.cards.l;
|
||||||
|
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.LoyaltyAbility;
|
import mage.abilities.LoyaltyAbility;
|
||||||
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
|
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
|
||||||
|
@ -11,20 +13,16 @@ import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
import java.util.LinkedHashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
|
@ -80,7 +78,7 @@ class LilianaVessEffect extends OneShotEffect {
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
creatureCards.addAll(player.getGraveyard().getCards(new FilterCreatureCard(), game));
|
creatureCards.addAll(player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
controller.moveCards(creatureCards, Zone.BATTLEFIELD, source, game, false, false, false, null);
|
controller.moveCards(creatureCards, Zone.BATTLEFIELD, source, game, false, false, false, null);
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.l;
|
package mage.cards.l;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -11,10 +10,10 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -29,7 +28,7 @@ public final class LilianasElite extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Liliana's Elite gets +1/+1 for each creature card in your graveyard.
|
// Liliana's Elite gets +1/+1 for each creature card in your graveyard.
|
||||||
DynamicValue amount = new CardsInControllerGraveyardCount(new FilterCreatureCard());
|
DynamicValue amount = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield));
|
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.l;
|
package mage.cards.l;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -13,7 +12,7 @@ import mage.cards.CardsImpl;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
|
@ -70,7 +69,7 @@ class LilianasIndignationEffect extends OneShotEffect {
|
||||||
Set<Card> movedCards = controller.moveCardsToGraveyardWithInfo(cardsToGraveyard.getCards(game), source, game, Zone.LIBRARY);
|
Set<Card> movedCards = controller.moveCardsToGraveyardWithInfo(cardsToGraveyard.getCards(game), source, game, Zone.LIBRARY);
|
||||||
Cards cardsMoved = new CardsImpl();
|
Cards cardsMoved = new CardsImpl();
|
||||||
cardsMoved.addAll(movedCards);
|
cardsMoved.addAll(movedCards);
|
||||||
int creatures = cardsMoved.count(new FilterCreatureCard(), game);
|
int creatures = cardsMoved.count(StaticFilters.FILTER_CARD_CREATURE, game);
|
||||||
if (creatures > 0) {
|
if (creatures > 0) {
|
||||||
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
|
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||||
if (targetPlayer != null) {
|
if (targetPlayer != null) {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.l;
|
package mage.cards.l;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -16,7 +15,6 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -68,11 +66,10 @@ class LivingDeathEffect extends OneShotEffect {
|
||||||
Map<UUID, Set<Card>> exiledCards = new HashMap<>();
|
Map<UUID, Set<Card>> exiledCards = new HashMap<>();
|
||||||
|
|
||||||
// Move creature cards from graveyard to exile
|
// Move creature cards from graveyard to exile
|
||||||
|
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
Set<Card> cardsPlayer = player.getGraveyard().getCards(new FilterCreatureCard(), game);
|
Set<Card> cardsPlayer = player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game);
|
||||||
if (!cardsPlayer.isEmpty()) {
|
if (!cardsPlayer.isEmpty()) {
|
||||||
exiledCards.put(player.getId(), cardsPlayer);
|
exiledCards.put(player.getId(), cardsPlayer);
|
||||||
player.moveCards(cardsPlayer, Zone.EXILED, source, game);
|
player.moveCards(cardsPlayer, Zone.EXILED, source, game);
|
||||||
|
@ -82,14 +79,12 @@ class LivingDeathEffect extends OneShotEffect {
|
||||||
game.applyEffects();
|
game.applyEffects();
|
||||||
|
|
||||||
// Sacrifice all creatures
|
// Sacrifice all creatures
|
||||||
|
|
||||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), game)) {
|
for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), game)) {
|
||||||
permanent.sacrifice(source.getSourceId(), game);
|
permanent.sacrifice(source.getSourceId(), game);
|
||||||
}
|
}
|
||||||
game.applyEffects();
|
game.applyEffects();
|
||||||
|
|
||||||
// Exiled cards are put onto the battlefield at the same time under their owner's control
|
// Exiled cards are put onto the battlefield at the same time under their owner's control
|
||||||
|
|
||||||
Set<Card> cardsToReturnFromExile = new HashSet<>();
|
Set<Card> cardsToReturnFromExile = new HashSet<>();
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.l;
|
package mage.cards.l;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -17,7 +16,6 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -77,7 +75,7 @@ class LivingEndEffect extends OneShotEffect {
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
Set<Card> cardsPlayer = player.getGraveyard().getCards(new FilterCreatureCard(), game);
|
Set<Card> cardsPlayer = player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game);
|
||||||
if (!cardsPlayer.isEmpty()) {
|
if (!cardsPlayer.isEmpty()) {
|
||||||
exiledCards.put(player.getId(), cardsPlayer);
|
exiledCards.put(player.getId(), cardsPlayer);
|
||||||
player.moveCards(cardsPlayer, Zone.EXILED, source, game);
|
player.moveCards(cardsPlayer, Zone.EXILED, source, game);
|
||||||
|
|
|
@ -15,7 +15,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetCard;
|
import mage.target.TargetCard;
|
||||||
|
@ -76,8 +76,8 @@ class LordOfTheVoidEffect extends OneShotEffect {
|
||||||
|
|
||||||
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 7));
|
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 7));
|
||||||
controller.moveCards(cards, Zone.EXILED, source, game);
|
controller.moveCards(cards, Zone.EXILED, source, game);
|
||||||
if (!cards.getCards(new FilterCreatureCard(), game).isEmpty()) {
|
if (!cards.getCards(StaticFilters.FILTER_CARD_CREATURE, game).isEmpty()) {
|
||||||
TargetCard target = new TargetCard(Zone.EXILED, new FilterCreatureCard());
|
TargetCard target = new TargetCard(Zone.EXILED, StaticFilters.FILTER_CARD_CREATURE);
|
||||||
if (controller.chooseTarget(outcome, cards, target, source, game)) {
|
if (controller.chooseTarget(outcome, cards, target, source, game)) {
|
||||||
Card card = cards.get(target.getFirstTarget(), game);
|
Card card = cards.get(target.getFirstTarget(), game);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.m;
|
package mage.cards.m;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -13,11 +12,11 @@ import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
@ -120,7 +119,7 @@ class MagisterOfWorthReturnFromGraveyardEffect extends OneShotEffect {
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
player.moveCards(player.getGraveyard().getCards(new FilterCreatureCard(), game), Zone.BATTLEFIELD, source, game);
|
player.moveCards(player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game), Zone.BATTLEFIELD, source, game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -13,7 +13,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetCardInHand;
|
import mage.target.common.TargetCardInHand;
|
||||||
|
@ -68,10 +68,10 @@ class MindMaggotsEffect extends OneShotEffect {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
int numToDiscard = controller.getAmount(0,
|
int numToDiscard = controller.getAmount(0,
|
||||||
controller.getHand().getCards(new FilterCreatureCard(), game).size(),
|
controller.getHand().getCards(StaticFilters.FILTER_CARD_CREATURE, game).size(),
|
||||||
"Discard how many creature cards?",
|
"Discard how many creature cards?",
|
||||||
game);
|
game);
|
||||||
TargetCardInHand target = new TargetCardInHand(numToDiscard, new FilterCreatureCard());
|
TargetCardInHand target = new TargetCardInHand(numToDiscard, StaticFilters.FILTER_CARD_CREATURE);
|
||||||
if (controller.choose(Outcome.Benefit, target, source.getSourceId(), game)) {
|
if (controller.choose(Outcome.Benefit, target, source.getSourceId(), game)) {
|
||||||
for (UUID targetId : target.getTargets()) {
|
for (UUID targetId : target.getTargets()) {
|
||||||
Card card = game.getCard(targetId);
|
Card card = game.getCard(targetId);
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.m;
|
package mage.cards.m;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -18,7 +17,7 @@ import mage.constants.Outcome;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
@ -52,7 +51,7 @@ public final class MomirVigSimicVisionary extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// Whenever you cast a green creature spell, you may search your library for a creature card and reveal it. If you do, shuffle your library and put that card on top of it.
|
// Whenever you cast a green creature spell, you may search your library for a creature card and reveal it. If you do, shuffle your library and put that card on top of it.
|
||||||
Effect effect = new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(new FilterCreatureCard()), true, true);
|
Effect effect = new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true, true);
|
||||||
effect.setText("you may search your library for a creature card and reveal it. If you do, shuffle your library and put that card on top of it");
|
effect.setText("you may search your library for a creature card and reveal it. If you do, shuffle your library and put that card on top of it");
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(effect, filter, true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(effect, filter, true));
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.m;
|
package mage.cards.m;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -9,7 +8,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.TimingRule;
|
import mage.constants.TimingRule;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,10 +20,9 @@ public final class MorgueTheft extends CardImpl {
|
||||||
public MorgueTheft(UUID ownerId, CardSetInfo setInfo) {
|
public MorgueTheft(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.
|
// Return target creature card from your graveyard to your hand.
|
||||||
this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
|
this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
|
||||||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard()));
|
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE));
|
||||||
// Flashback {4}{B}
|
// Flashback {4}{B}
|
||||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{B}"), TimingRule.SORCERY));
|
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{B}"), TimingRule.SORCERY));
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.m;
|
package mage.cards.m;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -11,7 +10,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
|
@ -43,11 +42,9 @@ public final class MortalCombat extends CardImpl {
|
||||||
|
|
||||||
class TwentyGraveyardCreatureCondition implements Condition {
|
class TwentyGraveyardCreatureCondition implements Condition {
|
||||||
|
|
||||||
private static final FilterCreatureCard filter = new FilterCreatureCard();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
return player != null && player.getGraveyard().count(filter, game) >= 20;
|
return player != null && player.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game) >= 20;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.n;
|
package mage.cards.n;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -12,8 +11,8 @@ import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.token.ZombieToken;
|
import mage.game.permanent.token.ZombieToken;
|
||||||
|
@ -72,7 +71,7 @@ class NecromancersConvenantEffect extends OneShotEffect {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (Card card : player.getGraveyard().getCards(new FilterCreatureCard(), game)) {
|
for (Card card : player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game)) {
|
||||||
if (card.moveToExile(source.getSourceId(), "Necromancer Covenant", source.getSourceId(), game)) {
|
if (card.moveToExile(source.getSourceId(), "Necromancer Covenant", source.getSourceId(), game)) {
|
||||||
count += 1;
|
count += 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.n;
|
package mage.cards.n;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -17,7 +16,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.token.ZombieToken;
|
import mage.game.permanent.token.ZombieToken;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -34,7 +33,7 @@ public final class NecromancersStockpile extends CardImpl {
|
||||||
// {1}{B}, Discard a creature card: Draw a card.
|
// {1}{B}, Discard a creature card: Draw a card.
|
||||||
// If the discarded card was a Zombie card, create a tapped 2/2 black Zombie creature token.
|
// If the discarded card was a Zombie card, create a tapped 2/2 black Zombie creature token.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{1}{B}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{1}{B}"));
|
||||||
ability.addCost(new NecromancersStockpileDiscardTargetCost(new TargetCardInHand(new FilterCreatureCard())));
|
ability.addCost(new NecromancersStockpileDiscardTargetCost(new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE)));
|
||||||
ability.addEffect(new NecromancersStockpilePutTokenEffect());
|
ability.addEffect(new NecromancersStockpilePutTokenEffect());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
package mage.cards.n;
|
package mage.cards.n;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
@ -12,13 +12,10 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.util.CardUtil;
|
import mage.util.CardUtil;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
|
@ -32,7 +29,7 @@ public final class NemesisOfMortals extends CardImpl {
|
||||||
this.toughness = new MageInt(5);
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
// Nemesis of Mortals costs {1} less to cast for each creature card in your graveyard.
|
// Nemesis of Mortals costs {1} less to cast for each creature card in your graveyard.
|
||||||
Ability ability = new SimpleStaticAbility(Zone.ALL, new SourceCostReductionForEachCardInGraveyardEffect(new FilterCreatureCard()));
|
Ability ability = new SimpleStaticAbility(Zone.ALL, new SourceCostReductionForEachCardInGraveyardEffect(StaticFilters.FILTER_CARD_CREATURE));
|
||||||
ability.setRuleAtTheTop(true);
|
ability.setRuleAtTheTop(true);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.n;
|
package mage.cards.n;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -16,7 +15,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
|
@ -56,7 +55,7 @@ class NetherSpiritCondition implements Condition {
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
Card card = game.getCard(source.getSourceId());
|
Card card = game.getCard(source.getSourceId());
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
return player.getGraveyard().contains(card.getId()) && player.getGraveyard().count(new FilterCreatureCard(), game) == 1;
|
return player.getGraveyard().contains(card.getId()) && player.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game) == 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.n;
|
package mage.cards.n;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -14,10 +13,10 @@ import mage.abilities.keyword.BestowAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -35,7 +34,7 @@ public final class Nighthowler extends CardImpl {
|
||||||
// Bestow {2}{B}{B}
|
// Bestow {2}{B}{B}
|
||||||
this.addAbility(new BestowAbility(this, "{2}{B}{B}"));
|
this.addAbility(new BestowAbility(this, "{2}{B}{B}"));
|
||||||
// Nighthowler and enchanted creature each get +X/+X, where X is the number of creature cards in all graveyards.
|
// Nighthowler and enchanted creature each get +X/+X, where X is the number of creature cards in all graveyards.
|
||||||
DynamicValue graveCreatures = new CardsInAllGraveyardsCount(new FilterCreatureCard());
|
DynamicValue graveCreatures = new CardsInAllGraveyardsCount(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
Effect effect = new BoostSourceEffect(graveCreatures, graveCreatures, Duration.WhileOnBattlefield);
|
Effect effect = new BoostSourceEffect(graveCreatures, graveCreatures, Duration.WhileOnBattlefield);
|
||||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
|
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
|
||||||
effect = new BoostEnchantedEffect(graveCreatures, graveCreatures, Duration.WhileOnBattlefield);
|
effect = new BoostEnchantedEffect(graveCreatures, graveCreatures, Duration.WhileOnBattlefield);
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.o;
|
package mage.cards.o;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -13,7 +12,6 @@ import mage.constants.CardType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.target.common.TargetCardInGraveyard;
|
import mage.target.common.TargetCardInGraveyard;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,7 +25,7 @@ public final class OversoldCemetery extends CardImpl {
|
||||||
|
|
||||||
// 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.
|
// 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()));
|
ability.addTarget(new TargetCardInGraveyard(StaticFilters.FILTER_CARD_CREATURE));
|
||||||
CardsInControllerGraveCondition condition = new CardsInControllerGraveCondition(4, StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
|
CardsInControllerGraveCondition condition = new CardsInControllerGraveCondition(4, StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(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."));
|
this.addAbility(new ConditionalInterveningIfTriggeredAbility(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."));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
package mage.cards.p;
|
package mage.cards.p;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldAbility;
|
import mage.abilities.common.EntersBattlefieldAbility;
|
||||||
|
@ -15,11 +15,9 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
|
@ -41,7 +39,7 @@ public final class PalaceSiege extends CardImpl {
|
||||||
new BeginningOfUpkeepTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), TargetController.YOU, false),
|
new BeginningOfUpkeepTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), TargetController.YOU, false),
|
||||||
new ModeChoiceSourceCondition("Khans"),
|
new ModeChoiceSourceCondition("Khans"),
|
||||||
ruleTrigger1);
|
ruleTrigger1);
|
||||||
ability1.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard()));
|
ability1.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE));
|
||||||
this.addAbility(ability1);
|
this.addAbility(ability1);
|
||||||
|
|
||||||
// * Dragons - At the beginning of your upkeep, each opponent loses 2 life and you gain 2 life.
|
// * Dragons - At the beginning of your upkeep, each opponent loses 2 life and you gain 2 life.
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.p;
|
package mage.cards.p;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -9,10 +8,10 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.ComparisonType;
|
import mage.constants.ComparisonType;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||||
|
@ -42,7 +41,7 @@ public final class Paleoloth extends CardImpl {
|
||||||
|
|
||||||
// Whenever another creature with power 5 or greater enters the battlefield under your control, you may return target creature card from your graveyard to your hand.
|
// Whenever another creature with power 5 or greater enters the battlefield under your control, you may return target creature card from your graveyard to your hand.
|
||||||
Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), filter, true, rule);
|
Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), filter, true, rule);
|
||||||
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard()));
|
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package mage.cards.p;
|
package mage.cards.p;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.DiesAttachedTriggeredAbility;
|
import mage.abilities.common.DiesAttachedTriggeredAbility;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
|
@ -12,13 +13,11 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SetTargetPointer;
|
import mage.constants.SetTargetPointer;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
|
@ -36,7 +35,7 @@ public final class PatternOfRebirth extends CardImpl {
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// When enchanted creature dies, that creature's controller may search their library for a creature card and put that card onto the battlefield. If that player does, they shuffle their library.
|
// When enchanted creature dies, that creature's controller may search their library for a creature card and put that card onto the battlefield. If that player does, they shuffle their library.
|
||||||
Effect effect = new SearchLibraryPutInPlayTargetPlayerEffect(new TargetCardInLibrary(new FilterCreatureCard()), false, false, Outcome.PutCreatureInPlay);
|
Effect effect = new SearchLibraryPutInPlayTargetPlayerEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), false, false, Outcome.PutCreatureInPlay);
|
||||||
effect.setText("that creature's controller may search their library for a creature card and put that card onto the battlefield. If that player does, they shuffle their library");
|
effect.setText("that creature's controller may search their library for a creature card and put that card onto the battlefield. If that player does, they shuffle their library");
|
||||||
this.addAbility(new DiesAttachedTriggeredAbility(effect, "enchanted creature", true, true, SetTargetPointer.ATTACHED_TO_CONTROLLER));
|
this.addAbility(new DiesAttachedTriggeredAbility(effect, "enchanted creature", true, true, SetTargetPointer.ATTACHED_TO_CONTROLLER));
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.p;
|
package mage.cards.p;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -14,7 +13,6 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
@ -62,7 +60,7 @@ class CreatureCardsInControllerGraveCondition implements Condition {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player p = game.getPlayer(source.getControllerId());
|
Player p = game.getPlayer(source.getControllerId());
|
||||||
if (p != null && p.getGraveyard().count(new FilterCreatureCard(), game) >= value) {
|
if (p != null && p.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game) >= value) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.p;
|
package mage.cards.p;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -15,7 +14,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
@ -32,6 +31,7 @@ import mage.target.common.TargetCardInLibrary;
|
||||||
public final class PrimalCommand extends CardImpl {
|
public final class PrimalCommand extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filterNonCreature = new FilterPermanent("noncreature permanent");
|
private static final FilterPermanent filterNonCreature = new FilterPermanent("noncreature permanent");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filterNonCreature.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
filterNonCreature.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ public final class PrimalCommand extends CardImpl {
|
||||||
public PrimalCommand(UUID ownerId, CardSetInfo setInfo) {
|
public PrimalCommand(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}{G}");
|
||||||
|
|
||||||
|
|
||||||
// Choose two -
|
// Choose two -
|
||||||
this.getSpellAbility().getModes().setMinModes(2);
|
this.getSpellAbility().getModes().setMinModes(2);
|
||||||
this.getSpellAbility().getModes().setMaxModes(2);
|
this.getSpellAbility().getModes().setMaxModes(2);
|
||||||
|
@ -59,7 +58,7 @@ public final class PrimalCommand extends CardImpl {
|
||||||
this.getSpellAbility().getModes().addMode(mode);
|
this.getSpellAbility().getModes().addMode(mode);
|
||||||
// or search your library for a creature card, reveal it, put it into your hand, then shuffle your library.
|
// or search your library for a creature card, reveal it, put it into your hand, then shuffle your library.
|
||||||
mode = new Mode();
|
mode = new Mode();
|
||||||
mode.addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterCreatureCard()), true, true));
|
mode.addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true, true));
|
||||||
this.getSpellAbility().getModes().addMode(mode);
|
this.getSpellAbility().getModes().addMode(mode);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
package mage.cards.r;
|
package mage.cards.r;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||||
|
@ -14,13 +14,11 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetOpponent;
|
import mage.target.common.TargetOpponent;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Quercitron
|
* @author Quercitron
|
||||||
*/
|
*/
|
||||||
|
@ -54,8 +52,6 @@ public final class RagMan extends CardImpl {
|
||||||
|
|
||||||
class RagManDiscardEffect extends OneShotEffect {
|
class RagManDiscardEffect extends OneShotEffect {
|
||||||
|
|
||||||
private static final FilterCreatureCard filter = new FilterCreatureCard();
|
|
||||||
|
|
||||||
public RagManDiscardEffect() {
|
public RagManDiscardEffect() {
|
||||||
super(Outcome.Discard);
|
super(Outcome.Discard);
|
||||||
this.staticText = "and discards a creature card at random";
|
this.staticText = "and discards a creature card at random";
|
||||||
|
@ -77,7 +73,7 @@ class RagManDiscardEffect extends OneShotEffect {
|
||||||
Cards creatureCardsInHand = new CardsImpl();
|
Cards creatureCardsInHand = new CardsImpl();
|
||||||
for (UUID cardId : player.getHand()) {
|
for (UUID cardId : player.getHand()) {
|
||||||
Card card = player.getHand().get(cardId, game);
|
Card card = player.getHand().get(cardId, game);
|
||||||
if (filter.match(card, game)) {
|
if (StaticFilters.FILTER_CARD_CREATURE.match(card, game)) {
|
||||||
creatureCardsInHand.add(card);
|
creatureCardsInHand.add(card);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.r;
|
package mage.cards.r;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -13,7 +12,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
|
@ -27,7 +26,6 @@ public final class Repopulate extends CardImpl {
|
||||||
public Repopulate(UUID ownerId, CardSetInfo setInfo) {
|
public Repopulate(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}");
|
||||||
|
|
||||||
|
|
||||||
// Shuffle all creature cards from target player's graveyard into that player's library.
|
// Shuffle all creature cards from target player's graveyard into that player's library.
|
||||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||||
this.getSpellAbility().addEffect(new RepopulateEffect());
|
this.getSpellAbility().addEffect(new RepopulateEffect());
|
||||||
|
@ -60,9 +58,8 @@ class RepopulateEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player player = game.getPlayer(source.getFirstTarget());
|
Player player = game.getPlayer(source.getFirstTarget());
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
Set<Card> cards = player.getGraveyard().getCards(new FilterCreatureCard(), game);
|
Set<Card> cards = player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game);
|
||||||
for(Card card : cards)
|
for (Card card : cards) {
|
||||||
{
|
|
||||||
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
||||||
}
|
}
|
||||||
player.shuffleLibrary(source, game);
|
player.shuffleLibrary(source, game);
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.r;
|
package mage.cards.r;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -11,7 +10,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.token.RitualOfTheReturnedZombieToken;
|
import mage.game.permanent.token.RitualOfTheReturnedZombieToken;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -28,7 +27,7 @@ public final class RitualOfTheReturned extends CardImpl {
|
||||||
|
|
||||||
// Exile target creature card from your graveyard. Create a black Zombie creature token with power equal to the exiled card's power and toughness equal to the exiled card's toughness.
|
// Exile target creature card from your graveyard. Create a black Zombie creature token with power equal to the exiled card's power and toughness equal to the exiled card's toughness.
|
||||||
this.getSpellAbility().addEffect(new RitualOfTheReturnedExileEffect());
|
this.getSpellAbility().addEffect(new RitualOfTheReturnedExileEffect());
|
||||||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard()));
|
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE));
|
||||||
}
|
}
|
||||||
|
|
||||||
public RitualOfTheReturned(final RitualOfTheReturned card) {
|
public RitualOfTheReturned(final RitualOfTheReturned card) {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -7,8 +6,8 @@ import mage.abilities.DelayedTriggeredAbility;
|
||||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.ExileTargetEffect;
|
|
||||||
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
|
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
|
||||||
|
import mage.abilities.effects.common.ExileTargetEffect;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
@ -17,7 +16,7 @@ import mage.constants.Outcome;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
@ -35,7 +34,7 @@ public final class Seance extends CardImpl {
|
||||||
|
|
||||||
// At the beginning of each upkeep, you may exile target creature card from your graveyard. If you do, create a token that's a copy of that card except it's a Spirit in addition to its other types. Exile it at the beginning of the next end step.
|
// At the beginning of each upkeep, you may exile target creature card from your graveyard. If you do, create a token that's a copy of that card except it's a Spirit in addition to its other types. Exile it at the beginning of the next end step.
|
||||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(new SeanceEffect(), TargetController.ANY, true);
|
Ability ability = new BeginningOfUpkeepTriggeredAbility(new SeanceEffect(), TargetController.ANY, true);
|
||||||
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard()));
|
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -11,9 +10,9 @@ import mage.abilities.keyword.ReachAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.constants.SubType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.token.SeedGuardianToken;
|
import mage.game.permanent.token.SeedGuardianToken;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -66,7 +65,7 @@ class SeedGuardianEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
int creaturesInGraveyard = controller.getGraveyard().count(new FilterCreatureCard(), game);
|
int creaturesInGraveyard = controller.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game);
|
||||||
return new CreateTokenEffect(new SeedGuardianToken(creaturesInGraveyard)).apply(game, source);
|
return new CreateTokenEffect(new SeedGuardianToken(creaturesInGraveyard)).apply(game, source);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -18,7 +17,6 @@ import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
@ -83,7 +81,7 @@ class CreatureCardsInControllerGraveCondition implements Condition {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player p = game.getPlayer(source.getControllerId());
|
Player p = game.getPlayer(source.getControllerId());
|
||||||
if (p != null && p.getGraveyard().count(new FilterCreatureCard(), game) >= value) {
|
if (p != null && p.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game) >= value) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -15,7 +14,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -31,7 +30,7 @@ public final class ShadowsOfThePast extends CardImpl {
|
||||||
|
|
||||||
// {4}{B}: Each opponent loses 2 life and you gain 2 life. Activate this ability only if there are four or more creature cards in your graveyard.
|
// {4}{B}: Each opponent loses 2 life and you gain 2 life. Activate this ability only if there are four or more creature cards in your graveyard.
|
||||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||||
new LoseLifeOpponentsEffect(2), new ManaCostsImpl<>("{4}{B}"), new CardsInControllerGraveCondition(4, new FilterCreatureCard()));
|
new LoseLifeOpponentsEffect(2), new ManaCostsImpl<>("{4}{B}"), new CardsInControllerGraveCondition(4, StaticFilters.FILTER_CARD_CREATURE));
|
||||||
Effect effect = new GainLifeEffect(2);
|
Effect effect = new GainLifeEffect(2);
|
||||||
effect.setText("and you gain 2 life");
|
effect.setText("and you gain 2 life");
|
||||||
ability.addEffect(effect);
|
ability.addEffect(effect);
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.SearchEffect;
|
import mage.abilities.effects.SearchEffect;
|
||||||
|
@ -8,15 +10,11 @@ import mage.cards.*;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Plopman
|
* @author Plopman
|
||||||
|
@ -26,7 +24,6 @@ public final class SignalTheClans extends CardImpl {
|
||||||
public SignalTheClans(UUID ownerId, CardSetInfo setInfo) {
|
public SignalTheClans(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}{G}");
|
||||||
|
|
||||||
|
|
||||||
// Search your library for three creature cards and reveal them. If you reveal three cards with different names, choose one of them at random and put that card into your hand. Shuffle the rest into your library.
|
// Search your library for three creature cards and reveal them. If you reveal three cards with different names, choose one of them at random and put that card into your hand. Shuffle the rest into your library.
|
||||||
this.getSpellAbility().addEffect(new SignalTheClansEffect());
|
this.getSpellAbility().addEffect(new SignalTheClansEffect());
|
||||||
}
|
}
|
||||||
|
@ -43,9 +40,8 @@ public final class SignalTheClans extends CardImpl {
|
||||||
|
|
||||||
class SignalTheClansEffect extends SearchEffect {
|
class SignalTheClansEffect extends SearchEffect {
|
||||||
|
|
||||||
|
|
||||||
public SignalTheClansEffect() {
|
public SignalTheClansEffect() {
|
||||||
super(new TargetCardInLibrary(3, new FilterCreatureCard()), Outcome.DrawCard);
|
super(new TargetCardInLibrary(3, StaticFilters.FILTER_CARD_CREATURE), Outcome.DrawCard);
|
||||||
staticText = "Search your library for three creature cards and reveal them. If you reveal three cards with different names, choose one of them at random and put that card into your hand. Shuffle the rest into your library";
|
staticText = "Search your library for three creature cards and reveal them. If you reveal three cards with different names, choose one of them at random and put that card into your hand. Shuffle the rest into your library";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
@ -12,7 +14,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.cards.CardsImpl;
|
import mage.cards.CardsImpl;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.permanent.BlockedByIdPredicate;
|
import mage.filter.predicate.permanent.BlockedByIdPredicate;
|
||||||
|
@ -23,9 +25,6 @@ import mage.players.Player;
|
||||||
import mage.target.TargetCard;
|
import mage.target.TargetCard;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
|
@ -87,7 +86,7 @@ class SistersOfStoneDeathEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
CardsImpl cardsInExile = new CardsImpl();
|
CardsImpl cardsInExile = new CardsImpl();
|
||||||
TargetCard target = new TargetCard(Zone.EXILED, new FilterCreatureCard());
|
TargetCard target = new TargetCard(Zone.EXILED, StaticFilters.FILTER_CARD_CREATURE);
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
ExileZone exile = game.getExile().getExileZone(exileId);
|
ExileZone exile = game.getExile().getExileZone(exileId);
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -24,7 +23,7 @@ import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.ZoneChangeEvent;
|
import mage.game.events.ZoneChangeEvent;
|
||||||
|
@ -50,7 +49,7 @@ public final class SithMagic extends CardImpl {
|
||||||
triggeredAbility,
|
triggeredAbility,
|
||||||
HateCondition.instance,
|
HateCondition.instance,
|
||||||
"<i>Hate</i> — At the beggining of each combat, if opponent lost life from a source other than combat damage this turn, you may return target card from a graveyard to the battlefield under your control. It gains lifelink and haste. Exile it at the beginning of the next end step or if it would leave the battlefield.");
|
"<i>Hate</i> — At the beggining of each combat, if opponent lost life from a source other than combat damage this turn, you may return target card from a graveyard to the battlefield under your control. It gains lifelink and haste. Exile it at the beginning of the next end step or if it would leave the battlefield.");
|
||||||
ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard()));
|
ability.addTarget(new TargetCardInGraveyard(StaticFilters.FILTER_CARD_CREATURE));
|
||||||
this.addAbility(ability, new LifeLossOtherFromCombatWatcher());
|
this.addAbility(ability, new LifeLossOtherFromCombatWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -10,10 +9,10 @@ import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.common.TargetCardInHand;
|
import mage.target.common.TargetCardInHand;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,7 +34,7 @@ public final class SkyshroudVampire extends CardImpl {
|
||||||
this.addAbility(new SimpleActivatedAbility(
|
this.addAbility(new SimpleActivatedAbility(
|
||||||
Zone.BATTLEFIELD,
|
Zone.BATTLEFIELD,
|
||||||
new BoostSourceEffect(2, 2, Duration.EndOfTurn),
|
new BoostSourceEffect(2, 2, Duration.EndOfTurn),
|
||||||
new DiscardTargetCost(new TargetCardInHand(new FilterCreatureCard()))));
|
new DiscardTargetCost(new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE))));
|
||||||
}
|
}
|
||||||
|
|
||||||
public SkyshroudVampire(final SkyshroudVampire card) {
|
public SkyshroudVampire(final SkyshroudVampire card) {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -19,7 +18,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -72,7 +71,7 @@ class SneakAttackEffect extends OneShotEffect {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
if (controller.chooseUse(Outcome.PutCreatureInPlay, choiceText, source, game)) {
|
if (controller.chooseUse(Outcome.PutCreatureInPlay, choiceText, source, game)) {
|
||||||
TargetCardInHand target = new TargetCardInHand(new FilterCreatureCard());
|
TargetCardInHand target = new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE);
|
||||||
if (controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
|
if (controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
|
||||||
Card card = game.getCard(target.getFirstTarget());
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -17,7 +16,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
import mage.game.events.GameEvent.EventType;
|
||||||
|
@ -76,7 +75,7 @@ class SongOfBloodEffect extends OneShotEffect {
|
||||||
Set<Card> movedCards = controller.moveCardsToGraveyardWithInfo(cardsToGraveyard.getCards(game), source, game, Zone.LIBRARY);
|
Set<Card> movedCards = controller.moveCardsToGraveyardWithInfo(cardsToGraveyard.getCards(game), source, game, Zone.LIBRARY);
|
||||||
Cards cardsMoved = new CardsImpl();
|
Cards cardsMoved = new CardsImpl();
|
||||||
cardsMoved.addAll(movedCards);
|
cardsMoved.addAll(movedCards);
|
||||||
int creatures = cardsMoved.count(new FilterCreatureCard(), game);
|
int creatures = cardsMoved.count(StaticFilters.FILTER_CARD_CREATURE, game);
|
||||||
if (creatures > 0) {
|
if (creatures > 0) {
|
||||||
// Setup a delayed trigger to give +X/+0 to any creature attacking this turn..
|
// Setup a delayed trigger to give +X/+0 to any creature attacking this turn..
|
||||||
DelayedTriggeredAbility delayedAbility = new SongOfBloodTriggeredAbility(creatures);
|
DelayedTriggeredAbility delayedAbility = new SongOfBloodTriggeredAbility(creatures);
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -8,7 +7,7 @@ import mage.abilities.effects.mana.DynamicManaEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -20,7 +19,7 @@ public final class SongsOfTheDamned extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}");
|
||||||
|
|
||||||
// Add {B} for each creature card in your graveyard.
|
// Add {B} for each creature card in your graveyard.
|
||||||
DynamicManaEffect effect = new DynamicManaEffect(Mana.BlackMana(1), new CardsInControllerGraveyardCount(new FilterCreatureCard()));
|
DynamicManaEffect effect = new DynamicManaEffect(Mana.BlackMana(1), new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE));
|
||||||
this.getSpellAbility().addEffect(effect);
|
this.getSpellAbility().addEffect(effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -10,7 +9,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.TimingRule;
|
import mage.constants.TimingRule;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.permanent.token.SpiderToken;
|
import mage.game.permanent.token.SpiderToken;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,7 +22,7 @@ public final class SpiderSpawning extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}");
|
||||||
|
|
||||||
// Create a 1/2 green Spider creature token with reach for each creature card in your graveyard.
|
// Create a 1/2 green Spider creature token with reach for each creature card in your graveyard.
|
||||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new SpiderToken(), new CardsInControllerGraveyardCount(new FilterCreatureCard())));
|
this.getSpellAbility().addEffect(new CreateTokenEffect(new SpiderToken(), new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE)));
|
||||||
// Flashback {6}{B}
|
// Flashback {6}{B}
|
||||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{6}{B}"), TimingRule.SORCERY));
|
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{6}{B}"), TimingRule.SORCERY));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -6,7 +5,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutOnLibraryEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,9 +17,8 @@ public final class SylvanTutor extends CardImpl {
|
||||||
public SylvanTutor(UUID ownerId, CardSetInfo setInfo) {
|
public SylvanTutor(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}");
|
||||||
|
|
||||||
|
|
||||||
// Search your library for a creature card and reveal that card. Shuffle your library, then put the card on top of it.
|
// Search your library for a creature card and reveal that card. Shuffle your library, then put the card on top of it.
|
||||||
this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(new FilterCreatureCard()), true, true));
|
this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public SylvanTutor(final SylvanTutor card) {
|
public SylvanTutor(final SylvanTutor card) {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue