mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Fixed handling of morphed cards in exile zone.
This commit is contained in:
parent
55e386a0e8
commit
8d6c25b3e8
4 changed files with 19 additions and 19 deletions
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<String, UUID> 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) {
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue