1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-24 10:39:44 +00:00

Fix typo (should be Strength, not Luck). Use GMSTs for strength damage.

This commit is contained in:
scrawl 2014-01-20 17:44:39 +01:00
parent 1617a4f7d9
commit 82a07af72c
2 changed files with 9 additions and 1 deletions

View file

@ -252,6 +252,8 @@ namespace MWClass
fKnockDownMult = gmst.find("fKnockDownMult"); fKnockDownMult = gmst.find("fKnockDownMult");
iKnockDownOddsMult = gmst.find("iKnockDownOddsMult"); iKnockDownOddsMult = gmst.find("iKnockDownOddsMult");
iKnockDownOddsBase = gmst.find("iKnockDownOddsBase"); iKnockDownOddsBase = gmst.find("iKnockDownOddsBase");
fDamageStrengthBase = gmst.find("fDamageStrengthBase");
fDamageStrengthMult = gmst.find("fDamageStrengthMult");
inited = true; inited = true;
} }
@ -524,7 +526,8 @@ namespace MWClass
if(attack) if(attack)
{ {
damage = attack[0] + ((attack[1]-attack[0])*stats.getAttackStrength()); damage = attack[0] + ((attack[1]-attack[0])*stats.getAttackStrength());
damage *= 0.5f + (stats.getAttribute(ESM::Attribute::Luck).getModified() / 100.0f); damage *= fDamageStrengthBase->getFloat() +
(stats.getAttribute(ESM::Attribute::Strength).getModified() * fDamageStrengthMult->getFloat() * 0.1);
if(weaphashealth) if(weaphashealth)
{ {
int weapmaxhealth = weapon.get<ESM::Weapon>()->mBase->mData.mHealth; int weapmaxhealth = weapon.get<ESM::Weapon>()->mBase->mData.mHealth;
@ -1254,4 +1257,7 @@ namespace MWClass
const ESM::GameSetting *Npc::fKnockDownMult; const ESM::GameSetting *Npc::fKnockDownMult;
const ESM::GameSetting *Npc::iKnockDownOddsMult; const ESM::GameSetting *Npc::iKnockDownOddsMult;
const ESM::GameSetting *Npc::iKnockDownOddsBase; const ESM::GameSetting *Npc::iKnockDownOddsBase;
const ESM::GameSetting *Npc::fDamageStrengthBase;
const ESM::GameSetting *Npc::fDamageStrengthMult;
} }

View file

@ -36,6 +36,8 @@ namespace MWClass
static const ESM::GameSetting *fKnockDownMult; static const ESM::GameSetting *fKnockDownMult;
static const ESM::GameSetting *iKnockDownOddsMult; static const ESM::GameSetting *iKnockDownOddsMult;
static const ESM::GameSetting *iKnockDownOddsBase; static const ESM::GameSetting *iKnockDownOddsBase;
static const ESM::GameSetting *fDamageStrengthBase;
static const ESM::GameSetting *fDamageStrengthMult;
public: public: