MCPcopy Create free account
hub / github.com/PCGen/pcgen / process

Method process

code/src/java/plugin/lsttokens/race/CrToken.java:101–117  ·  view source on GitHub ↗
(LoadContext context, Race race)

Source from the content-addressed store, hash-verified

99 }
100
101 @Override
102 public boolean process(LoadContext context, Race race)
103 {
104 Formula levelAdjFormula = race.getSafe(FormulaKey.LEVEL_ADJUSTMENT);
105 if (levelAdjFormula.isStatic())
106 {
107 Number la = levelAdjFormula.resolveStatic();
108 ChallengeRating cr = race.get(ObjectKey.CHALLENGE_RATING);
109 if ((la.floatValue() != 0) && cr == null)
110 {
111 race.put(ObjectKey.CHALLENGE_RATING, new ChallengeRating(FormulaFactory.getFormulaFor(la.toString())));
112 }
113 }
114 //else Nothing to do here, matches 5.14 behavior
115 //TODO Should there at LEAST be a message in an else??
116 return true;
117 }
118
119 @Override
120 public Class<Race> getDeferredTokenClass()

Callers

nothing calls this directly

Calls 8

isStaticMethod · 0.95
resolveStaticMethod · 0.95
getFormulaForMethod · 0.95
getSafeMethod · 0.80
floatValueMethod · 0.80
getMethod · 0.65
putMethod · 0.65
toStringMethod · 0.65

Tested by

no test coverage detected