mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Cheats: added command to add any card/spell to stack without cost (only simple cast supports, without targets and modes);
This commit is contained in:
parent
fceedff3a8
commit
8ef30e4cde
1 changed files with 22 additions and 0 deletions
|
@ -442,6 +442,26 @@ public final class SystemUtil {
|
|||
perm.addCounters(CounterType.LOYALTY.createInstance(command.Amount), null, game);
|
||||
}
|
||||
}
|
||||
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) {
|
||||
logger.warn("Unknown card for stack command [" + command.cardName + "]: " + line);
|
||||
continue;
|
||||
}
|
||||
|
||||
// put card to game
|
||||
Card card = cardInfo.getCard();
|
||||
Set<Card> cardsToLoad = new HashSet<>();
|
||||
cardsToLoad.add(card);
|
||||
game.loadCards(cardsToLoad, player.getId());
|
||||
|
||||
// move card from exile to stack
|
||||
swapWithAnyCard(game, player, card, Zone.STACK);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -516,6 +536,8 @@ public final class SystemUtil {
|
|||
game.getExile().getPermanentExile().remove(card);
|
||||
player.getLibrary().putOnTop(card, game);
|
||||
break;
|
||||
case STACK:
|
||||
card.cast(game, Zone.EXILED, card.getSpellAbility(), player.getId());
|
||||
default:
|
||||
card.moveToZone(zone, null, game, false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue