MCPcopy Create free account
hub / github.com/Card-Forge/forge / getPaperCard

Method getPaperCard

forge-game/src/main/java/forge/game/card/Card.java:7518–7552  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7516 }
7517
7518 public IPaperCard getPaperCard() {
7519 IPaperCard cp = paperCard;
7520 if (cp != null) {
7521 return cp;
7522 }
7523
7524 final String name = getName();
7525 final String set = getSetCode();
7526
7527 if (StringUtils.isNotBlank(set)) {
7528 cp = StaticData.instance().getVariantCards().getCard(name, set);
7529 if (cp != null) {
7530 return cp;
7531 }
7532 cp = StaticData.instance().getCommonCards().getCard(name, set);
7533 if (cp != null) {
7534 return cp;
7535 }
7536 }
7537 //no specific set for variant
7538 cp = StaticData.instance().getVariantCards().getCard(name);
7539 if (cp != null) {
7540 return cp;
7541 }
7542 //try to get from user preference if available
7543 CardDb.CardArtPreference cardArtPreference = StaticData.instance().getCardArtPreference();
7544 if (cardArtPreference == null) //fallback
7545 cardArtPreference = CardArtPreference.ORIGINAL_ART_CORE_EXPANSIONS_REPRINT_ONLY;
7546 cp = StaticData.instance().getCommonCards().getCardFromEditions(name, cardArtPreference);
7547 if (cp != null) {
7548 return cp;
7549 }
7550 //lastoption
7551 return StaticData.instance().getCommonCards().getCard(name);
7552 }
7553
7554 /**
7555 * Update Card instance for the given PaperCard if any

Callers 15

toStringMethod · 0.95
getMostRecentSetMethod · 0.95
getRulesMethod · 0.95
cardHasPropertyMethod · 0.95
copySpellHostMethod · 0.95
resolveMethod · 0.95
resolveMethod · 0.95
addCardMethod · 0.45
assignCompanionMethod · 0.45
copyCardMethod · 0.45
copyStatsMethod · 0.45

Calls 8

getNameMethod · 0.95
getSetCodeMethod · 0.95
instanceMethod · 0.95
getVariantCardsMethod · 0.80
getCommonCardsMethod · 0.80
getCardMethod · 0.65
getCardArtPreferenceMethod · 0.65
getCardFromEditionsMethod · 0.65

Tested by

no test coverage detected