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

ogs::magic::Spell Class Reference

A magical effect produced by a caster.

#include <Spell.h>

Inheritance diagram for ogs::magic::Spell:

Inheritance graph
[legend]
Collaboration diagram for ogs::magic::Spell:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::list< ComponentComponents
 A list of spell components.


Public Member Functions

virtual const SchoolgetSchool () const=0
 Determine the school (and subschool if applicable) that this spell belongs to.

virtual Descriptors getDescriptors () const
 Determine descriptors for this spell.

virtual Components getComponents () const=0
 Determine the components needed to cast this spell.

virtual Range getRange () const=0
 Determine the range of this spell.

virtual bool attachMetamagicFeat (MetamagicFeat &metamagicFeat)
 Attach a metamagic feat to this spell.


Protected Member Functions

 Spell ()
 Create a new spell.


Constructor & Destructor Documentation

ogs::magic::Spell::Spell  )  [inline, protected]
 

This constructor is protected so only this class and derived classes can use it. All it does is create an empty array of metamagic feats.


Member Function Documentation

bool Spell::attachMetamagicFeat MetamagicFeat metamagicFeat  )  [virtual]
 

Parameters:
metamagicFeat A metamagic feat.
Returns:
True if metamagic feat is attached to this spell.

virtual Components ogs::magic::Spell::getComponents  )  const [pure virtual]
 

The components of a spell may vary from plain versions of the spell due to metamagic feats.

Returns:
Array of components for this spell.

Implemented in ogs::spells::conjurations::CureWounds.

Descriptors ogs::magic::Spell::getDescriptors  )  const [inline, virtual]
 

Many spells have no descriptors. Therefore, this function returns an empty set of descriptors by default. Derived classes must override this function if the spell has any descriptors.

Returns:
Descriptors for this spell.

virtual Range ogs::magic::Spell::getRange  )  const [pure virtual]
 

The range of a spell may vary from normal versions of the spell due to metamagic feats.

Returns:
Range of this spell.

Implemented in ogs::spells::conjurations::CureWounds.

virtual const School& ogs::magic::Spell::getSchool  )  const [pure virtual]
 

Returns:
School (and subschool) of this spell.

Implemented in ogs::spells::Abjuration, ogs::spells::Conjuration, ogs::spells::Divination, ogs::spells::Enchantment, ogs::spells::Evocation, ogs::spells::Illusion, ogs::spells::Necromancy, ogs::spells::Transmutation, ogs::spells::Universal, and ogs::spells::conjurations::CureWounds.


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