Jump to content

Mordy sword fixes


Recommended Posts

The original Mordy sword lacks several immunities. Even with Baldurdash, it needs additional effects to suppress the "Confused" string and animation.

 

// adds many missing effects to Mordy swords (Baldurdash)
COPY_EXISTING ~sword01.cre~ ~override~
 READ_LONG 0x2a0 "known_off"
 READ_LONG 0x2a8 "mem_info"
 READ_LONG 0x2b0 "mem_off"
 READ_LONG 0x2b8 "slot_off"
 READ_LONG 0x2bc "item_off"
 READ_LONG 0x2c4 "fx_off"
 READ_LONG 0x2c8 "fx_num"
 // insert the 17 new immunity effect and types; the rest of the parameters are covered in the loop
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_LONG  ("%fx_off%" + 0x18) 135  // polymorph
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_LONG  ("%fx_off%" + 0x18) 134  // petrify
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_LONG  ("%fx_off%" + 0x18) 128  // confusion
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_LONG  ("%fx_off%" + 0x18) 109  // hold
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_LONG  ("%fx_off%" + 0x18) 106  // break morale
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_LONG  ("%fx_off%" + 0x18) 80   // deafness
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_LONG  ("%fx_off%" + 0x18) 78   // disease
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_LONG  ("%fx_off%" + 0x18) 76   // feeblemind
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_LONG  ("%fx_off%" + 0x18) 74   // blindness
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_LONG  ("%fx_off%" + 0x18) 45   // stun
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_LONG  ("%fx_off%" + 0x18) 39   // sleep
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_LONG  ("%fx_off%" + 0x18) 24   // panic
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_LONG  ("%fx_off%" + 0x18) 5    // charm
 SET "new_immun" = 13
 WHILE ("%new_immun%" > 0) BEGIN
   SET "new_immun" = ("%new_immun%" - 1)
   WRITE_LONG  ("%fx_off%" + 0x08 + ("%new_immun%" * 0x108)) 101 // immunity to effect
   WRITE_LONG  ("%fx_off%" + 0x0c + ("%new_immun%" * 0x108)) 1   // target self
   WRITE_LONG  ("%fx_off%" + 0x1c + ("%new_immun%" * 0x108)) 1   // instant/permanent till death
   WRITE_SHORT ("%fx_off%" + 0x24 + ("%new_immun%" * 0x108)) 100 // probability
   WRITE_LONG  ("%fx_off%" + 0xc4 + ("%new_immun%" * 0x108)) 1   // secondary type
 END
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_ASCII ("%fx_off%" + 0x28) ~spin975~ // psionic domination
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_ASCII ("%fx_off%" + 0x28) ~spin974~ // psionic blast
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_ASCII ("%fx_off%" + 0x28) ~spin912~ // detonate
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_ASCII ("%fx_off%" + 0x28) ~spin911~ // ballsitic attack
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_ASCII ("%fx_off%" + 0x28) ~spin909~ // ego whip
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_ASCII ("%fx_off%" + 0x28) ~spin910~ // domination
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_ASCII ("%fx_off%" + 0x28) ~spin959~ // psionic blast
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_ASCII ("%fx_off%" + 0x28) ~spin834~ // psionic blast
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_ASCII ("%fx_off%" + 0x28) ~spin775~ // unk
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_ASCII ("%fx_off%" + 0x28) ~spin774~ // maze
 SET "new_spimmun" = 10
 WHILE ("%new_spimmun%" > 0) BEGIN
   SET "new_spimmun" = ("%new_spimmun%" - 1)
   WRITE_LONG  ("%fx_off%" + 0x08 + ("%new_spimmun%" * 0x108)) 206 // protection from spell
   WRITE_LONG  ("%fx_off%" + 0x0c + ("%new_spimmun%" * 0x108)) 1   // target self
   WRITE_LONG  ("%fx_off%" + 0x10 + ("%new_spimmun%" * 0x108)) 8   // power
   WRITE_LONG  ("%fx_off%" + 0x1c + ("%new_spimmun%" * 0x108)) 1   // instant/permanent till death
   WRITE_SHORT ("%fx_off%" + 0x24 + ("%new_spimmun%" * 0x108)) 100 // probability
   WRITE_LONG  ("%fx_off%" + 0x3c + ("%new_spimmun%" * 0x108)) -2  // save bonus
   WRITE_LONG  ("%fx_off%" + 0x54 + ("%new_spimmun%" * 0x108)) 3   // dispel/bypass
   WRITE_ASCII ("%fx_off%" + 0x8c + ("%new_spimmun%" * 0x108)) ~misc9y~ // parent spell
   WRITE_LONG  ("%fx_off%" + 0xc0 + ("%new_spimmun%" * 0x108)) 10  // primary type
   WRITE_LONG  ("%fx_off%" + 0xc4 + ("%new_spimmun%" * 0x108)) 1   // secondary type
 END
 // new effects to suppress confusion string and graphic
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_LONG  ("%fx_off%" + 0x08) 267   // disable display string
   WRITE_LONG  ("%fx_off%" + 0x0c) 1     // target self
   WRITE_LONG  ("%fx_off%" + 0x10) 4     // power
   WRITE_LONG  ("%fx_off%" + 0x14) 14782 // strref for "confused"
   WRITE_LONG  ("%fx_off%" + 0x1c) 1     // instant/permanent till death
   WRITE_SHORT ("%fx_off%" + 0x24) 100   // probability
 INSERT_BYTES  ("%fx_off%"       ) 0x108
   WRITE_LONG  ("%fx_off%" + 0x08) 296        // disable display string
   WRITE_LONG  ("%fx_off%" + 0x0c) 1          // target self
   WRITE_LONG  ("%fx_off%" + 0x10) 4          // power
   WRITE_LONG  ("%fx_off%" + 0x14) 14782      // strref for "confused"
   WRITE_LONG  ("%fx_off%" + 0x1c) 1          // instant/permanent till death
   WRITE_SHORT ("%fx_off%" + 0x24) 100        // probability
   WRITE_ASCII ("%fx_off%" + 0x28) ~spconfus~ // vvc file
 WRITE_LONG 0x2c8 ("%fx_num%" + 25)
 SET "offset_delta" = (25 * 0x108)
 PATCH_IF ("%known_off%" >= "%fx_off%") BEGIN
   WRITE_LONG 0x2a0 ("%known_off%" + "%offset_delta%")
 END
 PATCH_IF ("%mem_info%" >= "%fx_off%") BEGIN
   WRITE_LONG 0x2a8 ("%mem_info%" + "%offset_delta%")
 END
 PATCH_IF ("%mem_off%" >= "%fx_off%") BEGIN
   WRITE_LONG 0x2b0 ("%mem_off%" + "%offset_delta%")
 END
 PATCH_IF ("%slot_off%" >= "%fx_off%") BEGIN
   WRITE_LONG 0x2b8 ("%slot_off%" + "%offset_delta%")
 END
 PATCH_IF ("%item_off%" >= "%fx_off%") BEGIN
   WRITE_LONG 0x2bc ("%item_off%" + "%offset_delta%")
 END
 BUT_ONLY_IF_IT_CHANGES

 

Included in alpha v3.

Link to comment

Archived

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

×
×
  • Create New...