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

Method getCopyMasterCheck

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

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

(CharID id)

Source from the content-addressed store, hash-verified

46 * items for the Player Character identified by the given CharID
47 */
48 public String getCopyMasterCheck(CharID id)
49 {
50 for (CompanionMod cMod : companionModFacet.getSet(id))
51 {
52 if (cMod.getType().equalsIgnoreCase(get(id).getType().getKeyName()))
53 {
54 if (cMod.get(StringKey.MASTER_CHECK_FORMULA) != null)
55 {
56 return cMod.get(StringKey.MASTER_CHECK_FORMULA);
57 }
58 }
59 }
60
61 return Constants.EMPTY_STRING;
62 }
63
64 /**
65 * Gets a Master HP Formula string from any of the CompanionMod items for

Callers 1

getBaseCheckMethod · 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