* Added another StaticFilter.

This commit is contained in:
LevelX2 2017-05-07 14:07:21 +02:00
parent 757c01343f
commit dc4283685a
51 changed files with 224 additions and 272 deletions

View file

@ -24,10 +24,10 @@
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
*/
package mage.cards.a;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@ -38,9 +38,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -49,10 +47,10 @@ import java.util.UUID;
public class AbsoluteGrace extends CardImpl {
public AbsoluteGrace(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
Ability ability = ProtectionAbility.from(ObjectColor.BLACK);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, new FilterCreaturePermanent("creatures"), false)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, FILTER_PERMANENT_CREATURES, false)));
}
public AbsoluteGrace(final AbsoluteGrace card) {

View file

@ -24,10 +24,10 @@
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
*/
package mage.cards.a;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@ -38,9 +38,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -49,10 +47,10 @@ import java.util.UUID;
public class AbsoluteLaw extends CardImpl {
public AbsoluteLaw(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
Ability ability = ProtectionAbility.from(ObjectColor.RED);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, new FilterCreaturePermanent("creatures"), false)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, FILTER_PERMANENT_CREATURES, false)));
}
public AbsoluteLaw(final AbsoluteLaw card) {

View file

@ -25,9 +25,9 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.a;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
@ -39,26 +39,24 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
* @author Loki
*/
public class AerieMystics extends CardImpl {
private static FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures");
public AerieMystics(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}");
this.subtype.add("Bird");
this.subtype.add("Wizard");
this.power = new MageInt(3);
this.toughness = new MageInt(3);
this.addAbility(FlyingAbility.getInstance());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(ShroudAbility.getInstance(), Duration.EndOfTurn, filter), new ManaCostsImpl("{1}{G}{U}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
new GainAbilityControlledEffect(ShroudAbility.getInstance(), Duration.EndOfTurn, FILTER_PERMANENT_CREATURES), new ManaCostsImpl("{1}{G}{U}")));
}
public AerieMystics(final AerieMystics card) {

View file

@ -27,6 +27,7 @@
*/
package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
@ -34,15 +35,13 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.filter.predicate.mageobject.NamePredicate;
import mage.game.Game;
import mage.players.Player;
import mage.target.Target;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
*
* @author magenoxx_at_gmail.com
@ -56,8 +55,7 @@ public class AetherBurst extends CardImpl {
}
public AetherBurst(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
// Return up to X target creatures to their owners' hands, where X is one plus the number of cards named Aether Burst in all graveyards as you cast Aether Burst.
this.getSpellAbility().addEffect(new DynamicReturnToHandTargetEffect());
@ -78,7 +76,7 @@ public class AetherBurst extends CardImpl {
}
}
}
((DynamicTargetCreaturePermanent)target).setMaxNumberOfTargets(amount + 1);
((DynamicTargetCreaturePermanent) target).setMaxNumberOfTargets(amount + 1);
}
}
@ -94,16 +92,15 @@ public class AetherBurst extends CardImpl {
class DynamicTargetCreaturePermanent extends TargetPermanent {
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creatures");
public DynamicTargetCreaturePermanent() {
super(filterCreature);
super(FILTER_PERMANENT_CREATURES);
}
public DynamicTargetCreaturePermanent(final DynamicTargetCreaturePermanent target) {
super(target);
}
@Override
public void setMaxNumberOfTargets(int maxNumberOfTargets) {
this.maxNumberOfTargets = maxNumberOfTargets;
}
@ -139,4 +136,3 @@ class DynamicReturnToHandTargetEffect extends ReturnToHandTargetEffect {
}
}

View file

@ -25,9 +25,9 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
@ -40,22 +40,20 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author ayratn
*/
public class Asceticism extends CardImpl {
public Asceticism(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{G}{G}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}{G}");
// Creatures you control have hexproof.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent("creatures"))));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield, FILTER_PERMANENT_CREATURES)));
// {1}{G}: Regenerate target creature.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateTargetEffect(), new ManaCostsImpl("{1}{G}"));
ability.addTarget(new TargetCreaturePermanent());

View file

@ -27,6 +27,7 @@
*/
package mage.cards.a;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@ -39,11 +40,9 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.watchers.common.AttackedThisTurnWatcher;
import java.util.UUID;
/**
*
* @author fireshoes
@ -51,16 +50,16 @@ import java.util.UUID;
public class AvatarOfSlaughter extends CardImpl {
public AvatarOfSlaughter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{R}{R}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{R}{R}");
this.subtype.add("Avatar");
this.power = new MageInt(8);
this.toughness = new MageInt(8);
// All creatures have double strike and attack each turn if able.
Effect effect = new GainAbilityAllEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent("creatures"));
Effect effect = new GainAbilityAllEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield, FILTER_PERMANENT_CREATURES);
effect.setText("All creatures have double strike");
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
effect = new AttacksIfAbleAllEffect(new FilterCreaturePermanent("creatures"));
effect = new AttacksIfAbleAllEffect(FILTER_PERMANENT_CREATURES);
effect.setText("and attack each turn if able");
ability.addEffect(effect);
this.addAbility(ability, new AttackedThisTurnWatcher());

View file

@ -27,6 +27,7 @@
*/
package mage.cards.b;
import java.util.UUID;
import mage.abilities.condition.LockedInCondition;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalRestrictionEffect;
@ -38,11 +39,10 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.TargetController;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import java.util.UUID;
/**
*
* @author LevelX2
@ -56,15 +56,14 @@ public class BarrageOfBoulders extends CardImpl {
}
public BarrageOfBoulders(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}");
// Barrage of Boulders deals 1 damage to each creature you don't control.
this.getSpellAbility().addEffect(new DamageAllEffect(1, filter));
// Ferocious - If you control a creature with power 4 or greater, creatures can't block this turn
Effect effect = new ConditionalRestrictionEffect(
Duration.EndOfTurn,
new CantBlockAllEffect(new FilterCreaturePermanent("creatures"), Duration.EndOfTurn),
new CantBlockAllEffect(FILTER_PERMANENT_CREATURES, Duration.EndOfTurn),
new LockedInCondition(FerociousCondition.instance), null);
effect.setText("<br/><i>Ferocious</i> &mdash; If you control a creature with power 4 or greater, creatures can't block this turn");
this.getSpellAbility().addEffect(effect);

View file

@ -27,6 +27,7 @@
*/
package mage.cards.b;
import java.util.UUID;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
@ -38,9 +39,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -49,15 +48,15 @@ import java.util.UUID;
public class BehindTheScenes extends CardImpl {
public BehindTheScenes(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}");
// Creatures you control have skulk.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new GainAbilityControlledEffect(new SkulkAbility(), Duration.WhileOnBattlefield, new FilterCreaturePermanent("creatures"))));
new GainAbilityControlledEffect(new SkulkAbility(), Duration.WhileOnBattlefield, FILTER_PERMANENT_CREATURES)));
// {4}{W}: Creatures you control get +1/+1 until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
new BoostControlledEffect(1, 1, Duration.EndOfTurn, new FilterCreaturePermanent("creatures")),
new BoostControlledEffect(1, 1, Duration.EndOfTurn, FILTER_PERMANENT_CREATURES),
new ManaCostsImpl("{4}{W}")));
}

