Jump to content

Using a script to make an actor completely immune to a specific spell.


Sukid

Recommended Posts

I'm kind of a newbie, getting my feet wet with something a little odd. I've been trying to make a necromancy perk that makes your reanimated undead immune to Turn Undead. Not that many enemies seem to have turn undead in vanilla but using ASIS like every single magic using enemy has it. The ability is a constant effect on the caster so hopefully it won't get stripped from the zombie when you change cells.

 

Is there a function that makes a target completely immune to a certain spell or magic effect based on either IDs or keywords?

 

At the moment I'm just using the script to add a spell that gives a 100% absorb chance with a ton of IsSpellTarget conditions for all the turn undead spells and enchantments.

Scriptname SuConjEx_NecroMancersWill extends activemagiceffect  
{This spell is applied when the perk "Necromancer's Will" is taken.
All reanimated minions will have an ability applied to them that makes them resist Turn Undead and similar effects.}

ReferenceAlias Property UndeadAlias auto
Spell Property suconjex_NecroWillZombie auto

Actor MyUndead Float
If UndeadAlias.GetRef() =! None
       MyUndead = (UndeadAlias.GetRef() as Actor)
       If MyUndead.HasSpell(suconjex_NecroWillZombie) = False
           MyUndead.AddSpell(suconjex_NecroWillZombie, false)
           Debug.Notification("Turning Resistence applied to your minion.")
       Else
           Debug.Notification("Your minion already resists turning.")
       End If
   End If

 

Also it doesn't work. But is there a better way of doing that or is adding the spell the way to go?

Edited by Sukid
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...