From b31ca263fdeff367019bf8674ffa02f5412e45b1 Mon Sep 17 00:00:00 2001 From: Agetian Date: Thu, 17 Aug 2017 04:13:32 +0000 Subject: [PATCH] - Implemented rule 901.6 for Planechase games. Should fix an issue with the planar deck cards disappearing when a player loses the game on his or her own turn. --- forge-game/src/main/java/forge/game/Game.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/forge-game/src/main/java/forge/game/Game.java b/forge-game/src/main/java/forge/game/Game.java index f7b4bb818b9..f55f4bcb30e 100644 --- a/forge-game/src/main/java/forge/game/Game.java +++ b/forge-game/src/main/java/forge/game/Game.java @@ -654,6 +654,16 @@ public class Game { CardCollectionView cards = this.getCardsInGame(); for(Card c : cards) { + // 901.6: If the current planar controller would leave the game, instead the next player + // in turn order that wouldn’t leave the game becomes the planar controller, then the old + // planar controller leaves the game. + if (c.isPlane() || c.isPhenomenon()) { + c.removeTempController(p); + c.setController(getPhaseHandler().getNextTurn(), getNextTimestamp()); + getAction().controllerChangeZoneCorrection(c); + continue; + } + if (c.getOwner().equals(p)) { c.ceaseToExist(); } else {