All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sso.Skill

java.lang.Object
   |
   +----sso.Persistant
           |
           +----sso.Skill

public class Skill
extends Persistant
Represents an instance of a skill on a PC.


Variable Index

 o base_rating
 o cur_rating
 o DEFAULT_RATING
 o defaultPenalty
 o improveThreshold
 o learnChance
 o parentSkill
 o parentSkillName
 o pips
 o SKILL
 o skillChangeListeners

Constructor Index

 o Skill()
Constructor.

Method Index

 o addSkillChangeListener(SkillChangeListener)
 o createRows()
Create the rows needed to store this object in the database.
 o createSkill()
Create a new skill object.
 o getBaseRating()
Get the base rating.
 o getDefaultPenalty()
Get the default penalty.
 o getImproveThreshold()
Get the improvement threshold.
 o getLearnChance()
Get the learning chance.
 o getParentSkill()
Get the parent skill.
 o getParentSkillName()
Get parent skill name.
 o getPips()
Get the pips.
 o getRating()
Get the current rating.
 o improve(int)
Improve the skill.
 o init()
Initialize the new skill object.
 o load()
Load a Skill object from the database.
 o loadSkill(int)
Load a Skill object.
 o main(String[])
Tester.
 o removeSkillChangeListener(SkillChangeListener)
 o roll()
Perform a skill roll.
 o setBaseRating(int)
Set the base rating.
 o setDefaultPenalty(int)
Set the default penalty.
 o setImproveThreshold(int)
Set the improvement threshold.
 o setLearnChance(int)
Set the learning chance.
 o setRating(int)
Set the current rating.
 o skillChange()
 o store()
Store the state of the skill object.
 o unregister()
Remove the object from the registry and database.

Variables

 o cur_rating
 protected int cur_rating
 o base_rating
 protected int base_rating
 o pips
 protected int pips
 o improveThreshold
 protected int improveThreshold
 o learnChance
 protected int learnChance
 o parentSkill
 protected Skill parentSkill
 o defaultPenalty
 protected int defaultPenalty
 o skillChangeListeners
 protected Vector skillChangeListeners
 o parentSkillName
 protected String parentSkillName
 o DEFAULT_RATING
 public static final int DEFAULT_RATING
 o SKILL
 public static String SKILL

Constructors

 o Skill
 protected Skill()
Constructor. Don't call directly.

Methods

 o createSkill
 public static Skill createSkill()
Create a new skill object.

 o init
 protected void init()
Initialize the new skill object.

Overrides:
init in class Persistant
 o getRating
 public int getRating()
Get the current rating.

 o setRating
 public void setRating(int rating)
Set the current rating.

 o getBaseRating
 public int getBaseRating()
Get the base rating.

 o setBaseRating
 public void setBaseRating(int rating)
Set the base rating.

 o improve
 public void improve(int points)
Improve the skill.

 o getPips
 public int getPips()
Get the pips.

 o getImproveThreshold
 public int getImproveThreshold()
Get the improvement threshold.

 o setImproveThreshold
 public void setImproveThreshold(int thresh)
Set the improvement threshold.

 o getLearnChance
 public int getLearnChance()
Get the learning chance.

 o setLearnChance
 public void setLearnChance(int chance)
Set the learning chance.

 o getParentSkill
 public Skill getParentSkill()
Get the parent skill.

 o getDefaultPenalty
 public int getDefaultPenalty()
Get the default penalty. This is the roll penalty modifier when the skill roll needs to default to the parent skill.

 o setDefaultPenalty
 public void setDefaultPenalty(int penalty)
Set the default penalty.

 o roll
 public int roll()
Perform a skill roll.

 o getParentSkillName
 public String getParentSkillName()
Get parent skill name.

 o createRows
 protected void createRows()
Create the rows needed to store this object in the database.

Overrides:
createRows in class Persistant
 o store
 public void store()
Store the state of the skill object.

Overrides:
store in class Persistant
 o loadSkill
 public static Skill loadSkill(int id)
Load a Skill object.

 o load
 protected void load()
Load a Skill object from the database.

Overrides:
load in class Persistant
 o unregister
 public void unregister()
Remove the object from the registry and database.

Overrides:
unregister in class Persistant
 o addSkillChangeListener
 public void addSkillChangeListener(SkillChangeListener sl)
 o removeSkillChangeListener
 public void removeSkillChangeListener(SkillChangeListener sl)
 o skillChange
 protected void skillChange()
 o main
 public static void main(String args[])
Tester.


All Packages  Class Hierarchy  This Package  Previous  Next  Index