|
|
|
@ -18,14 +18,24 @@ namespace MWMechanics
|
|
|
|
|
mAiSettings[i] = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CreatureStats::increaseLevelHealthBonus (float value)
|
|
|
|
|
float CreatureStats::getLevelHealthBonus () const
|
|
|
|
|
{
|
|
|
|
|
mLevelHealthBonus += value;
|
|
|
|
|
return mLevelHealthBonus;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
float CreatureStats::getLevelHealthBonus () const
|
|
|
|
|
void CreatureStats::levelUp()
|
|
|
|
|
{
|
|
|
|
|
return mLevelHealthBonus;
|
|
|
|
|
const MWWorld::Store<ESM::GameSetting> &gmst =
|
|
|
|
|
MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();
|
|
|
|
|
|
|
|
|
|
const int endurance = getAttribute(ESM::Attribute::Endurance).getBase();
|
|
|
|
|
|
|
|
|
|
// "When you gain a level, in addition to increasing three primary attributes, your Health
|
|
|
|
|
// will automatically increase by 10% of your Endurance attribute. If you increased Endurance this level,
|
|
|
|
|
// the Health increase is calculated from the increased Endurance"
|
|
|
|
|
mLevelHealthBonus += endurance * gmst.find("fLevelUpHealthEndMult")->getFloat();
|
|
|
|
|
|
|
|
|
|
mLevel++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const AiSequence& CreatureStats::getAiSequence() const
|
|
|
|
|