Skip to content

[(BGEE, BG2) bug] Melf's Acid Arrow portrait icon

CamDawgCamDawg Member, Developer Posts: 3,438
edited September 2012 in Fixed
Melf's Acid Arrow sets the 'acid' portrait icon, but it bypasses magic resistance unlike the rest of the spell:
// portrait icon for melf's acid arrow bypasses MR though spell itself does not
COPY_EXISTING ~spwi211.spl~ ~override~
READ_LONG 0x64 "abil_off"
READ_SHORT 0x68 "abil_num"
READ_LONG 0x6a "fx_off"
FOR (index = 0 ; index < abil_num ; index = index + 1 ) BEGIN // cycle thru abilities
WRITE_SHORT ("%abil_off%" + (0x28 * "%index%")) 1 // change to melee (lvl 1 header is ranged)
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_SHORT ("%fx_off%" + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "opcode"
PATCH_IF ("%opcode%" = 142) BEGIN
WRITE_BYTE ("%fx_off%" + 0x0d + (0x30 * ("%index2%" + "%abil_fx_idx%"))) 1 // dispel/not bypass MR
END
END
END
BUT_ONLY_IF_IT_CHANGES
Post edited by Bhryaen on

Comments

  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    Confirmed fixed.
  • BhryaenBhryaen Member Posts: 2,874
    Confirmed fixed...

    In-game I recruited IMOEN2, gave her a magic resistance 100% ring, unrecruited her, shot her to make her hostile, cast Melf's on her (both with scroll and spell in separate tests), noted her getting the "Magic Resistance" in the battle log, then CTRL-Q'd her in: no portrait icon.

    Not sure why the switch from a Ranged to a Melee Spell Ability- particularly with a Projectile = ARROWFLG.PRO- but whatever- works.
Sign In or Register to comment.