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

ogs::magic::Ability Class Reference

An ability with extended support for magic. More...

#include <Ability.h>

Inheritance diagram for ogs::magic::Ability:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual int getHighestSpellLevel () const=0
 Determine highest spell level that can be cast with this ability.

virtual SpellCounts getBonusSpells () const=0
 Determine bonus spells for this ability.


Static Protected Member Functions

int getHighestSpellLevel (ogs::core::Ability::Score)
 Determine highest spell level that can be cast.

SpellCounts getBonusSpells (ogs::core::Modifier::Value)
 Determine bonus spells for an ability score.


Detailed Description

The core mental abilities grant bonus spells for high scores and limit spells that can be cast for low scores. Game worlds and campaign settings that do not have magic in them do not need these extended abilities.


Member Function Documentation

SpellCounts Ability::getBonusSpells ogs::core::Modifier::Value  modifier  )  [static, protected]
 

Parameters:
modifier The value of an ability score modifier.
Returns:
Number of bonus spells per spell level.

virtual SpellCounts ogs::magic::Ability::getBonusSpells  )  const [pure virtual]
 

Returns:
Number of bonus spells per spell level.

Implemented in ogs::magic::abilities::Charisma, ogs::magic::abilities::Intelligence, and ogs::magic::abilities::Wisdom.

int ogs::magic::Ability::getHighestSpellLevel ogs::core::Ability::Score  score  )  [inline, static, protected]
 

A negative value indicates that spells can not be cast based on this ability.

Parameters:
score An ability score.
Returns:
Highest spell level or negative value.

virtual int ogs::magic::Ability::getHighestSpellLevel  )  const [pure virtual]
 

Returns:
Highest spell level.

Implemented in ogs::magic::abilities::Charisma, ogs::magic::abilities::Intelligence, and ogs::magic::abilities::Wisdom.


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