From d53f751711cf6bca5c6381b41eb6c666374dcf9d Mon Sep 17 00:00:00 2001 From: Samuel Sandeen Date: Thu, 8 Sep 2016 19:56:40 -0400 Subject: [PATCH] Update the cheat testing code The new Zone change code is more strict so the cheat code needs to trick it. --- Mage.Server/src/main/java/mage/server/util/SystemUtil.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 7893fbca3d..4bae78ba57 100644 --- a/Mage.Server/src/main/java/mage/server/util/SystemUtil.java +++ b/Mage.Server/src/main/java/mage/server/util/SystemUtil.java @@ -125,8 +125,11 @@ public class SystemUtil { * @param card Card to put to player's hand */ private static void swapWithAnyCard(Game game, Player player, Card card, Zone zone) { + // Put the card in Exile to start. Otherwise the game doesn't know where to remove the card from. + game.getExile().getPermanentExile().add(card); + game.setZone(card.getId(), Zone.EXILED); if (zone.equals(Zone.BATTLEFIELD)) { - card.putOntoBattlefield(game, Zone.OUTSIDE, null, player.getId()); + card.putOntoBattlefield(game, Zone.EXILED, null, player.getId()); } else if (zone.equals(Zone.LIBRARY)) { card.setZone(Zone.LIBRARY, game); player.getLibrary().putOnTop(card, game);