Skip to content

GT_7EYES-O-MATIC (Reloaded) #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,021 changes: 637 additions & 384 deletions eefixpack/files/lib/gt_7eyes.tph

Large diffs are not rendered by default.

820 changes: 447 additions & 373 deletions eefixpack/files/lib/gt_functions.tph

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions eefixpack/files/tph/5943_mold_touch.tph
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@ COPY_EXISTING ~idmold.pro~ ~override~
COPY_EXISTING ~%CLERIC_MOLD_TOUCH%.spl~ ~override~ // sppr326
~%CLERIC_MOLD_TOUCH%b.spl~ ~override~ // sppr326b
LPF DELETE_EFFECT INT_VAR match_opcode = 142 END // delete portrait icons because...
LPF ALTER_EFFECT INT_VAR match_opcode = 78 special = 7 END // we're attaching them directly to the disease effect
LPF ALTER_EFFECT INT_VAR match_opcode = 78 match_parameter2 = 12 timing = 3 duration = 0 END // we're attaching them directly to the disease effect
LPF ALTER_EFFECT INT_VAR silent = 1 match_opcode = 78 special = 7 END // we're attaching them directly to the disease effect
LPF ALTER_EFFECT INT_VAR silent = 1 match_opcode = 78 match_parameter2 = 12 timing = 3 duration = 0 END // we're attaching them directly to the disease effect

COPY_EXISTING ~%CLERIC_MOLD_TOUCH%.spl~ ~override~ // sppr326
LPF ALTER_EFFECT INT_VAR match_opcode = 78 match_duration = 18 opcode = 146 parameter1 = 0 parameter2 = 2 duration = 7
special = 0 STR_VAR resource = EVAL ~%CLERIC_MOLD_TOUCH%a~ END // change final (saved) mold touch burst to another subspell
LPF CLONE_EFFECT INT_VAR match_opcode = 324 match_parameter2 = 55 parameter2 = 68 END // prevent spread to someone who already has mold

COPY_EXISTING "cd006c.spl" "override"
LPF ALTER_EFFECT INT_VAR match_opcode = 78 match_duration = 18 opcode = 146 parameter1 = 0 parameter2 = 1 duration = 7
special = 0 STR_VAR resource = EVAL ~%CLERIC_MOLD_TOUCH%a~ END // change final (saved) mold touch burst to another subspell
LPF CLONE_EFFECT INT_VAR match_opcode = 78 match_parameter1 = 2 opcode = 206 parameter1 = 0 parameter2 = 0
timing = 0 duration = 1 savingthrow = BIT0 STR_VAR resource = EVAL ~%CLERIC_MOLD_TOUCH%~ END
LPF ALTER_EFFECT INT_VAR match_opcode = 174 resist_dispel = 3 END // always play audio/visual
LPF ALTER_EFFECT INT_VAR match_opcode = 215 resist_dispel = 3 END // always play audio/visual
timing = 0 duration = 1 savingthrow = BIT0 STR_VAR resource = EVAL ~%DEST_RES%~ END
// LPF ALTER_EFFECT INT_VAR match_opcode = 174 resist_dispel = 3 END // always play audio/visual
// LPF ALTER_EFFECT INT_VAR match_opcode = 215 resist_dispel = 3 END // always play audio/visual

COPY_EXISTING ~%CLERIC_MOLD_TOUCH%b.spl~ ~override~ // sppr326b
WRITE_BYTE 0x1c 2 // spell type
Expand Down
1 change: 1 addition & 0 deletions eefixpack/files/tph/6037_iwdee_probabilities.tph
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ COPY_EXISTING ~amaunat.itm~ ~override~ // amaunator's legacy: 5% beltyn's burni
~sbowebu.itm~ ~override~ // short bow of ebullience: 25% fire damage
~serrate.itm~ ~override~ // serrated bone blade: 20% cold damage
~sflail.itm~ ~override~ // conrnugon: 50% bleed, 25% stun
~cd0048.spl~ ~override~ // conrnugon: 25% stun
~shax4d4c.itm~ ~override~ // shadowed orc weapon: 40% cold damage
~shaxe2c.itm~ ~override~ // shadowed orc weapon: 40% cold damage
~shmblr.itm~ ~override~ // shambler weapon: 5% entangle
Expand Down
291 changes: 270 additions & 21 deletions eefixpack/files/tph/bg2ee.tph

Large diffs are not rendered by default.

31 changes: 18 additions & 13 deletions eefixpack/files/tph/bg_bg2_common_spell_fixes.tph
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ END

// luke
// Mimic Glue should not set the GREASE stat
/*
WITH_SCOPE BEGIN
COPY_EXISTING ~%MIMIC_GLUE%.spl~ ~override~ // Mimic Glue spin914
LAUNCH_PATCH_FUNCTION "ALTER_EFFECT" INT_VAR "match_opcode" = 158 "opcode" = 215 "parameter2" = 1 STR_VAR "resource" = "GREASED" END // Grease overlay => Play visual effect, Mode: Over target (attached)
BUT_ONLY_IF_IT_CHANGES
END
*/

