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

Method getMagicBonus

code/src/java/pcgen/core/Equipment.java:3875–3891  ·  view source on GitHub ↗

Look for a modifier that grants type "magic" @param eqModList Description of the Parameter @return The magicBonus value

(final Iterable<EquipmentModifier> eqModList)

Source from the content-addressed store, hash-verified

3873 * @return The magicBonus value
3874 */
3875 private static EquipmentModifier getMagicBonus(final Iterable<EquipmentModifier> eqModList)
3876 {
3877
3878 if (eqModList != null)
3879 {
3880
3881 for (EquipmentModifier eqMod : eqModList)
3882 {
3883 if (eqMod.isType("MagicalEnhancement") || (eqMod.isIType(Type.MAGIC)))
3884 {
3885 return eqMod;
3886 }
3887 }
3888 }
3889
3890 return null;
3891 }
3892
3893 /**
3894 * Gets the nameFromModifiers attribute of the Equipment object

Callers 1

suppressMasterworkMethod · 0.95

Calls 2

isITypeMethod · 0.80
isTypeMethod · 0.65

Tested by

no test coverage detected