fixed Brooding Saurian only getting back creatures (fixes #5033)

This commit is contained in:
Evan Kranzler 2018-06-18 01:21:14 -04:00
parent bb92d04ff4
commit 9a9c1a8694

View file

@ -1,4 +1,3 @@
package mage.cards.b; package mage.cards.b;
import java.util.Iterator; import java.util.Iterator;
@ -12,7 +11,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.other.OwnerIdPredicate; import mage.filter.predicate.other.OwnerIdPredicate;
import mage.filter.predicate.permanent.TokenPredicate; import mage.filter.predicate.permanent.TokenPredicate;
@ -27,7 +25,7 @@ import mage.players.Player;
public final class BroodingSaurian extends CardImpl { public final class BroodingSaurian extends CardImpl {
public BroodingSaurian(UUID ownerId, CardSetInfo setInfo) { public BroodingSaurian(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
this.subtype.add(SubType.LIZARD); this.subtype.add(SubType.LIZARD);
this.power = new MageInt(4); this.power = new MageInt(4);
@ -49,7 +47,8 @@ public final class BroodingSaurian extends CardImpl {
class BroodingSaurianControlEffect extends ContinuousEffectImpl { class BroodingSaurianControlEffect extends ContinuousEffectImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); private static final FilterPermanent filter = new FilterPermanent();
static { static {
filter.add(Predicates.not(new TokenPredicate())); filter.add(Predicates.not(new TokenPredicate()));
} }
@ -77,7 +76,7 @@ class BroodingSaurianControlEffect extends ContinuousEffectImpl {
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
FilterPermanent playerFilter = filter.copy(); FilterPermanent playerFilter = filter.copy();
playerFilter.add(new OwnerIdPredicate(playerId)); playerFilter.add(new OwnerIdPredicate(playerId));
for (Permanent permanent :game.getBattlefield().getActivePermanents(playerFilter, playerId, game)) { for (Permanent permanent : game.getBattlefield().getActivePermanents(playerFilter, playerId, game)) {
affectedObjectList.add(new MageObjectReference(permanent, game)); affectedObjectList.add(new MageObjectReference(permanent, game));
} }
} }