Add the bonus to the character's feat pool that is granted by the class. NB: LEVELSPERFEAT is now handled via PLayerCHaracter.getNumFeatsFromLevels() rather than bonuses. Only the standard feat progression for the gamemode is handled here. @param aPC The character to bonus.
(final PlayerCharacter aPC)
| 444 | * @param aPC The character to bonus. |
| 445 | */ |
| 446 | void addFeatPoolBonus(final PlayerCharacter aPC) |
| 447 | { |
| 448 | Integer mLevPerFeat = get(IntegerKey.LEVELS_PER_FEAT); |
| 449 | int startLevel; |
| 450 | int rangeLevel; |
| 451 | int divisor; |
| 452 | if (mLevPerFeat == null) |
| 453 | { |
| 454 | String aString = Globals.getBonusFeatString(); |
| 455 | StringTokenizer aTok = new StringTokenizer(aString, "|", false); |
| 456 | startLevel = Integer.parseInt(aTok.nextToken()); |
| 457 | rangeLevel = Integer.parseInt(aTok.nextToken()); |
| 458 | divisor = rangeLevel; |
| 459 | if (divisor > 0) |
| 460 | { |
| 461 | StringBuilder aBuf = new StringBuilder("FEAT|PCPOOL|").append("max(CL"); |
| 462 | // Make sure we only take off the startlevel value once |
| 463 | if (this == aPC.getClassKeyed(aPC.getLevelInfoClassKeyName(0))) |
| 464 | { |
| 465 | aBuf.append("-").append(startLevel); |
| 466 | aBuf.append("+").append(rangeLevel); |
| 467 | } |
| 468 | aBuf.append(",0)/").append(divisor); |
| 469 | // Logging.debugPrint("Feat bonus for " + this + " is " |
| 470 | // + aBuf.toString()); |
| 471 | BonusObj bon = Bonus.newBonus(Globals.getContext(), aBuf.toString()); |
| 472 | aPC.addBonus(bon, this); |
| 473 | } |
| 474 | } |
| 475 | } |
| 476 | |
| 477 | /* |
| 478 | * FINALPCCLASSANDLEVEL This is required in PCClassLevel and should be present in |
no test coverage detected