From a7fd898fcccf85a57dd736a21ecdb31b0aade7c1 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 11 Sep 2015 00:13:48 +0200 Subject: [PATCH] * Fixed that activation of gained abilities of face down permanents (e.g. by Singing Bell Strike) did uninteded reveal the face down creature. --- Mage.Common/src/mage/view/CardView.java | 3 ++- Mage.Common/src/mage/view/GameView.java | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Mage.Common/src/mage/view/CardView.java b/Mage.Common/src/mage/view/CardView.java index 6c90e5a66b4..008f6cd0b46 100644 --- a/Mage.Common/src/mage/view/CardView.java +++ b/Mage.Common/src/mage/view/CardView.java @@ -153,7 +153,7 @@ public class CardView extends SimpleCardView { * for morph / face down cards to know which player may see information for * the card * @param showFaceDownCard if true and the card is not on the battelfield, - * also a face dwon card is shown in the view dwon cards will be shown + * also a face down card is shown in the view down cards will be shown */ public CardView(Card card, Game game, boolean controlled, boolean showFaceDownCard) { super(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.getTokenSetCode(), game != null); @@ -191,6 +191,7 @@ public class CardView extends SimpleCardView { this.power = Integer.toString(card.getPower().getValue()); this.toughness = Integer.toString(card.getToughness().getValue()); this.cardTypes = card.getCardType(); + this.faceDown = ((Permanent) card).isFaceDown(game); } else { // this.hideInfo = true; return; diff --git a/Mage.Common/src/mage/view/GameView.java b/Mage.Common/src/mage/view/GameView.java index e15827f6e76..3bc9f70e81c 100644 --- a/Mage.Common/src/mage/view/GameView.java +++ b/Mage.Common/src/mage/view/GameView.java @@ -103,7 +103,12 @@ public class GameView implements Serializable { Card card = game.getCard(stackObject.getSourceId()); if (card != null) { if (object != null) { - stack.put(stackObject.getId(), new StackAbilityView(game, (StackAbility) stackObject, card.getName(), new CardView(card))); + if (object instanceof Permanent) { + boolean controlled = ((Permanent) object).getControllerId().equals(createdForPlayerId); + stack.put(stackObject.getId(), new StackAbilityView(game, (StackAbility) stackObject, ((Permanent) object).getName(), new CardView(((Permanent) object), game, controlled, false))); + } else { + stack.put(stackObject.getId(), new StackAbilityView(game, (StackAbility) stackObject, card.getName(), new CardView(card, game, false, false))); + } } else { stack.put(stackObject.getId(), new StackAbilityView(game, (StackAbility) stackObject, "", new CardView(card))); }