Jump to content

Spell Deflection protect against AOE spells?


Recommended Posts

The code is here.  At the beginning, it makes an array with a list of spells that are AoE enemy-effecting spells, and require this treatment.  Then, in  lines 498-563, it applies the NWN-style Deflection code to the spells in that array.  Basically, instead of each AoE spell having a projectile and transmitting its effects through that projectile, it creates a subspell with the original spell's effects; and the projectile only carries a single opcode 146 effect, which causes each target to cast a personal spell on themselves with the original spell's effects.

So instead of a Fireball doing fire damage to everyone in its radius, the Fireball will now cause everyone in its radius to be hit by their own personal, tiny Fireball.  This tiny personal spell is blocked by Spell Deflection, and burns off some of the Deflection's layers of protection.

I applied this to several other mods, including IWDification - you can see how I did that over here.  See e.g. line 357, adding Snowball Swarm to an array; and then lines 2601 through 2679, which applies the NWN-style Deflection code if the relevant component of SR has already bee installed.

(As far as I'm concerned, feel free to copy and paste that and use it in your own mods, if it makes it easier for you.)

Edited by subtledoctor
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...