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

Method isWeaponOneHanded

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

Tests if this weapon can be used in one hand by the specified PC. @param pc The PlayerCharacter wielding the weapon. @return true if the weapon can be used one handed.

(PlayerCharacter pc)

Source from the content-addressed store, hash-verified

4903 * @return true if the weapon can be used one handed.
4904 */
4905 public boolean isWeaponOneHanded(PlayerCharacter pc)
4906 {
4907
4908 if (pc == null && !isWeapon())
4909 {
4910 return false;
4911 }
4912
4913 WieldCategory wCat = getEffectiveWieldCategory(pc);
4914 return wCat != null && getHandsRequired(pc, wCat) == 1;
4915 }
4916
4917 private int getHandsRequired(PlayerCharacter pc, WieldCategory wCat)
4918 {

Callers 2

checkWieldMethod · 0.80
canEquipMethod · 0.80

Calls 3

isWeaponMethod · 0.95
getHandsRequiredMethod · 0.95

Tested by

no test coverage detected