Increase priority of Bound and Summon spells

update_gitlab_rules
Evil Eye 1 year ago
parent cc5f20d66a
commit ad76b0374a

@ -1,6 +1,7 @@
0.49.0
------
Bug #2623: Snowy Granius doesn't prioritize conjuration spells
Bug #3842: Body part skeletons override the main skeleton
Bug #4127: Weapon animation looks choppy
Bug #4204: Dead slaughterfish doesn't float to water surface after loading saved game

@ -588,14 +588,26 @@ namespace MWMechanics
if (!creatureStats.getSummonedCreatureMap().empty())
return 0.f;
// But rate summons higher than other effects
rating = 3.f;
}
if (effect.mEffectID >= ESM::MagicEffect::BoundDagger && effect.mEffectID <= ESM::MagicEffect::BoundGloves)
{
// While rateSpell prevents actors from recasting the same spell, it doesn't prevent them from casting
// different spells with the same effect. Multiple instances of the same bound item don't stack so if the
// effect is already active, rate it as useless.
if (actor.getClass().getCreatureStats(actor).getMagicEffects().get(effect.mEffectID).getMagnitude() > 0.f)
// effect is already active, rate it as useless. Likewise, if the actor already has a bound weapon, don't
// summon another of a different kind.
if (effect.mEffectID <= ESM::MagicEffect::BoundLongbow)
{
for (int e = ESM::MagicEffect::BoundDagger; e <= ESM::MagicEffect::BoundLongbow; ++e)
if (actor.getClass().getCreatureStats(actor).getMagicEffects().get(e).getMagnitude() > 0.f)
return 0.f;
}
else if (actor.getClass().getCreatureStats(actor).getMagicEffects().get(effect.mEffectID).getMagnitude()
> 0.f)
return 0.f;
// Prefer casting bound items over other spells
rating = 2.f;
}
// Underwater casting not possible

Loading…
Cancel
Save