Calculates total bonus from Feats @param aType @param aName @return feat bonus to
(String aType, String aName)
| 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 | { |
no test coverage detected