// luke
// Lesser Fire Spirit Suppress misleading "One of the spell has failed" message
// Lesser Fire Spirit - Suppress misleading "One of the spell has failed" message
// 1) Set subspell's range to a very high value (max signed value)
// 2) Set subspell's projectile to either "RANGE05", "RANGE07" or "RANGE10". The second one is the most appropriate IMHO (given ELEMENTAL_FIRE_SMALL selection circle)...
WITH_SCOPE BEGIN
Expand All @@ -52,7 +54,7 @@ OUTER_FOR (index = 2 ; index < 21 ; ++index) BEGIN
END

// luke
// Grease Remove duplicate op321 effect
// Grease - Remove duplicate op321 effect
// grease should work like web and check for grease once/round
WITH_SCOPE BEGIN
COPY_EXISTING ~%WIZARD_GREASE%.spl~ ~override~ // Grease spwi101
Expand All @@ -72,7 +74,7 @@ WITH_SCOPE BEGIN
END

// luke
// Magic Missile better feedback for the player when you cast it at someone protected by WIZARD_SHIELD
// Magic Missile - better feedback for the player when you cast it at someone protected by WIZARD_SHIELD
WITH_SCOPE BEGIN
COPY_EXISTING ~%WIZARD_MAGIC_MISSILE%.spl~ ~override~ // spwi112
~%TRAP_MAGIC_MISSILE%.spl~ ~override~ // spwi003
Expand Down Expand Up @@ -101,7 +103,7 @@ WITH_SCOPE BEGIN
END

// luke
// Detect Evil should not interact with spell protections
// Detect Evil - should not interact with spell protections
// 1) there's no need for the subspell
//// 1a) its effects have incorrect power levels
//// 1b) more importantly, as of v2.6, you should no longer be able to bypass other's Magic Resistance by targeting yourself with an area-effect ability => see `https://gibberlings3.github.io/iesdp/file_formats/ie_formats/eff_v2.htm#effv2_Body_0x5C` (BIT3) for further details...
Expand All @@ -122,6 +124,7 @@ END
// 1) op39 can automatically display a portrait icon, there's no need to apply a separate op142 effect
// 2) remove the "Bypass Mirror Image" flag (it's only relevant for opcode #12 and opcode #25)
// 3) provide better feedback for the player when attacking Golems or Undead
// 4) op324 resource field should not be empty (bgee only)
WITH_SCOPE BEGIN
COPY_EXISTING "%WIZARD_STINKING_CLOUD%.spl" "override" // spwi213
PATCH_WITH_SCOPE BEGIN
Expand All @@ -138,6 +141,7 @@ WITH_SCOPE BEGIN
END
LAUNCH_PATCH_FUNCTION ~DELETE_EFFECT~ INT_VAR ~match_opcode~ = 142 END
LAUNCH_PATCH_FUNCTION ~ALTER_EFFECT~ INT_VAR ~match_opcode~ = 39 ~special~ = 126 END
LPF ~ALTER_EFFECT~ INT_VAR ~match_opcode~ = 324 ~match_parameter2~ = 55 STR_VAR ~resource~ = "%DEST_RES%" END
BUT_ONLY_IF_IT_CHANGES
END

Expand Down Expand Up @@ -166,7 +170,7 @@ WITH_SCOPE BEGIN
END

// luke
// Lightning Bolt remove duplicate op318 effect
// Lightning Bolt - remove duplicate op318 effect
WITH_SCOPE BEGIN
COPY_EXISTING "%WIZARD_LIGHTNING_BOLT%.spl" "override" // spwi308
"%TALOS_LIGHTNING_BOLT%.spl" "override" // spcl722
Expand All @@ -185,7 +189,7 @@ WITH_SCOPE BEGIN
END

// luke
// Protection From Normal Missiles remove duplicate op328 effect
// Protection From Normal Missiles - remove duplicate op328 effect
WITH_SCOPE BEGIN
COPY_EXISTING "%WIZARD_PROTECTION_FROM_NORMAL_MISSILES%.spl" "override" // spwi311
"spra303.spl" "override" // Stalker
Expand Down Expand Up @@ -232,7 +236,7 @@ WITH_SCOPE BEGIN
END

// luke
// Minor Spell Deflection remove duplicate op328 / op233 effects
// Minor Spell Deflection - remove duplicate op328 / op233 effects
WITH_SCOPE BEGIN
COPY_EXISTING "%WIZARD_MINOR_SPELL_DEFLECTION%.spl" "override" // spwi318
"spra302.spl" "override" // Stalker
Expand Down Expand Up @@ -285,7 +289,7 @@ WITH_SCOPE BEGIN
END

// luke
// Feeblemind make sure it is truly permanent (until dispelled or character death)
// Feeblemind - make sure it is truly permanent (until dispelled or character death)
//// Unlike other effects that alter a creature's stat, this one does leave behind a removable effect when applied with `timing=1`
WITH_SCOPE BEGIN
COPY_EXISTING "%WIZARD_FEEBLEMIND%.spl" "override" // spwi509
Expand All @@ -295,7 +299,7 @@ WITH_SCOPE BEGIN
END