View file

@ -27,21 +27,20 @@
*/
package mage.cards.b;
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.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
import mage.game.stack.StackObject;
import mage.players.Player;
import java.util.UUID;
/**
*
* @author ilcartographer
@ -49,7 +48,7 @@ import java.util.UUID;
public class BreakingPoint extends CardImpl {
public BreakingPoint(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}{R}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}{R}");
// Any player may have Breaking Point deal 6 damage to him or her. If no one does, destroy all creatures. Creatures destroyed this way can't be regenerated.
this.getSpellAbility().addEffect(new BreakingPointDestroyEffect());
@ -105,7 +104,7 @@ class BreakingPointDestroyEffect extends OneShotEffect {
}
}
if (destroyCreatures) {
for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterCreaturePermanent("creatures"), source.getControllerId(), source.getSourceId(), game)) {
for (Permanent permanent : game.getBattlefield().getActivePermanents(FILTER_PERMANENT_CREATURES, source.getControllerId(), source.getSourceId(), game)) {
permanent.destroy(source.getSourceId(), game, true);
}
}

View file

@ -27,6 +27,7 @@
*/
package mage.cards.b;
import java.util.UUID;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.PreventAllDamageToAllEffect;
import mage.cards.CardImpl;
@ -34,9 +35,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -45,10 +44,10 @@ import java.util.UUID;
public class BubbleMatrix extends CardImpl {
public BubbleMatrix(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
// Prevent all damage that would be dealt to creatures.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventAllDamageToAllEffect(Duration.WhileOnBattlefield, new FilterCreaturePermanent("creatures"))));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventAllDamageToAllEffect(Duration.WhileOnBattlefield, FILTER_PERMANENT_CREATURES)));
}
public BubbleMatrix(final BubbleMatrix card) {

View file

@ -27,6 +27,7 @@
*/
package mage.cards.c;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
@ -35,9 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -46,7 +45,7 @@ import java.util.UUID;
public class ChasmGuide extends CardImpl {
public ChasmGuide(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.subtype.add("Goblin");
this.subtype.add("Scout");
this.subtype.add("Ally");
@ -55,7 +54,7 @@ public class ChasmGuide extends CardImpl {
// <i>Rally</i> Whenever Chasm Guide or another Ally enters the battlefield under your control, creatures you control gain haste until end of turn.
this.addAbility(new AllyEntersBattlefieldTriggeredAbility(
new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent("creatures")), false));
new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn, FILTER_PERMANENT_CREATURES), false));
}
public ChasmGuide(final ChasmGuide card) {

View file

@ -27,16 +27,15 @@
*/
package mage.cards.c;
import java.util.UUID;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.UndauntedAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author LevelX2
@ -50,7 +49,7 @@ public class CurtainsCall extends CardImpl {
this.addAbility(new UndauntedAbility());
// Destroy two target creatures.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(2, 2, new FilterCreaturePermanent("creatures"), false));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(2, 2, FILTER_PERMANENT_CREATURES, false));
}
public CurtainsCall(final CurtainsCall card) {

View file

@ -27,13 +27,12 @@
*/
package mage.cards.d;
import java.util.UUID;
import mage.abilities.effects.common.DestroyAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -42,11 +41,10 @@ import java.util.UUID;
public class Damnation extends CardImpl {
public Damnation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}{B}");
// Destroy all creatures. They can't be regenerated.
this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterCreaturePermanent("creatures"), true));
this.getSpellAbility().addEffect(new DestroyAllEffect(FILTER_PERMANENT_CREATURES, true));
}
public Damnation(final Damnation card) {

View file

@ -27,6 +27,7 @@
*/
package mage.cards.d;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
@ -36,11 +37,9 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.target.TargetPlayer;
import java.util.UUID;
/**
*
* @author North
@ -48,7 +47,7 @@ import java.util.UUID;
public class DawnglareInvoker extends CardImpl {
public DawnglareInvoker(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add("Kor");
this.subtype.add("Wizard");
@ -57,7 +56,7 @@ public class DawnglareInvoker extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new TapAllTargetPlayerControlsEffect(new FilterCreaturePermanent("creatures")),
new TapAllTargetPlayerControlsEffect(FILTER_PERMANENT_CREATURES),
new ManaCostsImpl("{8}"));
ability.addTarget(new TargetPlayer());
this.addAbility(ability);

View file

@ -27,6 +27,7 @@
*/
package mage.cards.d;
import java.util.*;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
@ -35,14 +36,12 @@ import mage.cards.*;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetCreaturePermanent;
import java.util.*;
/**
*
* @author LevelX2
@ -56,7 +55,7 @@ public class DivergentTransformations extends CardImpl {
this.addAbility(new UndauntedAbility());
// Exile two target creatures. For each of those creatures, its controller reveals cards from the top of his or her library until he or she reveals a creature card, puts that card onto the battlefield, then shuffles the rest into his or her library.
this.getSpellAbility().addEffect(new DivergentTransformationsEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(2, 2, new FilterCreaturePermanent("creatures"), false));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(2, 2, FILTER_PERMANENT_CREATURES, false));
}

View file

@ -27,6 +27,7 @@
*/
package mage.cards.d;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
@ -35,9 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -46,7 +45,7 @@ import java.util.UUID;
public class DrogskolShieldmate extends CardImpl {
public DrogskolShieldmate(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add("Spirit");
this.subtype.add("Soldier");
this.power = new MageInt(2);
@ -57,7 +56,7 @@ public class DrogskolShieldmate extends CardImpl {
// When Drogskol Shieldmate enters the battlefield, other creatures you control get +0/+1 until end of turn.
this.addAbility(new EntersBattlefieldTriggeredAbility(
new BoostControlledEffect(0, 1, Duration.EndOfTurn, new FilterCreaturePermanent("creatures"), true), false));
new BoostControlledEffect(0, 1, Duration.EndOfTurn, FILTER_PERMANENT_CREATURES, true), false));
}
public DrogskolShieldmate(final DrogskolShieldmate card) {

View file

@ -27,6 +27,7 @@
*/
package mage.cards.e;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect;
@ -39,12 +40,10 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.target.TargetPermanent;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
/**
*
* @author fireshoes
@ -52,7 +51,7 @@ import java.util.UUID;
public class EmblemOfTheWarmind extends CardImpl {
public EmblemOfTheWarmind(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}");
this.subtype.add("Aura");
// Enchant creature you control
@ -64,7 +63,7 @@ public class EmblemOfTheWarmind extends CardImpl {
// Creatures you control have haste.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent("creatures"))));
new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, FILTER_PERMANENT_CREATURES)));
}
public EmblemOfTheWarmind(final EmblemOfTheWarmind card) {

View file

@ -27,19 +27,18 @@
*/
package mage.cards.e;
import java.util.UUID;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.TapAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/**
*
* @author fireshoes
@ -47,12 +46,13 @@ import java.util.UUID;
public class Ensnare extends CardImpl {
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("Islands");
static{
static {
filter.add(new SubtypePredicate("Island"));
}
public Ensnare(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{U}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}");
// You may return two Islands you control to their owner's hand rather than pay Ensnare's mana cost.
AlternativeCostSourceAbility ability;
@ -60,7 +60,7 @@ public class Ensnare extends CardImpl {
this.addAbility(ability);
// Tap all creatures.
this.getSpellAbility().addEffect(new TapAllEffect(new FilterCreaturePermanent("creatures")));
this.getSpellAbility().addEffect(new TapAllEffect(FILTER_PERMANENT_CREATURES));
}
public Ensnare(final Ensnare card) {

View file

@ -25,17 +25,15 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.e;
import java.util.UUID;
import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -43,16 +41,16 @@ import java.util.UUID;
*/
public class EtherealHaze extends CardImpl {
public EtherealHaze (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}");
public EtherealHaze(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}");
this.subtype.add("Arcane");
// Prevent all damage that would be dealt by creatures this turn.
this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(new FilterCreaturePermanent("creatures"), Duration.EndOfTurn, false));
this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(FILTER_PERMANENT_CREATURES, Duration.EndOfTurn, false));
}
public EtherealHaze (final EtherealHaze card) {
public EtherealHaze(final EtherealHaze card) {
super(card);
}

View file

@ -27,13 +27,12 @@
*/
package mage.cards.e;
import java.util.UUID;
import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -42,11 +41,10 @@ import java.util.UUID;
public class Evacuation extends CardImpl {
public Evacuation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{U}{U}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}{U}");
// Return all creatures to their owners' hands.
this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(new FilterCreaturePermanent("creatures")));
this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(FILTER_PERMANENT_CREATURES));
}
public Evacuation(final Evacuation card) {

View file

@ -27,6 +27,7 @@
*/
package mage.cards.f;
import java.util.UUID;
import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility;
import mage.abilities.condition.common.OnOpponentsTurnCondition;
import mage.abilities.effects.common.combat.CantAttackAnyPlayerAllEffect;
@ -35,9 +36,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.PhaseStep;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -46,14 +45,14 @@ import java.util.UUID;
public class Festival extends CardImpl {
public Festival(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}");
// Cast Festival only during an opponent's upkeep.
this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(null, PhaseStep.UPKEEP, OnOpponentsTurnCondition.instance,
"Cast {this} only during an opponent's upkeep"));
// Creatures can't attack this turn.
this.getSpellAbility().addEffect(new CantAttackAnyPlayerAllEffect(Duration.EndOfTurn, new FilterCreaturePermanent("creatures")));
this.getSpellAbility().addEffect(new CantAttackAnyPlayerAllEffect(Duration.EndOfTurn, FILTER_PERMANENT_CREATURES));
}

View file

@ -27,6 +27,7 @@
*/
package mage.cards.f;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
@ -35,9 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -46,7 +45,7 @@ import java.util.UUID;
public class FiremantleMage extends CardImpl {
public FiremantleMage(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
this.subtype.add("Human");
this.subtype.add("Shaman");
this.subtype.add("Ally");
@ -55,7 +54,7 @@ public class FiremantleMage extends CardImpl {
// <i>Rally</i> Whenver Firemantle Mage or another Ally enters the battlefield under your control, creatures you control gain menace until end of turn.
this.addAbility(new AllyEntersBattlefieldTriggeredAbility(
new GainAbilityControlledEffect(new MenaceAbility(), Duration.EndOfTurn, new FilterCreaturePermanent("creatures")), false));
new GainAbilityControlledEffect(new MenaceAbility(), Duration.EndOfTurn, FILTER_PERMANENT_CREATURES), false));
}
public FiremantleMage(final FiremantleMage card) {

View file

@ -27,6 +27,7 @@
*/
package mage.cards.f;
import java.util.UUID;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.UntapAllControllerEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
@ -36,9 +37,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -47,16 +46,14 @@ import java.util.UUID;
public class FlyingCraneTechnique extends CardImpl {
public FlyingCraneTechnique(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{U}{R}{W}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}{R}{W}");
// Untap all creatures you control. They gain flying and double strike until end of turn.
FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures");
this.getSpellAbility().addEffect(new UntapAllControllerEffect(filter));
Effect effect = new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.EndOfTurn, filter);
this.getSpellAbility().addEffect(new UntapAllControllerEffect(FILTER_PERMANENT_CREATURES));
Effect effect = new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.EndOfTurn, FILTER_PERMANENT_CREATURES);
effect.setText("They gain flying");
this.getSpellAbility().addEffect(effect);
effect = new GainAbilityControlledEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn, filter);
effect = new GainAbilityControlledEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn, FILTER_PERMANENT_CREATURES);
effect.setText("and double strike until end of turn");
this.getSpellAbility().addEffect(effect);
}

