mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +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.CardEdition;
|
||||||
import forge.card.CardRarity;
|
import forge.card.CardRarity;
|
||||||
import forge.card.CardRules;
|
import forge.card.CardRules;
|
||||||
|
import forge.card.CardType;
|
||||||
import forge.card.CardTypeView;
|
import forge.card.CardTypeView;
|
||||||
import forge.card.ColorSet;
|
import forge.card.ColorSet;
|
||||||
import forge.card.mana.ManaCost;
|
import forge.card.mana.ManaCost;
|
||||||
@@ -732,6 +733,9 @@ public class CardView extends GameEntityView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public CardTypeView getType() {
|
public CardTypeView getType() {
|
||||||
|
if (isFaceDown() && !isInZone(EnumSet.of(ZoneType.Battlefield, ZoneType.Stack))) {
|
||||||
|
return CardType.EMPTY;
|
||||||
|
}
|
||||||
return get(TrackableProperty.Type);
|
return get(TrackableProperty.Type);
|
||||||
}
|
}
|
||||||
void updateType(CardState c) {
|
void updateType(CardState c) {
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public enum CPicture implements ICDoc {
|
|||||||
private final CardZoomer zoomer = CardZoomer.SINGLETON_INSTANCE;
|
private final CardZoomer zoomer = CardZoomer.SINGLETON_INSTANCE;
|
||||||
|
|
||||||
private CardView currentView = null;
|
private CardView currentView = null;
|
||||||
private boolean isDisplayAlt = false;
|
private boolean isDisplayAlt = false, alwaysDisplayAlt = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows card details and/or picture in sidebar cardview tabber.
|
* Shows card details and/or picture in sidebar cardview tabber.
|
||||||
@@ -71,8 +71,9 @@ public enum CPicture implements ICDoc {
|
|||||||
|
|
||||||
currentView = c;
|
currentView = c;
|
||||||
isDisplayAlt = showAlt;
|
isDisplayAlt = showAlt;
|
||||||
|
alwaysDisplayAlt = canFlip && c.isFaceDown();
|
||||||
flipIndicator.setVisible(canFlip);
|
flipIndicator.setVisible(canFlip);
|
||||||
picturePanel.setCard(c.getState(showAlt));
|
picturePanel.setCard(c.getState(isDisplayAlt || alwaysDisplayAlt));
|
||||||
if (showAlt && canFlip) {
|
if (showAlt && canFlip) {
|
||||||
flipCard();
|
flipCard();
|
||||||
}
|
}
|
||||||
@@ -97,10 +98,10 @@ public enum CPicture implements ICDoc {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
showCard(c, false);
|
showCard(c, false);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
currentView = null;
|
currentView = null;
|
||||||
isDisplayAlt = false;
|
isDisplayAlt = false;
|
||||||
|
alwaysDisplayAlt = false;
|
||||||
flipIndicator.setVisible(false);
|
flipIndicator.setVisible(false);
|
||||||
picturePanel.setCard(item);
|
picturePanel.setCard(item);
|
||||||
}
|
}
|
||||||
@@ -177,7 +178,7 @@ public enum CPicture implements ICDoc {
|
|||||||
public void flipCard() {
|
public void flipCard() {
|
||||||
if (MatchUtil.canCardBeFlipped(currentView)) {
|
if (MatchUtil.canCardBeFlipped(currentView)) {
|
||||||
isDisplayAlt = !isDisplayAlt;
|
isDisplayAlt = !isDisplayAlt;
|
||||||
picturePanel.setCard(currentView.getState(isDisplayAlt));
|
picturePanel.setCard(currentView.getState(isDisplayAlt || alwaysDisplayAlt));
|
||||||
CDetail.SINGLETON_INSTANCE.showCard(currentView, isDisplayAlt);
|
CDetail.SINGLETON_INSTANCE.showCard(currentView, isDisplayAlt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user