Class DataItemModification
java.lang.Object
de.rpgframework.genericrpg.modification.Modification
de.rpgframework.genericrpg.modification.DataItemModification
- Direct Known Subclasses:
AllowModification,ApplyableValueModification,EmbedModification,RecommendationModification,ValueModification
@Root(name="itemmod")
public class DataItemModification
extends Modification
implements Cloneable, Datable
A modification made to the current item it is attached to
-
Nested Class Summary
Nested classes/interfaces inherited from class de.rpgframework.genericrpg.modification.Modification
Modification.Origin -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected UUIDprotected StringFor modifications with a choice, this can limit the optionsprotected Dateprotected intprotected UUIDMay be used to identify automatically added elements - e.g.protected Stringprotected booleanprotected StringIdentifier of mode when the modification applies.protected StringFields inherited from class de.rpgframework.genericrpg.modification.Modification
apply, conditions, origin, source, type, when -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanString[]getDate()Return the date of the changegetDecision(UUID uuid) intgetId()getKey()<T> TbooleanisRemove()voidSet the date of the changevoidsetDecisions(List<Decision> decisions) voidsetExpCost(int expCost) voidvoidvoidsetRemove(boolean remove) toString()voidvalidate()Validate content in this modification during loadMethods inherited from class de.rpgframework.genericrpg.modification.Modification
getApplyTo, getConditionString, getOrigin, getReferenceType, getSource, getWhen, isConditional, setApplyTo, setConditionString, setOrigin, setSource, setWhen
-
Field Details
-
ref
-
variant
-
choice
-
remove
@Attribute protected boolean remove -
choiceOptions
For modifications with a choice, this can limit the options -
restrictedToMode
Identifier of mode when the modification applies. Prepend a '!' to express a mode that may NOT be active -
decisions
-
expCost
@Attribute protected int expCost -
date
-
id
May be used to identify automatically added elements - e.g. like a lifestyle added to a character - and therefore prevent duplicate additions
-
-
Constructor Details
-
DataItemModification
public DataItemModification() -
DataItemModification
-
-
Method Details
-
clone
- Overrides:
clonein classModification
-
equals
- Overrides:
equalsin classModification
-
toString
-
getKey
-
setKey
-
getResolvedKey
public <T> T getResolvedKey() -
getAsKeys
-
getConnectedChoice
-
validate
Description copied from class:ModificationValidate content in this modification during load- Overrides:
validatein classModification- Throws:
ReferenceException- See Also:
-
getDecisions
-
getDecision
-
setDecisions
-
getChoiceOptions
- Returns:
- the choiceOptions
-
getExpCost
public int getExpCost()- Returns:
- the expCost
-
setExpCost
public void setExpCost(int expCost) - Parameters:
expCost- the expCost to set
-
getDate
-
setDate
-
isRemove
public boolean isRemove()- Returns:
- the remove
-
setRemove
public void setRemove(boolean remove) - Parameters:
remove- the remove to set
-
getVariant
- Returns:
- the variant
-
getId
- Returns:
- the id
-
setId
-