[(BG2) bug] Protection from evil
The duration for the spell at various levels (earliest at 7) is incorrect as it should last 2 rds/level, per the descript.
// 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
Post edited by Tanthalas on
0
Comments
@CamDawg the glow effects on level 1 don't match the rest of the levels. (level 1 header has one less effect than the rest).
Level 7 -> 84 sec -> 14 rounds
Level 8 -> 96 sec -> 16 rounds
Level 9 -> 108 sec -> 18 rounds
Level 10 -> 120 sec -> 20 rounds
So it's only a matter of giving it the correct strings now.