OGS Java API Spec

ogs.core
Class CClass

java.lang.Object
  |
  +--ogs.support.Object
        |
        +--ogs.core.CClass
All Implemented Interfaces:
EventListener
Direct Known Subclasses:
Barbarian, Bard, Cleric, Commoner, Druid, Fighter, Monk, Paladin, Ranger, Rogue, Sorcerer, Wizard

public abstract class CClass
extends Object

A character class is an occupation or vocation of a character. Character class is abbreviated as cclass to differentiate the word from the object-oriented concept of a class. Classes that are derived from the CClass class represent specific player character classes, non-player character classes, and prestige classes.


Field Summary
 
Fields inherited from class ogs.support.Object
listeners
 
Constructor Summary
protected CClass()
          Create a new 1st-level character class.
protected CClass(int xpLevel)
          Create a new Nth-level character class.
 
Method Summary
 Modifier getBaseAttack()
          Determine the base attack bonus of this cclass.
protected  int getBaseAttackValue()
          Determine the value of the base attack bonus for this cclass.
 Modifier getBaseFortSave()
          Determine the base Fortitude save bonus of this cclass.
protected  int getBaseFortSaveValue()
          Determine the value of the base Fortitude save bonus for this cclass.
 Modifier getBaseRefSave()
          Determine the base Reflex save bonus for this cclass.
protected  int getBaseRefSaveValue()
          Determine the value of the base Reflex save bonus for this cclass.
 Modifier getBaseWillSave()
          Determine the base Will save bonus for this cclass.
protected  int getBaseWillSaveValue()
          Determine the value of the base Will save bonus for this cclass.
abstract  int getHitDie()
          Determine the hit die for this cclass.
 int getLevel()
          Determine the experience level of this class.
abstract  int getSkillPoints()
          Determine the skill points per experience level of this cclass.
 void setLevel(int xpLevel)
          Change the experience level of this cclass.
 
Methods inherited from class ogs.support.Object
addListener, handleEvent, notifyListeners, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CClass

protected CClass()
Create a new 1st-level character class. Attack and save bonuses are set to 1st-level values.


CClass

protected CClass(int xpLevel)
Create a new Nth-level character class. Attack and save bonuses are set to the correct values for the given experience level.

Parameters:
xpLevel - Experience level of this cclass.
Method Detail

getHitDie

public abstract int getHitDie()
Determine the hit die for this cclass.

Returns:
Hit die for this cclass.

getSkillPoints

public abstract int getSkillPoints()
Determine the skill points per experience level of this cclass.

Returns:
Skill points per experience level of this cclass.

getLevel

public int getLevel()
Determine the experience level of this class.

Returns:
Experience level of this class.

setLevel

public void setLevel(int xpLevel)
Change the experience level of this cclass. When the experience level is changed, all bonuses for this cclass are updated and observers are notified of the change.

Parameters:
xpLevel - An experience level.

getBaseAttack

public Modifier getBaseAttack()
Determine the base attack bonus of this cclass.

Returns:
Base attack bonus of this cclass.

getBaseFortSave

public Modifier getBaseFortSave()
Determine the base Fortitude save bonus of this cclass.

Returns:
Base Fortitude save bonus of this cclass.

getBaseRefSave

public Modifier getBaseRefSave()
Determine the base Reflex save bonus for this cclass.

Returns:
Base Reflex save bonus of this cclass.

getBaseWillSave

public Modifier getBaseWillSave()
Determine the base Will save bonus for this cclass.

Returns:
Base Will save bonus of this cclass.

getBaseAttackValue

protected int getBaseAttackValue()
Determine the value of the base attack bonus for this cclass. This method returns the average advancement rate for base attack bonuses by default. Derived classes should override this method if a different advvancement rate is required.


getBaseFortSaveValue

protected int getBaseFortSaveValue()
Determine the value of the base Fortitude save bonus for this cclass. This method returns the weak advancement rate for base Fortitude save bonuses by default. Derived classes should override this method if a different advancement rate is required.


getBaseRefSaveValue

protected int getBaseRefSaveValue()
Determine the value of the base Reflex save bonus for this cclass. This method returns the weak advancement rate for base Reflex save bonuses by default. Derived classes should override this method if a different advancement rate is required.


getBaseWillSaveValue

protected int getBaseWillSaveValue()
Determine the value of the base Will save bonus for this cclass. This method returns the weak advancement rate for base Will save bonuses by default. Derived classes should override this method if a different advancement rate is required.


OGS Java API Spec