- Temporary crash prevention measure for manifested split cards (until the problem with the view of such cards can be figured out)

This commit is contained in:
Agetian
2017-06-06 14:27:20 +00:00
parent 0045be2e84
commit f1fa86a08a
2 changed files with 15 additions and 11 deletions

View File

@@ -372,6 +372,7 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
if (!showSplitMana) {
drawManaCost(g, card.getCurrentState().getManaCost(), 0);
} else {
if (!card.getName().isEmpty()) { // FIXME: temporary crash prevention measure for face-down (manifested) split cards
PaperCard pc = StaticData.instance().getCommonCards().getCard(card.getName());
int ofs = pc != null && Card.getCardForUi(pc).hasKeyword("Aftermath") ? -12 : 12;
@@ -379,6 +380,7 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
drawManaCost(g, card.getAlternateState().getManaCost(), -ofs);
}
}
}
int number = 0;
if (card.getCounters() != null) {

View File

@@ -379,6 +379,7 @@ public class CardRenderer {
if (showCardManaCostOverlay(card)) {
float manaSymbolSize = w / 4;
if (card.isSplitCard() && card.hasAlternateState()) {
if (!card.getName().isEmpty()) { // FIXME: temporary crash prevention measure for face-down (manifested) split cards
float dy = manaSymbolSize / 2 + Utils.scale(5);
PaperCard pc = StaticData.instance().getCommonCards().getCard(card.getName());
@@ -389,6 +390,7 @@ public class CardRenderer {
drawManaCost(g, card.getAlternateState().getManaCost(), x - padding, y - dy, w + 2 * padding, h, manaSymbolSize);
drawManaCost(g, card.getCurrentState().getManaCost(), x - padding, y + dy, w + 2 * padding, h, manaSymbolSize);
}
}
else {
drawManaCost(g, card.getCurrentState().getManaCost(), x - padding, y, w + 2 * padding, h, manaSymbolSize);
}