mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
update spellfilters to staticfilters
This commit is contained in:
parent
ba5c216146
commit
b7159d7d2c
50 changed files with 173 additions and 389 deletions
|
|
@ -51,6 +51,10 @@ public final class StaticFilters {
|
|||
public static final FilterSpell FILTER_SPELL_NON_CREATURE
|
||||
= (FilterSpell) new FilterSpell("noncreature spell").add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||
|
||||
public static final FilterSpell FILTER_SPELL = new FilterSpell();
|
||||
|
||||
public static final FilterSpell FILTER_INSTANT_OR_SORCERY_SPELL = new FilterSpell("instant or sorcery spell");
|
||||
|
||||
public static final FilterPermanent FILTER_CREATURE_TOKENS = new FilterCreaturePermanent("creature tokens");
|
||||
|
||||
public static final FilterPermanent FILTER_ATTACKING_CREATURES = new FilterCreaturePermanent("attacking creatures");
|
||||
|
|
@ -87,6 +91,11 @@ public final class StaticFilters {
|
|||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.CREATURE)
|
||||
));
|
||||
|
||||
FILTER_INSTANT_OR_SORCERY_SPELL.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.INSTANT),
|
||||
new CardTypePredicate(CardType.SORCERY)
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ package mage.target;
|
|||
import mage.abilities.Ability;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.game.stack.StackObject;
|
||||
|
|
@ -49,7 +50,7 @@ public class TargetSpell extends TargetObject {
|
|||
private final Set<UUID> sourceIds = new HashSet<>();
|
||||
|
||||
public TargetSpell() {
|
||||
this(1, 1, new FilterSpell());
|
||||
this(1, 1, StaticFilters.FILTER_SPELL);
|
||||
}
|
||||
|
||||
public TargetSpell(FilterSpell filter) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue