Merge pull request #1402 from Capostrophic/knowneffects

Allow revealing up to 8 magic effects of a potion if the player's Alchemy skill is sufficient and the potion has more than 4 effects
This commit is contained in:
scrawl 2017-08-18 19:51:06 +00:00 committed by GitHub
commit f627db6ae7

View file

@ -457,7 +457,9 @@ bool MWMechanics::Alchemy::knownEffect(unsigned int potionEffectIndex, const MWW
static const float fWortChanceValue = static const float fWortChanceValue =
MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("fWortChanceValue")->getFloat(); MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("fWortChanceValue")->getFloat();
return (potionEffectIndex <= 1 && alchemySkill >= fWortChanceValue) return (potionEffectIndex <= 1 && alchemySkill >= fWortChanceValue)
|| (potionEffectIndex <= 3 && alchemySkill >= fWortChanceValue*2); || (potionEffectIndex <= 3 && alchemySkill >= fWortChanceValue*2)
|| (potionEffectIndex <= 5 && alchemySkill >= fWortChanceValue*3)
|| (potionEffectIndex <= 7 && alchemySkill >= fWortChanceValue*4);
} }
MWMechanics::Alchemy::Result MWMechanics::Alchemy::create (const std::string& name) MWMechanics::Alchemy::Result MWMechanics::Alchemy::create (const std::string& name)