Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

ogs::core::Character Class Reference

A character is a fictional individual in a campaign setting. More...

#include <Character.h>

Inheritance diagram for ogs::core::Character:

Inheritance graph
[legend]
Collaboration diagram for ogs::core::Character:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Character (Creature &creature, CClass &cclass)
 Create a single classed, Nth-level character.

CreaturegetCreature () const
 Determine the creature for this character.

XP::Points getPoints () const
 Determine the current number of experience points for this character.

void setPoints (XP::Points xpPoints)
 Change the experience points acquired by this character.

XP::Level getLevel () const
 Determine the experience level of this character.

const AdvancegetAdvance (XP::Level xpLevel) const
 Access the advancement information for this character at a given experience level.

bool canAdvance () const
 Determine if this character can advance to the next experience level.

void advanceCClass (CClass &cclass)
Skill::Points getSkillPoints () const
 Determine how many skill points are available to spend on skills.

bool canIncreaseAbility () const
 Determine if this character can increase an ability score.


Detailed Description

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.


Constructor & Destructor Documentation

Character::Character Creature creature,
CClass cclass
 

Parameters:
creature Creature used as a character.
cclass Reference to a CClass object.


Member Function Documentation

bool ogs::core::Character::canAdvance  )  const [inline]
 

Returns:
True if this character can advance.

bool Character::canIncreaseAbility  )  const
 

Returns:
True if an ability score can be increased.

const Character::Advance & Character::getAdvance XP::Level  xpLevel  )  const
 

This member function will throw an exception if the character has not reached the requested experience level.

Parameters:
xpLevel Experience level.
Returns:
Experience level advancement or NULL if not present.
Exceptions:
std::out_of_range If xpLevel does not exist for character.

Creature & ogs::core::Character::getCreature  )  const [inline]
 

Returns:
Reference to creature.object.

XP::Level ogs::core::Character::getLevel  )  const [inline]
 

The experience level of a character is also known as character level.

Returns:
Experience level of character.

XP::Points ogs::core::Character::getPoints  )  const [inline]
 

Returns:
Experience points.

Skill::Points Character::getSkillPoints  )  const
 

Returns:
Skill points available to spend on skills.

void Character::setPoints XP::Points  xpPoints  ) 
 

Parameters:
xpPoints Experience points of this character.
Todo:
Complete the implementation of this function.


The documentation for this class was generated from the following files:
Generated on Sun Apr 20 03:37:56 2003 for Open Gaming System (OGS) by doxygen1.3