Skip to content

[(BG2) bug] Darts of stunning

CamDawgCamDawg Member, Developer Posts: 3,438
edited November 2012 in Fixed
Darts of stunning (dart03) cause the Held portrait icon instead of the Stun icon.
// various items stun but use held icon
COPY_EXISTING ~dart03.itm~ ~override~
READ_LONG 0x64 "abil_off" ELSE 0
READ_SHORT 0x68 "abil_num" ELSE 0
READ_LONG 0x6a "fx_off" ELSE 0
SET "abil_length" = 0x38
FOR (index = 0 ; index < abil_num ; index = index + 1) BEGIN // start iterating through abilities
READ_SHORT ("%abil_off%" + 0x1e + ("%abil_length%" * "%index%")) "abil_fx_num"
READ_SHORT ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) "abil_fx_idx"
FOR (index2 = 0 ; index2 < abil_fx_num ; index2 = index2 + 1) BEGIN
READ_SHORT ("%fx_off%" + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "opcode"
READ_LONG ("%fx_off%" + 0x08 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "icon"
PATCH_IF (("%opcode%" = 142) AND ("%icon%" = 13)) BEGIN // display 'held' icon
WRITE_LONG ("%fx_off%" + 0x08 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 55 // stun
END
END
END
BUT_ONLY_IF_IT_CHANGES
Post edited by Tanthalas on

Comments

  • CamDawgCamDawg Member, Developer Posts: 3,438
    And let's go ahead and add battle text for the darts of stunning as well:
    // add battle text for darts of stunning
    COPY_EXISTING dart03.itm override
    LPF ADD_ITEM_EFFECT INT_VAR
    opcode = 139 // display string
    target = 2 // preset target
    parameter1 = 26050 // stunned
    timing = 1 // instant/perm
    resist_dispel = 1 // no dispel, resist
    savingthrow = 1 // save vs spells
    type = 2 // add to ranged headers
    END
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    Confirmed fixed.
Sign In or Register to comment.