mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-31 23:15:41 +00:00
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 endurance = creatureStats.getAttribute(ESM::Attribute::Endurance).getModified();
|
||||
|
||||
double magickaFactor =
|
||||
creatureStats.getMagicEffects().get (EffectKey (ESM::MagicEffect::FortifyMaximumMagicka)).getMagnitude() * 0.1 + 1;
|
||||
float base = 1.f;
|
||||
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();
|
||||
float diff = (static_cast<int>(magickaFactor*intelligence)) - magicka.getBase();
|
||||
|
|
Loading…
Reference in a new issue