View file

@ -27,14 +27,13 @@
*/
package mage.cards.f;
import java.util.UUID;
import mage.abilities.effects.common.PreventAllDamageToAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -43,10 +42,10 @@ import java.util.UUID;
public class Forfend extends CardImpl {
public Forfend(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
// Prevent all damage that would be dealt to creatures this turn.
this.getSpellAbility().addEffect(new PreventAllDamageToAllEffect(Duration.EndOfTurn, new FilterCreaturePermanent("creatures")));
this.getSpellAbility().addEffect(new PreventAllDamageToAllEffect(Duration.EndOfTurn, FILTER_PERMANENT_CREATURES));
}
public Forfend(final Forfend card) {

View file

@ -27,6 +27,7 @@
*/
package mage.cards.g;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.SpellAbility;
import mage.abilities.effects.common.TapTargetEffect;
@ -34,27 +35,22 @@ import mage.abilities.effects.keyword.ScryEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.game.Game;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public class GlimpseTheSunGod extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures");
public GlimpseTheSunGod(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{W}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{W}");
// Tap X target creatures. Scry 1.
this.getSpellAbility().addEffect(new TapTargetEffect("X target creatures"));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 1,filter, false));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 1, FILTER_PERMANENT_CREATURES, false));
this.getSpellAbility().addEffect(new ScryEffect(1));
}
@ -67,8 +63,8 @@ public class GlimpseTheSunGod extends CardImpl {
if (ability instanceof SpellAbility) {
ability.getTargets().clear();
int numberToTap = ability.getManaCostsToPay().getX();
numberToTap = Math.min(game.getBattlefield().count(filter, ability.getSourceId(), ability.getControllerId(), game), numberToTap);
ability.addTarget(new TargetCreaturePermanent(numberToTap, numberToTap, filter, false));
numberToTap = Math.min(game.getBattlefield().count(FILTER_PERMANENT_CREATURES, ability.getSourceId(), ability.getControllerId(), game), numberToTap);
ability.addTarget(new TargetCreaturePermanent(numberToTap, numberToTap, FILTER_PERMANENT_CREATURES, false));
}
}

View file

