Jump to content

Chromatic Orb fixes


CamDawg

Recommended Posts

Some of the Chromatic Orb effects were mistargeted or bypassing MR erroneously. This fixes both the Avenger and standard mage versions.

 

// chromatic orb has a few incorrect targets and MR checks
COPY_EXISTING ~spdr101.spl~ ~override~ // chromatic orb, stalker version
             ~spwi118.spl~ ~override~ // chromatic orb, wiz version
 READ_LONG  0x64 "abil_off"
 READ_SHORT 0x68 "abil_num"
 READ_LONG  0x6a "fx_off"
 WHILE ("%abil_num%" > 0) BEGIN
   SET "abil_num" = ("%abil_num%" - 1)
   READ_SHORT ("%abil_off%" + 0x10 + (0x28 * "%abil_num%")) "min_lev"
   PATCH_IF (("%min_lev%" = 1) OR ("%min_lev%" = 10) OR ("%min_lev%" = 12)) BEGIN
     READ_SHORT ("%abil_off%" + 0x1e + (0x28 * "%abil_num%")) "fx_num"
     READ_SHORT ("%abil_off%" + 0x20 + (0x28 * "%abil_num%")) "fx_idx"
     WHILE ("%fx_num%" > 0) BEGIN
       SET "fx_num" = ("%fx_num%" - 1)
       READ_SHORT ("%fx_off%" + 0x0d + (0x30 * ("%fx_idx%" + "%fx_num%"))) "opcode"
       PATCH_IF ("%opcode%" = 0) BEGIN // armor class penalty
         WRITE_BYTE ("%fx_off%" + 0x02 + (0x30 * ("%fx_idx%" + "%fx_num%"))) 2 // target: preset target
       END ELSE
       PATCH_IF (("%opcode%" = 139) OR ("%opcode%" = 142)) BEGIN // display portrait icon or display string
         WRITE_BYTE ("%fx_off%" + 0x0d + (0x30 * ("%fx_idx%" + "%fx_num%"))) 1 // dispel/not bypass
       END ELSE
       PATCH_IF ("%opcode%" = 55) BEGIN // slay
         WRITE_BYTE ("%fx_off%" + 0x02 + (0x30 * ("%fx_idx%" + "%fx_num%"))) 2 // not dispel/not bypass
       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...