forked from teamnwah/openmw-tes3coop
Implement fPCbaseMagickaMult and fNPCbaseMagickaMult
This commit is contained in:
parent
c05874e1ff
commit
b39fe85a51
1 changed files with 8 additions and 2 deletions
|
@ -397,8 +397,14 @@ namespace MWMechanics
|
||||||
int agility = creatureStats.getAttribute(ESM::Attribute::Agility).getModified();
|
int agility = creatureStats.getAttribute(ESM::Attribute::Agility).getModified();
|
||||||
int endurance = creatureStats.getAttribute(ESM::Attribute::Endurance).getModified();
|
int endurance = creatureStats.getAttribute(ESM::Attribute::Endurance).getModified();
|
||||||
|
|
||||||
double magickaFactor =
|
float base = 1.f;
|
||||||
creatureStats.getMagicEffects().get (EffectKey (ESM::MagicEffect::FortifyMaximumMagicka)).getMagnitude() * 0.1 + 1;
|
if (ptr.getCellRef().getRefId() == "player")
|
||||||
|
base = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("fPCbaseMagickaMult")->getFloat();
|
||||||
|
else
|
||||||
|
base = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("fNPCbaseMagickaMult")->getFloat();
|
||||||
|
|
||||||
|
double magickaFactor = base +
|
||||||
|
creatureStats.getMagicEffects().get (EffectKey (ESM::MagicEffect::FortifyMaximumMagicka)).getMagnitude() * 0.1;
|
||||||
|
|
||||||
DynamicStat<float> magicka = creatureStats.getMagicka();
|
DynamicStat<float> magicka = creatureStats.getMagicka();
|
||||||
float diff = (static_cast<int>(magickaFactor*intelligence)) - magicka.getBase();
|
float diff = (static_cast<int>(magickaFactor*intelligence)) - magicka.getBase();
|
||||||
|
|
Loading…
Reference in a new issue