diff --git a/Mage.Client/src/main/java/org/mage/card/arcane/CardPanel.java b/Mage.Client/src/main/java/org/mage/card/arcane/CardPanel.java index 94db4f973f..19fdbedb73 100644 --- a/Mage.Client/src/main/java/org/mage/card/arcane/CardPanel.java +++ b/Mage.Client/src/main/java/org/mage/card/arcane/CardPanel.java @@ -721,13 +721,13 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti private BufferedImage getFaceDownImage() { if (isPermanent) { - if (((PermanentView) gameCard).isMorphed()) { + if (gameCard.isMorphCard() && ((PermanentView) gameCard).isMorphed()) { return ImageCache.getMorphImage(); } else { return ImageCache.getManifestImage(); } } else { - if (gameCard.isMorphCard()) { + if (gameCard.isMorphCard() && this.gameCard instanceof StackAbilityView) { return ImageCache.getMorphImage(); } else { return ImageCache.loadImage(new TFile(DirectLinksForDownload.outDir + File.separator + DirectLinksForDownload.cardbackFilename)); diff --git a/Mage.Common/src/mage/view/CardView.java b/Mage.Common/src/mage/view/CardView.java index 4906a185d1..3de576a563 100644 --- a/Mage.Common/src/mage/view/CardView.java +++ b/Mage.Common/src/mage/view/CardView.java @@ -137,27 +137,25 @@ public class CardView extends SimpleCardView { // TODO: Better handle this in Framework (but currently I'm not sure how to do it there) LevelX2 if (card.isFaceDown()) { this.fillEmpty(card, controlled); - if (card.isMorphCard()) { + if (card.isMorphCard() && card instanceof Spell) { // special handling for casting of Morph cards - if (card instanceof Spell /*|| card instanceof Card*/) { - if (controlled) { - this.name = card.getName(); - this.displayName = card.getName(); - this.alternateName = card.getName(); - } - this.power = "2"; - this.toughness = "2"; - this.rules.add("You may cast this card as a 2/2 face-down creature, with no text," + - " no name, no subtypes, and no mana cost by paying {3} rather than paying its mana cost."); - return; + if (controlled) { + this.name = card.getName(); + this.displayName = card.getName(); + this.alternateName = card.getName(); } + this.power = "2"; + this.toughness = "2"; + this.rules.add("You may cast this card as a 2/2 face-down creature, with no text," + + " no name, no subtypes, and no mana cost by paying {3} rather than paying its mana cost."); + return; } else { if (card instanceof Permanent) { this.power = Integer.toString(card.getPower().getValue()); this.toughness = Integer.toString(card.getToughness().getValue()); this.cardTypes = card.getCardType(); } else { - this.hideInfo = true; + // this.hideInfo = true; return; } } diff --git a/Mage.Sets/src/mage/sets/theros/PyxisOfPandemonium.java b/Mage.Sets/src/mage/sets/theros/PyxisOfPandemonium.java index 077c1c46c8..bf5dbd4492 100644 --- a/Mage.Sets/src/mage/sets/theros/PyxisOfPandemonium.java +++ b/Mage.Sets/src/mage/sets/theros/PyxisOfPandemonium.java @@ -30,6 +30,7 @@ package mage.sets.theros; import java.util.HashMap; import java.util.Map; import java.util.UUID; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -96,7 +97,8 @@ class PyxisOfPandemoniumExileEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { + MageObject sourceObject = game.getObject(source.getSourceId()); + if (sourceObject != null && controller != null) { Map exileIds; String valueKey = CardUtil.getCardZoneString("exileIds", source.getSourceId(), game); Object object = game.getState().getValue(valueKey); @@ -122,7 +124,7 @@ class PyxisOfPandemoniumExileEffect extends OneShotEffect { } card.setFaceDown(true); player.moveCardToExileWithInfo(card, exileId, - new StringBuilder("Pyxis of Pandemonium (").append(player.getName()).append(")").toString(), + new StringBuilder(sourceObject.getLogName() +" (").append(player.getName()).append(")").toString(), source.getSourceId(), game, Zone.LIBRARY); } } @@ -137,7 +139,7 @@ class PyxisOfPandemoniumPutOntoBattlefieldEffect extends OneShotEffect { public PyxisOfPandemoniumPutOntoBattlefieldEffect() { super(Outcome.PutCardInPlay); - this.staticText = "Each player turns face up all cards he or she owns exiled with Pyxis of Pandemonium, then puts all permanent cards among them onto the battlefield"; + this.staticText = "Each player turns face up all cards he or she owns exiled with {this}, then puts all permanent cards among them onto the battlefield"; } public PyxisOfPandemoniumPutOntoBattlefieldEffect(final PyxisOfPandemoniumPutOntoBattlefieldEffect effect) { diff --git a/Mage/src/mage/game/permanent/PermanentCard.java b/Mage/src/mage/game/permanent/PermanentCard.java index 1e209403ab..12a3cf6190 100644 --- a/Mage/src/mage/game/permanent/PermanentCard.java +++ b/Mage/src/mage/game/permanent/PermanentCard.java @@ -31,7 +31,6 @@ package mage.game.permanent; import java.util.ArrayList; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; import mage.cards.Card; @@ -120,6 +119,7 @@ public class PermanentCard extends PermanentImpl { this.flipCard = card.isFlipCard(); this.flipCardName = card.getFlipCardName(); this.faceDown = card.isFaceDown(); + this.morphCard = card.isMorphCard(); } public Card getCard() {