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

Method getHands

code/src/java/pcgen/cdom/facet/analysis/HandsFacet.java:50–69  ·  view source on GitHub ↗

Returns the number of Hands possessed by the Player Character represented by the given CharID @param id The CharID representing the Player Character for which the number of Hands will be returned @return The number of Hands possessed by the Player Character represented

(CharID id)

Source from the content-addressed store, hash-verified

48 * by the given CharID
49 */
50 public int getHands(CharID id)
51 {
52 final Race aRace = raceFacet.get(id);
53 int hands = 0;
54 if (aRace != null)
55 {
56 hands = aRace.getSafe(IntegerKey.CREATURE_HANDS);
57 }
58
59 // Scan templates for any overrides
60 for (PCTemplate template : templateFacet.getSet(id))
61 {
62 Integer h = template.get(IntegerKey.CREATURE_HANDS);
63 if (h != null)
64 {
65 hands = h;
66 }
67 }
68 return hands;
69 }
70
71 public void setTemplateFacet(TemplateFacet templateFacet)
72 {

Callers 9

testRaceTypeUnsetNullMethod · 0.80
testAvoidPollutionMethod · 0.80
testGetFromRaceMethod · 0.80
testGetFromTemplateMethod · 0.80
passesMethod · 0.80
getPCHandsMethod · 0.80
resolveMethod · 0.80

Calls 3

getSafeMethod · 0.80
getMethod · 0.65
getSetMethod · 0.65

Tested by 7

testRaceTypeUnsetNullMethod · 0.64
testAvoidPollutionMethod · 0.64
testGetFromRaceMethod · 0.64
testGetFromTemplateMethod · 0.64
passesMethod · 0.64