Jump to content

SoA Black Blade of Disaster


CamDawg

Recommended Posts

In SoA, the Black Blade of Disaster states that it lasts for 1 round/level of the caster but it actually lasts a fixed 18 rounds. It also mentions that the wielder will gain proficiency in long swords and will have the THAC0 of a fighter of equal level; it actually grants no proficiency and gives a flat +12 THAC0 bonus.

 

In ToB, there are no issues, The description changes quite a bit, but the spell changes to match it perfectly--casting time decreases, no fighter THAC0 mention, adds the 10% level drain and HP bonus, adds grand mastery, duration fixed at 18 rounds.

Link to comment
In SoA, the Black Blade of Disaster states that it lasts for 1 round/level of the caster but it actually lasts a fixed 18 rounds. It also mentions that the wielder will gain proficiency in long swords and will have the THAC0 of a fighter of equal level; it actually grants no proficiency and gives a flat +12 THAC0 bonus.

My mistake; it actually sets THAC0 to a flat value of 12. Fixed by adding level 19 and 20 headers, adjusting the THAC0 correctly, and adding a proficiency effect to the black blade item:

 

ACTION_IF NOT FILE_EXISTS_IN_GAME ~mel01.cre~ THEN BEGIN // SoA-only fix

 // SoA black blade missing lev 19, 20 headers; see also blakblad.itm SoA patch for prof fix
 COPY_EXISTING ~spwi915.spl~ ~override~
READ_LONG   0x64 "abil_off"
READ_SHORT  0x68 "abil_num"
READ_LONG   0x6a "fx_off"
READ_SHORT  0x70 "fx_num"
FOR (index = 0; index < abil_num; index = index + 1) BEGIN // first fix existing effects
  READ_SHORT  ("%abil_off%" + 0x10 + ("%index%" * 0x28)) "min_lev"
  PATCH_IF ("%min_lev%" = 1) BEGIN
	SET "min_lev" = 18
  END
  READ_SHORT  ("%abil_off%" + 0x1e + ("%index%" * 0x28)) "abil_fx_num"
  READ_SHORT  ("%abil_off%" + 0x20 + ("%index%" * 0x28)) "abil_fx_idx"
  FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN
	READ_SHORT ("%fx_off%" +		(0x30 * ("%abil_fx_idx%" + "%index2%"))) "opcode"
	READ_LONG  ("%fx_off%" + 0x0e + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "duration"
	PATCH_IF ("%opcode%" = 54) BEGIN // thac0 bonus
	  WRITE_LONG ("%fx_off%" + 0x04 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) (21 - "%min_lev%") // adjusted for level
	  WRITE_LONG ("%fx_off%" + 0x08 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 1				  // set to value
	END
	PATCH_IF ("%duration%" > 5) BEGIN // longer than one round
	  WRITE_LONG ("%fx_off%" + 0x0d + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 0 // no dispel/bypass resistance
	  WRITE_LONG ("%fx_off%" + 0x0e + (0x30 * ("%abil_fx_idx%" + "%index2%"))) (6 * "%min_lev%") // corrects duration
	END
  END
END
FOR (index3 = min_lev + 1; index3 < 21; index3 = index3 + 1) BEGIN
  READ_ASCII ("%fx_off%" + (0x30 * "%abil_fx_idx%")) "effects" ("%abil_fx_num%" * 0x30) // reads whole block of effects from last ability
  READ_ASCII ("%abil_off%" + (0x28 * ("%abil_num%" - 1))) "ability" (0x28)			  // reads last ability
  SET "abil_fx_idx" = "%abil_fx_idx%" + "%abil_fx_num%"
  INSERT_BYTES   ("%fx_off%" + (0x30 * "%abil_fx_idx%")) ("%abil_fx_num%" * 0x30) // inserts bytes
	WRITE_ASCIIE ("%fx_off%" + (0x30 * "%abil_fx_idx%")) "%effects%"			  // clones existing effects
	FOR (index4 = 0; index4 < abil_fx_num; index4 = index4 + 1) BEGIN	// loop to adjust effects by min level
	  READ_SHORT ("%fx_off%" +		(0x30 * ("%abil_fx_idx%" + "%index4%"))) "opcode"
	  READ_LONG  ("%fx_off%" + 0x0e + (0x30 * ("%abil_fx_idx%" + "%index4%"))) "duration"
	  PATCH_IF ("%opcode%" = 54) BEGIN // thac0 bonus
		WRITE_LONG ("%fx_off%" + 0x04 + (0x30 * ("%abil_fx_idx%" + "%index4%"))) (21 - "%index3%") // adjusted for level
	  END
	  PATCH_IF ("%duration%" > 5) BEGIN // longer than one round
		WRITE_LONG ("%fx_off%" + 0x0e + (0x30 * ("%abil_fx_idx%" + "%index4%"))) (6 * "%index3%") // corrects duration
	  END
	END
  INSERT_BYTES   ("%abil_off%" +		("%abil_num%" * 0x28)) 0x28		// inserts bytes
	WRITE_ASCIIE ("%abil_off%" +		("%abil_num%" * 0x28)) "%ability%" // clones existing ability
	WRITE_SHORT  ("%abil_off%" + 0x10 + ("%abil_num%" * 0x28)) ("%index3%") // minimum level
	WRITE_SHORT  ("%abil_off%" + 0x20 + ("%abil_num%" * 0x28)) "%abil_fx_idx%"
  SET "fx_off" = ("%fx_off%" + 0x28)
  SET "abil_num" = ("%abil_num%" + 1)
END
WRITE_LONG  0x6a "%fx_off%"
WRITE_SHORT 0x68 "%abil_num%"
BUT_ONLY_IF_IT_CHANGES

 // soa black blade does not grant long sword grandmastery per descript; see also SoA-only spwi915.spl patch for duration, thac0 fixes
 COPY_EXISTING ~blakblad.itm~ ~override~
READ_LONG   0x64 "abil_off"
READ_SHORT  0x68 "abil_num"
READ_LONG   0x6a "fx_off"
READ_SHORT  0x70 "fx_num"
WRITE_SHORT 0x70 ("%fx_num%" + 1)
INSERT_BYTES  ("%fx_off%" +		("%fx_num%" * 0x30)) 0x30
  WRITE_SHORT ("%fx_off%" +		("%fx_num%" * 0x30)) 233 // modify proficiency
  WRITE_BYTE  ("%fx_off%" + 0x02 + ("%fx_num%" * 0x30)) 1   // target:self
  WRITE_LONG  ("%fx_off%" + 0x04 + ("%fx_num%" * 0x30)) 5   // # pips
  WRITE_LONG  ("%fx_off%" + 0x08 + ("%fx_num%" * 0x30)) 90  // in long sword
  WRITE_BYTE  ("%fx_off%" + 0x0c + ("%fx_num%" * 0x30)) 2   // instant/while equipped
  WRITE_BYTE  ("%fx_off%" + 0x0d + ("%fx_num%" * 0x30)) 2   // not dispel/not bypass
  WRITE_BYTE  ("%fx_off%" + 0x12 + ("%fx_num%" * 0x30)) 100 // probability 1
FOR (index = 0; index < abil_num; index = index + 1) BEGIN
  READ_SHORT  ("%abil_off%" + 0x20 + ("%index%" * 0x38)) "abil_fx_idx"
  WRITE_SHORT ("%abil_off%" + 0x20 + ("%index%" * 0x38)) ("%abil_fx_idx%" + 1)
END
BUT_ONLY_IF_IT_CHANGES

END

Link to comment

Archived

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

×
×
  • Create New...