OGS Java API Spec

ogs.core
Class Saves

java.lang.Object
  |
  +--ogs.core.Saves

public class Saves
extends Object

A set of saving throw modifiers. The set contains a list of modifiers that are added to rolls for each type of saving throw.


Field Summary
 Modifiers fort
          Modifiers added to Fortitude saving throws.
 Modifiers ref
          Modifiers added to Reflex saving throws.
 Modifiers will
          Modifiers added to Will saving throws.
 
Constructor Summary
Saves()
          Create an empty set of saving throw modifiers.
 
Method Summary
static int getStrongBonus(int xpLevel)
          Determine the stronger (higher) base save bonus for a given experience level.
static int getWeakBonus(int xpLevel)
          Determine the stronger (higher) base save bonus for a given experience level.
 boolean rollFortSave(int dc)
          Roll a Fortitude saving throw.
 boolean rollRefSave(int dc)
          Roll a Reflex saving throw.
 boolean rollWillSave(int dc)
          Roll a Will saving throw.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fort

public Modifiers fort
Modifiers added to Fortitude saving throws.


ref

public Modifiers ref
Modifiers added to Reflex saving throws.


will

public Modifiers will
Modifiers added to Will saving throws.

Constructor Detail

Saves

public Saves()
Create an empty set of saving throw modifiers.

Method Detail

getStrongBonus

public static int getStrongBonus(int xpLevel)
Determine the stronger (higher) base save bonus for a given experience level.

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

getWeakBonus

public static int getWeakBonus(int xpLevel)
Determine the stronger (higher) base save bonus for a given experience level.

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

rollFortSave

public boolean rollFortSave(int dc)
Roll a Fortitude saving throw. The Fortitude modifiers are added to the roll of 1d20 and compared to a difficulty class.

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

rollRefSave

public boolean rollRefSave(int dc)
Roll a Reflex saving throw. The Reflex modifiers are added to the roll of 1d20 and compared to a difficulty class.

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

rollWillSave

public boolean rollWillSave(int dc)
Roll a Will saving throw. The Will modifiers are added to the roll of 1d20 and compared to a difficulty class.

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

OGS Java API Spec