Jump to content

Spell spcl814 grants an unfair immunity to poison


Salk

Recommended Posts

Disease: Disease immunity should prevent the nauseated icon as well as the 'stricken by a foul disease' and 'diseased' messages in the text window.

 

Poison: Poison immunity can come in two forms, either as a reducton of poison damage to zero or an immunity to the poison effect itself. Unfortunately neither by themselves actually confer full poison immunity, so they both must be added. Poison immunity should also suppress the poison and bleeding icons and display the protection from poison icon.

Unfortunately, it works not as expected. The 'poison' group receives no 100% resistance, while the 'disease' group does get 100% res while it shouldn't.

// disease

COPY_EXISTING ~demogorg.itm~ ~override~ // <invalid strref -1>

~finmel01.itm~ ~override~ // <invalid strref -1>

~minhp1.itm~ ~override~ // <invalid strref -1>

~misc8j.itm~ ~override~ // boots of the west

~ravag03.itm~ ~override~ // <invalid strref -1>

~ring39.itm~ ~override~ // ring of gaxx

~sengua04.itm~ ~override~ // <invalid strref -1>

~spcl814.spl~ ~override~ // <invalid strref -1>

~sword01.cre~ ~override~ // magical sword

~tstatue.itm~ ~override~ // <invalid strref -1>

LAUNCH_PATCH_MACRO ~add_fx_batch_prep~ // defines vars for rest of patch

PATCH_IF (SOURCE_SIZE >= min_size) BEGIN

SET "new_fx" = 0

FOR (index = (0 - global_loop) ; index < abil_num ; index = index + 1) BEGIN

PATCH_IF ("%cosmetic%" = 1) BEGIN // if cosmetic effects needed

SET "new_fx_2" = 0

END ELSE BEGIN // if no cosmetic effects should be added

SET "new_fx_2" = 1

END

SET "new_fx_1" = 0

SET "new_fx_3" = 0

SET "new_fx_4" = 0

SET "new_fx_5" = 0

PATCH_IF ("%index%" < 0) BEGIN // if loop through globals needed

SET "abil_fx_idx" = 0

END ELSE BEGIN // otherwise normal ability

SET "counter_offset" = ("%abil_off%" + 0x1e + ("%abil_length%" * "%index%"))

READ_SHORT ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) "abil_fx_idx"

SET "abil_fx_idx" = ("%abil_fx_idx%" + "%new_fx%")

WRITE_SHORT ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) ("%abil_fx_idx%")

END

READ_SHORT "%counter_offset%" "counter" // fx_num on global loop, otherwise abil_fx_num

FOR (index2 = 0 ; index2 < counter ; index2 = index2 + 1) BEGIN

