Jump to content

Staff of Woodlands


Recommended Posts

Staff of Woodlands was usable by rangers (corrected in ToB patch), gave a +3 bonus to AC (should be set to 3), had an undispellable portrait icon for Barkskin, and was missing four save bonuses. The usability issue is fixed in a larger, generic usability patch.

 

// staff of the woodlands
COPY_EXISTING ~staf14.itm~ ~override~
 READ_LONG  0x64 "abil_off"
 READ_SHORT 0x68 "abil_num"
 READ_LONG  0x6a "fx_off"
 READ_SHORT 0x70 "fx_num"
 SET "new_fx" = 4
 WRITE_SHORT 0x70 ("%fx_num%" + "%new_fx%")
 WHILE ("%abil_num%" > 0) BEGIN
   SET "abil_num" = ("%abil_num%" - 1)
   READ_BYTE   ("%abil_off%" +        ("%abil_num%" * 0x38)) "type"
   READ_ASCII  ("%abil_off%" + 0x04 + ("%abil_num%" * 0x38)) "icon"
   READ_SHORT  ("%abil_off%" + 0x20 + ("%abil_num%" * 0x38)) "abil_fx_idx"
   WRITE_SHORT ("%abil_off%" + 0x20 + ("%abil_num%" * 0x38)) ("%abil_fx_idx%" + "%new_fx%") // adding 4 global effects
   PATCH_IF (("%type%" = 3) AND ("%icon%" STRING_COMPARE_CASE "sppr204b" = 0)) BEGIN // magical, barkskin
     READ_SHORT  ("%abil_off%" + 0x1e + ("%abil_num%" * 0x38)) "abil_fx_num"
     WHILE ("%abil_fx_num%" > 0) BEGIN
       SET "abil_fx_num" = ("%abil_fx_num%" - 1)
       READ_SHORT ("%fx_off%" +        (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) "opcode"
       PATCH_IF ("%opcode%" = 142) BEGIN // display portrait icon
         WRITE_BYTE ("%fx_off%" + 0x0d + (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) 1 // dispel/not bypass
       END
     END
   END
 END
 WHILE ("%fx_num%" > 0) BEGIN
   SET "fx_num" = ("%fx_num%" - 1)
   READ_SHORT ("%fx_off%" + ("%fx_num%" * 0x30)) "type"
   PATCH_IF ("%type%" = 0) BEGIN
     WRITE_LONG ("%fx_off%" + 0x08 + ("%fx_num%" * 0x30)) 16 // set base AC to 3
   END
 END
 WHILE ("%fx_new%" > 0) BEGIN
   SET "fx_new" = ("%fx_new%" - 1)
   INSERT_BYTES  ("%fx_insert%"       ) 0x30       // new effect
     WRITE_SHORT ("%fx_insert%"       ) ("%fx_new%" + 33) // save bonuses
     WRITE_BYTE  ("%fx_insert%" + 0x02) 1     // target:self
     WRITE_LONG  ("%fx_insert%" + 0x04) 1     // value
     WRITE_BYTE  ("%fx_insert%" + 0x0c) 2     // instant/while equipped
     WRITE_BYTE  ("%fx_insert%" + 0x0d) 2     // not dispel/not bypass
     WRITE_BYTE  ("%fx_insert%" + 0x12) 100   // probability
 END

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...