mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Fixed that activation of gained abilities of face down permanents (e.g. by Singing Bell Strike) did uninteded reveal the face down creature.
This commit is contained in:
parent
464955bd3a
commit
a7fd898fcc
2 changed files with 8 additions and 2 deletions
|
@ -153,7 +153,7 @@ public class CardView extends SimpleCardView {
|
||||||
* for morph / face down cards to know which player may see information for
|
* for morph / face down cards to know which player may see information for
|
||||||
* the card
|
* the card
|
||||||
* @param showFaceDownCard if true and the card is not on the battelfield,
|
* @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) {
|
public CardView(Card card, Game game, boolean controlled, boolean showFaceDownCard) {
|
||||||
super(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.getTokenSetCode(), game != null);
|
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.power = Integer.toString(card.getPower().getValue());
|
||||||
this.toughness = Integer.toString(card.getToughness().getValue());
|
this.toughness = Integer.toString(card.getToughness().getValue());
|
||||||
this.cardTypes = card.getCardType();
|
this.cardTypes = card.getCardType();
|
||||||
|
this.faceDown = ((Permanent) card).isFaceDown(game);
|
||||||
} else {
|
} else {
|
||||||
// this.hideInfo = true;
|
// this.hideInfo = true;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -103,7 +103,12 @@ public class GameView implements Serializable {
|
||||||
Card card = game.getCard(stackObject.getSourceId());
|
Card card = game.getCard(stackObject.getSourceId());
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
if (object != 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 {
|
} else {
|
||||||
stack.put(stackObject.getId(), new StackAbilityView(game, (StackAbility) stackObject, "", new CardView(card)));
|
stack.put(stackObject.getId(), new StackAbilityView(game, (StackAbility) stackObject, "", new CardView(card)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue