mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
set filter on restriction effect
This commit is contained in:
parent
d65581809f
commit
d231ace130
1 changed files with 9 additions and 1 deletions
|
@ -41,6 +41,9 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
@ -73,6 +76,11 @@ public class TeferisMoat extends CardImpl {
|
|||
|
||||
class TeferisMoatRestrictionEffect extends RestrictionEffect {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures without flying");
|
||||
static {
|
||||
filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
|
||||
}
|
||||
|
||||
TeferisMoatRestrictionEffect(){
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "Creatures of the chosen color without flying can't attack you";
|
||||
|
@ -100,4 +108,4 @@ class TeferisMoatRestrictionEffect extends RestrictionEffect {
|
|||
public TeferisMoatRestrictionEffect copy() {
|
||||
return new TeferisMoatRestrictionEffect(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue