Fixed some exception problems.

This commit is contained in:
LevelX2 2018-01-27 11:42:43 +01:00
parent 9eb71e24be
commit 6b90c1fd7f
7 changed files with 32 additions and 19 deletions

View file

@ -74,7 +74,7 @@ public class AttachEffect extends OneShotEffect {
if (player != null) {
return player.addAttachment(source.getSourceId(), game);
}
if (source.getTargets().get(0) instanceof TargetCard) { // e.g. Spellweaver Volute
if (!source.getTargets().isEmpty() && source.getTargets().get(0) instanceof TargetCard) { // e.g. Spellweaver Volute
Card card = game.getCard(getTargetPointer().getFirst(game, source));
if (card != null) {
return card.addAttachment(source.getSourceId(), game);