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

ogs::core::Abilities Class Reference

A set of ability scores. More...

#include <Abilities.h>

List of all members.

Public Types

typedef PtrMap::iterator Iterator
 An iterator for each ability in this set.

typedef PtrMap::value_type Value
 A pair of an ability type and ability pointer.


Public Member Functions

 Abilities ()
 Create a complete set of abilities.

 Abilities (Ability::Method &method)
 Create a complete set of abilities using a method.

 Abilities (PartialMethod &partialMethod)
 Create a set of abilities using a direct method.

Iterator getBegin ()
 Determine the iterator for the beginning of these abilities.

Iterator getEnd ()
 Determine the iterator for the end of these abilities.

AbilityPtr operator[] (Ability::Type abilityType)
 Determine the ability for a given type.

bool isComplete () const
 Determine if this is a complete set of abilities.

bool canRerollStandard ()
 Determine if this set of abilities can be rerolled using the standard method.

bool canRerollAverage ()
 Determine if this set of abilities can be rerolled using the average method.

bool canRerollHighPowered ()
 Determine if this set of abilities can be rerolled using the high-powered method.


Detailed Description

Abilities are normally complete sets. A complete set of ability scores consists of one score for each type of ability. Some entities however may not possess all six abilities. Certain creatures for example may lack Intelligence, Constitution, Strength, or some other ability by their very nature. Sentient items also do not have physical abilities. These entities have partial sets of ability scores.


Member Typedef Documentation

typedef PtrMap::value_type ogs::core::Abilities::Value
 

Iterators point to values of this type.


Constructor & Destructor Documentation

Abilities::Abilities  ) 
 

The ability scores are generated with the standard method.

Abilities::Abilities Ability::Method method  ) 
 

Parameters:
method A method for generating ability scores.

Abilities::Abilities PartialMethod partialMethod  ) 
 

Parameters:
partialMethod A partial method.


Member Function Documentation

bool ogs::core::Abilities::canRerollAverage  )  [inline]
 

Abilities that are rolled using the average method can be rerolled if the total ability modifier is -3 or less or all scores are 11 or less.

Returns:
True if abilities can be rerolled.

bool ogs::core::Abilities::canRerollHighPowered  )  [inline]
 

Abilities that are rolled using the high-powered method can be rerolled if the total ability modifier is +1 or less or all scores are 14 or less.

Returns:
True if abilities can be rerolled.

bool ogs::core::Abilities::canRerollStandard  )  [inline]
 

Abilities that are rolled using the standard method can be rerolled if the total ability modifier is 0 or less or all scores are 13 or less.

Returns:
True if abilities can be rerolled.

Abilities::Iterator ogs::core::Abilities::getBegin  )  [inline]
 

Returns:
Iterator for the beginning of this set.

Abilities::Iterator ogs::core::Abilities::getEnd  )  [inline]
 

Returns:
Iterator for the end of these abilities.

bool ogs::core::Abilities::isComplete  )  const [inline]
 

A complete set of abilities contains all six ability scores.

Returns:
True if this set is a complete set of abilities.

AbilityPtr ogs::core::Abilities::operator[] Ability::Type  abilityType  )  [inline]
 

If an ability for the type does not exist in this set, this operator returns null.

Parameters:
abilityType Type of ability.
Returns:
An ability or null if the ability does not exist.


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