Fix possible permanent targets for ability that does not target.

This commit is contained in:
Quercitron 2014-04-27 15:44:00 +04:00
parent 87a3c46925
commit db68a827ce

View file

@ -185,8 +185,10 @@ public class TargetPermanent<T extends TargetPermanent<T>> extends TargetObject<
Set<UUID> possibleTargets = new HashSet<>();
MageObject targetSource = game.getObject(sourceId);
for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, sourceControllerId, sourceId, game)) {
if (!targets.containsKey(permanent.getId()) && permanent.canBeTargetedBy(targetSource, sourceControllerId, game)) {
possibleTargets.add(permanent.getId());
if (!targets.containsKey(permanent.getId())) {
if (notTarget || permanent.canBeTargetedBy(targetSource, sourceControllerId, game)) {
possibleTargets.add(permanent.getId());
}
}
}
return possibleTargets;