show other side of unimplemented card in card explorer
parent
37c47e405e
commit
1fee8d6607
|
@ -252,6 +252,15 @@ public class CardDefinitions {
|
|||
}
|
||||
}
|
||||
|
||||
public static MagicCardDefinition getMissingOrCard(final String original) {
|
||||
final String key = getASCII(original);
|
||||
if (missingCards != null && missingCards.containsKey(key)) {
|
||||
return missingCards.get(key);
|
||||
} else {
|
||||
return getCard(original);
|
||||
}
|
||||
}
|
||||
|
||||
public static MagicCardDefinition getCard(final String original) {
|
||||
final String key = getASCII(original);
|
||||
// lazy loading of card scripts
|
||||
|
|
|
@ -379,7 +379,7 @@ public class MagicCardDefinition implements MagicAbilityStore, IRenderableCard {
|
|||
public MagicCardDefinition getFlippedDefinition() {
|
||||
if (flipCardDefinition == null) {
|
||||
flipCardDefinition = isFlipCard() ?
|
||||
CardDefinitions.getCard(flipCardName) :
|
||||
CardDefinitions.getMissingOrCard(flipCardName) :
|
||||
MagicCardDefinition.UNKNOWN;
|
||||
}
|
||||
return flipCardDefinition;
|
||||
|
@ -388,7 +388,7 @@ public class MagicCardDefinition implements MagicAbilityStore, IRenderableCard {
|
|||
public MagicCardDefinition getTransformedDefinition() {
|
||||
if (transformCardDefinition == null) {
|
||||
transformCardDefinition = isDoubleFaced() ?
|
||||
CardDefinitions.getCard(transformCardName) :
|
||||
CardDefinitions.getMissingOrCard(transformCardName) :
|
||||
MagicCardDefinition.UNKNOWN;
|
||||
}
|
||||
return transformCardDefinition;
|
||||
|
|
|
@ -108,7 +108,7 @@ public class CardViewer extends JPanel implements ICardSelectionListener {
|
|||
}
|
||||
|
||||
private void switchCardAspect() {
|
||||
if (currentCardDefinition.hasMultipleAspects() && currentCardDefinition.isValid()) {
|
||||
if (currentCardDefinition.hasMultipleAspects()) {
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||
if (currentCardDefinition.isDoubleFaced()) {
|
||||
setCard(currentCardDefinition.getTransformedDefinition());
|
||||
|
|
Loading…
Reference in New Issue