OpenMW
|
Common creature stats. More...
#include <creaturestats.hpp>
Public Types | |
enum | AttackType { AT_Slash, AT_Thrust, AT_Chop } |
Public Member Functions | |
CreatureStats () | |
bool | needToRecalcDynamicStats () |
void | addToFallHeight (float height) |
float | land () |
bool | canUsePower (const std::string &power) const |
void | usePower (const std::string &power) |
const Stat< int > & | getAttribute (int index) const |
const DynamicStat< float > & | getHealth () const |
const DynamicStat< float > & | getMagicka () const |
const DynamicStat< float > & | getFatigue () const |
const DynamicStat< float > & | getDynamic (int index) const |
const Spells & | getSpells () const |
const ActiveSpells & | getActiveSpells () const |
const MagicEffects & | getMagicEffects () const |
bool | getAttackingOrSpell () const |
int | getLevel () const |
int | getAiSetting (int index) const |
0: hello, 1 fight, 2 flee, 3 alarm | |
Spells & | getSpells () |
ActiveSpells & | getActiveSpells () |
MagicEffects & | getMagicEffects () |
void | setAttribute (int index, const Stat< int > &value) |
void | setAttribute (int index, int base) |
void | setHealth (const DynamicStat< float > &value) |
void | setMagicka (const DynamicStat< float > &value) |
void | setFatigue (const DynamicStat< float > &value) |
void | setDynamic (int index, const DynamicStat< float > &value) |
void | setSpells (const Spells &spells) |
void | setActiveSpells (const ActiveSpells &active) |
void | setMagicEffects (const MagicEffects &effects) |
void | setAttackingOrSpell (bool attackingOrSpell) |
void | setAttackType (int attackType) |
int | getAttackType () |
void | setLevel (int level) |
void | setAiSetting (int index, int value) |
0: hello, 1 fight, 2 flee, 3 alarm | |
const AiSequence & | getAiSequence () const |
AiSequence & | getAiSequence () |
float | getFatigueTerm () const |
Return effective fatigue. | |
float | getLevelHealthBonus () const |
void | levelUp () |
void | updateHealth () |
bool | isDead () const |
bool | hasDied () const |
void | clearHasDied () |
void | resurrect () |
bool | hasCommonDisease () const |
bool | hasBlightDisease () const |
int | getFriendlyHits () const |
Number of friendly hits received. | |
void | friendlyHit () |
Increase number of friendly hits by one. | |
bool | hasTalkedToPlayer () const |
Has this creature talked with the player before? | |
void | talkedToPlayer () |
bool | isAlarmed () const |
void | setAlarmed (bool alarmed) |
bool | getAttacked () const |
void | setAttacked (bool attacked) |
bool | isHostile () const |
void | setHostile (bool hostile) |
bool | getCreatureTargetted () const |
float | getEvasion () const |
void | setLastHitObject (const std::string &objectid) |
const std::string & | getLastHitObject () const |
Public Attributes | |
std::set< int > | mBoundItems |
std::map< int, std::string > | mSummonedCreatures |
Protected Attributes | |
bool | mIsWerewolf |
Stat< int > | mWerewolfAttributes [8] |
Private Attributes | |
Stat< int > | mAttributes [8] |
DynamicStat< float > | mDynamic [3] |
int | mLevel |
Spells | mSpells |
ActiveSpells | mActiveSpells |
MagicEffects | mMagicEffects |
int | mAiSettings [4] |
AiSequence | mAiSequence |
float | mLevelHealthBonus |
bool | mDead |
bool | mDied |
int | mFriendlyHits |
bool | mTalkedTo |
bool | mAlarmed |
bool | mAttacked |
bool | mHostile |
bool | mAttackingOrSpell |
float | mFallHeight |
int | mAttackType |
std::string | mLastHitObject |
bool | mRecalcDynamicStats |
std::map< std::string, MWWorld::TimeStamp > | mUsedPowers |
Common creature stats.
void MWMechanics::CreatureStats::addToFallHeight | ( | float | height | ) |
bool MWMechanics::CreatureStats::canUsePower | ( | const std::string & | power | ) | const |
Increase number of friendly hits by one.
const ActiveSpells & MWMechanics::CreatureStats::getActiveSpells | ( | ) | const |
const AiSequence & MWMechanics::CreatureStats::getAiSequence | ( | ) | const |
int MWMechanics::CreatureStats::getAiSetting | ( | int | index | ) | const |
0: hello, 1 fight, 2 flee, 3 alarm
bool MWMechanics::CreatureStats::getAttacked | ( | ) | const |
bool MWMechanics::CreatureStats::getAttackingOrSpell | ( | ) | const |
int MWMechanics::CreatureStats::getAttackType | ( | ) | [inline] |
const Stat< int > & MWMechanics::CreatureStats::getAttribute | ( | int | index | ) | const |
bool MWMechanics::CreatureStats::getCreatureTargetted | ( | ) | const |
const DynamicStat< float > & MWMechanics::CreatureStats::getDynamic | ( | int | index | ) | const |
float MWMechanics::CreatureStats::getEvasion | ( | ) | const |
const DynamicStat< float > & MWMechanics::CreatureStats::getFatigue | ( | ) | const |
float MWMechanics::CreatureStats::getFatigueTerm | ( | ) | const |
Return effective fatigue.
int MWMechanics::CreatureStats::getFriendlyHits | ( | ) | const |
Number of friendly hits received.
const DynamicStat< float > & MWMechanics::CreatureStats::getHealth | ( | ) | const |
const std::string & MWMechanics::CreatureStats::getLastHitObject | ( | ) | const |
int MWMechanics::CreatureStats::getLevel | ( | ) | const |
float MWMechanics::CreatureStats::getLevelHealthBonus | ( | ) | const |
const MagicEffects & MWMechanics::CreatureStats::getMagicEffects | ( | ) | const |
const DynamicStat< float > & MWMechanics::CreatureStats::getMagicka | ( | ) | const |
const Spells & MWMechanics::CreatureStats::getSpells | ( | ) | const |
bool MWMechanics::CreatureStats::hasBlightDisease | ( | ) | const |
bool MWMechanics::CreatureStats::hasCommonDisease | ( | ) | const |
bool MWMechanics::CreatureStats::hasDied | ( | ) | const |
bool MWMechanics::CreatureStats::hasTalkedToPlayer | ( | ) | const |
Has this creature talked with the player before?
bool MWMechanics::CreatureStats::isAlarmed | ( | ) | const |
bool MWMechanics::CreatureStats::isDead | ( | ) | const |
bool MWMechanics::CreatureStats::isHostile | ( | ) | const |
float MWMechanics::CreatureStats::land | ( | ) |
Reset the fall height
void MWMechanics::CreatureStats::levelUp | ( | ) |
Reimplemented in MWMechanics::NpcStats.
void MWMechanics::CreatureStats::setActiveSpells | ( | const ActiveSpells & | active | ) |
void MWMechanics::CreatureStats::setAiSetting | ( | int | index, |
int | value | ||
) |
0: hello, 1 fight, 2 flee, 3 alarm
void MWMechanics::CreatureStats::setAlarmed | ( | bool | alarmed | ) |
void MWMechanics::CreatureStats::setAttacked | ( | bool | attacked | ) |
void MWMechanics::CreatureStats::setAttackingOrSpell | ( | bool | attackingOrSpell | ) |
void MWMechanics::CreatureStats::setAttackType | ( | int | attackType | ) | [inline] |
void MWMechanics::CreatureStats::setAttribute | ( | int | index, |
const Stat< int > & | value | ||
) |
void MWMechanics::CreatureStats::setAttribute | ( | int | index, |
int | base | ||
) |
void MWMechanics::CreatureStats::setDynamic | ( | int | index, |
const DynamicStat< float > & | value | ||
) |
void MWMechanics::CreatureStats::setFatigue | ( | const DynamicStat< float > & | value | ) |
void MWMechanics::CreatureStats::setHealth | ( | const DynamicStat< float > & | value | ) |
void MWMechanics::CreatureStats::setHostile | ( | bool | hostile | ) |
void MWMechanics::CreatureStats::setLastHitObject | ( | const std::string & | objectid | ) |
void MWMechanics::CreatureStats::setLevel | ( | int | level | ) |
void MWMechanics::CreatureStats::setMagicEffects | ( | const MagicEffects & | effects | ) |
void MWMechanics::CreatureStats::setMagicka | ( | const DynamicStat< float > & | value | ) |
void MWMechanics::CreatureStats::setSpells | ( | const Spells & | spells | ) |
Calculate health based on endurance and strength. Called at character creation and at level up.
void MWMechanics::CreatureStats::usePower | ( | const std::string & | power | ) |
int MWMechanics::CreatureStats::mAiSettings[4] [private] |
bool MWMechanics::CreatureStats::mAlarmed [private] |
bool MWMechanics::CreatureStats::mAttacked [private] |
bool MWMechanics::CreatureStats::mAttackingOrSpell [private] |
int MWMechanics::CreatureStats::mAttackType [private] |
Stat<int> MWMechanics::CreatureStats::mAttributes[8] [private] |
std::set<int> MWMechanics::CreatureStats::mBoundItems |
bool MWMechanics::CreatureStats::mDead [private] |
bool MWMechanics::CreatureStats::mDied [private] |
DynamicStat<float> MWMechanics::CreatureStats::mDynamic[3] [private] |
float MWMechanics::CreatureStats::mFallHeight [private] |
int MWMechanics::CreatureStats::mFriendlyHits [private] |
bool MWMechanics::CreatureStats::mHostile [private] |
bool MWMechanics::CreatureStats::mIsWerewolf [protected] |
std::string MWMechanics::CreatureStats::mLastHitObject [private] |
int MWMechanics::CreatureStats::mLevel [private] |
float MWMechanics::CreatureStats::mLevelHealthBonus [private] |
bool MWMechanics::CreatureStats::mRecalcDynamicStats [private] |
Spells MWMechanics::CreatureStats::mSpells [private] |
std::map<int, std::string> MWMechanics::CreatureStats::mSummonedCreatures |
bool MWMechanics::CreatureStats::mTalkedTo [private] |
std::map<std::string, MWWorld::TimeStamp> MWMechanics::CreatureStats::mUsedPowers [private] |
Stat<int> MWMechanics::CreatureStats::mWerewolfAttributes[8] [protected] |