From a45335791dea360536078af88b5f7bf9bd4a48e5 Mon Sep 17 00:00:00 2001 From: Agetian Date: Sun, 5 Feb 2017 12:37:49 +0000 Subject: [PATCH] - Committing a temporary version of getLKICopy that does not break visuals of many cards in many different circumstances (may need further improvement). --- forge-game/src/main/java/forge/game/card/CardUtil.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/forge-game/src/main/java/forge/game/card/CardUtil.java b/forge-game/src/main/java/forge/game/card/CardUtil.java index 30db2c16677..1ce9fe29eb4 100644 --- a/forge-game/src/main/java/forge/game/card/CardUtil.java +++ b/forge-game/src/main/java/forge/game/card/CardUtil.java @@ -275,10 +275,14 @@ public final class CardUtil { // don't just copy the current state. copy all of them // needed for Transformed to get the CMC correct for (final CardStateName state : in.getStates()) { - CardFactory.copyState(in, state, newCopy, state, false); + if (!newCopy.getStates().contains(state)) { + newCopy.addAlternateState(state, false); + } + newCopy.getState(state).copyFrom(in, in.getState(state)); } - // DO NOT UPDATE THE VIEW! - newCopy.setState(in.getCurrentStateName(), false); + // TODO: the line below unexpectedly breaks the visual state of cards (tapped/untapped, + // counters, etc.). If it's necessary, we need to figure out how to make it not break stuff. + //newCopy.setState(in.getCurrentStateName(), false); if (in.isCloned()) { newCopy.addAlternateState(CardStateName.Cloner, false);