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

ogs::core::Saves Struct Reference

A set of saving throws. More...

#include <Saves.h>

Collaboration diagram for ogs::core::Saves:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Saves ()
 Create a new set of saves.

bool rollFortSave (Die::Value dc) const
 Roll a Fortitude saving throw.

bool rollRefSave (Die::Value dc) const
 Roll a Reflex saving throw.

bool rollWillSave (Die::Value dc) const
 Roll a Will saving throw.


Static Public Member Functions

Modifier::Value getStrongBonus (XP::Level xpLevel)
 Determine value of stronger (higher) base save bonus.

Modifier::Value getWeakBonus (XP::Level xpLevel)
 Determine value of weaker (lower) base save bonus.


Public Attributes

Modifiers fort
 Modifiers added to a Fortitude saving throw.

Modifiers ref
 Modifiers added to a Reflex saving throw.

Modifiers will
 Modifiers added to a Will saving throw.


Detailed Description

A set of saving throws contains a separate list of modifiers for each type of saving throw. There are three types of saving throws: Fortitude, Reflex, and Will. These modifiers are added to the roll of 1d20 when a saving throw check is made. The Saves class encapsulates these modifiers and also contains helper functions for determining base saving throw bonuses at a given experience level and actually checking the roll of a saving throw.


Constructor & Destructor Documentation

ogs::core::Saves::Saves  )  [inline]
 

A new set of saving throws does not contain any modifiers when initially created.


Member Function Documentation

Modifier::Value ogs::core::Saves::getStrongBonus XP::Level  xpLevel  )  [inline, static]
 

Parameters:
xpLevel Experience level of cclass.
Returns:
Value of base save bonus.

Modifier::Value ogs::core::Saves::getWeakBonus XP::Level  xpLevel  )  [inline, static]
 

Parameters:
xpLevel Experience level of cclass.
Returns:
Value of base save bonus.

bool ogs::core::Saves::rollFortSave Die::Value  dc  )  const [inline]
 

The Fortitude modifiers are added to the roll of 1d20 and compared to a difficulty class. If the result is greater than or equal to the DC, the saving throw is successful.

Parameters:
dc Difficulty class of saving throw.
Returns:
True if saving throw succeeded.

bool ogs::core::Saves::rollRefSave Die::Value  dc  )  const [inline]
 

The Reflex modifiers are added to the roll of 1d20 and compared to a difficulty class. If the result is greater than or equal to the DC, the saving throw is successful.

Parameters:
dc Difficulty class of saving throw.
Returns:
True if saving throw succeeded.

bool ogs::core::Saves::rollWillSave Die::Value  dc  )  const [inline]
 

The Will modifiers are added to the roll of 1d20 and compared to a difficulty class. If the result is greater than or equal to the DC, the saving throw is successful.

Parameters:
dc Difficulty class of saving throw.
Returns:
True if saving throw succeeded.


The documentation for this struct was generated from the following file:
Generated on Sun Apr 20 03:38:21 2003 for Open Gaming System (OGS) by doxygen1.3