From f1ba813518032f007b3d878bc42363b425987bb7 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sat, 26 Jan 2019 14:32:32 +0400 Subject: [PATCH] Cheats: added amount supports in stack command; --- .../src/main/java/mage/server/util/SystemUtil.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Mage.Server/src/main/java/mage/server/util/SystemUtil.java b/Mage.Server/src/main/java/mage/server/util/SystemUtil.java index e398fc67bb..96a69327d1 100644 --- a/Mage.Server/src/main/java/mage/server/util/SystemUtil.java +++ b/Mage.Server/src/main/java/mage/server/util/SystemUtil.java @@ -445,7 +445,7 @@ public final class SystemUtil { continue; } else if ("stack".equalsIgnoreCase(command.zone)) { // simple cast (without targets or modes) - + // find card info CardInfo cardInfo = CardRepository.instance.findCard(command.cardName); if (cardInfo == null) { @@ -454,13 +454,16 @@ public final class SystemUtil { } // put card to game - Card card = cardInfo.getCard(); Set cardsToLoad = new HashSet<>(); - cardsToLoad.add(card); + for (int i = 0; i < command.Amount; i++) { + cardsToLoad.add(cardInfo.getCard()); + } game.loadCards(cardsToLoad, player.getId()); // move card from exile to stack - swapWithAnyCard(game, player, card, Zone.STACK); + for (Card card : cardsToLoad) { + swapWithAnyCard(game, player, card, Zone.STACK); + } continue; }