Jump to content

Potion of Storm Giant Strength mistargeted


Recommended Posts

Potion of Storm Giant Strength has the wrong target set for its strength bonus; recode from Baldurdash.

 

// Potion of Storm Giant Strength mis-targeted
COPY_EXISTING ~potn07.itm~ ~override~
 READ_LONG   0x64 "abil_off"
 READ_SHORT  0x68 "abil_num"
 READ_LONG   0x6a "fx_off"
 WHILE ("%abil_num%" > 0) BEGIN // looks for magical ability header
   SET "abil_num" = ("%abil_num%" - 1)
   READ_BYTE   ("%abil_off%" +        ("%abil_num%" * 0x38)) "type"
   PATCH_IF ("%type%" = 3) BEGIN // magical ability check
     READ_SHORT  ("%abil_off%" + 0x1e + ("%abil_num%" * 0x38)) "abil_fx_num"
     READ_SHORT  ("%abil_off%" + 0x20 + ("%abil_num%" * 0x38)) "abil_fx_idx"
     WHILE ("%abil_fx_num%" > 0) BEGIN // disables all melee effects
       SET "abil_fx_num" = ("%abil_fx_num%" - 1)
       WRITE_SHORT ("%fx_off%" + (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) "fx_type"
       PATCH_IF ("%fx_type%" = 44) BEGIN // str bonus
         WRITE_BYTE ("%fx_off%" + 0x02 + (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) 1 // target: self
       END
     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...