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

ogs::magic::Component Class Reference

An element required for the preparation or casting of a spell. More...

#include <Component.h>

Inheritance diagram for ogs::magic::Component:

Inheritance graph
[legend]
List of all members.

Public Types

enum  Type {
  VERBAL = 1, SOMANTIC = 2, MATERIAL = 3, FOCUS = 4,
  DIVINE_FOCUS = 5, EXPERIENCE_COST = 6
}
 A type of component. More...


Public Member Functions

Type getType () const
 Determine the type of component.

std::string getAbbreviation () const
 Determine the abbreviation for this type of component.


Static Public Member Functions

Component Verbal ()
 Create a new Verbal spell component.

Component Somantic ()
 Create a new Somantic spell component.

Component DivineFocus ()
 Create a new Divine Focus spell component.


Protected Member Functions

 Component (Type type)
 Create a new component.


Detailed Description

A spell component can be one of several different types. The standard types are Verbal, Somantic, Material, Focus, Divine Focus, and Experience Cost. This class represents the simple types Verbal, Somantic, and Divine Focus. The remaining types Material, Focus, and Experience Cost are represented by the PhysicalComponent and ExperienceCost classes.


Member Enumeration Documentation

enum ogs::magic::Component::Type
 

Enumeration values:
VERBAL  A spoken or audible incantation.

This componenet requires that the caster be able to speak or sound out the proper vocalizations.

SOMANTIC  A bodily movement or gesture.

Somantic components require that the caster is not hindered and has freedom of movement.

MATERIAL  An expendible substance or object.

Material components are consumed during spell preparation or casting.

FOCUS  A reusable substance or object.

Focus components are not consumed during spell preparation or casting.

DIVINE_FOCUS  A holy symbol or other religous object.

Divine focus components are required for most divine spells.

EXPERIENCE_COST  A loss of experience points.

Experience cost components are usually required in more powerful spells.


Constructor & Destructor Documentation

Component::Component Type  type  )  [protected]
 

Parameters:
type Type of component (VERBAL, SOMANTIC, MATERIAL, etc.)
Exceptions:
std::invalid_argument If type is not a valid component type.


Member Function Documentation

Component ogs::magic::Component::DivineFocus  )  [inline, static]
 

Returns:
Spell component with Divine Focus type.

std::string ogs::magic::Component::getAbbreviation  )  const [inline]
 

Returns:
Abbreviation for this type of component.

Component::Type ogs::magic::Component::getType  )  const [inline]
 

Returns:
Type of component (VERBAL, SOMANTIC, MATERIAL, etc.)

Component ogs::magic::Component::Somantic  )  [inline, static]
 

Returns:
Somantic spell component.

Component ogs::magic::Component::Verbal  )  [inline, static]
 

Returns:
Verbal spell component.


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