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

ogs::core::details::Maturity Class Reference

The various stages of life for a creature. More...

#include <Maturity.h>

Inheritance diagram for ogs::core::details::Maturity:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual unsigned getAdultAge () const=0
 Determine the average adult age for this type of creature.

virtual unsigned getMiddleAge () const=0
 Determine the average middle age for this type of creature.

virtual unsigned getOldAge () const=0
 Determine the average old age for this type of creature.

virtual unsigned getVenerableAge () const=0
 Determine the average venerable age for this type of creature.

virtual const DiegetMaximumAge () const=0
 Access the die used to roll a random maximum age for a PC.

unsigned rollMaximumAge () const
 Roll a random maximum age for a player character (PC).


Detailed Description

The Maturity class is an interface that determines the longevity or lifespan of a creature. This class is implemented by Creature classes such as Human that can be used as a player character (PC) race. It provides players and referees with average age ranges such as adult, starting, middle, old, venerable, and maximum. Each of these stages have effects that are applied once a creature reaches that age. The pure virtual member functions should behave the same for all instances of a Creature class (i.e., as static member functions). All ages are expressed in years by default.


Member Function Documentation

virtual unsigned ogs::core::details::Maturity::getAdultAge  )  const [pure virtual]
 

The adult age is the base value for determining the starting age of a PC.

Returns:
Average adult age of a creature.

Implemented in ogs::creatures::humanoids::Dwarf, ogs::creatures::humanoids::Elf, ogs::creatures::humanoids::Gnome, ogs::creatures::humanoids::HalfElf, ogs::creatures::humanoids::Halfling, ogs::creatures::humanoids::HalfOrc, and ogs::creatures::humanoids::Human.

virtual const Die& ogs::core::details::Maturity::getMaximumAge  )  const [pure virtual]
 

The value of this die roll is added to the average venerable age to to produce a random maximum age for a PC. A PC dies of natrual causes when he or she reaches the maximum age.

Returns:
Die used to roll random maximum ages.

Implemented in ogs::creatures::humanoids::Dwarf, ogs::creatures::humanoids::Elf, ogs::creatures::humanoids::Gnome, ogs::creatures::humanoids::HalfElf, ogs::creatures::humanoids::Halfling, ogs::creatures::humanoids::HalfOrc, and ogs::creatures::humanoids::Human.

virtual unsigned ogs::core::details::Maturity::getMiddleAge  )  const [pure virtual]
 

At middle age, a character recieves a -1 modifier to physical abilities (Strength, Constitution, and Dexterity) and a +1 modifier to mental abilities (Intelligence, Wisdom, and Charisma). This function should provide the same age for all instances of a class.

Returns:
Average middle age of a creature.

Implemented in ogs::creatures::humanoids::Dwarf, ogs::creatures::humanoids::Elf, ogs::creatures::humanoids::Gnome, ogs::creatures::humanoids::HalfElf, ogs::creatures::humanoids::Halfling, ogs::creatures::humanoids::HalfOrc, and ogs::creatures::humanoids::Human.

virtual unsigned ogs::core::details::Maturity::getOldAge  )  const [pure virtual]
 

At old age, a character recieves a -2 modifier to physical abilities and a +1 modifier to mental abilities.

Returns:
Average old age of a creature.

Implemented in ogs::creatures::humanoids::Dwarf, ogs::creatures::humanoids::Elf, ogs::creatures::humanoids::Gnome, ogs::creatures::humanoids::HalfElf, ogs::creatures::humanoids::Halfling, ogs::creatures::humanoids::HalfOrc, and ogs::creatures::humanoids::Human.

virtual unsigned ogs::core::details::Maturity::getVenerableAge  )  const [pure virtual]
 

At venerable age, a character recieves a -3 modifier to physical abilities and a +1 modifier to mental abilities. The venerable age is also used as the base value for determining maximum age.

Returns:
Average venerable age of a creature.

Implemented in ogs::creatures::humanoids::Dwarf, ogs::creatures::humanoids::Elf, ogs::creatures::humanoids::Gnome, ogs::creatures::humanoids::HalfElf, ogs::creatures::humanoids::Halfling, ogs::creatures::humanoids::HalfOrc, and ogs::creatures::humanoids::Human.

unsigned ogs::core::details::Maturity::rollMaximumAge  )  const [inline]
 

A random maximum age is determined by adding the die roll for maximum ages to the average venerable age.

Returns:
Random maximum age modifier.


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