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

Method fromSet

forge-core/src/main/java/forge/item/BoosterPack.java:33–43  ·  view source on GitHub ↗
(CardEdition edition)

Source from the content-addressed store, hash-verified

31 private final int hash;
32
33 public static BoosterPack fromSet(CardEdition edition) {
34 String boosterKind = edition.getRandomBoosterKind();
35 if (boosterKind == null) {
36 return null;
37 }
38
39 SealedTemplate d = edition.getBoosterTemplate(boosterKind);
40 StringBuilder sb = new StringBuilder(edition.getName());
41 sb.append(" ").append(boosterKind);
42 return new BoosterPack(sb.toString(), d);
43 }
44
45 public static BoosterPack fromColor(final String color) {
46 return new BoosterPack(color, new SealedTemplate("?", ImmutableList.of(

Callers 5

parseRewardMethod · 0.95
getBoosterPackMethod · 0.95
readBoosterMethod · 0.95

Calls 5

getRandomBoosterKindMethod · 0.80
getNameMethod · 0.65
getBoosterTemplateMethod · 0.45
appendMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected