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

ogs::feats::BonusFeat Class Reference

A special feat that can be substituted with another feat. More...

#include <BonusFeat.h>

Inheritance diagram for ogs::feats::BonusFeat:

Inheritance graph
[legend]
Collaboration diagram for ogs::feats::BonusFeat:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Restriction { NONE, COMBAT_FEAT_ONLY, MAGIC_FEAT_ONLY }
 Indicates any restrictions on the replacment feat. More...


Public Member Functions

 BonusFeat (Restriction restriction=NONE)
 Create a new bonus feat.

Feat::Compatibility getCompatibility () const
 Determine the compatability of this feat.

Feat::Group getGroup () const
 Determine the group that this feat belongs to.

Restriction getRestriction () const
 Determine the restriction for this bonus feat.

Feat * getFeat () const
 Determine the selected feat for this bonus feat.

bool setFeat (Feat &feat)
 Replace this bonus feat with another feat.


Detailed Description

A bonus feat can be replaced with another feat of the character's choice. Once the bonus feat is replaced, the bonus feat behaves as the selected feat in all respects. From a design pattern perspective, a bonus feat is a proxy for the selected feat. Once a bonus feat is selected, it cannot be changed later on.

Bonus feats are features of humans, fighters, rogues, and wizards. Humans automatically gain a bonus feat as a racial trait. Rogues can choose a bonus feat instead of other special abilities at 10th level and higher. Fighters gain a bonus feat about every two levels and wizards every five levels. The selected feat for fighters and wizards have restrictions. A fighter must select a combat feat and a wizard must select a magic feat. Bonus feats for humans and rogues have no restrictions.

See also:
ogs::cclasses::Fighter

ogs::cclasses::Rogue

ogs::cclasses::Wizard

ogs::creatures::humanoids::Human


Member Enumeration Documentation

enum ogs::feats::BonusFeat::Restriction
 

Enumeration values:
NONE  This bonus feat can be replaced with any feat.
COMBAT_FEAT_ONLY  This bonus feat can only be replaced with a combat feat.

Bonus feats for fighters have this restriction.

MAGIC_FEAT_ONLY  This bonus feat can only be replaced with a magic feat.

Magic feats include metamagic feats, item creation feats, and the Spell Mastery feat. Bonus feats for wizards have this restriction.


Constructor & Destructor Documentation

ogs::feats::BonusFeat::BonusFeat Restriction  restriction = NONE  ) 
 

If the specified restriction is invalid, the bonus feat has no restrictions.

Parameters:
restriction Restriction of selected feat.


Member Function Documentation

Feat::Compatibility ogs::feats::BonusFeat::getCompatibility  )  const [inline]
 

Bonus feats are repeatable feats by themselves. After a feat is selected, the compatability of a bonus feat is the same as the selected feat.

Returns:
Compatibility of this feat.

Reimplemented from ogs::core::Feat.

Feat * ogs::feats::BonusFeat::getFeat  )  const [inline]
 

If no feat has been selected yet, this function returns NULL.

Returns:
Pointer to selected feat or NULL if not yet selected.

Feat::Group ogs::feats::BonusFeat::getGroup  )  const [inline]
 

Bonus feats are special feats by themselves. After a feat is selected, the group of a bonus feat is the same as the selected feat.

Returns:
Feat::SPECIAL or group of selected feat.

Reimplemented from ogs::core::Feat.

BonusFeat::Restriction ogs::feats::BonusFeat::getRestriction  )  const [inline]
 

Returns:
Restriction for this bonus feat.

bool BonusFeat::setFeat Feat &  feat  ) 
 

Parameters:
feat Feat selected as replacement.
Returns:
True if bonus feat was replaced with selected feat.


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