@ -27,6 +27,7 @@
*/
package mage.cards.g;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.combat.AttacksIfAbleAllEffect;
@ -35,11 +36,9 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.watchers.common.AttackedThisTurnWatcher;
import java.util.UUID;
/**
*
* @author fenhl
@ -47,14 +46,14 @@ import java.util.UUID;
public class GrandMelee extends CardImpl {
public GrandMelee(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}");
// All creatures attack each turn if able.
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new AttacksIfAbleAllEffect(new FilterCreaturePermanent("creatures")));
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new AttacksIfAbleAllEffect(FILTER_PERMANENT_CREATURES));
this.addAbility(ability, new AttackedThisTurnWatcher());
// All creatures block each turn if able.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BlocksIfAbleAllEffect(new FilterCreaturePermanent("creatures"))));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BlocksIfAbleAllEffect(FILTER_PERMANENT_CREATURES)));
}
public GrandMelee(final GrandMelee card) {

View file

@ -28,11 +28,6 @@
package mage.cards.h;
import java.util.UUID;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect;
@ -42,7 +37,12 @@ import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.filter.common.FilterCreaturePermanent;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
@ -53,7 +53,7 @@ import mage.target.common.TargetCreaturePermanent;
public class HolyMantle extends CardImpl {
public HolyMantle(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}{W}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}");
this.subtype.add("Aura");
@ -65,8 +65,8 @@ public class HolyMantle extends CardImpl {
this.addAbility(ability);
// Enchanted creature gets +2/+2 and has protection from creatures.
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2,2, Duration.WhileOnBattlefield));
ability.addEffect(new GainAbilityAttachedEffect(new ProtectionAbility(new FilterCreaturePermanent("creatures")), AttachmentType.AURA, Duration.WhileOnBattlefield));
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield));
ability.addEffect(new GainAbilityAttachedEffect(new ProtectionAbility(FILTER_PERMANENT_CREATURES), AttachmentType.AURA, Duration.WhileOnBattlefield));
this.addAbility(ability);
}

View file

@ -38,6 +38,7 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.TargetController;
import mage.constants.Zone;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.filter.common.FilterCreaturePermanent;
/**
@ -47,13 +48,12 @@ import mage.filter.common.FilterCreaturePermanent;
public class IntruderAlarm extends CardImpl {
public IntruderAlarm(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
// Creatures don't untap during their controllers' untap steps.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, new FilterCreaturePermanent("creatures"))));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, FILTER_PERMANENT_CREATURES)));
// Whenever a creature enters the battlefield, untap all creatures.
this.addAbility(new EntersBattlefieldAllTriggeredAbility(new UntapAllEffect(new FilterCreaturePermanent("creatures")), new FilterCreaturePermanent("a creature")));
this.addAbility(new EntersBattlefieldAllTriggeredAbility(new UntapAllEffect(FILTER_PERMANENT_CREATURES), new FilterCreaturePermanent("a creature")));
}
public IntruderAlarm(final IntruderAlarm card) {

View file

@ -38,7 +38,7 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
@ -53,7 +53,7 @@ import mage.watchers.common.NumberOfTimesPermanentTargetedATurnWatcher;
public class KiraGreatGlassSpinner extends CardImpl {
public KiraGreatGlassSpinner(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}");
this.subtype.add("Spirit");
addSuperType(SuperType.LEGENDARY);
@ -68,7 +68,7 @@ public class KiraGreatGlassSpinner extends CardImpl {
effect.setText("counter that spell or ability");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new GainAbilityControlledEffect(new KiraGreatGlassSpinnerAbility(effect), Duration.WhileOnBattlefield,
new FilterCreaturePermanent("creatures"))),
FILTER_PERMANENT_CREATURES)),
new NumberOfTimesPermanentTargetedATurnWatcher());
}

View file

@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.ControllerPredicate;
@ -54,7 +55,7 @@ public class KolaghanTheStormsFury extends CardImpl {
}
public KolaghanTheStormsFury(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{R}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{R}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add("Dragon");
this.power = new MageInt(4);
@ -65,7 +66,7 @@ public class KolaghanTheStormsFury extends CardImpl {
// Whenever a Dragon you control attacks, creatures you control get +1/+0 until end of turn.
this.addAbility(new AttacksAllTriggeredAbility(
new BoostControlledEffect(1, 0, Duration.EndOfTurn, new FilterCreaturePermanent("creatures"), false),
new BoostControlledEffect(1, 0, Duration.EndOfTurn, FILTER_PERMANENT_CREATURES, false),
false, filter, SetTargetPointer.NONE, false));
// Dash {3}{B}{R}

View file

@ -36,7 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -45,7 +45,7 @@ import mage.filter.common.FilterCreaturePermanent;
public class KorBladewhirl extends CardImpl {
public KorBladewhirl(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add("Kor");
this.subtype.add("Soldier");
this.subtype.add("Ally");
@ -54,7 +54,7 @@ public class KorBladewhirl extends CardImpl {
// <i>Rally</i> Whenever Kor Bladewhirl or another Ally enters the battlefield under your control, creatures you control gain first strike until end of turn.
this.addAbility(new AllyEntersBattlefieldTriggeredAbility(
new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent("creatures")), false));
new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, FILTER_PERMANENT_CREATURES), false));
}
public KorBladewhirl(final KorBladewhirl card) {

View file

@ -37,7 +37,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -46,7 +46,7 @@ import mage.filter.common.FilterCreaturePermanent;
public class MasterOfPearls extends CardImpl {
public MasterOfPearls(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add("Human");
this.subtype.add("Monk");
@ -56,7 +56,7 @@ public class MasterOfPearls extends CardImpl {
// Morph {3}{W}{W}
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{3}{W}{W}")));
// When Master of Pearls is turned face up, creatures you control get +2/+2 until end of turn.
this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new BoostControlledEffect(2,2, Duration.EndOfTurn, new FilterCreaturePermanent("creatures"))));
this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new BoostControlledEffect(2, 2, Duration.EndOfTurn, FILTER_PERMANENT_CREATURES)));
}
public MasterOfPearls(final MasterOfPearls card) {

View file

@ -28,13 +28,13 @@
package mage.cards.m;
import java.util.UUID;
import mage.constants.CardType;
import mage.abilities.Mode;
import mage.abilities.effects.common.ExileAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.filter.common.FilterArtifactPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.common.FilterEnchantmentPermanent;
import mage.filter.common.FilterPlaneswalkerPermanent;
@ -45,14 +45,13 @@ import mage.filter.common.FilterPlaneswalkerPermanent;
public class MercilessEviction extends CardImpl {
public MercilessEviction(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{W}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{W}{B}");
// Choose one - Exile all artifacts
this.getSpellAbility().addEffect(new ExileAllEffect(new FilterArtifactPermanent("artifacts")));
// or exile all creatures
Mode mode = new Mode();
mode.getEffects().add(new ExileAllEffect(new FilterCreaturePermanent("creatures")));
mode.getEffects().add(new ExileAllEffect(FILTER_PERMANENT_CREATURES));
this.getSpellAbility().addMode(mode);
// or exile all enchantments
Mode mode2 = new Mode();

View file

@ -27,6 +27,7 @@
*/
package mage.cards.m;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
@ -38,9 +39,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SuperType;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -49,7 +48,7 @@ import java.util.UUID;
public class MillenniumFalcon extends CardImpl {
public MillenniumFalcon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{G}{G}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{G}{G}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add("Starship");
this.power = new MageInt(5);
@ -62,7 +61,7 @@ public class MillenniumFalcon extends CardImpl {
this.addAbility(SpaceflightAbility.getInstance());
// When Millennium Falcon enters the battlefield, creatures you control gain hexproof until end of turn.
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent("creatures"))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.EndOfTurn, FILTER_PERMANENT_CREATURES)));
}
public MillenniumFalcon(final MillenniumFalcon card) {

View file

@ -35,7 +35,7 @@ import mage.abilities.effects.common.TapAllTargetPlayerControlsEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.target.TargetPlayer;
import mage.target.common.TargetCardInGraveyard;
import mage.target.common.TargetCreaturePermanent;
@ -47,7 +47,7 @@ import mage.target.common.TargetCreaturePermanent;
public class NayaCharm extends CardImpl {
public NayaCharm(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{G}{W}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}{G}{W}");
// Choose one - Naya Charm deals 3 damage to target creature;
this.getSpellAbility().addEffect(new DamageTargetEffect(3));
@ -59,7 +59,7 @@ public class NayaCharm extends CardImpl {
this.getSpellAbility().addMode(mode);
// or tap all creatures target player controls.
mode = new Mode();
mode.getEffects().add(new TapAllTargetPlayerControlsEffect(new FilterCreaturePermanent("creatures")));
mode.getEffects().add(new TapAllTargetPlayerControlsEffect(FILTER_PERMANENT_CREATURES));
mode.getTargets().add(new TargetPlayer());
this.getSpellAbility().addMode(mode);
}

View file

@ -42,7 +42,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.target.common.TargetCreaturePermanent;
/**
@ -52,7 +52,7 @@ import mage.target.common.TargetCreaturePermanent;
public class NephaliaMoondrakes extends CardImpl {
public NephaliaMoondrakes(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}");
this.subtype.add("Drake");
this.power = new MageInt(5);
this.toughness = new MageInt(5);
@ -66,7 +66,7 @@ public class NephaliaMoondrakes extends CardImpl {
this.addAbility(ability);
// {4}{U}{U}, Exile Nephalia Moondrakes from your graveyard: Creatures you control gain flying until end of turn.
ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent("creatures")), new ManaCostsImpl("{4}{U}{U}"));
ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.EndOfTurn, FILTER_PERMANENT_CREATURES), new ManaCostsImpl("{4}{U}{U}"));
ability.addCost(new ExileSourceFromGraveCost());
this.addAbility(ability);
}

View file

@ -36,7 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -45,7 +45,7 @@ import mage.filter.common.FilterCreaturePermanent;
public class OnduChampion extends CardImpl {
public OnduChampion(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
this.subtype.add("Minotaur");
this.subtype.add("Warrior");
this.subtype.add("Ally");
@ -54,7 +54,7 @@ public class OnduChampion extends CardImpl {
// <i>Rally</i> Whenever Ondu Champion or another Ally enters the battlefield under your control, creatures you control gain trample until end of turn.
this.addAbility(new AllyEntersBattlefieldTriggeredAbility(
new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent("creatures")), false));
new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, FILTER_PERMANENT_CREATURES), false));
}
public OnduChampion(final OnduChampion card) {

View file

@ -39,7 +39,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.players.Player;
@ -52,7 +52,7 @@ import mage.target.TargetPlayer;
public class OrimsChant extends CardImpl {
public OrimsChant(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}");
// Kicker {W} (You may pay an additional {W} as you cast this spell.)
this.addAbility(new KickerAbility("{W}"));
@ -123,7 +123,7 @@ class OrimsChantEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null && KickedCondition.instance.apply(game, source)) {
game.addEffect(new CantAttackAnyPlayerAllEffect(Duration.EndOfTurn, new FilterCreaturePermanent("creatures")), source);
game.addEffect(new CantAttackAnyPlayerAllEffect(Duration.EndOfTurn, FILTER_PERMANENT_CREATURES), source);
return true;
}
return false;

View file

@ -40,7 +40,7 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -49,12 +49,11 @@ import mage.filter.common.FilterCreaturePermanent;
public class PendrellMists extends CardImpl {
public PendrellMists(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}");
// All creatures have "At the beginning of your upkeep, sacrifice this creature unless you pay {1}."
Ability gainedAbility = new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new GenericManaCost(1)), TargetController.YOU, false);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(gainedAbility, Duration.WhileOnBattlefield, new FilterCreaturePermanent("creatures"),
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(gainedAbility, Duration.WhileOnBattlefield, FILTER_PERMANENT_CREATURES,
"All creatures have \"At the beginning of your upkeep, sacrifice this creature unless you pay {1}")));
}

View file

@ -40,7 +40,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ColoredManaSymbol;
import mage.constants.Duration;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.watchers.common.ManaSpentToCastWatcher;
/**
@ -50,7 +50,7 @@ import mage.watchers.common.ManaSpentToCastWatcher;
public class Plaxmanta extends CardImpl {
public Plaxmanta(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
this.subtype.add("Beast");
this.power = new MageInt(2);
this.toughness = new MageInt(2);
@ -60,7 +60,7 @@ public class Plaxmanta extends CardImpl {
// When Plaxmanta enters the battlefield, creatures you control gain shroud until end of turn.
this.addAbility(new EntersBattlefieldTriggeredAbility(
new GainAbilityControlledEffect(ShroudAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent("creatures"))));
new GainAbilityControlledEffect(ShroudAbility.getInstance(), Duration.EndOfTurn, FILTER_PERMANENT_CREATURES)));
// When Plaxmanta enters the battlefield, sacrifice it unless {G} was spent to cast it.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.G)), false), new ManaSpentToCastWatcher());

View file

@ -34,7 +34,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.target.common.TargetCreaturePermanent;
/**
@ -44,14 +44,13 @@ import mage.target.common.TargetCreaturePermanent;
public class ReapWhatIsSown extends CardImpl {
public ReapWhatIsSown(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}{W}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}{W}");
// Put a +1/+1 counter on each of up to three target creatures.
Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance());
effect.setText("Put a +1/+1 counter on each of up to three target creatures");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 3, new FilterCreaturePermanent("creatures"), false));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 3, FILTER_PERMANENT_CREATURES, false));
}
public ReapWhatIsSown(final ReapWhatIsSown card) {

View file

@ -36,19 +36,19 @@ import mage.abilities.effects.common.DestroyAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
* @author LoneFox
*
*/
public class Rout extends CardImpl {
public Rout(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{W}{W}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}{W}");
Effect effect = new DestroyAllEffect(new FilterCreaturePermanent("creatures"), true);
Effect effect = new DestroyAllEffect(FILTER_PERMANENT_CREATURES, true);
// You may cast Rout as though it had flash if you pay {2} more to cast it.
Ability ability = new PayMoreToCastAsThoughtItHadFlashAbility(this, new ManaCostsImpl("{2}"));
ability.addEffect(effect);

View file

@ -33,7 +33,7 @@ import mage.abilities.keyword.UndauntedAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -48,7 +48,7 @@ public class SublimeExhalation extends CardImpl {
this.addAbility(new UndauntedAbility());
// Destroy all creatures.
getSpellAbility().addEffect(new DestroyAllEffect(new FilterCreaturePermanent("creatures")));
getSpellAbility().addEffect(new DestroyAllEffect(FILTER_PERMANENT_CREATURES));
}
public SublimeExhalation(final SublimeExhalation card) {

View file

@ -38,7 +38,7 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -47,7 +47,7 @@ import mage.filter.common.FilterCreaturePermanent;
public class SunQuanLordOfWu extends CardImpl {
public SunQuanLordOfWu(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{U}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add("Human");
this.subtype.add("Soldier");
@ -57,7 +57,7 @@ public class SunQuanLordOfWu extends CardImpl {
// Creatures you control have horsemanship.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(HorsemanshipAbility.getInstance(),
Duration.WhileOnBattlefield, new FilterCreaturePermanent("creatures"))));
Duration.WhileOnBattlefield, FILTER_PERMANENT_CREATURES)));
}
public SunQuanLordOfWu(final SunQuanLordOfWu card) {

View file

@ -49,7 +49,7 @@ import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.Game;
@ -81,7 +81,7 @@ public class TamiyoFieldResearcher extends CardImpl {
// +1: Choose up to two target creatures. Until your next turn, whenever either of those creatures deals combat damage, you draw a card.
Ability ability = new LoyaltyAbility(new TamiyoFieldResearcherEffect1(), 1);
ability.addTarget(new TargetCreaturePermanent(0, 2, new FilterCreaturePermanent("creatures"), false));
ability.addTarget(new TargetCreaturePermanent(0, 2, FILTER_PERMANENT_CREATURES, false));
this.addAbility(ability);
// -2: Tap up to two target nonland permanents. They don't untap during their controller's next untap step.
@ -199,4 +199,3 @@ class TamiyoFieldResearcherEmblem extends Emblem {
this.getAbilities().add(new SimpleStaticAbility(Zone.COMMAND, new CastFromHandWithoutPayingManaCostEffect()));
}
}

View file

@ -39,7 +39,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.game.Game;
import mage.game.events.DamagedPlayerEvent;
import mage.game.events.GameEvent;
@ -65,7 +65,7 @@ public class TeysaEnvoyOfGhosts extends CardImpl {
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// protection from creatures
this.addAbility(new ProtectionAbility(new FilterCreaturePermanent("creatures")));
this.addAbility(new ProtectionAbility(FILTER_PERMANENT_CREATURES));
// Whenever a creature deals combat damage to you, destroy that creature. Create a 1/1 white and black Spirit creature token with flying.
this.addAbility(new TeysaEnvoyOfGhostsTriggeredAbility());

View file

@ -42,7 +42,7 @@ import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
@ -52,13 +52,10 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class UnquestionedAuthority extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures");
public UnquestionedAuthority(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
this.subtype.add("Aura");
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
@ -69,7 +66,8 @@ public class UnquestionedAuthority extends CardImpl {
// When Unquestioned Authority enters the battlefield, draw a card.
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)));
// Enchanted creature has protection from creatures.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new ProtectionAbility(filter), AttachmentType.AURA)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new GainAbilityAttachedEffect(new ProtectionAbility(FILTER_PERMANENT_CREATURES), AttachmentType.AURA)));
}
public UnquestionedAuthority(final UnquestionedAuthority card) {

View file

@ -41,8 +41,8 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.filter.common.FilterAttackingCreature;
import mage.filter.common.FilterCreaturePermanent;
/**
*
@ -51,7 +51,7 @@ import mage.filter.common.FilterCreaturePermanent;
public class WarmongerHellkite extends CardImpl {
public WarmongerHellkite(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}");
this.subtype.add("Dragon");
this.power = new MageInt(5);
@ -61,7 +61,7 @@ public class WarmongerHellkite extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// All creatures attack each combat if able.
Effect effect = new AttacksIfAbleAllEffect(new FilterCreaturePermanent("creatures"), Duration.WhileOnBattlefield, true);
Effect effect = new AttacksIfAbleAllEffect(FILTER_PERMANENT_CREATURES, Duration.WhileOnBattlefield, true);
effect.setText("All creatures attack each combat if able");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));

View file

@ -34,7 +34,7 @@ import mage.abilities.effects.common.TapTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.game.Game;
import mage.target.common.TargetCreaturePermanent;
@ -44,14 +44,12 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class WordOfBinding extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures");
public WordOfBinding(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{B}{B}");
// Tap X target creatures.
this.getSpellAbility().addEffect(new TapTargetEffect("X target creatures"));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 1,filter, false));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 1, FILTER_PERMANENT_CREATURES, false));
}
public WordOfBinding(final WordOfBinding card) {
@ -63,8 +61,8 @@ public class WordOfBinding extends CardImpl {
if (ability instanceof SpellAbility) {
ability.getTargets().clear();
int numberToTap = ability.getManaCostsToPay().getX();
numberToTap = Math.min(game.getBattlefield().count(filter, ability.getSourceId(), ability.getControllerId(), game), numberToTap);
ability.addTarget(new TargetCreaturePermanent(numberToTap, numberToTap, filter, false));
numberToTap = Math.min(game.getBattlefield().count(FILTER_PERMANENT_CREATURES, ability.getSourceId(), ability.getControllerId(), game), numberToTap);
ability.addTarget(new TargetCreaturePermanent(numberToTap, numberToTap, FILTER_PERMANENT_CREATURES, false));
}
}

View file

@ -28,11 +28,11 @@
package mage.cards.w;
import java.util.UUID;
import mage.constants.CardType;
import mage.abilities.effects.common.DestroyAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.filter.common.FilterCreaturePermanent;
import mage.constants.CardType;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
@ -41,11 +41,10 @@ import mage.filter.common.FilterCreaturePermanent;
public class WrathOfGod extends CardImpl {
public WrathOfGod(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{W}{W}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{W}{W}");
// Destroy all creatures. They can't be regenerated.
this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterCreaturePermanent("creatures"), true));
this.getSpellAbility().addEffect(new DestroyAllEffect(FILTER_PERMANENT_CREATURES, true));
}
public WrathOfGod(final WrathOfGod card) {

View file

@ -35,6 +35,7 @@ public final class StaticFilters {
public static final FilterCard FILTER_CARD_ARTIFACT_OR_CREATURE = new FilterCard("artifact or creature card");
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE = new FilterCreaturePermanent();
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURES = new FilterCreaturePermanent("creatures");
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_GOBLINS = new FilterCreaturePermanent("Goblin", "Goblin creatures");
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_SLIVERS = new FilterCreaturePermanent("Sliver", "Sliver creatures");