- 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,11 +372,13 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
if (!showSplitMana) {
drawManaCost(g, card.getCurrentState().getManaCost(), 0);
} else {
PaperCard pc = StaticData.instance().getCommonCards().getCard(card.getName());
int ofs = pc != null && Card.getCardForUi(pc).hasKeyword("Aftermath") ? -12 : 12;
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;
drawManaCost(g, card.getCurrentState().getManaCost(), ofs);
drawManaCost(g, card.getAlternateState().getManaCost(), -ofs);
drawManaCost(g, card.getCurrentState().getManaCost(), ofs);
drawManaCost(g, card.getAlternateState().getManaCost(), -ofs);
}
}
}