diff --git a/apps/openmw/mwmechanics/spellpriority.cpp b/apps/openmw/mwmechanics/spellpriority.cpp index 3b242266c24..a0822bf20a7 100644 --- a/apps/openmw/mwmechanics/spellpriority.cpp +++ b/apps/openmw/mwmechanics/spellpriority.cpp @@ -171,7 +171,7 @@ namespace MWMechanics float rating = rateEffects(enchantment->mEffects, actor, enemy); - rating *= 2; // prefer rechargable magic items over spells + rating *= 1.25f; // prefer rechargable magic items over spells return rating; } diff --git a/apps/openmw/mwmechanics/weaponpriority.cpp b/apps/openmw/mwmechanics/weaponpriority.cpp index 55fb2eaf095..2e56dc45e93 100644 --- a/apps/openmw/mwmechanics/weaponpriority.cpp +++ b/apps/openmw/mwmechanics/weaponpriority.cpp @@ -125,7 +125,9 @@ namespace MWMechanics value = ref->mBase->mData.mCombat; } - rating *= getHitChance(actor, enemy, value) / 100.f; + // Take hit chance in account, but do not allow rating become negative. + float chance = getHitChance(actor, enemy, value) / 100.f; + rating *= std::min(1.f, std::max(0.01f, chance)); if (weapon->mData.mType < ESM::Weapon::Arrow) rating *= weapon->mData.mSpeed;