Hm, yeah I saw that argonians use that perk, I figured that was an error. Anyway you have to apply two effects, one for HealRate - as otherwise the effect would only work outside of combat - and, of course, CombatHealthRegenMult.
Yes, the player has differant (non-zero) values for these multipliers.
About the script, lets see ...
Well, first you should give u2 a proper name, I only named it that because I wasn't using, so I marked it
unused.
Second, yes, but I would write it something like this:
if (IsCooling || target.IsDead()) returnendifSpell spellSource = source as Spellif (spellSource && spellSource.IsHostile()) returnendif
Like this because, it allows for consistency for all scripts in your mod. You see, spotting a possible error becomes almost trivial once you have a pattern to follow. Any deviation from a - verified to be working - pattern would look suspicious.
Besides the first if-statement is universally required, so why not put it first?
Diseases: The IsHostile way might not work. Because disease-magic-effects don't have the hostile-flag set - only the detrimental-flag. So it could be that IsHostile doesn't return true, besides this would also prevent the power triggering from any and all destruction spells.
But there aren't many diseases so it's easy to check for them.
Just create a FormList, lets name it modDiseases and add every disease spell. This allows for a simple is spell in list check:
FormList property modDiseases auto; ...Spell spellSource = source as Spellif (spellSource && modDiseases.HasForm(spellSource)) returnendif
Poisons: This seems harder than diseases. Sigh, BGS did really under utilize the keyword system. Anyway, poisons usually don't originate from Spell's but rather from potions, so I expect that the source (or u2) parameter is either that, a Potion or a MagicEffect or in the worst case scenario it could be none.
Lets leave the
none case aside, because there isn't anything that could be done.
So, assuming poisons originate from potions:
Potion potionSource = source as Potionif (potionSource && potionSource.IsHostile()) returnendif
This should work, because all the AlchDamage* effects have the hostile-flag set.
If poisons are MagicEffect's, than there is no IsHostile function to be called, but there are keywords. The keyword MagicAlchHarmful should do the trick. And the code becomes:
Keyword property MagicAlchHarmful auto; ...MagicEffect magicSource = source as MagicEffectif (magicSource && magicSource.HasKeyword(MagicAlchHarmful)) returnendif