// luke
// Protection From Normal Weapons remove duplicate op328 effect
// Protection From Normal Weapons - remove duplicate op328 effect
WITH_SCOPE BEGIN
COPY_EXISTING "%WIZARD_PROTECTION_FROM_NORMAL_WEAPONS%.spl" "override" // spwi511
PATCH_WITH_SCOPE BEGIN
Expand All @@ -310,7 +314,7 @@ WITH_SCOPE BEGIN
END

// luke
// Minor Spell Turning remove duplicate op328 / op233 effects
// Minor Spell Turning - remove duplicate op328 / op233 effects
WITH_SCOPE BEGIN
COPY_EXISTING "%WIZARD_MINOR_SPELL_TURNING%.spl" "override" // spwi522
"%BEHOLDER_SPELL_TURNING%.spl" "override" // spin920
Expand All @@ -329,7 +333,7 @@ WITH_SCOPE BEGIN
END

// luke
// Spell Deflection remove duplicate op328 / op233 effects
// Spell Deflection - remove duplicate op328 / op233 effects
WITH_SCOPE BEGIN
COPY_EXISTING "%WIZARD_SPELL_DEFLECTION%.spl" "override" // spwi618
"%SPELL_DEFLECTION_NO_VISUAL%.spl" "override" // spin710
Expand All @@ -349,7 +353,7 @@ WITH_SCOPE BEGIN
END

// luke
// Spell Turning remove duplicate op328 / op233 effects
// Spell Turning - remove duplicate op328 / op233 effects
WITH_SCOPE BEGIN
COPY_EXISTING "%WIZARD_SPELL_TURNING%.spl" "override" // spwi701
PATCH_WITH_SCOPE BEGIN
Expand Down Expand Up @@ -383,7 +387,7 @@ WITH_SCOPE BEGIN
END

// luke
// Spell Trap remove duplicate op328 / op282 effects
// Spell Trap - remove duplicate op328 / op282 effects
WITH_SCOPE BEGIN
COPY_EXISTING "%WIZARD_SPELL_TRAP%.spl" "override" // spwi902
PATCH_WITH_SCOPE BEGIN
Expand Down Expand Up @@ -438,6 +442,7 @@ END
// - Make sure it truly slows poison (so as to match `IWDEE` and spell description/name)
WITH_SCOPE BEGIN
COPY_EXISTING ~%CLERIC_SLOW_POISON%.spl~ ~override~ // sppr212
"spin102.spl" "override" // innate variant
LAUNCH_PATCH_FUNCTION "ALTER_EFFECT" INT_VAR "match_opcode" = 11 "opcode" = 329 "parameter1" = 10 "parameter2" = 0 END // Cure poison => Slow poison
BUT_ONLY_IF_IT_CHANGES
END
Expand Down
20 changes: 18 additions & 2 deletions eefixpack/files/tph/bg_bg2_iwd_common_spell_fixes.tph
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,24 @@ END
WITH_SCOPE BEGIN
COPY_EXISTING ~%CLERIC_NATURE_BEAUTY%.spl~ ~override~ // sppr704
LPF "ADD_SPELL_EFFECT" INT_VAR "insert_point" = 0 "opcode" = 324 "target" = 2 "power" = 7 "parameter2" = 6 "resist_dispel" = BIT1 STR_VAR "resource" = "%DEST_RES%" END // Immunity to resource and message (GENERAL != HUMANOID)
LAUNCH_PATCH_FUNCTION "ALTER_EFFECT" INT_VAR "match_opcode" = 74 "timing" = 0 "duration" = 0x7FFFFFFF END // Blindness
LAUNCH_PATCH_FUNCTION "DELETE_EFFECT" INT_VAR "check_globals" = 0 "match_opcode" = 142 "match_parameter2" = 8 END // op74 naturally provides the "Blind" portrait icon
//
GET_OFFSET_ARRAY "ab_array" SPL_V10_HEADERS
PHP_EACH "ab_array" AS "ab_ind" => "ab_off" BEGIN
GET_OFFSET_ARRAY2 "fx_array" "%ab_off%" ITM_V10_HEAD_EFFECTS
PHP_EACH "fx_array" AS "fx_ind" => "fx_off" BEGIN
PATCH_MATCH SHORT_AT "%fx_off%" WITH
326 WHEN SLONG_AT (0x4 + "%fx_off%") == IDS_OF_SYMBOL ("splstate" "blind_immunity") AND LONG_AT (0x8 + "%fx_off%") == 111 BEGIN
READ_ASCII (0x14 + "%fx_off%") "subspell"
END
DEFAULT
END
END
END
//
COPY_EXISTING "%subspell%.spl" "override"
LAUNCH_PATCH_FUNCTION "ALTER_EFFECT" INT_VAR "match_opcode" = 74 "timing" = 0 "duration" = 0x7FFFFFFF END // Blindness
LAUNCH_PATCH_FUNCTION "DELETE_EFFECT" INT_VAR "check_globals" = 0 "match_opcode" = 142 "match_parameter2" = 8 END // op74 naturally provides the "Blind" portrait icon
BUT_ONLY
BUT_ONLY_IF_IT_CHANGES
END

Expand Down
Loading