forked from mirror/openmw-tes3mp
Revert condition changes
This commit is contained in:
parent
dab72b45db
commit
9fe5a4d236
1 changed files with 7 additions and 5 deletions
|
@ -126,10 +126,7 @@ namespace MWMechanics
|
||||||
float castChance = calcSpellBaseSuccessChance(spell, actor, effectiveSchool) + castBonus;
|
float castChance = calcSpellBaseSuccessChance(spell, actor, effectiveSchool) + castBonus;
|
||||||
castChance *= stats.getFatigueTerm();
|
castChance *= stats.getFatigueTerm();
|
||||||
|
|
||||||
if (godmode)
|
if (stats.getMagicEffects().get(ESM::MagicEffect::Silence).getMagnitude()&& !godmode)
|
||||||
return 100;
|
|
||||||
|
|
||||||
if (stats.getMagicEffects().get(ESM::MagicEffect::Silence).getMagnitude())
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (spell->mData.mType == ESM::Spell::ST_Power)
|
if (spell->mData.mType == ESM::Spell::ST_Power)
|
||||||
|
@ -138,12 +135,17 @@ namespace MWMechanics
|
||||||
if (spell->mData.mType != ESM::Spell::ST_Spell)
|
if (spell->mData.mType != ESM::Spell::ST_Spell)
|
||||||
return 100;
|
return 100;
|
||||||
|
|
||||||
if (stats.getMagicka().getCurrent() < spell->mData.mCost)
|
if (stats.getMagicka().getCurrent() < spell->mData.mCost && !godmode)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (spell->mData.mFlags & ESM::Spell::F_Always)
|
if (spell->mData.mFlags & ESM::Spell::F_Always)
|
||||||
return 100;
|
return 100;
|
||||||
|
|
||||||
|
if (godmode)
|
||||||
|
{
|
||||||
|
return 100;
|
||||||
|
}
|
||||||
|
|
||||||
if (!cap)
|
if (!cap)
|
||||||
return std::max(0.f, castChance);
|
return std::max(0.f, castChance);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue