|
|
|
@ -176,23 +176,25 @@ namespace MWMechanics
|
|
|
|
|
int magMax = (it->mMagnMax == 0) ? 1 : it->mMagnMax;
|
|
|
|
|
int area = (it->mArea == 0) ? 1 : it->mArea;
|
|
|
|
|
|
|
|
|
|
float magnitudeCost = 0;
|
|
|
|
|
float magnitudeCost = (magMin + magMax) * baseCost * 0.05;
|
|
|
|
|
if (mCastStyle == ESM::Enchantment::ConstantEffect)
|
|
|
|
|
{
|
|
|
|
|
magnitudeCost = (magMin + magMax) * baseCost * 2.5;
|
|
|
|
|
magnitudeCost *= store.get<ESM::GameSetting>().find("fEnchantmentConstantDurationMult")->getFloat();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
magnitudeCost = (magMin + magMax) * it->mDuration * baseCost * 0.025;
|
|
|
|
|
magnitudeCost *= it->mDuration;
|
|
|
|
|
if(it->mRange == ESM::RT_Target)
|
|
|
|
|
magnitudeCost *= 1.5;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
float areaCost = area * 0.025 * baseCost;
|
|
|
|
|
float areaCost = area * 0.05 * baseCost;
|
|
|
|
|
if (it->mRange == ESM::RT_Target)
|
|
|
|
|
areaCost *= 1.5;
|
|
|
|
|
|
|
|
|
|
enchantmentCost += (magnitudeCost + areaCost) * effectsLeftCnt;
|
|
|
|
|
const float fEffectCostMult = store.get<ESM::GameSetting>().find("fEffectCostMult")->getFloat();
|
|
|
|
|
|
|
|
|
|
enchantmentCost += (magnitudeCost + areaCost) * fEffectCostMult * effectsLeftCnt;
|
|
|
|
|
--effectsLeftCnt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|