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

Method parseFeatPoolLine

code/src/java/pcgen/io/PCGVer2Parser.java:2639–2661  ·  view source on GitHub ↗
(final String line)

Source from the content-addressed store, hash-verified

2637 }
2638
2639 private void parseFeatPoolLine(final String line)
2640 {
2641 try
2642 {
2643 double featPool = Double.parseDouble(line.substring(IOConstants.TAG_FEATPOOL.length() + 1));
2644 // In earlier versions the featpool included the bonus, so we need to counter it
2645 if (compareVersionTo(new int[]{5, 11, 1}) < 0)
2646 {
2647 calcFeatPoolAfterLoad = true;
2648 baseFeatPool = featPool;
2649 }
2650 else
2651 {
2652 thePC.setUserPoolBonus(AbilityCategory.FEAT, new BigDecimal(String.valueOf(featPool)));
2653 }
2654 }
2655 catch (NumberFormatException nfe)
2656 {
2657 final String msg = LanguageBundle.getFormattedString("Warnings.PCGenParser.IllegalFeatPool", //$NON-NLS-1$
2658 line);
2659 warnings.add(msg);
2660 }
2661 }
2662
2663 private void parseUserPoolLine(final String line)
2664 {

Callers 1

parseCachedLinesMethod · 0.95

Calls 5

compareVersionToMethod · 0.95
getFormattedStringMethod · 0.95
setUserPoolBonusMethod · 0.80
addMethod · 0.65
valueOfMethod · 0.45

Tested by

no test coverage detected