diff --git a/forge-game/src/main/java/forge/game/ability/effects/CopyPermanentEffect.java b/forge-game/src/main/java/forge/game/ability/effects/CopyPermanentEffect.java index 7962c91f45f..81a726a4aa1 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/CopyPermanentEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/CopyPermanentEffect.java @@ -101,15 +101,15 @@ public class CopyPermanentEffect extends TokenEffectBase { List choice = Lists.newArrayList(); final String num = sa.hasParam("RandomNum") ? sa.getParam("RandomNum") : "1"; int ncopied = AbilityUtils.calculateAmount(host, num, sa); - while(ncopied > 0) { + while(ncopied > 0 && !copysource.isEmpty()) { final PaperCard cp = Aggregates.random(copysource); Card possibleCard = Card.fromPaperCard(cp, activator); // Need to temporarily set the Owner so the Game is set if (possibleCard.isValid(valid, host.getController(), host, sa)) { choice.add(possibleCard); - copysource.remove(cp); ncopied -= 1; } + copysource.remove(cp); } tgtCards = choice; } else if (sa.hasParam("DefinedName")) {