#include <Feat.h>
Inheritance diagram for ogs::core::Feat:
Public Types | |
enum | Compatibility { EXCLUSIVE = 1, REPEATABLE = 2, CUMULATIVE = 3 } |
The compatibility of a feat determine how multiple instances of the same feat interact with each other. More... | |
enum | Group { GENERAL = 1, COMBAT = 2, MAGIC = 3, SPECIAL = 4 } |
The group that a feat belongs to. More... | |
Public Member Functions | |
Compatibility | getCompatibility () const |
Determine the compatibility of this feat. | |
Group | getGroup () const |
Determine the group that this feat belongs to. | |
Static Public Member Functions | |
unsigned | getSlotCount (XP::Level xpLevel) |
Determine number of slots available for feats at a given experience level. | |
XP::Level | getSlotCountLevel (unsigned slotCount) |
Determine experience level required for a given number of available slots for feats. | |
Protected Member Functions | |
Feat (Compatibility compatibility, Group group=GENERAL) | |
Create a new feat. | |
virtual bool | canAttach (const Object &object) const |
Determine if this feat can be attached to an object. | |
Creature * | getCreature () |
Determine the creature that this feat is attached to. | |
template<class T> bool | findFeat (const Object &object) const |
Determine if a creature has a feat. |
|
|
Feats can be classified into several different groups.
|
|
Feats can only be attached to creatures. If the object is not a creature, this function will return false.
Reimplemented from ogs::core::Feature. |
|
This function only checks for an instance of the template parameter T. If the object is not a creature, this function will return false.
|
|
Reimplemented in ogs::feats::BonusFeat, ogs::feats::ImprovedInitiative, ogs::feats::ImprovedSave, and ogs::feats::SingleWeapon< _WeaponType >. |
|
This function returns the same value as the Feature::getObject() function. It is provided solely for the convenience of derived classes.
|
|
Reimplemented in ogs::feats::BonusFeat, ogs::feats::ImprovedInitiative, and ogs::feats::ImprovedSave. |
|
|
|
This method is the inverse of the getSlotCount() function.
|