#include <CClass.h>
Inheritance diagram for ogs::core::CClass:
Public Member Functions | |
virtual bool | attachObject (ogs::support::Object &object) |
Attach this cclass to an object. | |
virtual bool | detachObject () |
Detach this cclass from an object. | |
ogs::support::Object * | getObject () const |
Determine the character that this cclass is attached to. | |
Die::Sides | getHitDie () const |
Determine the hit die for this type of cclass. | |
Skill::Points | getSkillRate () const |
Determine the skill rate of this cclass. | |
XP::Level | getLevel () const |
Determine the experience level of this cclass. | |
void | setLevel (XP::Level xpLevel) |
Change the experience level of this cclass. | |
Protected Member Functions | |
CClass (Die::Sides hitDie, Skill::Points skillRate, XP::Level xpLevel, Modifier::Value baseAttack, Modifier::Value baseFort, Modifier::Value baseRef, Modifier::Value baseWill) | |
Create a new character class. | |
virtual bool | canAttach (const Object &object) const |
Determine if this cclass can be attached to an object. | |
virtual bool | canDetach () const |
Determine if this cclass can be detached from an object. | |
virtual void | updateCClass () |
Update this cclass. |
Character class is abbreviated as cclass to differentiate the term "class" from the object-oriented concept of a class. CClasses that are derived from the CClass
class represent specific player character classes, nonplayer character classes, and prestige classes. Prestige classes are cclasses that have prerequisites.
|
The experience level of the class is taken from the number of hit dice. This value is used to initialize the base attack and save bonuses. The average advancement rate is used by default for the attack bonus and the weak advancement rates are used by default for the save bonuses.
|
|
This method should always be called first by derived classes that override this method.
Implements ogs::support::Attachable. Reimplemented in ogs::cclasses::Paladin. |
|
A cclass can not be attached to itself or if it is already attached. A cclass can only be attached to characters.
|
|
A cclass can not be detached from a character by default once it is attached.
|
|
This function resets the character pointer to null. Derived classes that override this function should therefore call the getObject() function before calling this function.
Implements ogs::support::Attachable. Reimplemented in ogs::cclasses::Paladin. |
|
|
|
|
|
If this cclass is not attached, this function returns NULL.
Implements ogs::support::Attachable. |
|
The skill rate is the number of skill points that a character gains for each experience level in this cclass.
|
|
When the experience level is changed, all bonuses for this cclass are updated and observers are notified of the change.
Reimplemented in ogs::cclasses::Monk. |
|
This function is called when the experience level of this cclass changes. By default, it only updates the modifiers associated with this cclass using the average attack and weak save bonuses. Derived classes should override this function to use different bonuses and to add or remove specific cclass features. |