From 2356e6218e7cb6b47d6bd9da4b4bb462dca85fdb Mon Sep 17 00:00:00 2001 From: Emanuel Guevel Date: Sat, 20 Jul 2013 21:57:45 +0200 Subject: [PATCH] Complete health increase on level up --- apps/openmw/mwmechanics/creaturestats.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/openmw/mwmechanics/creaturestats.cpp b/apps/openmw/mwmechanics/creaturestats.cpp index e6e058ad9..743dcfc7b 100644 --- a/apps/openmw/mwmechanics/creaturestats.cpp +++ b/apps/openmw/mwmechanics/creaturestats.cpp @@ -29,11 +29,13 @@ namespace MWMechanics MWBase::Environment::get().getWorld()->getStore().get(); 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 // 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(); + setHealth(static_cast (0.5 * (strength + endurance)) + mLevelHealthBonus); mLevel++; }