mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
Cleanup subtype filters that shouldn't limit to creatures (#11920)
* common Cohort Ability
This commit is contained in:
parent
59bbb1f2b0
commit
347f07ce81
215 changed files with 660 additions and 1212 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -9,7 +8,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -24,7 +23,7 @@ public final class AbyssalGatekeeper extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// When Abyssal Gatekeeper dies, each player sacrifices a creature.
|
||||
this.addAbility(new DiesSourceTriggeredAbility(new SacrificeAllEffect(1, new FilterControlledCreaturePermanent("creature"))));
|
||||
this.addAbility(new DiesSourceTriggeredAbility(new SacrificeAllEffect(1, StaticFilters.FILTER_PERMANENT_CREATURE)));
|
||||
}
|
||||
|
||||
private AbyssalGatekeeper(final AbyssalGatekeeper card) {
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -17,8 +16,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class AbyssalGorestalker extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("creatures");
|
||||
|
||||
public AbyssalGorestalker(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}");
|
||||
|
||||
|
|
@ -27,7 +24,7 @@ public final class AbyssalGorestalker extends CardImpl {
|
|||
this.toughness = new MageInt(6);
|
||||
|
||||
// When Abyssal Gorestalker enters the battlefield, each player sacrifices two creatures.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeAllEffect(2, filter)));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeAllEffect(2, StaticFilters.FILTER_PERMANENT_CREATURES)));
|
||||
}
|
||||
|
||||
private AbyssalGorestalker(final AbyssalGorestalker card) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -11,7 +10,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -22,9 +21,8 @@ public final class AggravatedAssault extends CardImpl {
|
|||
public AggravatedAssault(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}");
|
||||
|
||||
|
||||
// {3}{R}{R}: Untap all creatures you control. After this main phase, there is an additional combat phase followed by an additional main phase. Activate this ability only any time you could cast a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new UntapAllControllerEffect(new FilterControlledCreaturePermanent(), "Untap all creatures you control"), new ManaCostsImpl<>("{3}{R}{R}"));
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new UntapAllControllerEffect(StaticFilters.FILTER_CONTROLLED_CREATURES, "Untap all creatures you control"), new ManaCostsImpl<>("{3}{R}{R}"));
|
||||
ability.addEffect(new AddCombatAndMainPhaseEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import mage.constants.SubType;
|
|||
import mage.constants.SuperType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterPlaneswalkerPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.command.emblems.AjaniSteadfastEmblem;
|
||||
|
|
@ -62,7 +62,7 @@ public final class AjaniSteadfast extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// -2: Put a +1/+1 counter on each creature you control and a loyalty counter on each other planeswalker you control.
|
||||
ability = new LoyaltyAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), new FilterControlledCreaturePermanent()), -2);
|
||||
ability = new LoyaltyAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURE), -2);
|
||||
effect = new AddCountersAllEffect(CounterType.LOYALTY.createInstance(), filter);
|
||||
effect.setText("and a loyalty counter on each other planeswalker you control");
|
||||
ability.addEffect(effect);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import mage.constants.SuperType;
|
|||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterPermanentCard;
|
||||
import mage.filter.common.FilterPlaneswalkerPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
|
@ -51,7 +51,7 @@ public final class AjaniUnyielding extends CardImpl {
|
|||
this.addAbility(ajaniAbility2);
|
||||
|
||||
// -9: Put five +1/+1 counters on each creature you control and five loyalty counters on each other planeswalker you control.
|
||||
LoyaltyAbility ajaniAbility3 = new LoyaltyAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(5), new FilterControlledCreaturePermanent()), -9);
|
||||
LoyaltyAbility ajaniAbility3 = new LoyaltyAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(5), StaticFilters.FILTER_CONTROLLED_CREATURE), -9);
|
||||
ajaniAbility3.addEffect(new AddCountersAllEffect(CounterType.LOYALTY.createInstance(5), planeswalkerFilter).setText("and five loyalty counters on each other planeswalker you control"));
|
||||
this.addAbility(ajaniAbility3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,19 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.abilityword.CohortAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -24,13 +21,6 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public final class AkoumFlameseeker extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an untapped Ally you control");
|
||||
|
||||
static {
|
||||
filter.add(SubType.ALLY.getPredicate());
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
public AkoumFlameseeker(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
|
|
@ -40,11 +30,7 @@ public final class AkoumFlameseeker extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// <i>Cohort</i> — {T}, Tap an untapped Ally you control: Discard a card. If you do, draw a card.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new AkoumFlameseekerEffect(), new TapSourceCost());
|
||||
ability.addCost(new TapTargetCost(new TargetControlledPermanent(filter)));
|
||||
ability.setAbilityWord(AbilityWord.COHORT);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new CohortAbility(new AkoumFlameseekerEffect()));
|
||||
}
|
||||
|
||||
private AkoumFlameseeker(final AkoumFlameseeker card) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -10,7 +9,7 @@ import mage.cards.SplitCard;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SpellAbilityType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.CentaurToken;
|
||||
import mage.players.Player;
|
||||
|
|
@ -46,8 +45,6 @@ public final class AliveWell extends SplitCard {
|
|||
|
||||
class WellEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
public WellEffect() {
|
||||
super(Outcome.GainLife);
|
||||
staticText = "You gain 2 life for each creature you control";
|
||||
|
|
@ -66,7 +63,7 @@ class WellEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
int life = 2 * game.getBattlefield().count(filter, source.getControllerId(), source, game);
|
||||
int life = 2 * game.getBattlefield().count(StaticFilters.FILTER_CONTROLLED_CREATURE, source.getControllerId(), source, game);
|
||||
player.gainLife(life, game, source);
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -17,8 +16,8 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -26,10 +25,11 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
*/
|
||||
public final class AllyEncampment extends CardImpl {
|
||||
|
||||
private static final FilterSpell FILTER = new FilterSpell("an Ally spell");
|
||||
private static final FilterSpell filterSpell = new FilterSpell("an Ally spell");
|
||||
private static final FilterControlledPermanent filterPermanent = new FilterControlledPermanent(SubType.ALLY, "Ally you control");
|
||||
|
||||
static {
|
||||
FILTER.add(SubType.ALLY.getPredicate());
|
||||
filterSpell.add(SubType.ALLY.getPredicate());
|
||||
}
|
||||
|
||||
public AllyEncampment(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
@ -39,13 +39,13 @@ public final class AllyEncampment extends CardImpl {
|
|||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {T} Add one mana of any color. Spend this mana only to cast an Ally spell.
|
||||
this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new ConditionalSpellManaBuilder(FILTER), true));
|
||||
this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new ConditionalSpellManaBuilder(filterSpell), true));
|
||||
|
||||
// {1}, {T}, Sacrifice Ally Encampment: Return target Ally you control to its owner's hand.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new GenericManaCost(1));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent(SubType.ALLY, "Ally you control")));
|
||||
ability.addTarget(new TargetControlledPermanent(filterPermanent));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -16,16 +15,13 @@ import mage.constants.Outcome;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.*;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -33,7 +29,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class ArachnusSpinner extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped Spider you control");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Spider you control");
|
||||
|
||||
static {
|
||||
filter.add(SubType.SPIDER.getPredicate());
|
||||
|
|
@ -52,7 +48,7 @@ public final class ArachnusSpinner extends CardImpl {
|
|||
// Tap an untapped Spider you control: Search your graveyard and/or library for a card named Arachnus Web and put it onto the battlefield attached to target creature. If you search your library this way, shuffle it.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new ArachnusSpinnerEffect(),
|
||||
new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false)));
|
||||
new TapTargetCost(new TargetControlledPermanent(1, 1, filter, false)));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,13 +11,11 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetSacrifice;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -27,11 +25,10 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class ArchdemonOfGreed extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Human");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Human");
|
||||
|
||||
static {
|
||||
filter.add(SubType.HUMAN.getPredicate());
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
public ArchdemonOfGreed(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -12,8 +11,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -22,11 +20,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class ArmsDealer extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Goblin");
|
||||
|
||||
static {
|
||||
filter.add(SubType.GOBLIN.getPredicate());
|
||||
}
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.GOBLIN, "Goblin");
|
||||
|
||||
public ArmsDealer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}");
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
|
|
@ -32,7 +31,7 @@ public final class AshenmoorCohort extends CardImpl {
|
|||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
private static final String rule = "Ashenmoor Cohort gets +1/+1 as long as you control another black creature";
|
||||
private static final String rule = "{this} gets +1/+1 as long as you control another black creature";
|
||||
|
||||
public AshenmoorCohort(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}");
|
||||
|
|
|
|||
|
|
@ -5,10 +5,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetSacrifice;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -17,14 +14,11 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class BankruptInBlood extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter
|
||||
= new FilterControlledCreaturePermanent("creatures");
|
||||
|
||||
public BankruptInBlood(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
|
||||
|
||||
// As an additional cost to cast this spell, sacrifice two creatures.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(2, filter));
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(2, StaticFilters.FILTER_PERMANENT_CREATURES));
|
||||
|
||||
// Draw three cards.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(3));
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ import mage.abilities.effects.common.SacrificeAllEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -14,13 +13,11 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class BarterInBlood extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("creatures");
|
||||
|
||||
public BarterInBlood(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}{B}");
|
||||
|
||||
// Each player sacrifices two creatures.
|
||||
this.getSpellAbility().addEffect(new SacrificeAllEffect(2, filter));
|
||||
this.getSpellAbility().addEffect(new SacrificeAllEffect(2, StaticFilters.FILTER_PERMANENT_CREATURES));
|
||||
}
|
||||
|
||||
private BarterInBlood(final BarterInBlood card) {
|
||||
|
|
|
|||
|
|
@ -8,11 +8,10 @@ import mage.abilities.effects.PreventionEffectImpl;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamageEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.events.PreventDamageEvent;
|
||||
import mage.game.events.PreventedDamageEvent;
|
||||
import mage.players.Player;
|
||||
|
|
@ -66,7 +65,7 @@ class BattletideAlchemistEffect extends PreventionEffectImpl {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Player targetPlayer = game.getPlayer(event.getTargetId());
|
||||
if (controller != null && targetPlayer != null) {
|
||||
int numberOfClericsControlled = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent(SubType.CLERIC, "Clerics")).calculate(game, source, this);
|
||||
int numberOfClericsControlled = new PermanentsOnBattlefieldCount(new FilterControlledPermanent(SubType.CLERIC, "Clerics")).calculate(game, source, this);
|
||||
int toPrevent = Math.min(numberOfClericsControlled, event.getAmount());
|
||||
if (toPrevent > 0 && controller.chooseUse(Outcome.PreventDamage, "Prevent " + toPrevent + " damage to " + targetPlayer.getName() + '?', source, game)) {
|
||||
GameEvent preventEvent = new PreventDamageEvent(event.getTargetId(), source.getSourceId(), source, source.getControllerId(), toPrevent, ((DamageEvent) event).isCombatDamage());
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -31,7 +31,7 @@ public final class Borborygmos extends CardImpl {
|
|||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// Whenever Borborygmos deals combat damage to a player, put a +1/+1 counter on each creature you control.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), new FilterControlledCreaturePermanent()), false));
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURE), false));
|
||||
}
|
||||
|
||||
private Borborygmos(final Borborygmos card) {
|
||||
|
|
|
|||
|
|
@ -18,14 +18,14 @@ import mage.constants.Outcome;
|
|||
import mage.constants.SpellAbilityType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetSacrifice;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -79,27 +79,27 @@ class BoundEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
TargetControlledPermanent target = new TargetControlledPermanent(1, 1, new FilterControlledCreaturePermanent("a creature (to sacrifice)"), true);
|
||||
if (target.canChoose(controller.getId(), source, game)) {
|
||||
if (controller.chooseTarget(outcome, target, source, game)) {
|
||||
Permanent toSacrifice = game.getPermanent(target.getFirstTarget());
|
||||
if (toSacrifice != null) {
|
||||
toSacrifice.sacrifice(source, game);
|
||||
game.getState().processAction(game);
|
||||
int colors = toSacrifice.getColor(game).getColorCount();
|
||||
if (colors > 0) {
|
||||
TargetCardInYourGraveyard targetCard = new TargetCardInYourGraveyard(0, colors,
|
||||
new FilterCard("up to " + colors + " card" + (colors > 1 ? "s" : "") + " from your graveyard"));
|
||||
controller.chooseTarget(outcome, targetCard, source, game);
|
||||
controller.moveCards(new CardsImpl(targetCard.getTargets()), Zone.HAND, source, game);
|
||||
}
|
||||
}
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
TargetSacrifice target = new TargetSacrifice(StaticFilters.FILTER_PERMANENT_CREATURE);
|
||||
if (target.canChoose(controller.getId(), source, game)
|
||||
&& (controller.chooseTarget(outcome, target, source, game))) {
|
||||
Permanent toSacrifice = game.getPermanent(target.getFirstTarget());
|
||||
if (toSacrifice != null) {
|
||||
toSacrifice.sacrifice(source, game);
|
||||
game.getState().processAction(game);
|
||||
int colors = toSacrifice.getColor(game).getColorCount();
|
||||
if (colors > 0) {
|
||||
TargetCardInYourGraveyard targetCard = new TargetCardInYourGraveyard(0, colors,
|
||||
new FilterCard("up to " + colors + " card" + (colors > 1 ? "s" : "") + " from your graveyard"));
|
||||
controller.chooseTarget(outcome, targetCard, source, game);
|
||||
controller.moveCards(new CardsImpl(targetCard.getTargets()), Zone.HAND, source, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class BronzeHorsePreventionEffect extends PreventAllDamageToSourceEffect {
|
|||
}
|
||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
|
||||
|
||||
public BronzeHorsePreventionEffect() {
|
||||
BronzeHorsePreventionEffect() {
|
||||
super(Duration.WhileOnBattlefield);
|
||||
staticText = "as long as you control another creature, prevent all damage that would be dealt to {this} by spells that target it";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public final class CaptainOfTheMists extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("another Human");
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent("another Human");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
|
|
@ -11,12 +10,12 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -27,7 +26,7 @@ import java.util.UUID;
|
|||
public final class CaptivatingVampire extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("Vampire creatures");
|
||||
private static final FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent("untapped Vampires you control");
|
||||
private static final FilterControlledPermanent filter2 = new FilterControlledPermanent("untapped Vampires you control");
|
||||
|
||||
static {
|
||||
filter1.add(SubType.VAMPIRE.getPredicate());
|
||||
|
|
@ -46,7 +45,7 @@ public final class CaptivatingVampire extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter1, true)));
|
||||
|
||||
// Tap five untapped Vampires you control: Gain control of target creature. It becomes a Vampire in addition to its other types.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CaptivatingVampireEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(5, 5, filter2, true)));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CaptivatingVampireEffect(), new TapTargetCost(new TargetControlledPermanent(5, 5, filter2, true)));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,12 +17,11 @@ import mage.abilities.keyword.EnchantAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.TokenPredicate;
|
||||
import mage.game.permanent.token.CaribouToken;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -30,7 +29,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
*/
|
||||
public final class CaribouRange extends CardImpl {
|
||||
|
||||
static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Caribou token");
|
||||
static FilterControlledPermanent filter = new FilterControlledPermanent("a Caribou token");
|
||||
|
||||
static {
|
||||
filter.add(TokenPredicate.TRUE);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.TimingRule;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.SuspectedPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -34,7 +34,7 @@ import mage.target.common.TargetCardInLibrary;
|
|||
*/
|
||||
public final class CaseOfTheStashedSkeleton extends CardImpl {
|
||||
|
||||
static final FilterPermanent filter = new FilterControlledCreaturePermanent(SubType.SKELETON, "You control no suspected Skeletons");
|
||||
static final FilterPermanent filter = new FilterControlledPermanent(SubType.SKELETON, "You control no suspected Skeletons");
|
||||
|
||||
static {
|
||||
filter.add(SuspectedPredicate.instance);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
||||
|
|
@ -9,7 +8,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -21,11 +19,10 @@ public final class CatharsCrusade extends CardImpl {
|
|||
public CatharsCrusade(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}{W}");
|
||||
|
||||
|
||||
// Whenever a creature enters the battlefield under your control, put a +1/+1 counter on each creature you control.
|
||||
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new AddCountersAllEffect(CounterType.P1P1.createInstance(), new FilterControlledCreaturePermanent()),
|
||||
new AddCountersAllEffect(CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURE),
|
||||
StaticFilters.FILTER_PERMANENT_A_CREATURE,
|
||||
false)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -12,7 +11,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -32,7 +30,7 @@ public final class CelestialAncient extends CardImpl {
|
|||
|
||||
// Whenever you cast an enchantment spell, put a +1/+1 counter on each creature you control.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(),
|
||||
new FilterControlledCreaturePermanent()), StaticFilters.FILTER_SPELL_AN_ENCHANTMENT, false));
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURE), StaticFilters.FILTER_SPELL_AN_ENCHANTMENT, false));
|
||||
}
|
||||
|
||||
private CelestialAncient(final CelestialAncient card) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -16,7 +15,7 @@ import mage.constants.ComparisonType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -38,7 +37,8 @@ public final class ChampionsDrake extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Champion's Drake gets +3/+3 as long as you control a creature with three or more level counters on it.
|
||||
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(3, 3, Duration.WhileOnBattlefield), new PermanentHasCounterCondition(CounterType.LEVEL, 2, new FilterControlledCreaturePermanent(), ComparisonType.MORE_THAN), rule);
|
||||
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(3, 3, Duration.WhileOnBattlefield),
|
||||
new PermanentHasCounterCondition(CounterType.LEVEL, 2, StaticFilters.FILTER_CONTROLLED_CREATURE, ComparisonType.MORE_THAN), rule);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.game.Game;
|
||||
|
|
@ -28,7 +28,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class ChickenALaKing extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped Bird you control");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Bird you control");
|
||||
|
||||
static {
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -17,8 +16,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.filter.FilterPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -26,11 +24,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
*/
|
||||
public final class Clickslither extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Goblin");
|
||||
|
||||
static {
|
||||
filter.add(SubType.GOBLIN.getPredicate());
|
||||
}
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.GOBLIN, "a Goblin");
|
||||
|
||||
public Clickslither(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}{R}");
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -24,7 +24,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class CoerciveRecruiter extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent(SubType.PIRATE, "Pirate");
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.PIRATE, "Pirate");
|
||||
|
||||
public CoerciveRecruiter(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}");
|
||||
|
|
|
|||
|
|
@ -9,12 +9,11 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TimingRule;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.targetpointer.SecondTargetPointer;
|
||||
|
||||
/**
|
||||
|
|
@ -23,8 +22,8 @@ import mage.target.targetpointer.SecondTargetPointer;
|
|||
*/
|
||||
public final class CrawlFromTheCellar extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter
|
||||
= new FilterControlledCreaturePermanent(SubType.ZOMBIE);
|
||||
private static final FilterControlledPermanent filter
|
||||
= new FilterControlledPermanent(SubType.ZOMBIE);
|
||||
|
||||
public CrawlFromTheCellar(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}");
|
||||
|
|
@ -34,7 +33,7 @@ public final class CrawlFromTheCellar extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
|
||||
|
||||
this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance()).setTargetPointer(new SecondTargetPointer()));
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, 1, filter, false));
|
||||
this.getSpellAbility().addTarget(new TargetControlledPermanent(0, 1, filter, false));
|
||||
|
||||
// Flashback {3}{B}
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{3}{B}")));
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
|
|
@ -13,10 +12,9 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -26,15 +24,14 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class CrookclawElder extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter
|
||||
= new FilterControlledCreaturePermanent(SubType.BIRD, "untapped Birds you control");
|
||||
private static final FilterControlledCreaturePermanent filter2
|
||||
= new FilterControlledCreaturePermanent(SubType.WIZARD, "untapped Wizards you control");
|
||||
private static final Predicate pred = TappedPredicate.UNTAPPED;
|
||||
private static final FilterControlledPermanent filter
|
||||
= new FilterControlledPermanent(SubType.BIRD, "untapped Birds you control");
|
||||
private static final FilterControlledPermanent filter2
|
||||
= new FilterControlledPermanent(SubType.WIZARD, "untapped Wizards you control");
|
||||
|
||||
static {
|
||||
filter.add(pred);
|
||||
filter2.add(pred);
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
filter2.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
public CrookclawElder(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
@ -51,7 +48,7 @@ public final class CrookclawElder extends CardImpl {
|
|||
// Tap two untapped Birds you control: Draw a card.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new DrawCardSourceControllerEffect(1),
|
||||
new TapTargetCost(new TargetControlledCreaturePermanent(
|
||||
new TapTargetCost(new TargetControlledPermanent(
|
||||
2, 2, filter, true
|
||||
))
|
||||
);
|
||||
|
|
@ -60,7 +57,7 @@ public final class CrookclawElder extends CardImpl {
|
|||
// Tap two untapped Wizards you control: Target creature gains flying until end of turn.
|
||||
ability = new SimpleActivatedAbility(
|
||||
new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn),
|
||||
new TapTargetCost(new TargetControlledCreaturePermanent(
|
||||
new TapTargetCost(new TargetControlledPermanent(
|
||||
2, 2, filter2, true
|
||||
))
|
||||
);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public final class CrushUnderfoot extends CardImpl {
|
|||
|
||||
class CrushUnderfootEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Giant you control");
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Giant creature you control");
|
||||
static {
|
||||
filter.add(SubType.GIANT.getPredicate());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.game.permanent.token.ZombieToken;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class Cryptbreaker extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped Zombies you control");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Zombies you control");
|
||||
|
||||
static {
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
|
|
@ -49,7 +49,7 @@ public final class Cryptbreaker extends CardImpl {
|
|||
|
||||
// Tap three untapped Zombies you control: You draw a card and you lose 1 life.
|
||||
Effect effect = new DrawCardSourceControllerEffect(1, "you");
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapTargetCost(new TargetControlledCreaturePermanent(3, 3, filter, true)));
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapTargetCost(new TargetControlledPermanent(3, 3, filter, true)));
|
||||
effect = new LoseLifeSourceControllerEffect(1);
|
||||
ability.addEffect(effect.concatBy("and"));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
|
|
@ -12,7 +11,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -35,7 +34,7 @@ public final class CustodiLich extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTriggeredAbility(new BecomesMonarchSourceEffect()).addHint(MonarchHint.instance));
|
||||
|
||||
// Whenever you become the monarch, target player sacrifices a creature.
|
||||
Ability ability = new BecomesMonarchSourceControllerTriggeredAbility(new SacrificeEffect(new FilterControlledCreaturePermanent("creature"), 1, "target player"));
|
||||
Ability ability = new BecomesMonarchSourceControllerTriggeredAbility(new SacrificeEffect(StaticFilters.FILTER_PERMANENT_CREATURE, 1, "target player"));
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
@ -49,4 +48,4 @@ public final class CustodiLich extends CardImpl {
|
|||
public CustodiLich copy() {
|
||||
return new CustodiLich(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -12,8 +11,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
|
||||
/**
|
||||
|
|
@ -23,11 +21,7 @@ import mage.target.common.TargetAnyTarget;
|
|||
*/
|
||||
public final class Deadapult extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Zombie");
|
||||
|
||||
static {
|
||||
filter.add(SubType.ZOMBIE.getPredicate());
|
||||
}
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.ZOMBIE, "a Zombie");
|
||||
|
||||
public Deadapult(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}");
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -15,9 +14,8 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.permanent.token.SaprolingToken;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -26,10 +24,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class DeathsporeThallid extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Saproling");
|
||||
static {
|
||||
filter.add(SubType.SAPROLING.getPredicate());
|
||||
}
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.SAPROLING, "Saproling");
|
||||
|
||||
public DeathsporeThallid(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
|
||||
|
|
|
|||
|
|
@ -12,11 +12,10 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
|
|
@ -26,7 +25,7 @@ public final class DecreeOfSavagery extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{7}{G}{G}");
|
||||
|
||||
// Put four +1/+1 counters on each creature you control.
|
||||
this.getSpellAbility().addEffect(new AddCountersAllEffect(CounterType.P1P1.createInstance(4), new FilterControlledCreaturePermanent()));
|
||||
this.getSpellAbility().addEffect(new AddCountersAllEffect(CounterType.P1P1.createInstance(4), StaticFilters.FILTER_CONTROLLED_CREATURE));
|
||||
// Cycling {4}{G}{G}
|
||||
this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{4}{G}{G}")));
|
||||
// When you cycle Decree of Savagery, you may put four +1/+1 counters on target creature.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -13,9 +12,9 @@ import mage.constants.CardType;
|
|||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -29,10 +28,7 @@ public final class DeeprootElite extends CardImpl {
|
|||
filterYourAnotherMerfolk.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
private static final FilterControlledCreaturePermanent filterYourAnyMerfolk = new FilterControlledCreaturePermanent(SubType.MERFOLK);
|
||||
static {
|
||||
filterYourAnyMerfolk.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
private static final FilterControlledPermanent filterYourAnyMerfolk = new FilterControlledPermanent(SubType.MERFOLK);
|
||||
|
||||
public DeeprootElite(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
|
|
@ -44,7 +40,7 @@ public final class DeeprootElite extends CardImpl {
|
|||
|
||||
// Whenever another Merfolk enters the battlefield under your control, put a +1/+1 counter on target Merfolk you control.
|
||||
Ability ability = new EntersBattlefieldControlledTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), filterYourAnotherMerfolk);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(filterYourAnyMerfolk));
|
||||
ability.addTarget(new TargetControlledPermanent(filterYourAnyMerfolk));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
@ -56,4 +52,4 @@ public final class DeeprootElite extends CardImpl {
|
|||
public DeeprootElite copy() {
|
||||
return new DeeprootElite(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
|
|
@ -34,8 +34,7 @@ public final class DelayTactic extends CardImpl {
|
|||
|
||||
// Choose one -
|
||||
// Creatures you control gain hexproof until end of turn.
|
||||
this.getSpellAbility().addEffect(new GainAbilityAllEffect(HexproofAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent())
|
||||
.setText("Creatures you control gain hexproof until end of turn"));
|
||||
this.getSpellAbility().addEffect(new GainAbilityAllEffect(HexproofAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURES));
|
||||
|
||||
// Creatures target opponent controls don't untap during their next untap step.
|
||||
Mode mode = new Mode(new DelayTacticEffect());
|
||||
|
|
@ -83,4 +82,4 @@ class DelayTacticEffect extends OneShotEffect {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -11,11 +10,10 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetSacrifice;
|
||||
|
||||
/**
|
||||
|
|
@ -24,17 +22,12 @@ import mage.target.common.TargetSacrifice;
|
|||
*/
|
||||
public final class DevouringGreed extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("any number of Spirits");
|
||||
|
||||
static {
|
||||
filter.add(SubType.SPIRIT.getPredicate());
|
||||
}
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.SPIRIT, "any number of Spirits");
|
||||
|
||||
public DevouringGreed(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}{B}");
|
||||
this.subtype.add(SubType.ARCANE);
|
||||
|
||||
|
||||
// As an additional cost to cast Devouring Greed, you may sacrifice any number of Spirits.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetSacrifice(0, Integer.MAX_VALUE, filter)));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -14,10 +13,9 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetSacrifice;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
|
@ -28,17 +26,12 @@ import mage.target.targetpointer.FixedTarget;
|
|||
*/
|
||||
public final class DevouringRage extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("any number of Spirits");
|
||||
|
||||
static {
|
||||
filter.add(SubType.SPIRIT.getPredicate());
|
||||
}
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.SPIRIT, "any number of Spirits");
|
||||
|
||||
public DevouringRage(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{R}");
|
||||
this.subtype.add(SubType.ARCANE);
|
||||
|
||||
|
||||
// As an additional cost to cast Devouring Rage, you may sacrifice any number of Spirits.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetSacrifice(0, Integer.MAX_VALUE, filter)));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -10,7 +9,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterNonlandCard;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
|
|
@ -28,7 +27,7 @@ public final class DiplomacyOfTheWastes extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new DiscardCardYouChooseTargetEffect(new FilterNonlandCard()));
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||
new LoseLifeTargetEffect(2),
|
||||
new PermanentsOnTheBattlefieldCondition(new FilterControlledCreaturePermanent(SubType.WARRIOR, "Warrior")),
|
||||
new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(SubType.WARRIOR, "Warrior")),
|
||||
"If you control a Warrior, that player loses 2 life"));
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,36 +1,21 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.abilityword.CohortAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.game.permanent.token.ZombieToken;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class DranasChosen extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an untapped Ally you control");
|
||||
|
||||
static {
|
||||
filter.add(SubType.ALLY.getPredicate());
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
public DranasChosen(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}");
|
||||
|
|
@ -41,10 +26,7 @@ public final class DranasChosen extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// <i>Cohort</i> — {T}, Tap an untapped Ally you control: Create a tapped 2/2 black Zombie creature token.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ZombieToken(), 1, true, false), new TapSourceCost());
|
||||
ability.addCost(new TapTargetCost(new TargetControlledPermanent(filter)));
|
||||
ability.setAbilityWord(AbilityWord.COHORT);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new CohortAbility(new CreateTokenEffect(new ZombieToken(), 1, true, false)));
|
||||
}
|
||||
|
||||
private DranasChosen(final DranasChosen card) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetOpponentsChoicePermanent;
|
||||
|
|
@ -27,15 +27,13 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class EchoChamber extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
public EchoChamber(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||
|
||||
// {4}, {tap}: An opponent chooses target creature they control. Create a token that's a copy of that creature. That token gains haste until end of turn. Exile the token at the beginning of the next end step. Activate this ability only any time you could cast a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new EchoChamberCreateTokenEffect(), new GenericManaCost(4));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(1, 1, filter, false));
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_CREATURE, false));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.keyword.MutateAbility;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -14,9 +13,6 @@ import mage.abilities.effects.common.GainLifeEffect;
|
|||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
|
|
@ -26,8 +22,6 @@ import mage.game.events.GameEvent;
|
|||
*/
|
||||
public final class EssenceSymbiote extends CardImpl {
|
||||
|
||||
|
||||
|
||||
public EssenceSymbiote(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
|
||||
|
|
@ -55,24 +49,18 @@ public final class EssenceSymbiote extends CardImpl {
|
|||
|
||||
class EssenceSymbioteTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("creature you control mutates");
|
||||
|
||||
static {
|
||||
filter.add(new AbilityPredicate(MutateAbility.class));
|
||||
}
|
||||
|
||||
public EssenceSymbioteTriggeredAbility(Zone zone, Effect effect) {
|
||||
EssenceSymbioteTriggeredAbility(Zone zone, Effect effect) {
|
||||
super(zone, effect, false);
|
||||
setTriggerPhrase("Whenever a creature you control mutates, ");
|
||||
}
|
||||
|
||||
public EssenceSymbioteTriggeredAbility(final mage.cards.e.EssenceSymbioteTriggeredAbility ability) {
|
||||
private EssenceSymbioteTriggeredAbility(final EssenceSymbioteTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public mage.cards.e.EssenceSymbioteTriggeredAbility copy() {
|
||||
return new mage.cards.e.EssenceSymbioteTriggeredAbility(this);
|
||||
public EssenceSymbioteTriggeredAbility copy() {
|
||||
return new EssenceSymbioteTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -85,23 +73,6 @@ class EssenceSymbioteTriggeredAbility extends TriggeredAbilityImpl {
|
|||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
// TODO: Implement this
|
||||
/*
|
||||
Permanent sourcePermanent = game.getPermanent(event.getSourceId());
|
||||
Permanent targetPermanent = game.getPermanent(event.getTargetId());
|
||||
if (sourcePermanent != null && targetPermanent != null) {
|
||||
Player controller = game.getPlayer(targetPermanent.getControllerId());
|
||||
if (controller != null
|
||||
&& event.getTargetId().equals(targetPermanent.getId())
|
||||
&& controller.getId().equals(sourcePermanent.getControllerId())
|
||||
&& this.isControlledBy(controller.getId())) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setBoostedValue("targetId", targetPermanent.getId());
|
||||
effect.setTargetPointer(new FixedTarget(targetPermanent.getId(), targetPermanent.getZoneChangeCounter(game)));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetOpponentsChoicePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -16,8 +16,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class Evangelize extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
public Evangelize(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{W}");
|
||||
|
||||
|
|
@ -28,7 +26,7 @@ public final class Evangelize extends CardImpl {
|
|||
GainControlTargetEffect effect = new GainControlTargetEffect(Duration.EndOfGame);
|
||||
effect.setText("Gain control of target creature of an opponent's choice they control");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addTarget(new TargetOpponentsChoicePermanent(1, 1, filter, false));
|
||||
this.getSpellAbility().addTarget(new TargetOpponentsChoicePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_CREATURE, false));
|
||||
}
|
||||
|
||||
private Evangelize(final Evangelize card) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -19,6 +18,7 @@ import mage.constants.Duration;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.permanent.token.EldraziHorrorToken;
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ import mage.game.permanent.token.EldraziHorrorToken;
|
|||
public final class ExtricatorOfFlesh extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filterNonEldrazi = new FilterControlledCreaturePermanent("non-Eldrazi creature");
|
||||
private static final FilterControlledCreaturePermanent filterEldrazi = new FilterControlledCreaturePermanent(SubType.ELDRAZI, "Eldrazi");
|
||||
private static final FilterControlledPermanent filterEldrazi = new FilterControlledPermanent(SubType.ELDRAZI, "Eldrazi");
|
||||
|
||||
static {
|
||||
filterNonEldrazi.add(Predicates.not(SubType.ELDRAZI.getPredicate()));
|
||||
|
|
|
|||
|
|
@ -20,11 +20,9 @@ import mage.filter.StaticFilters;
|
|||
import mage.game.permanent.token.InklingToken;
|
||||
import mage.game.permanent.token.TreasureToken;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
|
|
@ -50,7 +48,7 @@ public final class FainTheBroker extends CardImpl {
|
|||
|
||||
// {T}, Remove a counter from a creature you control: Create a Treasure token.
|
||||
ability = new SimpleActivatedAbility(new CreateTokenEffect(new TreasureToken()), new TapSourceCost());
|
||||
ability.addCost(new RemoveCounterCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent(), true)));
|
||||
ability.addCost(new RemoveCounterCost(new TargetControlledCreaturePermanent().withNotTarget(true)));
|
||||
this.addAbility(ability);
|
||||
|
||||
// {T}, Sacrifice an artifact: Create a 2/1 white and black Inkling creature token with flying.
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
|
@ -115,7 +114,7 @@ class FalcoSparaPactweaverEffect extends AsThoughEffectImpl {
|
|||
}
|
||||
|
||||
Costs<Cost> newCosts = new CostsImpl<>();
|
||||
newCosts.add(new RemoveCounterCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent(), true)));
|
||||
newCosts.add(new RemoveCounterCost(new TargetControlledCreaturePermanent().withNotTarget(true)));
|
||||
newCosts.addAll(cardToCheck.getSpellAbility().getCosts());
|
||||
player.setCastSourceIdWithAlternateMana(
|
||||
cardToCheck.getId(), cardToCheck.getManaCost(), newCosts,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -21,7 +21,7 @@ public final class FamiliarGround extends CardImpl {
|
|||
|
||||
|
||||
// Each creature you control can't be blocked by more than one creature.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedByMoreThanOneAllEffect(new FilterControlledCreaturePermanent())));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedByMoreThanOneAllEffect(StaticFilters.FILTER_CONTROLLED_CREATURE)));
|
||||
}
|
||||
|
||||
private FamiliarGround(final FamiliarGround card) {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -26,7 +26,7 @@ public final class FeastOfBlood extends CardImpl {
|
|||
// Cast Feast of Blood only if you control two or more Vampires.
|
||||
this.addAbility(new CastOnlyIfConditionIsTrueAbility(
|
||||
new PermanentsOnTheBattlefieldCondition(
|
||||
new FilterControlledCreaturePermanent(SubType.VAMPIRE, "you control two or more Vampires"),
|
||||
new FilterControlledPermanent(SubType.VAMPIRE, "you control two or more Vampires"),
|
||||
ComparisonType.MORE_THAN, 1)));
|
||||
|
||||
// Destroy target creature. You gain 4 life.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -11,7 +10,7 @@ import mage.constants.SubType;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.common.TargetOpponentsCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -20,7 +19,7 @@ import mage.target.common.TargetOpponentsCreaturePermanent;
|
|||
*/
|
||||
public final class FirefistAdept extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filterCount = new FilterControlledCreaturePermanent("Wizards you control");
|
||||
private static final FilterControlledPermanent filterCount = new FilterControlledPermanent("Wizards you control");
|
||||
|
||||
static {
|
||||
filterCount.add(SubType.WIZARD.getPredicate());
|
||||
|
|
|
|||
|
|
@ -1,20 +1,19 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetSacrifice;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
|
|
@ -89,12 +88,11 @@ class FrayingOmnipotenceEffect extends OneShotEffect {
|
|||
if (player == null) {
|
||||
continue;
|
||||
}
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
int creaturesToSacrifice = (int) Math.ceil(game.getBattlefield().count(filter, player.getId(), source, game) / 2.0);
|
||||
int creaturesToSacrifice = (int) Math.ceil(game.getBattlefield().count(StaticFilters.FILTER_CONTROLLED_CREATURE, player.getId(), source, game) / 2.0);
|
||||
if (creaturesToSacrifice == 0) {
|
||||
continue;
|
||||
}
|
||||
Target target = new TargetSacrifice(creaturesToSacrifice, filter);
|
||||
TargetSacrifice target = new TargetSacrifice(creaturesToSacrifice, StaticFilters.FILTER_PERMANENT_CREATURE);
|
||||
target.chooseTarget(Outcome.Sacrifice, playerId, source, game);
|
||||
for (UUID permanentId : target.getTargets()) {
|
||||
Permanent permanent = game.getPermanent(permanentId);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.f;
|
||||
|
||||
import mage.MageInt;
|
||||
|
|
@ -18,7 +17,7 @@ import mage.constants.Duration;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.mageobject.VariableManaCostPredicate;
|
||||
import mage.target.TargetSpell;
|
||||
|
||||
|
|
@ -45,8 +44,7 @@ public final class FrontlineMedic extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Battalion - Whenever Frontline Medic and at least two other creatures attack, creatures you control gain indestructible until end of turn.
|
||||
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent(), false);
|
||||
effect.setText("creatures you control gain indestructible until end of turn");
|
||||
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURES, false);
|
||||
this.addAbility(new BattalionAbility(effect));
|
||||
|
||||
// Sacrifice Frontline Medic: Counter target spell with {X} in its mana cost unless its controller pays {3}.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -10,13 +9,13 @@ import mage.constants.CardType;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -26,7 +25,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
public final class FulfillContract extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filterBountyCreature = new FilterCreaturePermanent("creature with a bounty counter on it");
|
||||
private static final FilterControlledCreaturePermanent filterRogueOrHunter = new FilterControlledCreaturePermanent("Rogue or Hunter you control");
|
||||
private static final FilterControlledPermanent filterRogueOrHunter = new FilterControlledPermanent("Rogue or Hunter you control");
|
||||
|
||||
static {
|
||||
filterBountyCreature.add(CounterType.BOUNTY.getPredicate());
|
||||
|
|
@ -39,7 +38,7 @@ public final class FulfillContract extends CardImpl {
|
|||
// Destroy target creature with a bounty counter on it. If that creature is destroyed this way, you may put a +1/+1 counter on target Rogue or Hunter you control.
|
||||
this.getSpellAbility().addEffect(new FulfillContractEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filterBountyCreature));
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(filterRogueOrHunter));
|
||||
this.getSpellAbility().addTarget(new TargetControlledPermanent(filterRogueOrHunter));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import mage.cards.Cards;
|
|||
import mage.cards.CardsImpl;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
|
@ -29,7 +29,7 @@ import java.util.UUID;
|
|||
public final class GallifreyStands extends CardImpl {
|
||||
|
||||
private static final FilterCreatureCard filter = new FilterCreatureCard("a Doctor creature card");
|
||||
private static final FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent(SubType.DOCTOR, "Doctors");
|
||||
private static final FilterControlledPermanent filter2 = new FilterControlledPermanent(SubType.DOCTOR, "Doctors");
|
||||
|
||||
static {
|
||||
filter.add(SubType.DOCTOR.getPredicate());
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -11,8 +10,8 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -20,7 +19,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
*/
|
||||
public final class GangrenousGoliath extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(SubType.CLERIC,"untapped Clerics you control");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.CLERIC,"untapped Clerics you control");
|
||||
|
||||
public GangrenousGoliath(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}");
|
||||
|
|
@ -33,7 +32,7 @@ public final class GangrenousGoliath extends CardImpl {
|
|||
this.addAbility(new SimpleActivatedAbility(
|
||||
Zone.GRAVEYARD,
|
||||
new ReturnToHandSourceEffect(),
|
||||
new TapTargetCost(new TargetControlledCreaturePermanent(3, 3, filter, true))));
|
||||
new TapTargetCost(new TargetControlledPermanent(3, 3, filter, true))));
|
||||
}
|
||||
|
||||
private GangrenousGoliath(final GangrenousGoliath card) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -13,7 +12,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
|
|
@ -74,7 +73,7 @@ class GarrukPrimalHunterEffect extends OneShotEffect {
|
|||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
int amount = 0;
|
||||
for (Permanent p : game.getBattlefield().getActivePermanents(new FilterControlledCreaturePermanent(), source.getControllerId(), game)) {
|
||||
for (Permanent p : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_CONTROLLED_CREATURE, source.getControllerId(), game)) {
|
||||
if (p.getPower().getValue() > amount) {
|
||||
amount = p.getPower().getValue();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public final class GemcutterBuccaneer extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent(SubType.PIRATE, "Pirate");
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.PIRATE, "Pirate");
|
||||
|
||||
public GemcutterBuccaneer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
|
|
|
|||
|
|
@ -20,10 +20,8 @@ import mage.constants.SuperType;
|
|||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.permanent.token.SaprolingToken;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -46,7 +44,7 @@ public final class GhaveGuruOfSpores extends CardImpl {
|
|||
|
||||
// {1}, Remove a +1/+1 counter from a creature you control: Create a 1/1 green Saproling creature token.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SaprolingToken()), new GenericManaCost(1));
|
||||
ability.addCost(new RemoveCounterCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent(), true), CounterType.P1P1));
|
||||
ability.addCost(new RemoveCounterCost(new TargetControlledCreaturePermanent().withNotTarget(true), CounterType.P1P1));
|
||||
this.addAbility(ability);
|
||||
|
||||
// {1}, Sacrifice a creature: Put a +1/+1 counter on target creature.
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import mage.constants.SubType;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -23,7 +23,7 @@ import mage.target.common.TargetNonlandPermanent;
|
|||
*/
|
||||
public final class GiantsGrasp extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(SubType.GIANT);
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.GIANT);
|
||||
|
||||
public GiantsGrasp(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}");
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -13,7 +12,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.permanent.token.KnightToken;
|
||||
|
||||
/**
|
||||
|
|
@ -30,7 +29,7 @@ public final class GideonsPhalanx extends CardImpl {
|
|||
|
||||
// <i>Spell mastery</i> — If there are two or more instant and/or sorcery cards in your graveyard, creatures you control gain indestructible until end of turn.
|
||||
Effect effect = new ConditionalOneShotEffect(
|
||||
new AddContinuousEffectToGame(new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent())),
|
||||
new AddContinuousEffectToGame(new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURES)),
|
||||
SpellMasteryCondition.instance,
|
||||
"<br><i>Spell mastery</i> — If there are two or more instant and/or sorcery cards in your graveyard, creatures you control gain indestructible until end of turn");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -15,17 +14,16 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
* Gatecrash FAQ 21.01.2013
|
||||
*
|
||||
* <p>
|
||||
* Creatures your opponents control don't actually lose hexproof, although you
|
||||
* will ignore hexproof for purposes of choosing targets of spells and abilities
|
||||
* you control.
|
||||
*
|
||||
* <p>
|
||||
* Creatures that come under your control after Glaring Spotlight's last ability
|
||||
* resolves won't have hexproof but can't be blocked that turn.
|
||||
*
|
||||
|
|
@ -41,9 +39,9 @@ public final class GlaringSpotlight extends CardImpl {
|
|||
|
||||
// {3}, Sacrifice Glaring Spotlight: Creatures you control gain hexproof until end of turn and can't be blocked this turn.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
Zone.BATTLEFIELD, new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false),
|
||||
Zone.BATTLEFIELD, new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES, false),
|
||||
new GenericManaCost(3));
|
||||
ability.addEffect(new CantBeBlockedAllEffect(new FilterControlledCreaturePermanent(), Duration.EndOfTurn));
|
||||
ability.addEffect(new CantBeBlockedAllEffect(StaticFilters.FILTER_CONTROLLED_CREATURES, Duration.EndOfTurn).setText("and can't be blocked this turn"));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,8 +13,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -23,11 +22,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class GoblinSledder extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Goblin");
|
||||
|
||||
static {
|
||||
filter.add(SubType.GOBLIN.getPredicate());
|
||||
}
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.GOBLIN, "a Goblin");
|
||||
|
||||
public GoblinSledder(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}");
|
||||
|
|
|
|||
|
|
@ -12,8 +12,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.filter.FilterPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -21,11 +20,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
*/
|
||||
public final class GoblinTurncoat extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Goblin");
|
||||
|
||||
static {
|
||||
filter.add(SubType.GOBLIN.getPredicate());
|
||||
}
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.GOBLIN, "a Goblin");
|
||||
|
||||
public GoblinTurncoat(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -12,9 +11,8 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.permanent.token.GoblinToken;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -22,12 +20,11 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
*/
|
||||
public final class GoblinWarrens extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(SubType.GOBLIN, "Goblins");
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.GOBLIN, "Goblins");
|
||||
|
||||
public GoblinWarrens(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}");
|
||||
|
||||
|
||||
// {2}{R}, Sacrifice two Goblins: Create three 1/1 red Goblin creature tokens.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new GoblinToken(), 3), new ManaCostsImpl<>("{2}{R}"));
|
||||
ability.addCost(new SacrificeTargetCost(2, filter));
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import mage.MageInt;
|
||||
|
|
@ -9,7 +8,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -18,11 +17,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class GoblinsOfTheFlarg extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Dwarf");
|
||||
|
||||
static {
|
||||
filter.add(SubType.DWARF.getPredicate());
|
||||
}
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.DWARF, "a Dwarf");
|
||||
|
||||
public GoblinsOfTheFlarg(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}");
|
||||
|
|
|
|||
|
|
@ -7,18 +7,18 @@ import mage.abilities.common.GodEternalDiesTriggeredAbility;
|
|||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
|
|
@ -55,8 +55,6 @@ public final class GodEternalRhonas extends CardImpl {
|
|||
}
|
||||
|
||||
class GodEternalRhonasEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
GodEternalRhonasEffect() {
|
||||
super(Outcome.Benefit);
|
||||
|
|
@ -76,7 +74,7 @@ class GodEternalRhonasEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent godEternalRhonas = game.getPermanent(source.getSourceId());
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_CONTROLLED_CREATURES, source.getControllerId(), game)) {
|
||||
if (permanent == null
|
||||
|| godEternalRhonas != null
|
||||
&& permanent == godEternalRhonas) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -16,7 +15,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
|
|
@ -27,7 +26,7 @@ import mage.target.common.TargetCardInLibrary;
|
|||
public final class GodoBanditWarlord extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("an Equipment card");
|
||||
private static final FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent(SubType.SAMURAI);
|
||||
private static final FilterControlledPermanent filter2 = new FilterControlledPermanent(SubType.SAMURAI);
|
||||
|
||||
static {
|
||||
filter.add(SubType.EQUIPMENT.getPredicate());
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -21,7 +21,6 @@ public final class GolgariCharm extends CardImpl {
|
|||
public GolgariCharm(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}{G}");
|
||||
|
||||
|
||||
// Choose one — All creatures get -1/-1 until end of turn;
|
||||
this.getSpellAbility().addEffect(new BoostAllEffect(-1, -1, Duration.EndOfTurn));
|
||||
|
||||
|
|
@ -31,7 +30,7 @@ public final class GolgariCharm extends CardImpl {
|
|||
this.getSpellAbility().addMode(mode);
|
||||
|
||||
// or regenerate each creature you control.
|
||||
mode = new Mode(new RegenerateAllEffect(new FilterControlledCreaturePermanent()));
|
||||
mode = new Mode(new RegenerateAllEffect(StaticFilters.FILTER_CONTROLLED_CREATURE));
|
||||
this.getSpellAbility().addMode(mode);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.permanent.token.ZombieToken;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
|
@ -28,7 +28,7 @@ import mage.target.common.TargetCardInYourGraveyard;
|
|||
*/
|
||||
public final class GrafHarvest extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Zombies you control");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Zombies you control");
|
||||
|
||||
static {
|
||||
filter.add(SubType.ZOMBIE.getPredicate());
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -34,7 +34,7 @@ public final class GreaterKraytDragon extends CardImpl {
|
|||
this.addAbility(new MonstrosityAbility("{X}{X}{R}{G}{W}", Integer.MAX_VALUE));
|
||||
|
||||
// When Greater Krayt Dragon becomes monstrous, draw a card for each +1/+1 counter on creatures you control.
|
||||
this.addAbility(new BecomesMonstrousSourceTriggeredAbility(new DrawCardSourceControllerEffect(new CountersCount(CounterType.P1P1, new FilterControlledCreaturePermanent()))));
|
||||
this.addAbility(new BecomesMonstrousSourceTriggeredAbility(new DrawCardSourceControllerEffect(new CountersCount(CounterType.P1P1, StaticFilters.FILTER_CONTROLLED_CREATURES))));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -20,12 +19,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class HagraDiabolist extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Allies you control");
|
||||
|
||||
static {
|
||||
filter.add(SubType.ALLY.getPredicate());
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.ALLY, "Allies you control");
|
||||
|
||||
public HagraDiabolist(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.predicate.permanent.TokenPredicate;
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class HamletVanguard extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent(SubType.HUMAN);
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.HUMAN);
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -11,18 +10,14 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
*/
|
||||
public final class HarabazDruid extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Allies you control");
|
||||
|
||||
static {
|
||||
filter.add(SubType.ALLY.getPredicate());
|
||||
}
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.ALLY, "Allies you control");
|
||||
|
||||
public HarabazDruid(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -15,7 +14,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.TargetController;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
|
@ -53,7 +52,7 @@ class HeartmenderEffect extends OneShotEffect {
|
|||
|
||||
private final Counter counter;
|
||||
|
||||
public HeartmenderEffect(Counter counter) {
|
||||
HeartmenderEffect(Counter counter) {
|
||||
super(Outcome.BoostCreature);
|
||||
this.counter = counter;
|
||||
staticText = "remove a -1/-1 counter from each creature you control";
|
||||
|
|
@ -67,11 +66,10 @@ class HeartmenderEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
boolean applied = false;
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
if (game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game).isEmpty()) {
|
||||
if (game.getBattlefield().getActivePermanents(StaticFilters.FILTER_CONTROLLED_CREATURE, source.getControllerId(), game).isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
for (Permanent creature : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
|
||||
for (Permanent creature : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_CONTROLLED_CREATURE, source.getControllerId(), game)) {
|
||||
if (creature != null
|
||||
&& creature.getCounters(game).getCount(counter.getName()) >= counter.getCount()) {
|
||||
creature.removeCounters(counter.getName(), counter.getCount(), source, game);
|
||||
|
|
|
|||
|
|
@ -55,15 +55,16 @@ public final class HolgaRelentlessRager extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class HolgaRelentlessRagerEffect extends OneShotEffect {
|
||||
private enum HolgaRelentlessRagerPredicate implements Predicate<Permanent> {
|
||||
instance;
|
||||
enum HolgaRelentlessRagerPredicate implements Predicate<Permanent> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Permanent input, Game game) {
|
||||
return game.getPlayer(game.getCombat().getDefenderId(input.getId())) != null;
|
||||
}
|
||||
@Override
|
||||
public boolean apply(Permanent input, Game game) {
|
||||
return game.getPlayer(game.getCombat().getDefenderId(input.getId())) != null;
|
||||
}
|
||||
}
|
||||
|
||||
class HolgaRelentlessRagerEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import mage.abilities.keyword.FirstStrikeAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ public final class HopeAgainstHope extends CardImpl {
|
|||
this.addAbility(new EnchantAbility(auraTarget));
|
||||
|
||||
// Enchanted creature gets +1/+1 for each creature you control.
|
||||
PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent(), 1);
|
||||
PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE, 1);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(amount, amount, Duration.WhileOnBattlefield)));
|
||||
|
||||
// As long as enchanted creature is a Human, it has first strike.
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
|
||||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
|
|
@ -13,39 +12,30 @@ import mage.abilities.effects.common.counter.AddCountersAllEffect;
|
|||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.permanent.token.DeathtouchRatToken;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Saga
|
||||
*/
|
||||
public final class HungryLynx extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filterCat = new FilterControlledCreaturePermanent("Cats");
|
||||
static {
|
||||
filterCat.add(SubType.CAT.getPredicate());
|
||||
}
|
||||
private static final FilterControlledPermanent filterCat = new FilterControlledPermanent(SubType.CAT, "Cats");
|
||||
|
||||
private static final FilterCard filterProRat = new FilterCard("Rats");
|
||||
static {
|
||||
filterProRat.add(SubType.RAT.getPredicate());
|
||||
}
|
||||
|
||||
private static final FilterCreaturePermanent filterRat = new FilterCreaturePermanent("a Rat");
|
||||
static {
|
||||
filterRat.add(SubType.RAT.getPredicate());
|
||||
}
|
||||
private static final FilterPermanent filterRat = new FilterPermanent(SubType.RAT, "a Rat");
|
||||
|
||||
public HungryLynx(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
|
||||
|
|
@ -60,8 +50,7 @@ public final class HungryLynx extends CardImpl {
|
|||
|
||||
// At the beginning of your end step, target opponent creates a 1/1 black Rat creature token with deathtouch.
|
||||
Ability ability = new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new CreateTokenTargetEffect(new DeathtouchRatToken()), TargetController.YOU, null, false);
|
||||
Target target = new TargetOpponent();
|
||||
ability.addTarget(target);
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever a Rat dies, put a +1/+1 counter on each Cat you control.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.i;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -13,8 +12,8 @@ import mage.abilities.keyword.DoubleStrikeAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -22,13 +21,8 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
*/
|
||||
public final class IizukaTheRuthless extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Samurai");
|
||||
private static final FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent("Samurai creatures");
|
||||
|
||||
static {
|
||||
filter.add(SubType.SAMURAI.getPredicate());
|
||||
filter2.add(SubType.SAMURAI.getPredicate());
|
||||
}
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.SAMURAI, "Samurai");
|
||||
private static final FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent(SubType.SAMURAI, "Samurai creatures");
|
||||
|
||||
public IizukaTheRuthless(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}");
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
|
|
@ -59,13 +59,13 @@ public final class Immerwolf extends CardImpl {
|
|||
|
||||
class ImmerwolfEffect extends RestrictionEffect {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(SubType.WEREWOLF);
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.WEREWOLF);
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(SubType.HUMAN.getPredicate()));
|
||||
}
|
||||
|
||||
public ImmerwolfEffect() {
|
||||
ImmerwolfEffect() {
|
||||
super(Duration.WhileOnBattlefield);
|
||||
staticText = "Non-Human Werewolves you control can't transform";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
|
||||
package mage.cards.i;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
|
|
@ -15,15 +8,18 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetOpponent;
|
||||
import mage.target.common.TargetSacrifice;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -79,7 +75,7 @@ class InfernalOfferingSacrificeEffect extends OneShotEffect {
|
|||
Map<UUID, UUID> toSacrifice = new HashMap<>(2);
|
||||
for (UUID playerId : game.getState().getPlayersInRange(player.getId(), game)) {
|
||||
if (playerId.equals(player.getId()) || playerId.equals(opponent.getId())) {
|
||||
target = new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent(), true);
|
||||
target = new TargetSacrifice(StaticFilters.FILTER_PERMANENT_CREATURE);
|
||||
if (target.choose(Outcome.Sacrifice, playerId, source.getControllerId(), source, game)) {
|
||||
toSacrifice.put(playerId, target.getFirstTarget());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.i;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -7,7 +6,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -19,7 +18,7 @@ public final class InspiringRoar extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}");
|
||||
|
||||
// Put a +1/+1 counter on each creature you control.
|
||||
getSpellAbility().addEffect(new AddCountersAllEffect(CounterType.P1P1.createInstance(), new FilterControlledCreaturePermanent()));
|
||||
getSpellAbility().addEffect(new AddCountersAllEffect(CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURE));
|
||||
}
|
||||
|
||||
private InspiringRoar(final InspiringRoar card) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.i;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -12,9 +11,9 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -22,7 +21,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
*/
|
||||
public final class IntrepidProvisioner extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(SubType.HUMAN, "another target Human you control");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.HUMAN, "another target Human you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
|
|
@ -39,7 +38,7 @@ public final class IntrepidProvisioner extends CardImpl {
|
|||
this.addAbility(TrampleAbility.getInstance());
|
||||
// When Intrepid Provisioner enters the battlefield, another target Human you control gets +2/+2 until end of turn.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(2, 2, Duration.EndOfTurn), false);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.permanent.token.SpiderToken;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
|
|
@ -30,11 +30,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class IshkanahGrafwidow extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Spider you control");
|
||||
|
||||
static {
|
||||
filter.add(SubType.SPIDER.getPredicate());
|
||||
}
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.SPIDER, "Spider you control");
|
||||
|
||||
public IshkanahGrafwidow(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}");
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
|
@ -19,8 +19,8 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public final class JadeBearer extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter =
|
||||
new FilterControlledCreaturePermanent(SubType.MERFOLK, "another target Merfolk you control");
|
||||
private static final FilterControlledPermanent filter =
|
||||
new FilterControlledPermanent(SubType.MERFOLK, "another target Merfolk you control");
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.j;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -12,8 +11,8 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -21,6 +20,8 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
*/
|
||||
public final class JadeGuardian extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.MERFOLK, "Merfolk you control");
|
||||
|
||||
public JadeGuardian(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
|
||||
|
||||
|
|
@ -34,7 +35,7 @@ public final class JadeGuardian extends CardImpl {
|
|||
|
||||
// When Jade Guardian enters the battlefield, put a +1/+1 counter on target Merfolk you control.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent(SubType.MERFOLK, "Merfolk you control")));
|
||||
ability.addTarget(new TargetControlledPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetOpponentOrPlaneswalker;
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ public final class JeskaiCharm extends CardImpl {
|
|||
Effect effect = new BoostControlledEffect(1, 1, Duration.EndOfTurn);
|
||||
effect.setText("Creatures you control get +1/+1");
|
||||
mode = new Mode(effect);
|
||||
effect = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent());
|
||||
effect = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURE);
|
||||
effect.setText("and gain lifelink until end of turn");
|
||||
mode.addEffect(effect);
|
||||
this.getSpellAbility().addMode(mode);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
package mage.cards.j;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -21,7 +19,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -30,7 +28,7 @@ import mage.filter.common.FilterControlledCreaturePermanent;
|
|||
*/
|
||||
public final class JoragaTreespeaker extends LevelerCard {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Elves");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Elves");
|
||||
|
||||
static {
|
||||
filter.add(SubType.ELF.getPredicate());
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.j;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -9,7 +8,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -17,6 +16,8 @@ import mage.filter.common.FilterControlledCreaturePermanent;
|
|||
*/
|
||||
public final class JudgeOfCurrents extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.MERFOLK, "a Merfolk you control");
|
||||
|
||||
public JudgeOfCurrents(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
|
||||
this.subtype.add(SubType.MERFOLK);
|
||||
|
|
@ -25,7 +26,7 @@ public final class JudgeOfCurrents extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever a Merfolk you control becomes tapped, you may gain 1 life.
|
||||
this.addAbility(new BecomesTappedTriggeredAbility(new GainLifeEffect(1), true, new FilterControlledCreaturePermanent(SubType.MERFOLK, "a Merfolk you control")));
|
||||
this.addAbility(new BecomesTappedTriggeredAbility(new GainLifeEffect(1), true, filter));
|
||||
}
|
||||
|
||||
private JudgeOfCurrents(final JudgeOfCurrents card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -16,7 +14,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
|
|
@ -26,14 +24,15 @@ import mage.game.permanent.Permanent;
|
|||
import mage.game.permanent.PermanentToken;
|
||||
import mage.game.permanent.token.ZombieToken;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class KalitasTraitorOfGhet extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another Vampire or Zombie");
|
||||
private static final FilterPermanent filter = new FilterPermanent("another Vampire or Zombie");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -21,7 +21,7 @@ import mage.filter.common.FilterControlledCreaturePermanent;
|
|||
*/
|
||||
public final class KarganDragonrider extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(SubType.DRAGON, "a Dragon");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.DRAGON, "a Dragon");
|
||||
|
||||
public KarganDragonrider(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import mage.constants.SuperType;
|
|||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.FilterPermanentThisOrAnother;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.permanent.token.SpiritWhiteToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -26,9 +26,7 @@ import java.util.UUID;
|
|||
public final class KingOfTheOathbreakers extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter =
|
||||
new FilterPermanentThisOrAnother(
|
||||
new FilterControlledCreaturePermanent(SubType.SPIRIT),
|
||||
true);
|
||||
new FilterPermanentThisOrAnother(new FilterControlledPermanent(SubType.SPIRIT), true);
|
||||
|
||||
public KingOfTheOathbreakers(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{B}");
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -15,9 +13,10 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.permanent.token.SoldierToken;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -25,11 +24,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
*/
|
||||
public final class KnightCaptainOfEos extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Soldier");
|
||||
|
||||
static {
|
||||
filter.add(SubType.SOLDIER.getPredicate());
|
||||
}
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.SOLDIER, "a Soldier");
|
||||
|
||||
public KnightCaptainOfEos(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}");
|
||||
|
|
@ -39,7 +34,10 @@ public final class KnightCaptainOfEos extends CardImpl {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// When Knight-Captain of Eos enters the battlefield, create two 1/1 white Soldier creature tokens.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new SoldierToken(), 2), false));
|
||||
|
||||
// {W}, Sacrifice a Soldier: Prevent all combat damage that would be dealt this turn.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true), new ManaCostsImpl<>("{W}"));
|
||||
ability.addCost(new SacrificeTargetCost(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class LavakinBrawler extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent(SubType.ELEMENTAL);
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.ELEMENTAL);
|
||||
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
|
||||
|
||||
public LavakinBrawler(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -19,7 +18,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
|
|
@ -82,7 +81,7 @@ class LightningRunnerEffect extends OneShotEffect {
|
|||
"Untap all creatures you control and after this phase, there is an additional combat phase.",
|
||||
"Yes", "No", source, game)
|
||||
&& cost.pay(source, game, source, source.getControllerId(), true)) {
|
||||
new UntapAllControllerEffect(new FilterControlledCreaturePermanent()).apply(game, source);
|
||||
new UntapAllControllerEffect(StaticFilters.FILTER_CONTROLLED_CREATURES).apply(game, source);
|
||||
new AdditionalCombatPhaseEffect().apply(game, source);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.RingBearerPredicate;
|
||||
import mage.game.permanent.token.WraithToken;
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class LordOfTheNazgul extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filterWraith = new FilterControlledCreaturePermanent("Wraiths you control");
|
||||
private static final FilterPermanent filterWraith = new FilterControlledPermanent("Wraiths you control");
|
||||
private static final FilterPermanent filterRingBearer = new FilterPermanent("Ring-bearers");
|
||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filterWraith, ComparisonType.MORE_THAN, 8);
|
||||
private static final Hint hint = new ValueHint(
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public final class LordSkittersBlessing extends CardImpl {
|
|||
}
|
||||
|
||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
|
||||
private static final Hint hint = new ConditionHint(condition, "You control an enchanted creaeture");
|
||||
private static final Hint hint = new ConditionHint(condition, "You control an enchanted creature");
|
||||
|
||||
public LordSkittersBlessing(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
|
||||
|
|
@ -53,7 +53,7 @@ public final class LordSkittersBlessing extends CardImpl {
|
|||
"an enchanted creature, you lose 1 life and you draw an additional card."
|
||||
);
|
||||
ability.addEffect(new DrawCardSourceControllerEffect(1));
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability.addHint(hint));
|
||||
}
|
||||
|
||||
private LordSkittersBlessing(final LordSkittersBlessing card) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -14,11 +13,11 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.game.permanent.token.MerfolkToken;
|
||||
import mage.target.TargetSpell;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -26,7 +25,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
*/
|
||||
public final class LullmageMentor extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped Merfolk you control");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Merfolk you control");
|
||||
|
||||
static {
|
||||
filter.add(SubType.MERFOLK.getPredicate());
|
||||
|
|
@ -45,7 +44,7 @@ public final class LullmageMentor extends CardImpl {
|
|||
this.addAbility(new SpellCounteredControllerTriggeredAbility(new CreateTokenEffect(new MerfolkToken()), true));
|
||||
|
||||
// Tap seven untapped Merfolk you control: Counter target spell.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(7, 7, filter, true)));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new TapTargetCost(new TargetControlledPermanent(7, 7, filter, true)));
|
||||
ability.addTarget(new TargetSpell());
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
|
@ -38,7 +38,7 @@ public final class MagusOfTheArena extends CardImpl {
|
|||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MagusOfTheArenaEffect(), new GenericManaCost(3));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(1, 1, new FilterControlledCreaturePermanent(), false));
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_CREATURE, false));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import mage.abilities.keyword.*;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.game.Game;
|
||||
|
|
@ -34,7 +35,7 @@ public final class MajesticMyriarch extends CardImpl {
|
|||
this.toughness = new MageInt(0);
|
||||
|
||||
// Majestic Myriarch's power and toughness are each equal to twice the number of creatures you control.
|
||||
DynamicValue xValue = new MultipliedValue(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()), 2);
|
||||
DynamicValue xValue = new MultipliedValue(new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURES), 2);
|
||||
Effect effect = new SetBasePowerToughnessSourceEffect(xValue);
|
||||
effect.setText("{this}'s power and toughness are each equal to twice the number of creatures you control");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, effect));
|
||||
|
|
@ -163,4 +164,4 @@ class MajesticMyriarchEffect extends OneShotEffect {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue