mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Remove invalid targets after resolved Shroud/Hexproof/Protect from list of threatened objects to prevent duplicate saves
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user