|
|
|
@ -121,6 +121,11 @@ namespace MWMechanics
|
|
|
|
|
|
|
|
|
|
CreatureStats& stats = actor.getClass().getCreatureStats(actor);
|
|
|
|
|
|
|
|
|
|
float castBonus = -stats.getMagicEffects().get(ESM::MagicEffect::Sound).getMagnitude();
|
|
|
|
|
|
|
|
|
|
float castChance = calcSpellBaseSuccessChance(spell, actor, effectiveSchool) + castBonus;
|
|
|
|
|
castChance *= stats.getFatigueTerm();
|
|
|
|
|
|
|
|
|
|
if (stats.getMagicEffects().get(ESM::MagicEffect::Silence).getMagnitude()&& !godmode)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
@ -138,11 +143,6 @@ namespace MWMechanics
|
|
|
|
|
return 100;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
float castBonus = -stats.getMagicEffects().get(ESM::MagicEffect::Sound).getMagnitude();
|
|
|
|
|
|
|
|
|
|
float castChance = calcSpellBaseSuccessChance(spell, actor, effectiveSchool) + castBonus;
|
|
|
|
|
castChance *= stats.getFatigueTerm();
|
|
|
|
|
|
|
|
|
|
if (!cap)
|
|
|
|
|
return std::max(0.f, castChance);
|
|
|
|
|
else
|
|
|
|
|