Fixed possible static filter manipulation.

This commit is contained in:
LevelX2 2018-06-21 22:33:02 +02:00
parent a46c70bd68
commit 083d4cee6d
4 changed files with 10 additions and 16 deletions

View file

@ -1,4 +1,3 @@
package mage.cards.m;
import java.util.UUID;
@ -7,7 +6,7 @@ import mage.abilities.effects.common.TapAllTargetPlayerControlsEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterLandPermanent;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetPlayer;
@ -39,7 +38,7 @@ public final class ManaShort extends CardImpl {
class ManaShortEffect extends TapAllTargetPlayerControlsEffect {
public ManaShortEffect() {
super(new FilterLandPermanent());
super(StaticFilters.FILTER_LANDS);
staticText = "Tap all lands target player controls and that player loses all unspent mana";
}

View file

@ -1,4 +1,3 @@
package mage.cards.t;
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.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.target.common.TargetOpponent;
/**
@ -28,7 +27,7 @@ public final class TempestCaller extends CardImpl {
this.toughness = new MageInt(3);
// When Tempest Caller enters the battlefield, tap all creatures target opponent controls.
Ability ability = new EntersBattlefieldTriggeredAbility(new TapAllTargetPlayerControlsEffect(new FilterCreaturePermanent("creatures")));
Ability ability = new EntersBattlefieldTriggeredAbility(new TapAllTargetPlayerControlsEffect(FILTER_PERMANENT_CREATURES));
ability.addTarget(new TargetOpponent());
this.addAbility(ability);
}

View file

@ -1,4 +1,3 @@
package mage.cards.t;
import java.util.UUID;
@ -15,11 +14,11 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.constants.SetTargetPointer;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.game.Game;
import mage.players.Player;
@ -30,7 +29,7 @@ import mage.players.Player;
public final class TorrentElemental extends CardImpl {
public TorrentElemental(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}");
this.subtype.add(SubType.ELEMENTAL);
this.power = new MageInt(3);
this.toughness = new MageInt(5);
@ -38,7 +37,7 @@ public final class TorrentElemental extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever Torrent Elemental attacks, tap all creatures defending player controls.
Effect effect = new TapAllTargetPlayerControlsEffect(new FilterCreaturePermanent());
Effect effect = new TapAllTargetPlayerControlsEffect(FILTER_PERMANENT_CREATURES);
effect.setText("tap all creatures defending player controls.");
this.addAbility(new AttacksTriggeredAbility(effect, false, null, SetTargetPointer.PLAYER));
// {3}{B/G}{B/G}: Put Torrent Elemental from exile onto the battlefield tapped. Activate this ability only any time you could cast a sorcery.