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

Method isWeaponLightForPC

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

Tests if this weapon is a light weapon for the specied PC. @param pc The PlayerCharacter wielding the weapon. @return true if the weapon is light for the specified pc.

(final PlayerCharacter pc)

Source from the content-addressed store, hash-verified

4885 * @return true if the weapon is light for the specified pc.
4886 */
4887 public boolean isWeaponLightForPC(final PlayerCharacter pc)
4888 {
4889
4890 if (pc == null || !isWeapon())
4891 {
4892 return false;
4893 }
4894 WieldCategory wc = Globals.getContext().getReferenceContext()
4895 .silentlyGetConstructedCDOMObject(WieldCategory.class, "Light");
4896 return (wc != null) && wc.equals(getEffectiveWieldCategory(pc));
4897 }
4898
4899 /**
4900 * Tests if this weapon can be used in one hand by the specified PC.

Callers 5

getTotalHitTokenMethod · 0.95
checkWieldMethod · 0.80
getIsLightTokenMethod · 0.80
getToHitMethod · 0.80
getDamageMethod · 0.80

Calls 6

isWeaponMethod · 0.95
getContextMethod · 0.95
equalsMethod · 0.95
getReferenceContextMethod · 0.65

Tested by

no test coverage detected