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

Method appendRollMethodLine

code/src/java/pcgen/io/PCGVer2Creator.java:569–584  ·  view source on GitHub ↗
(StringBuilder buffer)

Source from the content-addressed store, hash-verified

567 }
568
569 private void appendRollMethodLine(StringBuilder buffer)
570 {
571 final GameMode game = getGameMode();
572 buffer.append(IOConstants.TAG_ROLLMETHOD).append(':');
573 buffer.append(game.getRollMethod());
574 buffer.append('|');
575 buffer.append(IOConstants.TAG_EXPRESSION).append(':');
576 switch (game.getRollMethod())
577 {
578 case Constants.CHARACTER_STAT_METHOD_ALL_THE_SAME -> buffer.append(game.getAllStatsValue());
579 case Constants.CHARACTER_STAT_METHOD_PURCHASE -> buffer.append(game.getPurchaseModeMethodName());
580 case Constants.CHARACTER_STAT_METHOD_ROLLED -> buffer.append(game.getRollMethodExpression());
581 default -> buffer.append(0);
582 }
583 buffer.append(IOConstants.LINE_SEP);
584 }
585
586 /*
587 * modified this function to output the version number

Callers 1

createPCGStringMethod · 0.95

Calls 6

getGameModeMethod · 0.95
getRollMethodMethod · 0.95
getAllStatsValueMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected