mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
avoid NoSuchElementException in case toConnive is empty
This commit is contained in:
@@ -53,6 +53,9 @@ public class ConniveEffect extends SpellAbilityEffect {
|
||||
moveParams.put(AbilityKey.LastStateGraveyard, sa.getLastStateGraveyard());
|
||||
|
||||
CardCollectionView toConnive = getTargetCards(sa);
|
||||
if (toConnive.isEmpty()) { // if nothing is conniving, we're done
|
||||
return;
|
||||
}
|
||||
final Player p = toConnive.getFirst().getController(); // currently all connivers will have the same controller
|
||||
final int n = toConnive.size();
|
||||
if (n > 1) {
|
||||
|
||||
Reference in New Issue
Block a user