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

Method parse

forge-game/src/main/java/forge/game/keyword/Affinity.java:17–42  ·  view source on GitHub ↗
(String details)

Source from the content-addressed store, hash-verified

15 }
16
17 @Override
18 protected void parse(String details) {
19 if ("Affinity".equalsIgnoreCase(details)) {
20 type = "Permanent.withAffinity";
21 descType = "Affinity";
22 reminderType = "permanent with affinity"; // technically the reminder says "permanent you control with affinity", but thats a TestCard
23 } else if ("Outlaw".equalsIgnoreCase(details)) {
24 type = "Permanent.Outlaw";
25 descType = "outlaws";
26 reminderType = Lang.getInstance().buildValidDesc(CardType.Constant.OUTLAW_TYPES, true);
27 } else if ("Historic".equalsIgnoreCase(details)) {
28 type = "Permanent.Historic";
29 descType = "historic permanents";
30 reminderType = "artifact, legendary, and/or Saga permanent";
31 } else if (details.contains(":")) {
32 String k[];
33 k = details.split(":");
34 type = k[0];
35 descType = Lang.getPlural(k[1]);
36 reminderType = k[1];
37 } else {
38 type = details;
39 descType = CardType.getPluralType(type);
40 reminderType = Lang.getInstance().buildValidDesc(Arrays.asList(type.split(",")), true);
41 }
42 }
43}

Callers

nothing calls this directly

Calls 6

getInstanceMethod · 0.95
getPluralMethod · 0.95
getPluralTypeMethod · 0.95
buildValidDescMethod · 0.80
splitMethod · 0.80
containsMethod · 0.65

Tested by

no test coverage detected