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

Class PlayerCharacter

code/src/java/pcgen/core/PlayerCharacter.java:271–9869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269import org.jetbrains.annotations.TestOnly;
270
271public class PlayerCharacter implements Cloneable, VariableContainer
272{
273
274 // Constants for use in getBonus
275 private static String lastVariable;
276 // This marker is static so that the spells allocated to it can also be found in the cloned character.
277 private static final CDOMObject GRANTED_SPELL_CACHE = new ObjectCache();
278
279 private final CharID id;
280 private final SAtoStringProcessor SA_TO_STRING_PROC;
281 private final SAProcessor SA_PROC;
282 private final CharacterDisplay display;
283
284 /*
285 * Note "pure" here means no getDirty call, and absolutely no other stuff in
286 * the method. Also any method is not used elsewhere in PlayerCharacter
287 */
288 //The following facets are write-only isolated (dirty in a set is allowed)
289 private final AllowDebtFacet allowDebtFacet = FacetLibrary.getFacet(AllowDebtFacet.class);
290 private final ChronicleEntryFacet chronicleEntryFacet = FacetLibrary.getFacet(ChronicleEntryFacet.class);
291 private final IgnoreCostFacet ignoreCostFacet = FacetLibrary.getFacet(IgnoreCostFacet.class);
292 private final GenderFacet genderFacet = FacetLibrary.getFacet(GenderFacet.class);
293 private final WeightFacet weightFacet = FacetLibrary.getFacet(WeightFacet.class);
294 private final AddLanguageFacet addLangFacet = FacetLibrary.getFacet(AddLanguageFacet.class);
295 private final AutoLanguageListFacet autoLangListFacet = FacetLibrary.getFacet(AutoLanguageListFacet.class);
296 private final AutoListArmorProfFacet armorProfListFacet = FacetLibrary.getFacet(AutoListArmorProfFacet.class);
297 private final AutoListShieldProfFacet shieldProfListFacet = FacetLibrary.getFacet(AutoListShieldProfFacet.class);
298 private final AutoListWeaponProfFacet alWeaponProfFacet = FacetLibrary.getFacet(AutoListWeaponProfFacet.class);
299 private final RegionFacet regionFacet = FacetLibrary.getFacet(RegionFacet.class);
300 private final NoteItemFacet noteItemFacet = FacetLibrary.getFacet(NoteItemFacet.class);
301 private final GlobalAddedSkillCostFacet globalAddedSkillCostFacet =
302 FacetLibrary.getFacet(GlobalAddedSkillCostFacet.class);
303 private final LocalAddedSkillCostFacet localAddedSkillCostFacet =
304 FacetLibrary.getFacet(LocalAddedSkillCostFacet.class);
305 private final PreviewSheetFacet previewSheetFacet = FacetLibrary.getFacet(PreviewSheetFacet.class);
306 private final SkillFilterFacet skillFilterFacet = FacetLibrary.getFacet(SkillFilterFacet.class);
307
308 //The following facets are pure delegation (no exceptions) - could be considered "complete"
309 private final AddedTemplateFacet addedTemplateFacet = FacetLibrary.getFacet(AddedTemplateFacet.class);
310 private final BonusWeaponProfFacet wpBonusFacet = FacetLibrary.getFacet(BonusWeaponProfFacet.class);
311 private final ClassSpellListFacet classSpellListFacet = FacetLibrary.getFacet(ClassSpellListFacet.class);
312 private final DomainSpellCountFacet domainSpellCountFacet = FacetLibrary.getFacet(DomainSpellCountFacet.class);
313 private final LegalDeityFacet legalDeityFacet = FacetLibrary.getFacet(LegalDeityFacet.class);
314 private final MonsterCSkillFacet monCSkillFacet = FacetLibrary.getFacet(MonsterCSkillFacet.class);
315 private final NonAbilityFacet nonAbilityFacet = FacetLibrary.getFacet(NonAbilityFacet.class);
316 private final QualifyFacet qualifyFacet = FacetLibrary.getFacet(QualifyFacet.class);
317 private final SkillOutputOrderFacet skillOutputOrderFacet = FacetLibrary.getFacet(SkillOutputOrderFacet.class);
318 private final SkillPoolFacet skillPoolFacet = FacetLibrary.getFacet(SkillPoolFacet.class);
319 private final SkillRankFacet skillRankFacet = FacetLibrary.getFacet(SkillRankFacet.class);
320 private final StartingLanguageFacet startingLangFacet = FacetLibrary.getFacet(StartingLanguageFacet.class);
321 private final StatCalcFacet statCalcFacet = FacetLibrary.getFacet(StatCalcFacet.class);
322 private final StatLockFacet statLockFacet = FacetLibrary.getFacet(StatLockFacet.class);
323 private final StatValueFacet statValueFacet = FacetLibrary.getFacet(StatValueFacet.class);
324 private final SubClassFacet subClassFacet = FacetLibrary.getFacet(SubClassFacet.class);
325 private final SubstitutionClassFacet substitutionClassFacet = FacetLibrary.getFacet(SubstitutionClassFacet.class);
326 private final UnlockedStatFacet unlockedStatFacet = FacetLibrary.getFacet(UnlockedStatFacet.class);
327 private final NonStatStatFacet nonStatStatFacet = FacetLibrary.getFacet(NonStatStatFacet.class);
328 private final NonStatToStatFacet nonStatToStatFacet = FacetLibrary.getFacet(NonStatToStatFacet.class);

Callers

nothing calls this directly

Calls 9

getFacetMethod · 0.95
getInstanceMethod · 0.95
getCNAbilityMethod · 0.95
getContextMethod · 0.95
getBooleanMethod · 0.80
getActiveObjectMethod · 0.65
getReferenceContextMethod · 0.65
getManufacturerIdMethod · 0.45

Tested by

no test coverage detected