mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Attempting to fix a NoSuchElementException in ChangeZoneAllAi when no opponent can be legally targeted with an ability.
This commit is contained in:
@@ -155,6 +155,10 @@ public class ChangeZoneAllAi extends SpellAbilityAi {
|
||||
final Iterable<Player> oppList = Iterables.filter(ai.getOpponents(),
|
||||
PlayerPredicates.isTargetableBy(sa));
|
||||
|
||||
if (Iterables.isEmpty(oppList)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// get the one with the most in graveyard
|
||||
// zone is visible so evaluate which would be hurt the most
|
||||
Player oppTarget = Collections.max(Lists.newArrayList(oppList),
|
||||
|
||||
Reference in New Issue
Block a user