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

Method generateBioValue

code/src/java/pcgen/core/BioSet.java:468–493  ·  view source on GitHub ↗
(final String addKey, final PlayerCharacter pc)

Source from the content-addressed store, hash-verified

466 }
467
468 private String generateBioValue(final String addKey, final PlayerCharacter pc)
469 {
470 final String line =
471 getTokenNumberInMaps(addKey, 0, pc.getDisplay().getRegion(), pc.getRace().getKeyName().trim());
472 final String rv;
473
474 if (line != null && !line.isEmpty())
475 {
476 final StringTokenizer aTok = new StringTokenizer(line, "|");
477 final List<String> aList = new ArrayList<>();
478
479 while (aTok.hasMoreTokens())
480 {
481 aList.add(aTok.nextToken());
482 }
483
484 final int roll = RollingMethods.roll(1, aList.size()) - 1; // needs to be 0-offset
485 rv = aList.get(roll);
486 }
487 else
488 {
489 rv = "";
490 }
491
492 return rv;
493 }
494
495 private void generateHeightWeight(final PlayerCharacter pc)
496 {

Callers 1

randomizeMethod · 0.95

Calls 13

getTokenNumberInMapsMethod · 0.95
rollMethod · 0.95
trimMethod · 0.80
hasMoreTokensMethod · 0.80
nextTokenMethod · 0.80
getKeyNameMethod · 0.65
isEmptyMethod · 0.65
addMethod · 0.65
sizeMethod · 0.65
getMethod · 0.65
getRegionMethod · 0.45
getDisplayMethod · 0.45

Tested by

no test coverage detected