mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- For face-down cards you can see, always display their face-up image for easier browsing through morphs.
- Don't display face-down cards in library/hand/exile as creatures.
This commit is contained in:
@@ -12,6 +12,7 @@ import forge.card.CardStateName;
|
||||
import forge.card.CardEdition;
|
||||
import forge.card.CardRarity;
|
||||
import forge.card.CardRules;
|
||||
import forge.card.CardType;
|
||||
import forge.card.CardTypeView;
|
||||
import forge.card.ColorSet;
|
||||
import forge.card.mana.ManaCost;
|
||||
@@ -732,6 +733,9 @@ public class CardView extends GameEntityView {
|
||||
}
|
||||
|
||||
public CardTypeView getType() {
|
||||
if (isFaceDown() && !isInZone(EnumSet.of(ZoneType.Battlefield, ZoneType.Stack))) {
|
||||
return CardType.EMPTY;
|
||||
}
|
||||
return get(TrackableProperty.Type);
|
||||
}
|
||||
void updateType(CardState c) {
|
||||
|
||||
@@ -56,7 +56,7 @@ public enum CPicture implements ICDoc {
|
||||
private final CardZoomer zoomer = CardZoomer.SINGLETON_INSTANCE;
|
||||
|
||||
private CardView currentView = null;
|
||||
private boolean isDisplayAlt = false;
|
||||
private boolean isDisplayAlt = false, alwaysDisplayAlt = false;
|
||||
|
||||
/**
|
||||
* Shows card details and/or picture in sidebar cardview tabber.
|
||||
@@ -71,8 +71,9 @@ public enum CPicture implements ICDoc {
|
||||
|
||||
currentView = c;
|
||||
isDisplayAlt = showAlt;
|
||||
alwaysDisplayAlt = canFlip && c.isFaceDown();
|
||||
flipIndicator.setVisible(canFlip);
|
||||
picturePanel.setCard(c.getState(showAlt));
|
||||
picturePanel.setCard(c.getState(isDisplayAlt || alwaysDisplayAlt));
|
||||
if (showAlt && canFlip) {
|
||||
flipCard();
|
||||
}
|
||||
@@ -97,10 +98,10 @@ public enum CPicture implements ICDoc {
|
||||
}
|
||||
}
|
||||
showCard(c, false);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
currentView = null;
|
||||
isDisplayAlt = false;
|
||||
alwaysDisplayAlt = false;
|
||||
flipIndicator.setVisible(false);
|
||||
picturePanel.setCard(item);
|
||||
}
|
||||
@@ -177,7 +178,7 @@ public enum CPicture implements ICDoc {
|
||||
public void flipCard() {
|
||||
if (MatchUtil.canCardBeFlipped(currentView)) {
|
||||
isDisplayAlt = !isDisplayAlt;
|
||||
picturePanel.setCard(currentView.getState(isDisplayAlt));
|
||||
picturePanel.setCard(currentView.getState(isDisplayAlt || alwaysDisplayAlt));
|
||||
CDetail.SINGLETON_INSTANCE.showCard(currentView, isDisplayAlt);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user