mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-28 21:06:41 +00:00
Account for enemy armor rating in weapon rating
This commit is contained in:
parent
fa3e45fa7d
commit
e66be02e2e
1 changed files with 8 additions and 2 deletions
|
@ -97,8 +97,11 @@ namespace MWMechanics
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (weapon->mData.mType <= ESM::Weapon::MarksmanThrown)
|
if (enemy.getClass().isNpc())
|
||||||
rating *= weapon->mData.mSpeed;
|
{
|
||||||
|
static const float fCombatArmorMinMult = gmst.find("fCombatArmorMinMult")->mValue.getFloat();
|
||||||
|
rating *= std::max(fCombatArmorMinMult, rating / (rating + enemy.getClass().getArmorRating(enemy)));
|
||||||
|
}
|
||||||
|
|
||||||
int value = 50.f;
|
int value = 50.f;
|
||||||
if (actor.getClass().isNpc())
|
if (actor.getClass().isNpc())
|
||||||
|
@ -115,6 +118,9 @@ namespace MWMechanics
|
||||||
|
|
||||||
rating *= getHitChance(actor, enemy, value) / 100.f;
|
rating *= getHitChance(actor, enemy, value) / 100.f;
|
||||||
|
|
||||||
|
if (weapon->mData.mType <= ESM::Weapon::MarksmanThrown)
|
||||||
|
rating *= weapon->mData.mSpeed;
|
||||||
|
|
||||||
return rating * rangedMult;
|
return rating * rangedMult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue