Jump to content

Protection from Evil (wizard version)


Recommended Posts

The durations for this spell are messed up big time. It's four more than it should be at level 7, 12 more than it should be at levels 10-12, 16 more than it should be at level 13, and 20 more than it should be at levels 14-20.

 

 

The priest version of the spell is fine in this regards.

Link to comment
// duration for protection from evil wrong at many levels
COPY_EXISTING ~spwi113.spl~ ~override~
 READ_LONG  0x64 "abil_off" ELSE 0
 READ_SHORT 0x68 "abil_num" ELSE 0
 READ_LONG  0x6a "fx_off"   ELSE 0
 FOR (index = 0; index < abil_num; index = index + 1) BEGIN
READ_SHORT ("%abil_off%" + 0x10 + (0x28 * "%index%")) "min_lev"
READ_SHORT ("%abil_off%" + 0x1e + (0x28 * "%index%")) "abil_fx_num"
READ_SHORT ("%abil_off%" + 0x20 + (0x28 * "%index%")) "abil_fx_idx"
FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN
  READ_LONG ("%fx_off%" + 0x0e + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "duration"
  PATCH_IF ("%duration%" > 5) BEGIN // filter out brief and/or instant effects like playing sounds and animations
	WRITE_LONG ("%fx_off%" + 0x0e + (0x30 * ("%abil_fx_idx%" + "%index2%"))) ("%min_lev%" * 12)
  END
END
 END
 BUT_ONLY_IF_IT_CHANGES

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...