From bd8280f15397c26624d4172a55fa23bd2d457d27 Mon Sep 17 00:00:00 2001 From: CamDawg Date: Tue, 26 Jul 2022 07:37:49 -0700 Subject: [PATCH] [bgee] Adding protection vs. Aec's Death Gaze to Death Ward --- .../files/tph/dw/death_magic_immunity.tph | 98 ++++++++++--------- eefixpack/files/tph/dw_fixes.tph | 2 +- 2 files changed, 54 insertions(+), 46 deletions(-) diff --git a/eefixpack/files/tph/dw/death_magic_immunity.tph b/eefixpack/files/tph/dw/death_magic_immunity.tph index cd0706b..89c9ffe 100644 --- a/eefixpack/files/tph/dw/death_magic_immunity.tph +++ b/eefixpack/files/tph/dw/death_magic_immunity.tph @@ -1,48 +1,56 @@ DEFINE_ACTION_FUNCTION death_magic_immunity BEGIN - ///////////////////////////////////////////////////////////////////////// - ///////////////////////////////////////////////////////////////////////// - //// Standardize the various spells / items that grant immunity to 'death magic' - //// (currently BG2 only) - ///////////////////////////////////////////////////////////////////////// - ///////////////////////////////////////////////////////////////////////// - - /* - We are standardizing on Death Ward (immunity to 13, 55, 209, 238), partly because that's what PnP does, - partly because it's plausible that a core spell was more carefully worked out than later ideas, and partly - because it seems to meet the common sense meaning (an effect that directly kills you). - */ - - ///////////////////////////////////////////////////////////////////////// - //// Cloak of the Lich should protect from Disintegrate - ///////////////////////////////////////////////////////////////////////// - - COPY_EXISTING "ohbclck1.itm" override - LPF CLONE_EFFECT INT_VAR match_opcode=101 match_parameter2=13 parameter2=238 END - - //////////////////////////////////////////////////////////////////////// - //// Hindo's Doom should not have an undocumented protection from petrification - ///////////////////////////////////////////////////////////////////////// - - COPY_EXISTING "sw1h71.itm" override - LPF DELETE_EFFECT INT_VAR match_opcode=267 match_parameter1=14665 END // 'petrified' string - LPF DELETE_EFFECT INT_VAR match_opcode=101 match_parameter2=134 END // protection - - //////////////////////////////////////////////////////////////////////// - //// Avoid Death should protect from PW:Kill, but not from level drain, petrification, or Imprisonment - ///////////////////////////////////////////////////////////////////////// - - COPY_EXISTING "spcl917.spl" override - LPF DELETE_EFFECT INT_VAR match_opcode=267 match_parameter1=41616 END // 'five levels drained' string - LPF DELETE_EFFECT INT_VAR match_opcode=267 match_parameter1=40979 END // 'four levels drained' string - LPF DELETE_EFFECT INT_VAR match_opcode=267 match_parameter1=40969 END // 'three levels drained' string - LPF DELETE_EFFECT INT_VAR match_opcode=267 match_parameter1=40968 END // 'two levels drained' string - LPF DELETE_EFFECT INT_VAR match_opcode=267 match_parameter1=41495 END // 'one level drained' string - LPF DELETE_EFFECT INT_VAR match_opcode=169 match_parameter2=59 END // energy drain icon - LPF DELETE_EFFECT INT_VAR match_opcode=101 match_parameter2=211 END // protection from imprisonment - LPF DELETE_EFFECT INT_VAR match_opcode=101 match_parameter2=216 END // protection from level drain - LPF DELETE_EFFECT INT_VAR match_opcode=101 match_parameter2=134 END // protection from petrification - LPF CLONE_EFFECT INT_VAR match_opcode=101 match_parameter2=13 parameter2=209 END // PW:Kill - - + ACTION_IF game_is_bg2ee BEGIN + + ///////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////// + //// Standardize the various spells / items that grant immunity to 'death magic' + //// (currently BG2 only) + ///////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////// + + /* + We are standardizing on Death Ward (immunity to 13, 55, 209, 238), partly because that's what PnP does, + partly because it's plausible that a core spell was more carefully worked out than later ideas, and partly + because it seems to meet the common sense meaning (an effect that directly kills you). + */ + + ///////////////////////////////////////////////////////////////////////// + //// Cloak of the Lich should protect from Disintegrate + ///////////////////////////////////////////////////////////////////////// + + COPY_EXISTING "ohbclck1.itm" override + LPF CLONE_EFFECT INT_VAR match_opcode=101 match_parameter2=13 parameter2=238 END + + //////////////////////////////////////////////////////////////////////// + //// Hindo's Doom should not have an undocumented protection from petrification + ///////////////////////////////////////////////////////////////////////// + + COPY_EXISTING "sw1h71.itm" override + LPF DELETE_EFFECT INT_VAR match_opcode=267 match_parameter1=14665 END // 'petrified' string + LPF DELETE_EFFECT INT_VAR match_opcode=101 match_parameter2=134 END // protection + + //////////////////////////////////////////////////////////////////////// + //// Avoid Death should protect from PW:Kill, but not from level drain, petrification, or Imprisonment + ///////////////////////////////////////////////////////////////////////// + + COPY_EXISTING "spcl917.spl" override + LPF DELETE_EFFECT INT_VAR match_opcode=267 match_parameter1=41616 END // 'five levels drained' string + LPF DELETE_EFFECT INT_VAR match_opcode=267 match_parameter1=40979 END // 'four levels drained' string + LPF DELETE_EFFECT INT_VAR match_opcode=267 match_parameter1=40969 END // 'three levels drained' string + LPF DELETE_EFFECT INT_VAR match_opcode=267 match_parameter1=40968 END // 'two levels drained' string + LPF DELETE_EFFECT INT_VAR match_opcode=267 match_parameter1=41495 END // 'one level drained' string + LPF DELETE_EFFECT INT_VAR match_opcode=169 match_parameter2=59 END // energy drain icon + LPF DELETE_EFFECT INT_VAR match_opcode=101 match_parameter2=211 END // protection from imprisonment + LPF DELETE_EFFECT INT_VAR match_opcode=101 match_parameter2=216 END // protection from level drain + LPF DELETE_EFFECT INT_VAR match_opcode=101 match_parameter2=134 END // protection from petrification + LPF CLONE_EFFECT INT_VAR match_opcode=101 match_parameter2=13 parameter2=209 END // PW:Kill + + END ELSE BEGIN // just one fix for bgee + + COPY_EXISTING ~sppr409.spl~ ~override~ // death ward + LPF CLONE_EFFECT INT_VAR multi_match = 1 match_opcode = 101 opcode = 206 parameter1 = 0 parameter2 = 0 STR_VAR resource = spin996 END // add explicit block for aec's death gaze + + END + END \ No newline at end of file diff --git a/eefixpack/files/tph/dw_fixes.tph b/eefixpack/files/tph/dw_fixes.tph index 6337df4..d73681f 100644 --- a/eefixpack/files/tph/dw_fixes.tph +++ b/eefixpack/files/tph/dw_fixes.tph @@ -34,7 +34,7 @@ LAF paralyzation_fixes END // standardize death magic protection (BG2 only) -ACTION_IF GAME_IS "bg2ee" BEGIN +ACTION_IF game_is_bgee OR game_is_bg2ee BEGIN INCLUDE "%library_path%/death_magic_immunity.tph" LAF death_magic_immunity END END