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:
Oleg Agafonov 2019-01-26 14:16:44 +04:00
parent fceedff3a8
commit 8ef30e4cde

View file

@ -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);
}