Jump to content

Blackrazor fixes


Recommended Posts

Blackrazor is missing many, many effects. This adds 11 effects (6 global) and fixes two of the existing ones.

 

// blackrazor missing many effects
COPY_EXISTING ~miscbc.itm~ ~override~
 READ_LONG   0x64 "abil_off"
 READ_SHORT  0x68 "abil_num"
 READ_LONG   0x6a "fx_off"
 WRITE_LONG  0x6a ("%fx_off%" + 6)
 SET "patched" = 0
 WHILE ("%abil_num%" > 0) BEGIN // looks for magical ability header
   SET "abil_num" = ("%abil_num%" - 1)
   READ_BYTE ("%abil_off%" + ("%abil_num%" * 0x38)) "type"
   READ_SHORT  ("%abil_off%" + 0x20 + ("%abil_num%" * 0x38)) "abil_fx_idx"
   PATCH_IF ("%type%" = 1) BEGIN // melee ability check
     READ_SHORT  ("%abil_off%" + 0x1e + ("%abil_num%" * 0x38)) "abil_fx_num"
     WRITE_SHORT ("%abil_off%" + 0x1e + ("%abil_num%" * 0x38)) ("%abil_fx_num%" +  5)
     WHILE ("%abil_fx_num%" > 0) BEGIN // searches through fx for str bonus
       SET "abil_fx_num" = ("%abil_fx_num%" - 1)
       READ_SHORT ("%fx_off%" +        (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) "type1"
       PATCH_IF ("%type1%" = 44) BEGIN // str bonus
         WRITE_BYTE ("%fx_off%" + 0x12 + (("%abil_fx_idx%" + "%abil_fx_num%") * 0x30)) 15 // probability
       END
     END
     INSERT_BYTES  ("%fx_off%" +        ("%abil_fx_idx%" * 0x30)) 0x30 // new effect
       WRITE_SHORT ("%fx_off%" +        ("%abil_fx_idx%" * 0x30)) 142  // display icon
       WRITE_BYTE  ("%fx_off%" + 0x02 + ("%abil_fx_idx%" * 0x30)) 1    // target: self
       WRITE_LONG  ("%fx_off%" + 0x08 + ("%abil_fx_idx%" * 0x30)) 21   // strength
       WRITE_BYTE  ("%fx_off%" + 0x0d + ("%abil_fx_idx%" * 0x30)) 2    // no dispel/not bypass
       WRITE_LONG  ("%fx_off%" + 0x0e + ("%abil_fx_idx%" * 0x30)) 20   // duration
       WRITE_BYTE  ("%fx_off%" + 0x12 + ("%abil_fx_idx%" * 0x30)) 15   // probability
     INSERT_BYTES  ("%fx_off%" +        ("%abil_fx_idx%" * 0x30)) 0x30 // new effect
       WRITE_SHORT ("%fx_off%" +        ("%abil_fx_idx%" * 0x30)) 139  // display string
       WRITE_BYTE  ("%fx_off%" + 0x02 + ("%abil_fx_idx%" * 0x30)) 1    // target: self
       WRITE_LONG  ("%fx_off%" + 0x04 + ("%abil_fx_idx%" * 0x30)) 14022 // strref "healed"
       WRITE_BYTE  ("%fx_off%" + 0x0c + ("%abil_fx_idx%" * 0x30)) 1    // instant/perm
       WRITE_BYTE  ("%fx_off%" + 0x0d + ("%abil_fx_idx%" * 0x30)) 2    // no dispel/not bypass
       WRITE_BYTE  ("%fx_off%" + 0x12 + ("%abil_fx_idx%" * 0x30)) 15   // probability
     INSERT_BYTES  ("%fx_off%" +        ("%abil_fx_idx%" * 0x30)) 0x30 // new effect
       WRITE_SHORT ("%fx_off%" +        ("%abil_fx_idx%" * 0x30)) 142  // display icon
       WRITE_BYTE  ("%fx_off%" + 0x02 + ("%abil_fx_idx%" * 0x30)) 1    // target: self
       WRITE_LONG  ("%fx_off%" + 0x08 + ("%abil_fx_idx%" * 0x30)) 38   // haste
       WRITE_BYTE  ("%fx_off%" + 0x0d + ("%abil_fx_idx%" * 0x30)) 2    // no dispel/not bypass
       WRITE_LONG  ("%fx_off%" + 0x0e + ("%abil_fx_idx%" * 0x30)) 20   // duration
       WRITE_BYTE  ("%fx_off%" + 0x12 + ("%abil_fx_idx%" * 0x30)) 15   // probability
     INSERT_BYTES  ("%fx_off%" +        ("%abil_fx_idx%" * 0x30)) 0x30 // new effect
       WRITE_SHORT ("%fx_off%" +        ("%abil_fx_idx%" * 0x30)) 139  // display string
       WRITE_BYTE  ("%fx_off%" + 0x02 + ("%abil_fx_idx%" * 0x30)) 2    // target: preset target
       WRITE_LONG  ("%fx_off%" + 0x04 + ("%abil_fx_idx%" * 0x30)) 40979 // strref "4 levels drained"
       WRITE_BYTE  ("%fx_off%" + 0x0c + ("%abil_fx_idx%" * 0x30)) 1    // instant/perm
       WRITE_BYTE  ("%fx_off%" + 0x0d + ("%abil_fx_idx%" * 0x30)) 2    // no dispel/not bypass
       WRITE_BYTE  ("%fx_off%" + 0x12 + ("%abil_fx_idx%" * 0x30)) 15   // probability
     SET "patched" = 1
   END
   PATCH_IF ("%patched"% = 1) BEGIN
     WRITE_SHORT ("%abil_off%" + 0x20 + ("%abil_num%" * 0x38)) ("%abil_fx_idx%" + 6)
   END ELSE BEGIN
     WRITE_SHORT ("%abil_off%" + 0x20 + ("%abil_num%" * 0x38)) ("%abil_fx_idx%" + 11)
   END
 END
 WHILE ("%fx_num%" > 0) BEGIN
   SET "fx_num" = ("%fx_num%" - 1)
   READ_SHORT ("%fx_off%" +        ("%fx_num%" * 0x30)) "type"
   PATCH_IF ("%type%" = 7) BEGIN  // set item color
     WRITE_BYTE  ("%fx_off%" + 0x0d + ("%fx_num%" * 0x30)) 0 // no dispel/bypass
   END
 END
 INSERT_BYTES  ("%fx_off%"       ) 0x30 // new effect
   WRITE_LONG  ("%fx_off%" + 0x08) 43   // domination
 INSERT_BYTES  ("%fx_off%"       ) 0x30 // new effect
   WRITE_LONG  ("%fx_off%" + 0x08) 1    // dire charm
 INSERT_BYTES  ("%fx_off%"       ) 0x30 // new effect (charm, 0)
 INSERT_BYTES  ("%fx_off%"       ) 0x30 // new effect
   WRITE_LONG  ("%fx_off%" + 0x08) 36   // panic
 SET "loops" = 4
 WHILE ("%loops%" > 0) BEGIN
   SET "loops" = ("%loops%" - 1)
   WRITE_SHORT ("%fx_off%"        + ("%loops%" * 0x30)) 169  // prevent icon
   WRITE_BYTE  ("%fx_off%" + 0x02 + ("%loops%" * 0x30)) 1    // target: self
   WRITE_BYTE  ("%fx_off%" + 0x0c + ("%loops%" * 0x30)) 2    // instant/while equipped
   WRITE_BYTE  ("%fx_off%" + 0x12 + ("%loops%" * 0x30)) 100  // probability
 END
 INSERT_BYTES  ("%fx_off%"       ) 0x30 // new effect
   WRITE_LONG  ("%fx_off%" + 0x08) 87   // regeneration
 INSERT_BYTES  ("%fx_off%"       ) 0x30 // new effect
   WRITE_LONG  ("%fx_off%" + 0x08) 52   // mind shield
 SET "loops" = 2
 WHILE ("%loops%" > 0) BEGIN
   SET "loops" = ("%loops%" - 1)
   WRITE_SHORT ("%fx_off%"        + ("%loops%" * 0x30)) 142  // prevent icon
   WRITE_BYTE  ("%fx_off%" + 0x02 + ("%loops%" * 0x30)) 1    // target: self
   WRITE_BYTE  ("%fx_off%" + 0x0c + ("%loops%" * 0x30)) 2    // instant/while equipped
   WRITE_BYTE  ("%fx_off%" + 0x12 + ("%loops%" * 0x30)) 100  // probability
 END

Link to comment

Wow. Only Cam... :bday:

 

Hmm. Do you not think that suppressing icons and text when the target's immune would be better handled in a major C_E_R which scanned for protection effects and inserted the corresponding string/icon suppression automatically?

Link to comment

Yeah, though rather than a full every-item-in-the-game push, we should just identify the items that need/use/have the effects and target them to cut down on install time (compare my first dialogue fixes against v2 :bday: ). I'm pretty sure this is what devSin uses in his pack.

 

For now I'm pushing forward with just getting the BD fixes done. I'd like to get the pack to "Baldurdash equivalency" as a first checkpoint and then push on through new material and devSin's stuff.

Link to comment

Hello, just to point out something.

I don't know if it was intended but when using Blackrazor and getting a lucky hit, either healing + STR bonus + Haste apply at the same hit on the character, or LVL drain applies to the ennemy.

Shouldn't it be that either each effect has 15% chance to apply, or, considering a successfull LVL drain, the other effects apply consequently?

 

Also, it seems the effects of Haste bypass those of Improved Haste, meaning that an Improved Hasted character being Hasted will lose the benefits of Improved Haste by getting those of Haste.

Link to comment

Archived

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

×
×
  • Create New...