Jump to content

Wish: TS/Imp Alacrity combo spell


Recommended Posts

The Improved Alacrity/TS result from Wish uses the wrong opcode for IA; it reduces casting time instead of removing the pause between casting. This also disables an extraneous display string effect.

 

// time stop/imp alacrity from wish has wrong opcode for IA
COPY_EXISTING ~spwish17.spl~ ~override~
 PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN // protects against invalid files
   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%" + (0x28 * "%abil_num%")) "type"
     PATCH_IF ("%type%" = 1) BEGIN // if melee
       READ_SHORT ("%abil_off%" + 0x1e + (0x28 * "%abil_num%")) "abil_fx_num"
       READ_SHORT ("%abil_off%" + 0x20 + (0x28 * "%abil_num%")) "abil_fx_idx"
       WHILE ("%abil_fx_num%" > 0) BEGIN
         SET "abil_fx_num" = ("%abil_fx_num%" - 1)
         READ_SHORT ("%fx_off%" + (0x30 * ("%abil_fx_idx%" + "%abil_fx_num%"))) "opcode"
         PATCH_IF ("%opcode%" = 189) BEGIN // increase casting speed
           WRITE_SHORT ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%abil_fx_num%"))) 188 // increase spells/round
           WRITE_SHORT ("%fx_off%" + 0x04 + (0x30 * ("%abil_fx_idx%" + "%abil_fx_num%"))) 0   // unlimited
         END ELSE
         PATCH_IF ("%opcode%" = 139) BEGIN // increase casting speed
           WRITE_BYTE  ("%fx_off%" + 0x12 + (0x30 * ("%abil_fx_idx%" + "%abil_fx_num%"))) 0   // probability: 0
         END ELSE
       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...