mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
KeywordEnum: replace more String Keywords checks with Enums
This commit is contained in:
@@ -22,6 +22,7 @@ import forge.StaticData;
|
||||
import forge.assets.FSkinProp;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.card.CardView.CardStateView;
|
||||
import forge.game.keyword.Keyword;
|
||||
import forge.gui.SOverlayUtils;
|
||||
import forge.item.PaperCard;
|
||||
import forge.toolbox.FOverlay;
|
||||
@@ -230,7 +231,7 @@ public enum CardZoomer {
|
||||
if (cardName.isEmpty()) { cardName = thisCard.getCard().getAlternateState().getName(); }
|
||||
|
||||
PaperCard pc = StaticData.instance().getCommonCards().getCard(cardName);
|
||||
boolean isAftermath = pc != null && Card.getCardForUi(pc).hasKeyword("Aftermath");
|
||||
boolean isAftermath = pc != null && Card.getCardForUi(pc).hasKeyword(Keyword.AFTERMATH);
|
||||
|
||||
return thisCard.getCard().isFaceDown() || isSplitRotated ? 0 : isAftermath ? 270 : 90; // rotate Aftermath splits the other way to correctly show the right split (graveyard) half
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import forge.card.mana.ManaCost;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.card.CardView;
|
||||
import forge.game.card.CardView.CardStateView;
|
||||
import forge.game.keyword.Keyword;
|
||||
import forge.game.card.CounterType;
|
||||
import forge.gui.CardContainer;
|
||||
import forge.item.PaperCard;
|
||||
@@ -434,7 +435,7 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
|
||||
} else {
|
||||
if (!card.isFaceDown()) { // no need to draw mana symbols on face down split cards (e.g. manifested)
|
||||
PaperCard pc = StaticData.instance().getCommonCards().getCard(card.getName());
|
||||
int ofs = pc != null && Card.getCardForUi(pc).hasKeyword("Aftermath") ? -12 : 12;
|
||||
int ofs = pc != null && Card.getCardForUi(pc).hasKeyword(Keyword.AFTERMATH) ? -12 : 12;
|
||||
|
||||
drawManaCost(g, card.getCurrentState().getManaCost(), ofs);
|
||||
drawManaCost(g, card.getAlternateState().getManaCost(), -ofs);
|
||||
|
||||
Reference in New Issue
Block a user