mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
Complete health increase on level up
This commit is contained in:
parent
2a0644a7c3
commit
2356e6218e
1 changed files with 2 additions and 0 deletions
|
@ -29,11 +29,13 @@ namespace MWMechanics
|
||||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();
|
MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();
|
||||||
|
|
||||||
const int endurance = getAttribute(ESM::Attribute::Endurance).getBase();
|
const int endurance = getAttribute(ESM::Attribute::Endurance).getBase();
|
||||||
|
const int strength = getAttribute(ESM::Attribute::Strength).getBase();
|
||||||
|
|
||||||
// "When you gain a level, in addition to increasing three primary attributes, your Health
|
// "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,
|
// will automatically increase by 10% of your Endurance attribute. If you increased Endurance this level,
|
||||||
// the Health increase is calculated from the increased Endurance"
|
// the Health increase is calculated from the increased Endurance"
|
||||||
mLevelHealthBonus += endurance * gmst.find("fLevelUpHealthEndMult")->getFloat();
|
mLevelHealthBonus += endurance * gmst.find("fLevelUpHealthEndMult")->getFloat();
|
||||||
|
setHealth(static_cast<int> (0.5 * (strength + endurance)) + mLevelHealthBonus);
|
||||||
|
|
||||||
mLevel++;
|
mLevel++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue