|
|
@ -274,7 +274,9 @@ short MagicEffect::getResistanceEffect(short effect)
|
|
|
|
// Source https://wiki.openmw.org/index.php?title=Research:Magic#Effect_attribute
|
|
|
|
// Source https://wiki.openmw.org/index.php?title=Research:Magic#Effect_attribute
|
|
|
|
|
|
|
|
|
|
|
|
// <Effect, Effect providing resistance against first effect>
|
|
|
|
// <Effect, Effect providing resistance against first effect>
|
|
|
|
std::map<short, short> effects;
|
|
|
|
static std::map<short, short> effects;
|
|
|
|
|
|
|
|
if (effects.empty())
|
|
|
|
|
|
|
|
{
|
|
|
|
effects[DisintegrateArmor] = Sanctuary;
|
|
|
|
effects[DisintegrateArmor] = Sanctuary;
|
|
|
|
effects[DisintegrateWeapon] = Sanctuary;
|
|
|
|
effects[DisintegrateWeapon] = Sanctuary;
|
|
|
|
|
|
|
|
|
|
|
@ -310,6 +312,7 @@ short MagicEffect::getResistanceEffect(short effect)
|
|
|
|
effects[Corprus] = ResistCorprusDisease;
|
|
|
|
effects[Corprus] = ResistCorprusDisease;
|
|
|
|
effects[Poison] = ResistPoison;
|
|
|
|
effects[Poison] = ResistPoison;
|
|
|
|
effects[Paralyze] = ResistParalysis;
|
|
|
|
effects[Paralyze] = ResistParalysis;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (effects.find(effect) != effects.end())
|
|
|
|
if (effects.find(effect) != effects.end())
|
|
|
|
return effects[effect];
|
|
|
|
return effects[effect];
|
|
|
@ -319,8 +322,9 @@ short MagicEffect::getResistanceEffect(short effect)
|
|
|
|
|
|
|
|
|
|
|
|
short MagicEffect::getWeaknessEffect(short effect)
|
|
|
|
short MagicEffect::getWeaknessEffect(short effect)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::map<short, short> effects;
|
|
|
|
static std::map<short, short> effects;
|
|
|
|
|
|
|
|
if (effects.empty())
|
|
|
|
|
|
|
|
{
|
|
|
|
for (int i=0; i<5; ++i)
|
|
|
|
for (int i=0; i<5; ++i)
|
|
|
|
effects[DrainAttribute+i] = WeaknessToMagicka;
|
|
|
|
effects[DrainAttribute+i] = WeaknessToMagicka;
|
|
|
|
for (int i=0; i<5; ++i)
|
|
|
|
for (int i=0; i<5; ++i)
|
|
|
@ -354,6 +358,7 @@ short MagicEffect::getWeaknessEffect(short effect)
|
|
|
|
effects[Poison] = WeaknessToPoison;
|
|
|
|
effects[Poison] = WeaknessToPoison;
|
|
|
|
|
|
|
|
|
|
|
|
effects[Paralyze] = -1;
|
|
|
|
effects[Paralyze] = -1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (effects.find(effect) != effects.end())
|
|
|
|
if (effects.find(effect) != effects.end())
|
|
|
|
return effects[effect];
|
|
|
|
return effects[effect];
|
|
|
|