READ_SHORT ("%fx_off%" + (0x08 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "opcode"

READ_LONG ("%fx_off%" + 0x04 + (0x10 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "param1"

READ_LONG ("%fx_off%" + 0x08 + (0x10 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "param2"

READ_ASCII ("%fx_off%" + 0x14 + (0x14 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "resref"

PATCH_IF (("%opcode%" = 101) AND ("%param2%" = 78)) BEGIN // disease immunity

SET "new_fx_1" = 1

READ_ASCII ("%fx_off%" + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "template" ((0x30 + (0xd8 * "%fx_type%")))

END ELSE

PATCH_IF (("%opcode%" = 169) AND ("%param2%" = 7)) BEGIN // prevent nauseated icon

SET "new_fx_2" = 1

END ELSE

PATCH_IF (("%opcode%" = 267) AND ("%param1%" = 39752)) BEGIN // disable string "stricken by a foul disease"

SET "new_fx_3" = 1

END ELSE

PATCH_IF (("%opcode%" = 267) AND ("%param1%" = 54337)) BEGIN // disable string "diseased"

SET "new_fx_4" = 1

END ELSE

PATCH_IF (("%opcode%" = 173) AND ("%param1%" = 100)) BEGIN // reduced damage from poison - 100%

SET "new_fx_5" = 1

END

END

PATCH_IF ("%new_fx_1%" = 1) BEGIN

PATCH_IF ("%new_fx_2%" = 0) BEGIN

INSERT_BYTES ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))

WRITE_ASCIIE ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect

WRITE_SHORT ("%fx_off%" + (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 169 // prevent portrait icon

WRITE_LONG ("%fx_off%" + 0x08 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 7 // nauseated

SET "new_fx" = ("%new_fx%" + 1)

SET "counter" = ("%counter%" + 1)

END

PATCH_IF ("%new_fx_3%" = 0) BEGIN

INSERT_BYTES ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))

WRITE_ASCIIE ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect

WRITE_SHORT ("%fx_off%" + (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 267 // disable string

WRITE_LONG ("%fx_off%" + 0x04 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 39752 // strref

SET "new_fx" = ("%new_fx%" + 1)

SET "counter" = ("%counter%" + 1)

END

PATCH_IF ("%new_fx_4%" = 0) BEGIN

INSERT_BYTES ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))

WRITE_ASCIIE ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect

WRITE_SHORT ("%fx_off%" + (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 267 // disable string

WRITE_LONG ("%fx_off%" + 0x04 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 54337 // strref

SET "new_fx" = ("%new_fx%" + 1)

SET "counter" = ("%counter%" + 1)

END

PATCH_IF ("%new_fx_5%" = 0) BEGIN

INSERT_BYTES ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))

WRITE_ASCIIE ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect

WRITE_SHORT ("%fx_off%" + (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 173 // reduced damage from poison

WRITE_LONG ("%fx_off%" + 0x04 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 100 // value

SET "new_fx" = ("%new_fx%" + 1)

SET "counter" = ("%counter%" + 1)

END

END

WRITE_SHORT "%counter_offset%" "%counter%"

END

LAUNCH_PATCH_MACRO ~add_fx_batch_final~ // wrapup creature offset patching

END

BUT_ONLY_IF_IT_CHANGES

 

// poison

COPY_EXISTING ~amcst02.cre~ ~override~ // mercenary

~amcst03.cre~ ~override~ // mercenary

~ammgrd01.cre~ ~override~ // monk

~ammgrd02.cre~ ~override~ // monk

~ammgrd05.cre~ ~override~ // monk

~ammlegs.cre~ ~override~ // monk

~ammonk01.cre~ ~override~ // monk

~ammonk02.cre~ ~override~ // monk

~ammonk03.cre~ ~override~ // monk

~ammonk07.cre~ ~override~ // monk

~ammonk08.cre~ ~override~ // monk

~amul22.itm~ ~override~ // periapt of proof against poison

~balelite.cre~ ~override~ // monk

~balth.cre~ ~override~ // balthazar

~barl.cre~ ~override~ // barl

~barlfl.itm~ ~override~ // flail

~bazdra02.cre~ ~override~ // draconis

~bazdra03.cre~ ~override~ // fll'yissetat

~bazmonk.cre~ ~override~ // monk

~bazpatrg.itm~ ~override~ // ring

~bhaalhp1.itm~ ~override~ // <invalid strref -1>

~bhaalimm.itm~ ~override~ // <invalid strref -1>

~chalslay.itm~ ~override~ // ring

~chwraith.itm~ ~override~ // <invalid strref -1>

~cutamgrd.cre~ ~override~ // monk

~cutbalth.cre~ ~override~ // balthazar

~demogorg.itm~ ~override~ // <invalid strref -1>

~demosum1.cre~ ~override~ // marilith

~deriny01.cre~ ~override~ // erinyes

~devaevil.cre~ ~override~ // fallen deva

~devagood.cre~ ~override~ // deva

~devast01.cre~ ~override~ // astral deva

~devmon01.cre~ ~override~ // monadic deva

~dimp01.cre~ ~override~ // imp

~elemprin.itm~ ~override~ // <invalid strref -1>

~fangel01.cre~ ~override~ // einhiris

~finmel01.itm~ ~override~ // <invalid strref -1>

~finsol01.cre~ ~override~ // solar

~finsol04.cre~ ~override~ // fallen solar

~fsdragon.cre~ ~override~ // dragon

~fsspir.itm~ ~override~ // ring

~golbra.itm~ ~override~ // brain golem item

~golbra01.cre~ ~override~ // brain golem

~golcla.itm~ ~override~ // clay golem item

~golcla01.cre~ ~override~ // clay golem

~golem01.cre~ ~override~ // clay golem

~golfle.itm~ ~override~ // flesh golem item

~golice01.cre~ ~override~ // ice golem

~goljug01.cre~ ~override~ // juggernaut golem

~golmag01.itm~ ~override~ // magic golem item

~golsan01.cre~ ~override~ // sand golem

~golsto01.cre~ ~override~ // stone golem

~golstone.itm~ ~override~ // stone golem item

~gorbat1.cre~ ~override~ // ka'rashur

~gorbat2.cre~ ~override~ // erinyes

~gorbat3.cre~ ~override~ // cornugon

~gorbat4.cre~ ~override~ // imp

~gorcamb6.cre~ ~override~ // fell cat

~gorcamb7.cre~ ~override~ // fell cat

~gorfirg.itm~ ~override~ // ring

~gorgua01.cre~ ~override~ // aurumach rilmani

~gorgua02.cre~ ~override~ // ferrumach rilmani

~gorjelfu.itm~ ~override~ // ring

~gorjelgr.itm~ ~override~ // ring

~gormisti.itm~ ~override~ // ring

~gormistp.cre~ ~override~ // poison mist

~gormistp.itm~ ~override~ // ring

~gorwom01.cre~ ~override~ // nalmissra

~gorwom03.cre~ ~override~ // y'tossi

~gorwom04.cre~ ~override~ // ameralis zauviir

~helm30.itm~ ~override~ // thieves' hood

~hgber01.itm~ ~override~ // two handed sword +1

~hgfel01.cre~ ~override~ // fell cat

~holdring.itm~ ~override~ // ring

~icbone01.cre~ ~override~ // bone golem

~imoenhp1.itm~ ~override~ // imoen's belt

~innoc.itm~ ~override~ // ring

~invulner.itm~ ~override~ // ring

~irongol.itm~ ~override~ // iron golem item

~killmonk.cre~ ~override~ // monk

~mdog1.itm~ ~override~ // <invalid strref -1>

~mel01.itm~ ~override~ // imoen's belt

~melsum05.cre~ ~override~ // marilith

~mindva01.cre~ ~override~ // vampiric illithid

~mindvam.cre~ ~override~ // vampiric illithid

~minhp1.itm~ ~override~ // <invalid strref -1>

~mistpo01.cre~ ~override~ // poison mist

~morsword.itm~ ~override~ // mordenkainen's sword

~nishrusu.cre~ ~override~ // nishruu

~objring.itm~ ~override~ // ring

~planet01.cre~ ~override~ // planetar

~planevil.cre~ ~override~ // fallen planetar

~plangood.cre~ ~override~ // planetar

~planwish.cre~ ~override~ // fallen planetar

~ppguy01.cre~ ~override~ // <invalid strref -1>

~ppiron.cre~ ~override~ // clay golem

~pudden01.cre~ ~override~ // dense pudding

~pudden02.cre~ ~override~ // dense pudding

~ravag03.itm~ ~override~ // <invalid strref -1>

~ring39.itm~ ~override~ // ring of gaxx

~ring46.itm~ ~override~ // ring of anti-venom

~ring94.itm~ ~override~ // ring

~ring95.itm~ ~override~ // ring

~ring98.itm~ ~override~ // ring

~ring99.itm~ ~override~ // ring

~ringdemn.itm~ ~override~ // <invalid strref -1>

~ringkora.itm~ ~override~ // ring

~scrl08.itm~ ~override~ // protection from poison

~sengua04.itm~ ~override~ // <invalid strref -1>

~senmonk.cre~ ~override~ // master bennon

~shalt01.itm~ ~override~ // ring

~shararm.itm~ ~override~ // darkmail +3

~solar.cre~ ~override~ // solar

~solar01.cre~ ~override~ // solar

~spcl221.spl~ ~override~ // <invalid strref -1>

~spcl415.spl~ ~override~ // <invalid strref -1>

~spcl818.spl~ ~override~ // <invalid strref -1>

~spcl924.spl~ ~override~ // <invalid strref -1>

~spin853.spl~ ~override~ // otiluke's resilient sphere

// ~spwi413.spl~ ~override~ // otiluke's resilient sphere

~spwi853.spl~ ~override~ // otiluke's resilient sphere

~stalker.itm~ ~override~ // ring

~surehp1.itm~ ~override~ // ring

~sw1h34.itm~ ~override~ // albruin +1

~telimp1.cre~ ~override~ // imp

~telpit1.cre~ ~override~ // pit fiend

~telslav2.itm~ ~override~ // <invalid strref -1>

~tobpar03.cre~ ~override~ // long po

~tomegol2.cre~ ~override~ // clay golem

~tomegol3.cre~ ~override~ // stone golem

~trolldie.itm~ ~override~ // <invalid strref -1>

~tstatue.itm~ ~override~ // <invalid strref -1>

~udgolem.cre~ ~override~ // brain golem

~udvamp.cre~ ~override~ // vampiric illithid

~vampreg.itm~ ~override~ // ring

~vampreg1.itm~ ~override~ // ring

~vampreg2.itm~ ~override~ // ring

LAUNCH_PATCH_MACRO ~add_fx_batch_prep~ // defines vars for rest of patch

PATCH_IF (SOURCE_SIZE >= min_size) BEGIN

SET "new_fx" = 0

FOR (index = (0 - global_loop) ; index < abil_num ; index = index + 1) BEGIN

PATCH_IF ("%cosmetic%" = 1) BEGIN // if cosmetic effects needed

SET "new_fx_3" = 0

SET "new_fx_4" = 0

SET "new_fx_5" = 0

END ELSE BEGIN // if no cosmetic effects should be added

SET "new_fx_5" = 1

PATCH_IF ("%SOURCE_RES%" STRING_COMPARE_CASE "imoenhp1" = 0) BEGIN

SET "new_fx_3" = 0

SET "new_fx_4" = 0

END ELSE BEGIN

SET "new_fx_3" = 1

SET "new_fx_4" = 1

END

END

SET "new_fx_1" = 0

SET "new_fx_6" = 0

SET "new_fx_7" = 0

PATCH_IF ("%index%" < 0) BEGIN // if loop through globals needed

SET "abil_fx_idx" = 0

END ELSE BEGIN // otherwise normal ability

SET "counter_offset" = ("%abil_off%" + 0x1e + ("%abil_length%" * "%index%"))

READ_SHORT ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) "abil_fx_idx"

SET "abil_fx_idx" = ("%abil_fx_idx%" + "%new_fx%")

WRITE_SHORT ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) ("%abil_fx_idx%")

END

READ_SHORT "%counter_offset%" "counter" // fx_num on global loop, otherwise abil_fx_num

FOR (index2 = 0 ; index2 < counter ; index2 = index2 + 1) BEGIN

READ_SHORT ("%fx_off%" + (0x08 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "opcode"

READ_LONG ("%fx_off%" + 0x04 + (0x10 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "param1"

READ_LONG ("%fx_off%" + 0x08 + (0x10 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "param2"

READ_ASCII ("%fx_off%" + 0x14 + (0x14 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "resref"

PATCH_IF (("%opcode%" = 101) AND ("%param2%" = 25)) BEGIN // poison immunity

SET "new_fx_1" = 1

READ_ASCII ("%fx_off%" + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "template" ((0x30 + (0xd8 * "%fx_type%")))

END ELSE

PATCH_IF (("%opcode%" = 169) AND ("%param2%" = 6)) BEGIN // prevent poison icon

SET "new_fx_3" = 1

END ELSE

PATCH_IF (("%opcode%" = 169) AND ("%param2%" = 137)) BEGIN // prevent bleeding icon

SET "new_fx_4" = 1

END ELSE

PATCH_IF (("%opcode%" = 142) AND ("%param2%" = 30)) BEGIN // display protection from poison icon

SET "new_fx_5" = 1

END ELSE

PATCH_IF (("%opcode%" = 267) AND ("%param1%" = 14662)) BEGIN // disable string "poisoned"

SET "new_fx_6" = 1

END ELSE

PATCH_IF (("%opcode%" = 267) AND ("%param1%" = 14017)) BEGIN // disable string "poison"

SET "new_fx_7" = 1

END

END

PATCH_IF ("%new_fx_1%" = 1) BEGIN

PATCH_IF ("%new_fx_3%" = 0) BEGIN

INSERT_BYTES ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))

WRITE_ASCIIE ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect

WRITE_SHORT ("%fx_off%" + (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 169 // prevent portrait icon

WRITE_LONG ("%fx_off%" + 0x08 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 6 // poison

SET "new_fx" = ("%new_fx%" + 1)

SET "counter" = ("%counter%" + 1)

END

PATCH_IF ("%new_fx_4%" = 0) BEGIN

INSERT_BYTES ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))

WRITE_ASCIIE ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect

WRITE_SHORT ("%fx_off%" + (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 169 // prevent portrait icon

WRITE_LONG ("%fx_off%" + 0x08 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 137 // bleeding

SET "new_fx" = ("%new_fx%" + 1)

SET "counter" = ("%counter%" + 1)

END

PATCH_IF ("%new_fx_5%" = 0) BEGIN

INSERT_BYTES ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))

WRITE_ASCIIE ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect

WRITE_SHORT ("%fx_off%" + (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 142 // display portrait icon

WRITE_LONG ("%fx_off%" + 0x08 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 30 // protection from poison

SET "new_fx" = ("%new_fx%" + 1)

SET "counter" = ("%counter%" + 1)

END

PATCH_IF ("%new_fx_6%" = 0) BEGIN

INSERT_BYTES ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))

WRITE_ASCIIE ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect

WRITE_SHORT ("%fx_off%" + (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 267 // disable string

WRITE_LONG ("%fx_off%" + 0x04 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 14662 // strref

SET "new_fx" = ("%new_fx%" + 1)

SET "counter" = ("%counter%" + 1)

END

PATCH_IF ("%new_fx_7%" = 0) BEGIN

INSERT_BYTES ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))

WRITE_ASCIIE ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect

WRITE_SHORT ("%fx_off%" + (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 267 // disable string

WRITE_LONG ("%fx_off%" + 0x04 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 14017 // strref

SET "new_fx" = ("%new_fx%" + 1)

SET "counter" = ("%counter%" + 1)

END

END

WRITE_SHORT "%counter_offset%" "%counter%"

END

LAUNCH_PATCH_MACRO ~add_fx_batch_final~ // wrapup creature offset patching

END

BUT_ONLY_IF_IT_CHANGES

 

 

 

I've moved the 100% poison resistance from 'disease' to 'poison'.

// disease
COPY_EXISTING ~demogorg.itm~ ~override~ // <invalid strref -1>
		  ~finmel01.itm~ ~override~ // <invalid strref -1>
		  ~minhp1.itm~   ~override~ // <invalid strref -1>
		  ~misc8j.itm~   ~override~ // boots of the west
		  ~ravag03.itm~  ~override~ // <invalid strref -1>
		  ~ring39.itm~   ~override~ // ring of gaxx
		  ~sengua04.itm~ ~override~ // <invalid strref -1>
		  ~spcl814.spl~  ~override~ // <invalid strref -1>
		  ~sword01.cre~  ~override~ // magical sword
		  ~tstatue.itm~  ~override~ // <invalid strref -1>
 LAUNCH_PATCH_MACRO ~add_fx_batch_prep~ // defines vars for rest of patch
 PATCH_IF (SOURCE_SIZE >= min_size) BEGIN
SET "new_fx" = 0
FOR (index = (0 - global_loop); index < abil_num; index = index + 1) BEGIN
  PATCH_IF ("%cosmetic%" = 1) BEGIN // if cosmetic effects needed
	SET "new_fx_2" = 0
  END ELSE BEGIN // if no cosmetic effects should be added
	SET "new_fx_2" = 1
  END
  SET "new_fx_1" = 0
  SET "new_fx_3" = 0
  SET "new_fx_4" = 0
  PATCH_IF ("%index%" < 0) BEGIN // if loop through globals needed
	SET "abil_fx_idx" = 0
  END ELSE BEGIN // otherwise normal ability
	SET "counter_offset" = ("%abil_off%" + 0x1e + ("%abil_length%" * "%index%"))
	READ_SHORT  ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) "abil_fx_idx"
	SET "abil_fx_idx" = ("%abil_fx_idx%" + "%new_fx%")
	WRITE_SHORT ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) ("%abil_fx_idx%")
  END
  READ_SHORT "%counter_offset%" "counter" // fx_num on global loop, otherwise abil_fx_num
  FOR (index2 = 0; index2 < counter; index2 = index2 + 1) BEGIN
	READ_SHORT ("%fx_off%"		+ (0x08 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "opcode"
	READ_LONG  ("%fx_off%" + 0x04 + (0x10 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "param1"
	READ_LONG  ("%fx_off%" + 0x08 + (0x10 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "param2"
	READ_ASCII ("%fx_off%" + 0x14 + (0x14 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "resref"
	PATCH_IF (("%opcode%" = 101) AND ("%param2%" = 78)) BEGIN // disease immunity
	  SET "new_fx_1" = 1
	  READ_ASCII ("%fx_off%" +							 (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "template" ((0x30 + (0xd8 * "%fx_type%")))
	END ELSE
	PATCH_IF (("%opcode%" = 169) AND ("%param2%" = 7)) BEGIN // prevent nauseated icon
	  SET "new_fx_2" = 1
	END ELSE
	PATCH_IF (("%opcode%" = 267) AND ("%param1%" = 39752)) BEGIN // disable string "stricken by a foul disease"
	  SET "new_fx_3" = 1
	END ELSE
	PATCH_IF (("%opcode%" = 267) AND ("%param1%" = 54337)) BEGIN // disable string "diseased"
	  SET "new_fx_4" = 1
	END ELSE
  END
  PATCH_IF ("%new_fx_1%" = 1) BEGIN
	PATCH_IF ("%new_fx_2%" = 0) BEGIN
	  INSERT_BYTES   ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))
		WRITE_ASCIIE ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect
		WRITE_SHORT  ("%fx_off%"		+ (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 169		  // prevent portrait icon
		WRITE_LONG   ("%fx_off%" + 0x08 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 7			// nauseated
	  SET "new_fx" = ("%new_fx%" + 1)
	  SET "counter" = ("%counter%" + 1)
	END
	PATCH_IF ("%new_fx_3%" = 0) BEGIN
	  INSERT_BYTES   ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))
		WRITE_ASCIIE ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect
		WRITE_SHORT  ("%fx_off%"		+ (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 267		  // disable string
		WRITE_LONG   ("%fx_off%" + 0x04 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 39752		// strref
	  SET "new_fx" = ("%new_fx%" + 1)
	  SET "counter" = ("%counter%" + 1)
	END
	PATCH_IF ("%new_fx_4%" = 0) BEGIN
	  INSERT_BYTES   ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))
		WRITE_ASCIIE ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect
		WRITE_SHORT  ("%fx_off%"		+ (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 267		  // disable string
		WRITE_LONG   ("%fx_off%" + 0x04 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 54337		// strref
	  SET "new_fx" = ("%new_fx%" + 1)
	  SET "counter" = ("%counter%" + 1)
	END
  END
  WRITE_SHORT "%counter_offset%" "%counter%"
END
LAUNCH_PATCH_MACRO ~add_fx_batch_final~ // wrapup creature offset patching
 END
 BUT_ONLY_IF_IT_CHANGES

// poison
COPY_EXISTING ~amcst02.cre~  ~override~ // mercenary
		  ~amcst03.cre~  ~override~ // mercenary
		  ~ammgrd01.cre~ ~override~ // monk
		  ~ammgrd02.cre~ ~override~ // monk
		  ~ammgrd05.cre~ ~override~ // monk
		  ~ammlegs.cre~  ~override~ // monk
		  ~ammonk01.cre~ ~override~ // monk
		  ~ammonk02.cre~ ~override~ // monk
		  ~ammonk03.cre~ ~override~ // monk
		  ~ammonk07.cre~ ~override~ // monk
		  ~ammonk08.cre~ ~override~ // monk
		  ~amul22.itm~   ~override~ // periapt of proof against poison
		  ~balelite.cre~ ~override~ // monk
		  ~balth.cre~	~override~ // balthazar
		  ~barl.cre~	 ~override~ // barl
		  ~barlfl.itm~   ~override~ // flail
		  ~bazdra02.cre~ ~override~ // draconis
		  ~bazdra03.cre~ ~override~ // fll'yissetat
		  ~bazmonk.cre~  ~override~ // monk
		  ~bazpatrg.itm~ ~override~ // ring
		  ~bhaalhp1.itm~ ~override~ // <invalid strref -1>
		  ~bhaalimm.itm~ ~override~ // <invalid strref -1>
		  ~chalslay.itm~ ~override~ // ring
		  ~chwraith.itm~ ~override~ // <invalid strref -1>
		  ~cutamgrd.cre~ ~override~ // monk
		  ~cutbalth.cre~ ~override~ // balthazar
		  ~demogorg.itm~ ~override~ // <invalid strref -1>
		  ~demosum1.cre~ ~override~ // marilith
		  ~deriny01.cre~ ~override~ // erinyes
		  ~devaevil.cre~ ~override~ // fallen deva
		  ~devagood.cre~ ~override~ // deva
		  ~devast01.cre~ ~override~ // astral deva
		  ~devmon01.cre~ ~override~ // monadic deva
		  ~dimp01.cre~   ~override~ // imp
		  ~elemprin.itm~ ~override~ // <invalid strref -1>
		  ~fangel01.cre~ ~override~ // einhiris
		  ~finmel01.itm~ ~override~ // <invalid strref -1>
		  ~finsol01.cre~ ~override~ // solar
		  ~finsol04.cre~ ~override~ // fallen solar
		  ~fsdragon.cre~ ~override~ // dragon
		  ~fsspir.itm~   ~override~ // ring
		  ~golbra.itm~   ~override~ // brain golem item
		  ~golbra01.cre~ ~override~ // brain golem
		  ~golcla.itm~   ~override~ // clay golem item
		  ~golcla01.cre~ ~override~ // clay golem
		  ~golem01.cre~  ~override~ // clay golem
		  ~golfle.itm~   ~override~ // flesh golem item
		  ~golice01.cre~ ~override~ // ice golem
		  ~goljug01.cre~ ~override~ // juggernaut golem
		  ~golmag01.itm~ ~override~ // magic golem item
		  ~golsan01.cre~ ~override~ // sand golem
		  ~golsto01.cre~ ~override~ // stone golem
		  ~golstone.itm~ ~override~ // stone golem item
		  ~gorbat1.cre~  ~override~ // ka'rashur
		  ~gorbat2.cre~  ~override~ // erinyes
		  ~gorbat3.cre~  ~override~ // cornugon
		  ~gorbat4.cre~  ~override~ // imp
		  ~gorcamb6.cre~ ~override~ // fell cat
		  ~gorcamb7.cre~ ~override~ // fell cat
		  ~gorfirg.itm~  ~override~ // ring
		  ~gorgua01.cre~ ~override~ // aurumach rilmani
		  ~gorgua02.cre~ ~override~ // ferrumach rilmani
		  ~gorjelfu.itm~ ~override~ // ring
		  ~gorjelgr.itm~ ~override~ // ring
		  ~gormisti.itm~ ~override~ // ring
		  ~gormistp.cre~ ~override~ // poison mist
		  ~gormistp.itm~ ~override~ // ring
		  ~gorwom01.cre~ ~override~ // nalmissra
		  ~gorwom03.cre~ ~override~ // y'tossi
		  ~gorwom04.cre~ ~override~ // ameralis zauviir
		  ~helm30.itm~   ~override~ // thieves' hood
		  ~hgber01.itm~  ~override~ // two handed sword +1
		  ~hgfel01.cre~  ~override~ // fell cat
		  ~holdring.itm~ ~override~ // ring
		  ~icbone01.cre~ ~override~ // bone golem
		  ~imoenhp1.itm~ ~override~ // imoen's belt
		  ~innoc.itm~	~override~ // ring
		  ~invulner.itm~ ~override~ // ring
		  ~irongol.itm~  ~override~ // iron golem item
		  ~killmonk.cre~ ~override~ // monk
		  ~mdog1.itm~	~override~ // <invalid strref -1>
		  ~mel01.itm~	~override~ // imoen's belt
		  ~melsum05.cre~ ~override~ // marilith
		  ~mindva01.cre~ ~override~ // vampiric illithid
		  ~mindvam.cre~  ~override~ // vampiric illithid
		  ~minhp1.itm~   ~override~ // <invalid strref -1>
		  ~mistpo01.cre~ ~override~ // poison mist
		  ~morsword.itm~ ~override~ // mordenkainen's sword
		  ~nishrusu.cre~ ~override~ // nishruu
		  ~objring.itm~  ~override~ // ring
		  ~planet01.cre~ ~override~ // planetar
		  ~planevil.cre~ ~override~ // fallen planetar
		  ~plangood.cre~ ~override~ // planetar
		  ~planwish.cre~ ~override~ // fallen planetar
		  ~ppguy01.cre~  ~override~ // <invalid strref -1>
		  ~ppiron.cre~   ~override~ // clay golem
		  ~pudden01.cre~ ~override~ // dense pudding
		  ~pudden02.cre~ ~override~ // dense pudding
		  ~ravag03.itm~  ~override~ // <invalid strref -1>
		  ~ring39.itm~   ~override~ // ring of gaxx
		  ~ring46.itm~   ~override~ // ring of anti-venom
		  ~ring94.itm~   ~override~ // ring
		  ~ring95.itm~   ~override~ // ring
		  ~ring98.itm~   ~override~ // ring
		  ~ring99.itm~   ~override~ // ring
		  ~ringdemn.itm~ ~override~ // <invalid strref -1>
		  ~ringkora.itm~ ~override~ // ring
		  ~scrl08.itm~   ~override~ // protection from poison
		  ~sengua04.itm~ ~override~ // <invalid strref -1>
		  ~senmonk.cre~  ~override~ // master bennon
		  ~shalt01.itm~  ~override~ // ring
		  ~shararm.itm~  ~override~ // darkmail +3
		  ~solar.cre~	~override~ // solar
		  ~solar01.cre~  ~override~ // solar
		  ~spcl221.spl~  ~override~ // <invalid strref -1>
		  ~spcl415.spl~  ~override~ // <invalid strref -1>
		  ~spcl818.spl~  ~override~ // <invalid strref -1>
		  ~spcl924.spl~  ~override~ // <invalid strref -1>
		  ~spin853.spl~  ~override~ // otiluke's resilient sphere
//			  ~spwi413.spl~  ~override~ // otiluke's resilient sphere
		  ~spwi853.spl~  ~override~ // otiluke's resilient sphere
		  ~stalker.itm~  ~override~ // ring
		  ~surehp1.itm~  ~override~ // ring
		  ~sw1h34.itm~   ~override~ // albruin +1
		  ~telimp1.cre~  ~override~ // imp
		  ~telpit1.cre~  ~override~ // pit fiend
		  ~telslav2.itm~ ~override~ // <invalid strref -1>
		  ~tobpar03.cre~ ~override~ // long po
		  ~tomegol2.cre~ ~override~ // clay golem
		  ~tomegol3.cre~ ~override~ // stone golem
		  ~trolldie.itm~ ~override~ // <invalid strref -1>
		  ~tstatue.itm~  ~override~ // <invalid strref -1>
		  ~udgolem.cre~  ~override~ // brain golem
		  ~udvamp.cre~   ~override~ // vampiric illithid
		  ~vampreg.itm~  ~override~ // ring
		  ~vampreg1.itm~ ~override~ // ring
		  ~vampreg2.itm~ ~override~ // ring
 LAUNCH_PATCH_MACRO ~add_fx_batch_prep~ // defines vars for rest of patch
 PATCH_IF (SOURCE_SIZE >= min_size) BEGIN
SET "new_fx" = 0
FOR (index = (0 - global_loop); index < abil_num; index = index + 1) BEGIN
  PATCH_IF ("%cosmetic%" = 1) BEGIN // if cosmetic effects needed
	SET "new_fx_3" = 0
	SET "new_fx_4" = 0
	SET "new_fx_5" = 0
  END ELSE BEGIN // if no cosmetic effects should be added
	SET "new_fx_5" = 1
	PATCH_IF ("%SOURCE_RES%" STRING_COMPARE_CASE "imoenhp1" = 0) BEGIN
	  SET "new_fx_3" = 0
	  SET "new_fx_4" = 0
	END ELSE BEGIN
	  SET "new_fx_3" = 1
	  SET "new_fx_4" = 1
	END
  END
  SET "new_fx_1" = 0
  SET "new_fx_6" = 0
  SET "new_fx_7" = 0
  SET "new_fx_8" = 0
  PATCH_IF ("%index%" < 0) BEGIN // if loop through globals needed
	SET "abil_fx_idx" = 0
  END ELSE BEGIN // otherwise normal ability
	SET "counter_offset" = ("%abil_off%" + 0x1e + ("%abil_length%" * "%index%"))
	READ_SHORT  ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) "abil_fx_idx"
	SET "abil_fx_idx" = ("%abil_fx_idx%" + "%new_fx%")
	WRITE_SHORT ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) ("%abil_fx_idx%")
  END
  READ_SHORT "%counter_offset%" "counter" // fx_num on global loop, otherwise abil_fx_num
  FOR (index2 = 0; index2 < counter; index2 = index2 + 1) BEGIN
	READ_SHORT ("%fx_off%"		+ (0x08 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "opcode"
	READ_LONG  ("%fx_off%" + 0x04 + (0x10 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "param1"
	READ_LONG  ("%fx_off%" + 0x08 + (0x10 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "param2"
	READ_ASCII ("%fx_off%" + 0x14 + (0x14 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "resref"
	PATCH_IF (("%opcode%" = 101) AND ("%param2%" = 25)) BEGIN // poison immunity
	  SET "new_fx_1" = 1
	  READ_ASCII ("%fx_off%" +							 (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "template" ((0x30 + (0xd8 * "%fx_type%")))
	END ELSE
	PATCH_IF (("%opcode%" = 169) AND ("%param2%" = 6)) BEGIN // prevent poison icon
	  SET "new_fx_3" = 1
	END ELSE
	PATCH_IF (("%opcode%" = 169) AND ("%param2%" = 137)) BEGIN // prevent bleeding icon
	  SET "new_fx_4" = 1
	END ELSE
	PATCH_IF (("%opcode%" = 142) AND ("%param2%" = 30)) BEGIN // display protection from poison icon
	  SET "new_fx_5" = 1
	END ELSE
	PATCH_IF (("%opcode%" = 267) AND ("%param1%" = 14662)) BEGIN // disable string "poisoned"
	  SET "new_fx_6" = 1
	END ELSE
	PATCH_IF (("%opcode%" = 267) AND ("%param1%" = 14017)) BEGIN // disable string "poison"
	  SET "new_fx_7" = 1
	END
	PATCH_IF (("%opcode%" = 173) AND ("%param1%" = 100)) BEGIN // reduced damage from poison - 100%
	  SET "new_fx_8" = 1
	END
  END
  PATCH_IF ("%new_fx_1%" = 1) BEGIN
	PATCH_IF ("%new_fx_3%" = 0) BEGIN
	  INSERT_BYTES   ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))
		WRITE_ASCIIE ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect
		WRITE_SHORT  ("%fx_off%"		+ (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 169		  // prevent portrait icon
		WRITE_LONG   ("%fx_off%" + 0x08 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 6			// poison
	  SET "new_fx" = ("%new_fx%" + 1)
	  SET "counter" = ("%counter%" + 1)
	END
	PATCH_IF ("%new_fx_4%" = 0) BEGIN
	  INSERT_BYTES   ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))
		WRITE_ASCIIE ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect
		WRITE_SHORT  ("%fx_off%"		+ (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 169		  // prevent portrait icon
		WRITE_LONG   ("%fx_off%" + 0x08 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 137		  // bleeding
	  SET "new_fx" = ("%new_fx%" + 1)
	  SET "counter" = ("%counter%" + 1)
	END
	PATCH_IF ("%new_fx_5%" = 0) BEGIN
	  INSERT_BYTES   ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))
		WRITE_ASCIIE ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect
		WRITE_SHORT  ("%fx_off%"		+ (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 142		  // display portrait icon
		WRITE_LONG   ("%fx_off%" + 0x08 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 30		   // protection from poison
	  SET "new_fx" = ("%new_fx%" + 1)
	  SET "counter" = ("%counter%" + 1)
	END
	PATCH_IF ("%new_fx_6%" = 0) BEGIN
	  INSERT_BYTES   ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))
		WRITE_ASCIIE ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect
		WRITE_SHORT  ("%fx_off%"		+ (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 267		  // disable string
		WRITE_LONG   ("%fx_off%" + 0x04 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 14662		// strref
	  SET "new_fx" = ("%new_fx%" + 1)
	  SET "counter" = ("%counter%" + 1)
	END
	PATCH_IF ("%new_fx_7%" = 0) BEGIN
	  INSERT_BYTES   ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))
		WRITE_ASCIIE ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect
		WRITE_SHORT  ("%fx_off%"		+ (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 267		  // disable string
		WRITE_LONG   ("%fx_off%" + 0x04 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 14017		// strref
	  SET "new_fx" = ("%new_fx%" + 1)
	  SET "counter" = ("%counter%" + 1)
	END
	PATCH_IF ("%new_fx_8%" = 0) BEGIN
	  INSERT_BYTES   ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))
		WRITE_ASCIIE ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect
		WRITE_SHORT  ("%fx_off%"		+ (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 173		  // reduced damage from poison
		WRITE_LONG   ("%fx_off%" + 0x04 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 100		  // value
	  SET "new_fx" = ("%new_fx%" + 1)
	  SET "counter" = ("%counter%" + 1)
	END
  END
  WRITE_SHORT "%counter_offset%" "%counter%"
END
LAUNCH_PATCH_MACRO ~add_fx_batch_final~ // wrapup creature offset patching
 END
 BUT_ONLY_IF_IT_CHANGES

Link to comment

Thank you for fixing this, Ardanis! :)

 

UPDATE: I actually get a parse error from weidu when running the fixpack after swapping the original block with yours.

 

The error message says:

 

[bG2FIXPACK/SETUP-BG2FIXPACK.TP2] PARSE ERROR at line 24893 column 1-9

Near Text: END

GLR parse error

 

[bG2FIXPACK/SETUP-BG2FIXPACK.TP2] ERROR at line 24893 column 1-9

Near Text: END

Parsing.Parse_error

ERROR: parsing [bG2FIXPACK/SETUP-BG2FIXPACK.TP2]: Parsing.Parse_error

ERROR: problem parsing TP file [bG2FIXPACK/SETUP-BG2FIXPACK.TP2]: Parsing.Parse_error

 

FATAL ERROR: Parsing.Parse_error

 

Can you check it again?

 

UPDATE2: I am not a modder but I think that the problem is an "ELSE" too much here:

 

		  SET "new_fx_4" = 1
	END ELSE
  END

 

 

Thanks!

Link to comment

The problem is that "Poison resistance bonus" also negates damage from disease, which is why we removed it from the items which granted only "Immunity to effect" poison in the default game.

 

I don't know why Cam or Nythrun went back and added it to disease-immunity items; it's possible it'll be removed for player-facing items in the future (except RING39, which gives immunity to poison AND disease), unless somebody can make a good case for it (it will never come back for poison-only items, however, because of the issue with disease).

Link to comment

Archived

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

×
×
  • Create New...