diff --git a/Mage.Client/src/main/java/mage/client/game/GamePanel.java b/Mage.Client/src/main/java/mage/client/game/GamePanel.java index 326cbed2042..088187fc511 100644 --- a/Mage.Client/src/main/java/mage/client/game/GamePanel.java +++ b/Mage.Client/src/main/java/mage/client/game/GamePanel.java @@ -458,7 +458,7 @@ public final class GamePanel extends javax.swing.JPanel { this.handContainer.setVisible(false); } else { handCards.clear(); - handCards.put(YOUR_HAND, CardsViewUtil.convertSimple(game.getHand(), loadedCards)); + handCards.put(YOUR_HAND, game.getHand()); // Mark playable if (game.getCanPlayInHand() != null) { diff --git a/Mage.Common/src/mage/view/CardView.java b/Mage.Common/src/mage/view/CardView.java index dd9c828a836..4147a8019bf 100644 --- a/Mage.Common/src/mage/view/CardView.java +++ b/Mage.Common/src/mage/view/CardView.java @@ -35,10 +35,7 @@ import mage.abilities.SpellAbility; import mage.abilities.costs.mana.ManaCosts; import mage.cards.Card; import mage.cards.SplitCard; -import mage.constants.CardType; -import mage.constants.MageObjectType; -import mage.constants.Rarity; -import mage.constants.Zone; +import mage.constants.*; import mage.counters.Counter; import mage.counters.CounterType; import mage.game.command.Emblem; @@ -53,7 +50,6 @@ import mage.target.Targets; import java.util.ArrayList; import java.util.List; import java.util.UUID; -import mage.constants.AbilityType; /** * @author BetaSteward_at_googlemail.com @@ -196,24 +192,21 @@ public class CardView extends SimpleCardView { if (card instanceof Permanent) { this.mageObjectType = MageObjectType.PERMANENT; Permanent permanent = (Permanent)card; - this.power = Integer.toString(card.getPower().getValue()); - this.toughness = Integer.toString(card.getToughness().getValue()); this.loyalty = Integer.toString(permanent.getCounters().getCount(CounterType.LOYALTY)); this.pairedCard = permanent.getPairedCard(); if (!permanent.getControllerId().equals(permanent.getOwnerId())) { controlledByOwner = false; } } else { - if (card.isCopy()) { this.mageObjectType = MageObjectType.COPY_CARD; } else { this.mageObjectType = MageObjectType.CARD; } - this.power = card.getPower().toString(); - this.toughness = card.getToughness().toString(); this.loyalty = ""; } + this.power = Integer.toString(card.getPower().getValue()); + this.toughness = Integer.toString(card.getToughness().getValue()); this.cardTypes = card.getCardType(); this.subTypes = card.getSubtype(); this.superTypes = card.getSupertype(); diff --git a/Mage.Common/src/mage/view/GameView.java b/Mage.Common/src/mage/view/GameView.java index 398826536d3..b2a84374b65 100644 --- a/Mage.Common/src/mage/view/GameView.java +++ b/Mage.Common/src/mage/view/GameView.java @@ -45,10 +45,10 @@ import mage.game.stack.Spell; import mage.game.stack.StackAbility; import mage.game.stack.StackObject; import mage.players.Player; +import org.apache.log4j.Logger; import java.io.Serializable; import java.util.*; -import org.apache.log4j.Logger; /** @@ -62,7 +62,7 @@ public class GameView implements Serializable { private final int priorityTime; private final List players = new ArrayList<>(); - private SimpleCardsView hand; + private CardsView hand; private Set canPlayInHand; private Map opponentHands; private final CardsView stack = new CardsView(); @@ -206,11 +206,11 @@ public class GameView implements Serializable { return players; } - public SimpleCardsView getHand() { + public CardsView getHand() { return hand; } - public void setHand(SimpleCardsView hand) { + public void setHand(CardsView hand) { this.hand = hand; } diff --git a/Mage.Server/src/main/java/mage/server/game/GameSession.java b/Mage.Server/src/main/java/mage/server/game/GameSession.java index 3d08e4ae97a..b47c5808dbc 100644 --- a/Mage.Server/src/main/java/mage/server/game/GameSession.java +++ b/Mage.Server/src/main/java/mage/server/game/GameSession.java @@ -235,7 +235,7 @@ public class GameSession extends GameWatcher { Player player = game.getPlayer(playerId); player.setUserData(this.userData); GameView gameView = new GameView(game.getState(), game, playerId); - gameView.setHand(new SimpleCardsView(player.getHand().getCards(game))); + gameView.setHand(new CardsView(player.getHand().getCards(game))); gameView.setCanPlayInHand(player.getPlayableInHand(game)); processControlledPlayers(player, gameView);