Combat AI: take the actual hit chance in account when rating weapon

fix/skillcap
Capostrophic 6 years ago committed by GitHub
parent 1c13256456
commit 382b68a081
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -103,7 +103,10 @@ namespace MWMechanics
int skill = item.getClass().getEquipmentSkill(item);
if (skill != -1)
rating *= actor.getClass().getSkill(actor, skill) / 100.f;
{
MWMechanics::SkillValue& value = actor.getClass().getSkill(actor, skill);
rating *= MWMechanics::getHitChance(actor, enemy, value) / 100.f;
}
// There is no need to apply bonus if weapon rating == 0
if (rating == 0.f)

Loading…
Cancel
Save