OGS Java API Spec

ogs.core
Class Character

java.lang.Object
  |
  +--ogs.support.Object
        |
        +--ogs.core.Character
All Implemented Interfaces:
EventListener

public class Character
extends Object

A character is a fictional individual in a campaign setting. More specifically, a character is a creature with one or more character classes (cclasses). From a design pattern perspective, a character is the director or mediator of a creature and one or more cclasses.


Nested Class Summary
 class Character.Advance
          Manages experience level advancement of a character.
 
Field Summary
 
Fields inherited from class ogs.support.Object
listeners
 
Constructor Summary
Character(Creature creature, CClass cclass)
          Create a single-classed, Nth-level character.
 
Method Summary
 void advanceCClass(CClass cclass)
          Advance a character class for this character.
 boolean canAdvance()
          Determine if this character can advance to the next experience level.
 boolean canIncreaseAbility()
          Determine if this character can increase an ability score.
 Creature getCreature()
          Determine the creature for this character.
 int getLevel()
          Determine the experience level of this character.
 int getPoints()
          Determine the current number of experience points for this character.
 int getSkillPoints()
          Determine how many skill points are available to spend on skills.
 void setPoints(int xpPoints)
          Change the current experience points of a character.
 
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

Character

public Character(Creature creature,
                 CClass cclass)
Create a single-classed, Nth-level character. The specified character class determines the experience level of the character.

Parameters:
creature - Creatures used as character.
cclass - Character class of the character.
Method Detail

getCreature

public Creature getCreature()
Determine the creature for this character.

Returns:
Creature.object

getPoints

public int getPoints()
Determine the current number of experience points for this character.

Returns:
Experience points.

setPoints

public void setPoints(int xpPoints)
Change the current experience points of a character.


getLevel

public int getLevel()
Determine the experience level of this character. The experience * level of a character is also known as character level.

Returns:
Experience level of this character.

canAdvance

public boolean canAdvance()
Determine if this character can advance to the next experience level.

Returns:
True if this character can advance.

advanceCClass

public void advanceCClass(CClass cclass)
Advance a character class for this character.

Parameters:
cclass - Character class to advance.

getSkillPoints

public int getSkillPoints()
Determine how many skill points are available to spend on skills.

Returns:
Skill points available to spend on skills.

canIncreaseAbility

public boolean canIncreaseAbility()
Determine if this character can increase an ability score.

Returns:
True if this character can increase an ability score.

OGS Java API Spec