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

Method getCopyMasterHP

code/src/java/pcgen/cdom/facet/MasterFacet.java:75–89  ·  view source on GitHub ↗

Gets a Master HP Formula string from any of the CompanionMod items for the PlayerCharacter identified by the given CharID. The first CompanionMod item that has a Master HP Formula will be used. Order of CompanionMod objects is not guaranteed by this Facet. @param id The CharID for which

(CharID id)

Source from the content-addressed store, hash-verified

73 * for the Player Character identified by the given CharID
74 */
75 public String getCopyMasterHP(CharID id)
76 {
77 for (CompanionMod cMod : companionModFacet.getSet(id))
78 {
79 if (cMod.getType().equalsIgnoreCase(get(id).getType().getKeyName()))
80 {
81 if (cMod.get(StringKey.MASTER_HP_FORMULA) != null)
82 {
83 return cMod.get(StringKey.MASTER_HP_FORMULA);
84 }
85 }
86 }
87
88 return Constants.EMPTY_STRING;
89 }
90
91 /**
92 * Gets a Master BAB Formula string from any of the CompanionMod items for

Callers 1

hitPointsMethod · 0.80

Calls 5

equalsIgnoreCaseMethod · 0.80
getSetMethod · 0.65
getTypeMethod · 0.65
getKeyNameMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected