From a7b217def22d6bf1c35afd5dde36ceb18000a6eb Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 7 Feb 2016 01:27:40 +0100 Subject: [PATCH] AI: don't cast fortify effects (Fixes #3184) --- apps/openmw/mwmechanics/aicombataction.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/openmw/mwmechanics/aicombataction.cpp b/apps/openmw/mwmechanics/aicombataction.cpp index cf0d2532b..cee2aae9c 100644 --- a/apps/openmw/mwmechanics/aicombataction.cpp +++ b/apps/openmw/mwmechanics/aicombataction.cpp @@ -275,6 +275,15 @@ namespace MWMechanics case ESM::MagicEffect::ResistShock: return 0.f; // probably useless since we don't know in advance what the enemy will cast + // don't cast these for now as they would make the NPC cast the same effect over and over again, especially when they have potions + case ESM::MagicEffect::FortifyAttribute: + case ESM::MagicEffect::FortifyHealth: + case ESM::MagicEffect::FortifyMagicka: + case ESM::MagicEffect::FortifyFatigue: + case ESM::MagicEffect::FortifySkill: + case ESM::MagicEffect::FortifyMaximumMagicka: + return 0.f; + case ESM::MagicEffect::Feather: if (actor.getClass().getEncumbrance(actor) - actor.getClass().getCapacity(actor) >= 0) return 100.f;