|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.huguesjohnson.tiamat.NamedObject
com.huguesjohnson.tiamat.Skill
public class Skill
Skill - represents a skill for a character, modifies an a players attribute or ability to use an item.
| Constructor Summary | |
|---|---|
Skill(java.lang.String name,
java.lang.String description)
Creates a new Skill with no targets. |
|
Skill(java.lang.String name,
java.lang.String description,
Target[] targets)
Creates a new Skill. |
|
| Method Summary | |
|---|---|
void |
addTarget(Target target)
Adds a Target to the collection of Targets. |
Target |
getTarget(int index)
Returns the Target at the specified index, null if index out of range. |
int |
getTargetCount()
Returns the number of targets for this Skill. |
Target[] |
getTargets()
Returns the Targets for this Skill. |
void |
setTarget(int index,
Target target)
Sets the Target at the specified index. |
void |
setTargets(Target[] targets)
Sets the Targets for this Skill. |
java.lang.String |
toString()
Returns a string representation of the object. |
| Methods inherited from class com.huguesjohnson.tiamat.NamedObject |
|---|
getDescription, getName, onDeserialize, setDescription, setName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Skill(java.lang.String name,
java.lang.String description)
name - The name of the Skill.description - The description of the Skill
public Skill(java.lang.String name,
java.lang.String description,
Target[] targets)
name - The name of the Skill.description - The description of the Skilltargets - The Targets for this Skill.| Method Detail |
|---|
public void setTargets(Target[] targets)
targets - The new Targets for this Skill.public Target[] getTargets()
public void setTarget(int index,
Target target)
index - The index to set.target - The Target to set.public Target getTarget(int index)
index - The index of the Target to retrieve.
public java.lang.String toString()
toString in class NamedObjectpublic int getTargetCount()
public void addTarget(Target target)
target - The Target to add.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||