#include <Ability.h>
Inheritance diagram for ogs::core::Ability:
Public Types | |
typedef unsigned short | Score |
An ability score. | |
enum | Type { STR = 1, DEX, CON, INT, WIS, CHA, NUM = 6 } |
Type of ability. More... | |
Public Member Functions | |
Ability (Type type) | |
Create a new ability. | |
Ability (Type type, Method &method) | |
Create a new ability using a method. | |
Type | getType () const |
Determine the type of this ability. | |
Score | getOriginalScore () const |
Determine the original (unmodified) ability score. | |
Modifiers & | getModifiers () |
Determine the modifiers added to this ability score. | |
Score | getCurrentScore () const |
Determine the current (modified) ability score. | |
const Modifier & | getModifier () const |
Determine the ability modifier for this ability. | |
Modifier & | getModifier () |
Determine the ability modifier for this ability. | |
Static Public Member Functions | |
bool | isValidType (int i) |
Determine if an integer value is a valid ability type. | |
unsigned | getIncreaseCount (XP::Level xpLevel) |
Determine number of ability increases available at a given experience level. | |
XP::Level | getIncreaseCountLevel (unsigned increaseCount) |
Determine experience level required for a given number of ability increases. |
An ability score can be modified by adding other modifiers to the unmodified, original score of the ability. The modified, current score is used to determine the ability modifier. Thus, an ability has two kinds of modifiers: zero or more score modifiers that are added to the original score and one ability modifier resulting from the current score.
|
There are only six types of ability scores. Strength, Dexterity, and Constitution are considered "physical" abilities. Intelligence, Wisdom, and Charisma are considered "mental" abilities.
|
|
The ability score is rolled using the standard method. The ability has no score modifiers and the ability modifier is created with the proper value determined from the ability score.
|
|
The ability has no score modifiers and the ability modifier is created with the proper value determined from the ability score.
|
|
|
|
|
|
This method is the inverse of the getIncreaseCount() function.
|
|
The ability modifier can be added to other modifier lists (such as saving throws and skill checks). Do not change its value directly!
|
|
The ability modifier can be added to other modifier lists (such as saving throws and skill checks).
|
|
Changes made to the object returned by this function will be directly reflected in the current score and ability modifier.
|
|
|
|
|
|
|