mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-23 07:41:36 +00:00
Increase priority of Bound and Summon spells
This commit is contained in:
parent
cc5f20d66a
commit
ad76b0374a
2 changed files with 15 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
0.49.0
|
0.49.0
|
||||||
------
|
------
|
||||||
|
|
||||||
|
Bug #2623: Snowy Granius doesn't prioritize conjuration spells
|
||||||
Bug #3842: Body part skeletons override the main skeleton
|
Bug #3842: Body part skeletons override the main skeleton
|
||||||
Bug #4127: Weapon animation looks choppy
|
Bug #4127: Weapon animation looks choppy
|
||||||
Bug #4204: Dead slaughterfish doesn't float to water surface after loading saved game
|
Bug #4204: Dead slaughterfish doesn't float to water surface after loading saved game
|
||||||
|
|
|
@ -588,14 +588,26 @@ namespace MWMechanics
|
||||||
|
|
||||||
if (!creatureStats.getSummonedCreatureMap().empty())
|
if (!creatureStats.getSummonedCreatureMap().empty())
|
||||||
return 0.f;
|
return 0.f;
|
||||||
|
// But rate summons higher than other effects
|
||||||
|
rating = 3.f;
|
||||||
}
|
}
|
||||||
if (effect.mEffectID >= ESM::MagicEffect::BoundDagger && effect.mEffectID <= ESM::MagicEffect::BoundGloves)
|
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
|
// 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
|
// 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.
|
// effect is already active, rate it as useless. Likewise, if the actor already has a bound weapon, don't
|
||||||
if (actor.getClass().getCreatureStats(actor).getMagicEffects().get(effect.mEffectID).getMagnitude() > 0.f)
|
// 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;
|
return 0.f;
|
||||||
|
// Prefer casting bound items over other spells
|
||||||
|
rating = 2.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Underwater casting not possible
|
// Underwater casting not possible
|
||||||
|
|
Loading…
Reference in a new issue