From 2a2c817d8e8c7334fdac836c5992dea4b153bd8a Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 11 May 2014 20:41:22 +0200 Subject: [PATCH] * Venser, Shaper Savant - Fixed a bug that only creatures could be targeted. --- .../src/mage/target/common/TargetSpellOrPermanent.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Mage/src/mage/target/common/TargetSpellOrPermanent.java b/Mage/src/mage/target/common/TargetSpellOrPermanent.java index 72f8236c45..76ca270fbe 100644 --- a/Mage/src/mage/target/common/TargetSpellOrPermanent.java +++ b/Mage/src/mage/target/common/TargetSpellOrPermanent.java @@ -32,12 +32,11 @@ package mage.target.common; import java.util.HashSet; import java.util.Set; import java.util.UUID; -import mage.constants.Zone; import mage.MageObject; import mage.abilities.Ability; +import mage.constants.Zone; import mage.filter.Filter; import mage.filter.FilterPermanent; -import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterSpellOrPermanent; import mage.game.Game; import mage.game.permanent.Permanent; @@ -45,7 +44,6 @@ import mage.game.stack.Spell; import mage.game.stack.StackObject; import mage.target.TargetImpl; - /** * * @author LevelX @@ -155,7 +153,7 @@ public class TargetSpellOrPermanent extends TargetImpl { } } } - for (Permanent permanent: game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), sourceControllerId, game)) { + for (Permanent permanent: game.getBattlefield().getActivePermanents(filterPermanent, sourceControllerId, game)) { if (permanent.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(permanent, sourceId, sourceControllerId, game)) { count++; if (count >= this.minNumberOfTargets) { @@ -207,7 +205,7 @@ public class TargetSpellOrPermanent extends TargetImpl { possibleTargets.add(spell.getId()); } } - for (Permanent permanent: game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), sourceControllerId, game)) { + for (Permanent permanent: game.getBattlefield().getActivePermanents(filterPermanent, sourceControllerId, game)) { if (permanent.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(permanent, sourceId, sourceControllerId, game)) { possibleTargets.add(permanent.getId()); } @@ -224,7 +222,7 @@ public class TargetSpellOrPermanent extends TargetImpl { possibleTargets.add(spell.getId()); } } - for (Permanent permanent: game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), sourceControllerId, game)) { + for (Permanent permanent: game.getBattlefield().getActivePermanents(filterPermanent, sourceControllerId, game)) { if (filter.match(permanent, null, sourceControllerId, game)) { possibleTargets.add(permanent.getId()); }