Jump to content

Helm of Brilliance


CamDawg

Recommended Posts

Another bug from BD, though I'm using devSin's solution here. Helm of Brilliance's Sunray ability is mistargeted; BD reports this as an MR bug. It does not bypass MR since it's targeted at Preset Target rather than Self, which is what Daystar does with its Sunray ability.

 

  
// Helm of Brilliance Sunray fix
COPY_EXISTING ~helm16.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 // searches through fx for THAC0 bonus
       SET "abil_fx_num" = ("%abil_fx_num%" - 1)
       READ_SHORT ("%fx_off%" +        (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) "type1"
       READ_ASCII ("%fx_off%" + 0x14 + (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) "spell"
       PATCH_IF (("%spell%" STRING_COMPARE_CASE "sppr707" = 0) AND ("%type1%" = 146)) BEGIN // cast spell, sppr707
         WRITE_SHORT ("%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...