mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 12:35:46 +00:00
Use the actual damage for deducting weapon rating
This commit is contained in:
parent
bec47dfb7c
commit
9d85b7c2d3
@ -50,20 +50,27 @@ namespace MWMechanics
|
||||
|
||||
if (weapon->mData.mType >= ESM::Weapon::MarksmanBow)
|
||||
{
|
||||
rating = (weapon->mData.mChop[0] + weapon->mData.mChop[1]) / 2.f;
|
||||
float rangedDamage = weapon->mData.mChop[0] + weapon->mData.mChop[1];
|
||||
MWMechanics::adjustWeaponDamage(rangedDamage, item, actor);
|
||||
|
||||
rating = rangedDamage / 2.f;
|
||||
|
||||
if (weapon->mData.mType >= ESM::Weapon::MarksmanThrown)
|
||||
MWMechanics::resistNormalWeapon(enemy, actor, item, rating);
|
||||
}
|
||||
else
|
||||
{
|
||||
float meleeDamage = 0.f;
|
||||
|
||||
for (int i=0; i<2; ++i)
|
||||
{
|
||||
rating += weapon->mData.mSlash[i];
|
||||
rating += weapon->mData.mThrust[i];
|
||||
rating += weapon->mData.mChop[i];
|
||||
meleeDamage += weapon->mData.mSlash[i];
|
||||
meleeDamage += weapon->mData.mThrust[i];
|
||||
meleeDamage += weapon->mData.mChop[i];
|
||||
}
|
||||
rating /= 6.f;
|
||||
|
||||
MWMechanics::adjustWeaponDamage(meleeDamage, item, actor);
|
||||
rating = meleeDamage / 6.f;
|
||||
|
||||
MWMechanics::resistNormalWeapon(enemy, actor, item, rating);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user