Jump to content

Assassin THAC0 bonus


Nythrun

Recommended Posts

Not totally broken, it just doesn't stack correctly. Might as well patch both instances of its usage instead of just the one :)

COPY_EXISTING ~spcl421.spl~  ~override~
		  ~spcl541.spl~  ~override~
 PATCH_IF (%SOURCE_SIZE%>0x71)							 THEN BEGIN
READ_LONG   0x64 "abil_off"	 // extended header offset
READ_SHORT  0x68 "abil_num"	 // extended header count
READ_LONG   0x6a "fx_off"	   // feature table offset
FOR ("i"=0; "%i%"<"%abil_num%"; "i"+=1)					  BEGIN
  READ_SHORT  ("%abil_off%"+(0x28*"%i%")+0x1e) "abil_fx_num"
  READ_SHORT  ("%abil_off%"+(0x28*"%i%")+0x20) "abil_fx_idx"
  FOR ("j"=0; "%j%"<"%abil_fx_num%"; "j"+=1)				 BEGIN
	READ_SHORT ("%fx_off%"+(0x30*("%j%"+"%abil_fx_idx%"))+0x00) "opcode"
	PATCH_IF ("%opcode%"=0xb1)						  THEN BEGIN
	  WRITE_SHORT  ("%fx_off%"+(0x30*("%j%"+"%abil_fx_idx%"))+0x00) 0x116  // To-hit bonus
	  WRITE_LONG   ("%fx_off%"+(0x30*("%j%"+"%abil_fx_idx%"))+0x04) 0x01   // modifier
	  WRITE_LONG   ("%fx_off%"+(0x30*("%j%"+"%abil_fx_idx%"))+0x08) 0x00   // type: cumulative
	  WRITE_ASCII  ("%fx_off%"+(0x30*("%j%"+"%abil_fx_idx%"))+0x14) ~~ #8 // nulling resref
	END //PATCH_IF use .eff file opcode located
  END // FOR j, scanning each header's abilities
END // FOR i, scanning extended headers
 END // PATCH_IF filesize sanity check
BUT_ONLY_IF_IT_CHANGES // COPY_EXISTING closed

Link to comment

Archived

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

×
×
  • Create New...