@return Total base attack bonus as an int
()
| 4456 | * @return Total base attack bonus as an int |
| 4457 | */ |
| 4458 | public int baseAttackBonus() |
| 4459 | { |
| 4460 | // check for cached version |
| 4461 | final String cacheLookup = "BaseAttackBonus"; |
| 4462 | Float total = variableProcessor.getCachedVariable(cacheLookup); |
| 4463 | if (total != null) |
| 4464 | { |
| 4465 | return total.intValue(); |
| 4466 | } |
| 4467 | |
| 4468 | // get Master's BAB |
| 4469 | final PlayerCharacter nPC = getMasterPC(); |
| 4470 | |
| 4471 | if ((nPC != null) && (!masterFacet.getCopyMasterBAB(id).isEmpty())) |
| 4472 | { |
| 4473 | int masterBAB = nPC.baseAttackBonus(); |
| 4474 | final String copyMasterBAB = replaceMasterString(masterFacet.getCopyMasterBAB(id), masterBAB); |
| 4475 | masterBAB = getVariableValue(copyMasterBAB, "").intValue(); |
| 4476 | |
| 4477 | variableProcessor.addCachedVariable(cacheLookup, (float) masterBAB); |
| 4478 | return masterBAB; |
| 4479 | } |
| 4480 | int bab = (int) getTotalBonusTo("COMBAT", "BASEAB"); |
| 4481 | variableProcessor.addCachedVariable(cacheLookup, (float) bab); |
| 4482 | return bab; |
| 4483 | } |
| 4484 | |
| 4485 | /** |
| 4486 | * Creates the activeBonusList which is used to calculate all the bonuses to |