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

Method isWeaponOutsizedForPC

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

Tests if the weapon is either too large OR too small for the specified PC to wield. @param pc The PlayerCharacter wielding the weapon. @return true if the weapon is too large or too small.

(PlayerCharacter pc)

Source from the content-addressed store, hash-verified

4935 * @return true if the weapon is too large or too small.
4936 */
4937 public boolean isWeaponOutsizedForPC(PlayerCharacter pc)
4938 {
4939
4940 if (pc == null || !isWeapon())
4941 {
4942 return true;
4943 }
4944
4945 final WieldCategory wCat = getEffectiveWieldCategory(pc);
4946 if (wCat == null)
4947 {
4948 return false;
4949 }
4950 int handsRequired = getHandsRequired(pc, wCat);
4951 return (handsRequired > 2 || handsRequired < 0);
4952 }
4953
4954 /**
4955 * Tests if this weapon requires two hands to use.

Callers 4

canEquipItemMethod · 0.80
canEquipMethod · 0.80
getToHitMethod · 0.80
getDamageMethod · 0.80

Calls 3

isWeaponMethod · 0.95
getHandsRequiredMethod · 0.95

Tested by

no test coverage detected