[(BGEE, BG2) Bug] Miscast magic portrait icons
Currently, various spells will cause a chance for spells to fail but do not show a portrait icon to indicate this effect. This patch will add the miscast magic icon to these spells:
// miscast effects not accompanied by miscast icon
COPY_EXISTING ~spcl132.spl~ ~override~ // 25%, wrong icon (spell failure)
LAUNCH_PATCH_FUNCTION ~DELETE_SPELL_EFFECT~ INT_VAR
opcode_to_delete = "142" // delete existing portrait icons
END
LAUNCH_PATCH_FUNCTION ~ADD_SPELL_EFFECT~ INT_VAR
opcode = 142 // display portrait icon
target = 2 // preset target
resist_dispel = 2 // not dispel/bypass MR
duration = 90 // duration
parameter2 = 105 // icon: miscast magic
END
BUT_ONLY
// miscast effects not accompanied by miscast icon
COPY_EXISTING ~sppr310.spl~ ~override~ // 80%, no icon
LAUNCH_PATCH_FUNCTION ~ADD_SPELL_EFFECT~ INT_VAR
opcode = 142 // display portrait icon
target = 2 // preset target
resist_dispel = 1 // dispel/not bypass MR
duration = 60 // duration
power = 3 // power
parameter2 = 105 // icon: miscast magic
savingthrow = 1 // save vs spells
savebonus = 0xfffffffe // save at -2
END
BUT_ONLY
// miscast effects not accompanied by miscast icon
COPY_EXISTING ~sppr319.spl~ ~override~ // 80%, no icon
LAUNCH_PATCH_FUNCTION ~ADD_SPELL_EFFECT~ INT_VAR
opcode = 142 // display portrait icon
target = 2 // preset target
resist_dispel = 1 // dispel/not bypass MR
duration = 42 // duration
power = 3 // power
parameter2 = 105 // icon: miscast magic
savingthrow = 2 // save vs breath
savebonus = 0xfffffffc // save at -4
END
BUT_ONLY
// miscast effects not accompanied by miscast icon
COPY_EXISTING ~sppr986.spl~ ~override~ // 80%, no icon
READ_SHORT 0x68 "abil_num"
LAUNCH_PATCH_FUNCTION ~ADD_SPELL_EFFECT~ INT_VAR
opcode = 142 // display portrait icon
target = 2 // preset target
resist_dispel = 1 // dispel/not bypass MR
duration = 100 // duration
power = 3 // power
parameter2 = 105 // icon: miscast magic
savingthrow = 1 // save vs spells
savebonus = 0xfffffffe // save at -2
END
BUT_ONLY
Post edited by Bhryaen on
2
Comments
I mean I'll add this.
SPCL132- Icon changed from Spell failure (83) to Miscast magic (105).
SPPR310- Display portrait icon (Miscast magic (105) added to effects.
SPPR319- Display portrait icon (Miscast magic (105) added to effects.
SPPR986- Display portrait icon (Miscast magic (105) added to effects.