- Remove invalid targets after resolved Shroud/Hexproof/Protect from list of threatened objects to prevent duplicate saves

This commit is contained in:
excessum
2014-05-01 04:10:05 +00:00
parent e1f851360f
commit 8bcbc00fc4

View File

@@ -1339,6 +1339,18 @@ public class ComputerUtil {
} }
} else { } else {
objects = topStack.getTargets().getTargets(); objects = topStack.getTargets().getTargets();
if (tgt != null) {
final ArrayList<GameObject> canBeTargeted = new ArrayList<GameObject>();
for (Object o : objects) {
if (o instanceof Card) {
final Card c = (Card) o;
if (c.canBeTargetedBy(topStack)) {
canBeTargeted.add(c);
}
}
}
objects = canBeTargeted;
}
} }
// Determine if Defined Objects are "threatened" will be destroyed // Determine if Defined Objects are "threatened" will be destroyed