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

Method getFeatBonusTo

code/src/java/pcgen/core/PlayerCharacter.java:3037–3053  ·  view source on GitHub ↗

Calculates total bonus from Feats @param aType @param aName @return feat bonus to

(String aType, String aName)

Source from the content-addressed store, hash-verified

3035 * @return feat bonus to
3036 */
3037 public double getFeatBonusTo(String aType, String aName)
3038 {
3039 final Map<String, Ability> aHashMap = new HashMap<>();
3040
3041 for (Ability aFeat : getAbilityList(AbilityCategory.FEAT, Nature.NORMAL))
3042 {
3043 if (aFeat != null)
3044 {
3045 aHashMap.put(aFeat.getKeyName(), aFeat);
3046 }
3047 }
3048
3049 addUniqueAbilitiesToMap(aHashMap, getAbilityList(AbilityCategory.FEAT, Nature.VIRTUAL));
3050 addUniqueAbilitiesToMap(aHashMap, getAbilityList(AbilityCategory.FEAT, Nature.AUTOMATIC));
3051 List<Ability> aggregateFeatList = new ArrayList<>(aHashMap.values());
3052 return getPObjectWithCostBonusTo(aggregateFeatList, aType.toUpperCase(), aName.toUpperCase());
3053 }
3054
3055 public Ability getMatchingAbility(Category<Ability> abilityCategory, Ability ability, Nature nature)
3056 {

Callers 4

calculateSaveBonusMethod · 0.95
getFeatDamageTokenMethod · 0.80
getFeatHitTokenMethod · 0.80

Calls 6

getAbilityListMethod · 0.95
putMethod · 0.65
getKeyNameMethod · 0.65
valuesMethod · 0.45

Tested by

no test coverage detected