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

Method getSizeBonusTo

code/src/java/pcgen/core/PlayerCharacter.java:9141–9162  ·  view source on GitHub ↗
(SizeAdjustment sizeAdjustment, final String bonusType, final List<String> typeList,
						  double defaultValue)

Source from the content-addressed store, hash-verified

9139 }
9140
9141 double getSizeBonusTo(SizeAdjustment sizeAdjustment, final String bonusType, final List<String> typeList,
9142 double defaultValue)
9143 {
9144 for (String type : typeList)
9145 {
9146 /*
9147 * TODO: The standard for these bonuses should probably be TYPE=, but
9148 * the bonus objects only correctly match TYPE. The bonus objects
9149 * probably need to be reevaluated to standardize this usage
9150 */
9151 final double a = BonusCalc.charBonusTo(sizeAdjustment, bonusType, "TYPE." + type, this);
9152
9153 if (!CoreUtility.doublesEqual(a, 0.0))
9154 {
9155 defaultValue = a;
9156
9157 break;
9158 }
9159 }
9160
9161 return defaultValue;
9162 }
9163
9164 /**
9165 * Adds to the provided list any spells that have been granted to the character's class by abilities

Callers 3

resizeItemMethod · 0.80
getWeightMultiplierMethod · 0.80

Calls 2

charBonusToMethod · 0.95
doublesEqualMethod · 0.95

Tested by

no test coverage detected