mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
* Venser, Shaper Savant - Fixed a bug that only creatures could be targeted.
This commit is contained in:
parent
bfa0922dc2
commit
2a2c817d8e
1 changed files with 4 additions and 6 deletions
|
@ -32,12 +32,11 @@ package mage.target.common;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
import mage.constants.Zone;
|
||||||
import mage.filter.Filter;
|
import mage.filter.Filter;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
|
||||||
import mage.filter.common.FilterSpellOrPermanent;
|
import mage.filter.common.FilterSpellOrPermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
@ -45,7 +44,6 @@ import mage.game.stack.Spell;
|
||||||
import mage.game.stack.StackObject;
|
import mage.game.stack.StackObject;
|
||||||
import mage.target.TargetImpl;
|
import mage.target.TargetImpl;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author LevelX
|
* @author LevelX
|
||||||
|
@ -155,7 +153,7 @@ public class TargetSpellOrPermanent extends TargetImpl<TargetSpellOrPermanent> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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)) {
|
if (permanent.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(permanent, sourceId, sourceControllerId, game)) {
|
||||||
count++;
|
count++;
|
||||||
if (count >= this.minNumberOfTargets) {
|
if (count >= this.minNumberOfTargets) {
|
||||||
|
@ -207,7 +205,7 @@ public class TargetSpellOrPermanent extends TargetImpl<TargetSpellOrPermanent> {
|
||||||
possibleTargets.add(spell.getId());
|
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)) {
|
if (permanent.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(permanent, sourceId, sourceControllerId, game)) {
|
||||||
possibleTargets.add(permanent.getId());
|
possibleTargets.add(permanent.getId());
|
||||||
}
|
}
|
||||||
|
@ -224,7 +222,7 @@ public class TargetSpellOrPermanent extends TargetImpl<TargetSpellOrPermanent> {
|
||||||
possibleTargets.add(spell.getId());
|
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)) {
|
if (filter.match(permanent, null, sourceControllerId, game)) {
|
||||||
possibleTargets.add(permanent.getId());
|
possibleTargets.add(permanent.getId());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue