|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.haphazard.character.Skill
Denotes a skill that can be used by an character This class contains all specific information related to a skill. For more knowledge about the skill, please see GeneralSkill
Field Summary | |
int |
mValue
|
Constructor Summary | |
Skill(java.lang.String name)
Creates a new skill |
|
Skill(java.lang.String name,
int value)
Creates a new skill with a name and a value |
|
Skill(java.lang.String name,
int value,
int experience)
Creates a new skill with a name and a value |
Method Summary | |
void |
addExperience(int points)
Adds experience points to the skill |
double |
experienceProgress()
Gets the current progress towards the next level |
int |
getBaseValue()
Gets the base value of this skill |
java.lang.String |
getDescription()
Gets the desription of the skill |
java.lang.String |
getName()
Gets the name of the skill |
java.lang.String |
getParent()
Gets the parent of the skill |
void |
processDay()
Call when to prcess a day for updating and forgetting skills |
void |
setBaseValue(int base)
Sets the skills base value Only applicable to skills without a parent (interface stats) |
void |
setParent(Skill parent)
Sets the parent of this skill |
java.lang.String |
toString()
Translates this object into a String representation |
java.lang.String |
toXML(int indent)
Transforms this skill into an XML-notation |
void |
update(Skill skill)
Updates this skill with another skills stats |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public int mValue
Constructor Detail |
public Skill(java.lang.String name)
name
- The Skill to createpublic Skill(java.lang.String name, int value)
name
- The name of the skillvalue
- The value of the skillpublic Skill(java.lang.String name, int value, int experience)
name
- The name of the skillvalue
- The value of the skillexperience
- The current level of experience for the skillMethod Detail |
public java.lang.String getName()
public void setBaseValue(int base)
base
- The base value to setpublic int getBaseValue()
public void addExperience(int points)
public double experienceProgress()
public void processDay()
public void update(Skill skill)
skill
- The skill to update topublic java.lang.String getDescription()
public java.lang.String getParent()
public void setParent(Skill parent)
parent
- The parent of this skillpublic java.lang.String toXML(int indent)
indent
- The indentation level to use
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |