mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Cheats: added amount supports in stack command;
This commit is contained in:
parent
8ef30e4cde
commit
f1ba813518
1 changed files with 7 additions and 4 deletions
|
@ -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<Card> 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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue