Class CommonCharacter<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>
java.lang.Object
de.rpgframework.genericrpg.data.CommonCharacter<A,S,V,T>
- All Implemented Interfaces:
RuleSpecificCharacterObject<A,,S, V, T> DecisionContainer,Lifeform<A,S, V>
public abstract class CommonCharacter<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>
extends Object
implements RuleSpecificCharacterObject<A,S,V,T>, Lifeform<A,S,V>, DecisionContainer
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommonCharacter.DataSetControlprotected Map<A, AttributeValue<A>> Attributes that don't need to be serializedprotected de.rpgframework.classification.Genderprotected ModificationListprotected byte[]protected booleanprotected List<CarriedItem<T>> protected Stringprotected List<LevellingProfileValue> protected List<RuleConfiguration> protected List<CarriedItem<T>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCarriedItem(CarriedItem<T> item) voidaddDecision(Decision decision) If the referenced ComplexDataItem had choices, these are the decisions.voidaddGearDefinition(T gearDef) voidaddProfile(LevellingProfileValue value) voidvoidaddRuleFlag(RuleFlag flag) addSkillValue(V value) voidvoidaddVirtualCarriedItem(CarriedItem<T> item) voidvoidclearRuleFlag(RuleFlag flag) voidgetAge()getAttribute(A key) getCarriedItem(String key) getCarriedItem(UUID uuid) List<CarriedItem<T>> List<CarriedItem<T>> getCarriedItems(Predicate<CarriedItem<T>> filter) List<CarriedItem<T>> getDecision(UUID choice) getGearDefinition(String key) de.rpgframework.classification.Genderbyte[]getImage()getName()Returns a name by which a user interface shall display this character.getRuleValue(Rule rule) intgetSize()getSkillValue(String skillID) getSkillValue(UUID uuid) getSkillValue(S skill) List<CarriedItem<T>> intbooleanhasDecisionBeenMade(UUID choice) booleanhasRuleFlag(RuleFlag flag) booleanvoidremoveCarriedItem(CarriedItem<T> item) voidremoveDecision(UUID choice) booleanvoidbooleanremoveReward(Reward rew) voidremoveSkillValue(V value) voidremoveVirtualCarriedItem(CarriedItem<T> item) voidvoidsetAttribute(AttributeValue<A> val) voidsetCharGenUsed(String charGenUsed) voidsetEyeColor(String eyeColor) voidsetGender(de.rpgframework.classification.Gender value) voidsetHairColor(String hairColor) voidsetImage(byte[] data) voidsetInCareerMode(boolean inCareerMode) voidvoidsetRuleValue(Rule rule, String value) voidsetSize(int size) voidsetSkinColor(String color) voidsetStrictness(String value) voidsetWeight(int weight) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.rpgframework.genericrpg.data.Lifeform
getAttributeMethods inherited from interface de.rpgframework.character.RuleSpecificCharacterObject
getRules, getShortDescription
-
Field Details
-
name
-
dataSets
-
gender
@Attribute(name="gender") protected de.rpgframework.classification.Gender gender -
rules
-
derivedAttributes
Attributes that don't need to be serialized -
skills
-
image
@Element protected byte[] image -
inCareerMode
@Attribute(name="career") protected boolean inCareerMode -
decisions
-
items
@ElementList(type=CarriedItem.class, entry="item") protected List<CarriedItem<T extends PieceOfGear>> items -
virtualItems
-
history
-
rewards
-
profiles
@ElementList(type=LevellingProfileValue.class, entry="profile") protected List<LevellingProfileValue> profiles -
ruleFlags
-
gearDefinitions
-
-
Constructor Details
-
CommonCharacter
public CommonCharacter()
-
-
Method Details
-
getName
Description copied from interface:RuleSpecificCharacterObjectReturns a name by which a user interface shall display this character.- Specified by:
getNamein interfaceLifeform<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>>- Specified by:
getNamein interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- Returns:
- A printable name
- See Also:
-
setName
- Specified by:
setNamein interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- See Also:
-
getImage
public byte[] getImage()- Specified by:
getImagein interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- See Also:
-
setImage
public void setImage(byte[] data) - Specified by:
setImagein interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- See Also:
-
getAttribute
- Specified by:
getAttributein interfaceLifeform<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>>- Specified by:
getAttributein interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- See Also:
-
getAttributes
-
setAttribute
-
hasDecisionBeenMade
- Specified by:
hasDecisionBeenMadein interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- See Also:
-
getDecision
- Specified by:
getDecisionin interfaceDecisionContainer- Specified by:
getDecisionin interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- See Also:
-
removeDecision
- Specified by:
removeDecisionin interfaceDecisionContainer- Specified by:
removeDecisionin interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- See Also:
-
addDecision
Description copied from interface:DecisionContainerIf the referenced ComplexDataItem had choices, these are the decisions.- Specified by:
addDecisionin interfaceDecisionContainer- Specified by:
addDecisionin interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- See Also:
-
getGender
public de.rpgframework.classification.Gender getGender()- Specified by:
getGenderin interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- See Also:
-
setGender
public void setGender(de.rpgframework.classification.Gender value) - Specified by:
setGenderin interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- See Also:
-
getHairColor
- Specified by:
getHairColorin interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>
-
setHairColor
- Specified by:
setHairColorin interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>
-
getEyeColor
- Specified by:
getEyeColorin interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>
-
setEyeColor
- Specified by:
setEyeColorin interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>
-
getSkinColor
- Specified by:
getSkinColorin interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>
-
setSkinColor
- Specified by:
setSkinColorin interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>
-
getSize
public int getSize()- Specified by:
getSizein interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>
-
setSize
public void setSize(int size) - Specified by:
setSizein interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>
-
getWeight
public int getWeight()- Specified by:
getWeightin interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>
-
setWeight
public void setWeight(int weight) - Specified by:
setWeightin interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>
-
getAge
- Specified by:
getAgein interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>
-
setAge
- Specified by:
setAgein interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>
-
getSkillValues
- Specified by:
getSkillValuesin interfaceLifeform<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>>- See Also:
-
getSkillValue
- Specified by:
getSkillValuein interfaceLifeform<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>>- Specified by:
getSkillValuein interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- See Also:
-
getSkillValue
-
getSkillValue
-
removeSkillValue
-
addSkillValue
-
getDataSets
-
addCarriedItem
- Specified by:
addCarriedItemin interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- See Also:
-
getVirtualCarriedItems
-
addVirtualCarriedItem
-
removeVirtualCarriedItem
-
removeCarriedItem
- Specified by:
removeCarriedItemin interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- See Also:
-
getCarriedItems
- Specified by:
getCarriedItemsin interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- See Also:
-
getCarriedItemsRecursive
-
getCarriedItems
-
getCarriedItem
- Specified by:
getCarriedItemin interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- See Also:
-
getCarriedItem
-
isInCareerMode
public boolean isInCareerMode()- Specified by:
isInCareerModein interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- Returns:
- the inCareerMode
-
setInCareerMode
public void setInCareerMode(boolean inCareerMode) - Parameters:
inCareerMode- the inCareerMode to set
-
getCharGenUsed
-
setCharGenUsed
-
getStrictness
-
setStrictness
-
addRuleFlag
-
clearRuleFlag
-
clearRuleFlags
public void clearRuleFlags() -
hasRuleFlag
-
getRuleValue
- Specified by:
getRuleValuein interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- See Also:
-
setRuleValue
- Specified by:
setRuleValuein interfaceRuleSpecificCharacterObject<A extends IAttribute, S extends ISkill, V extends ASkillValue<S>, T extends PieceOfGear>- See Also:
-
addToHistory
-
removeFromHistory
-
getHistory
-
addReward
-
removeReward
-
getRewards
-
clearGearDefinitions
public void clearGearDefinitions() -
getGearDefinition
-
addGearDefinition
-
getProfiles
-
addProfile
-
removeProfile
-