diff --git a/cdtweaks/languages/english/weidu.tra b/cdtweaks/languages/english/weidu.tra index 06daf4ee..d1d7c59f 100644 --- a/cdtweaks/languages/english/weidu.tra +++ b/cdtweaks/languages/english/weidu.tra @@ -457,33 +457,7 @@ The uninstall messages above are normal and expected. @264000 = "PnP Potions [Luke]" -@265000 = "Spontaneous Casting for Clerics [Luke]" - -@266000 = "Weapon Finesse feat for Thieves [Luke]" - -@267000 = "Dual-Wield feat for Rangers [Luke]" - -@268000 = ~"Force" the Archer kit to use bows [Luke]~ - -@269000 = "NWN-ish Armor vs. Dexterity [Luke]" - -@270000 = "Defensive Roll feat for Thieves [Luke]" - -@271000 = "Divine Grace / Dark Blessing feat for Paladins / Blackguards [Luke]" - -@272000 = "Good Aim racial feat for Halflings [Luke]" - -@273000 = "Cleave Feat for Fighters [Luke]" - -@274000 = "Sneak Attack class feat for Blackguards [Luke]" - -@275000 = "Fearless racial feat for Halflings [Luke]" - -@276000 = "Poison Save class feat for Assassins [Luke]" - -@277000 = "Planar Turning class feat for Clerics / Paladins [Luke]" - -@278000 = "Circle Kick class feat for Monks [Luke]" +@265000 = "Make Grease ignitable [Luke (EEex)]" /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ diff --git a/cdtweaks/languages/italian/weidu.tra b/cdtweaks/languages/italian/weidu.tra index 738ea95a..08b37970 100644 --- a/cdtweaks/languages/italian/weidu.tra +++ b/cdtweaks/languages/italian/weidu.tra @@ -410,31 +410,7 @@ o rimpiazzata da - un'altra facente parte di uno dei mods installati.~ // @257000 = ~BGT: Limite di esperienza aggiuntivo mentre sei in BG~ // @257100 = ~BGT: Limite di esperienza aggiuntivo in SoA~ -@265000 = "Aggiungi talento di classe Lancio Spontaneo per i Chierici [Luke]" - -@266000 = "Aggiungi talento Arma Preferita per i Ladri [Luke]" - -@267000 = "Aggiungi talento Doppia-Presa per i Ranger [Luke]" - -@269000 = "Armatura vs. Destrezza in stile NWN [Luke]" - -@270000 = "Aggiungi talento Tiro Difensivo per i ladri [Luke]" - -@271000 = "Grazia Divina / Benedizione Oscura per Paladini / Guardie Nere [Luke]" - -@272000 = "Aggiungi talento razziale Buona Mira per gli Halfling [Luke]" - -@273000 = "Aggiungi talento di classe Incalzare per i Guerrieri [Luke]" - -@274000 = "Aggiungi talento di classe Attacco Furtivo per Guardie Nere [Luke]" - -@275000 = "Aggiungi talento razziale Temerario per gli Halfling [Luke]" - -@276000 = "Aggiungi talento di classe Resistenza ai Veleni per Assassini [Luke]" - -@277000 = "Aggiungi talento di classe Scacciare Creature Extraplanari per Paladini e Chierici [Luke]" - -@278000 = "Aggiungi talento di classe Calcio Rotante per i Monaci [Luke]" +@265000 = "Rendi Unto infiammabile [Luke (EEex)]" /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ diff --git a/cdtweaks/lib/comp_2650.tpa b/cdtweaks/lib/comp_2650.tpa index 4499e6ab..a4879856 100644 --- a/cdtweaks/lib/comp_2650.tpa +++ b/cdtweaks/lib/comp_2650.tpa @@ -1,15 +1,15 @@ -/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ -/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ -///// \\\\\ -///// Spontaneous Casting for Clerics \\\\\ -///// \\\\\ -/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ -/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ +/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// +/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// +///// ///// +///// Make Grease Ignitable \\\\\ +///// \\\\\ +/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// +/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// WITH_SCOPE BEGIN INCLUDE "cdtweaks\luke\misc.tph" - INCLUDE "cdtweaks\lib\spontaneous_casting.tph" - WITH_TRA "cdtweaks\languages\english\spontaneous_casting.tra" "cdtweaks\languages\%LANGUAGE%\spontaneous_casting.tra" BEGIN - LAF "SPONTANEOUS_CASTING" END - END + // + INCLUDE "cdtweaks\lib\make_grease_ignitable.tph" + // + LAF "MAKE_GREASE_IGNITABLE" END END \ No newline at end of file diff --git a/cdtweaks/lib/make_grease_ignitable.tph b/cdtweaks/lib/make_grease_ignitable.tph new file mode 100644 index 00000000..dfd05906 --- /dev/null +++ b/cdtweaks/lib/make_grease_ignitable.tph @@ -0,0 +1,14 @@ +DEFINE_ACTION_FUNCTION "MAKE_GREASE_IGNITABLE" +BEGIN + ACTION_IF !(FILE_EXISTS_IN_GAME "SOFLAMC.BAM") BEGIN + COPY "cdtweaks\luke\bam\soflamc.bam" "override" + END + ACTION_IF !(FILE_EXISTS_IN_GAME "#SHROUD.VVC") BEGIN + COPY "cdtweaks\luke\vvc\#shroud.vvc" "override" + END + ACTION_IF !(FILE_EXISTS_IN_GAME "MISC_01C.WAV") BEGIN + COPY "cdtweaks\luke\wav\misc_01c.wav" "override" + END + // + LAF "APPEND_LUA_FUNCTION" STR_VAR "description" = "Misc Tweaks" "sourceFileSpec" = "cdtweaks\luke\lua\tweaks\make_grease_ignitable.lua" "destRes" = "m_gttwks" END +END \ No newline at end of file diff --git a/cdtweaks/luke/bam/soflamc.bam b/cdtweaks/luke/bam/soflamc.bam new file mode 100644 index 00000000..7c8ea6ea Binary files /dev/null and b/cdtweaks/luke/bam/soflamc.bam differ diff --git a/cdtweaks/luke/lua/tweaks/make_grease_ignitable.lua b/cdtweaks/luke/lua/tweaks/make_grease_ignitable.lua new file mode 100644 index 00000000..6ac9e836 --- /dev/null +++ b/cdtweaks/luke/lua/tweaks/make_grease_ignitable.lua @@ -0,0 +1,151 @@ +--[[ ++-----------------------+ +| Make Grease ignitable | ++-----------------------+ +--]] + +-- greased targets suffer 3d6 additional fire damage per 1d3 rounds (save vs. breath for half) -- + +function GTGRSFLM(op403CGameEffect, CGameEffect, CGameSprite) + local dmgtype = GT_Resource_SymbolToIDS["dmgtype"] + -- + local roll = Infinity_RandomNumber(1, 3) + -- + local spriteActiveStats = EEex_Sprite_GetActiveStats(CGameSprite) + -- + local spriteMagicResistRoll = CGameSprite.m_magicResistRoll + -- + local savingThrowTable = { + [0x0] = {CGameSprite.m_saveVSSpellRoll, spriteActiveStats.m_nSaveVSSpell}, + [0x1] = {CGameSprite.m_saveVSBreathRoll, spriteActiveStats.m_nSaveVSBreath}, + [0x2] = {CGameSprite.m_saveVSDeathRoll, spriteActiveStats.m_nSaveVSDeath}, + [0x3] = {CGameSprite.m_saveVSWandsRoll, spriteActiveStats.m_nSaveVSWands}, + [0x4] = {CGameSprite.m_saveVSPolyRoll, spriteActiveStats.m_nSaveVSPoly} + } + -- + local immunityToDamage = EEex_Trigger_ParseConditionalString("EEex_IsImmuneToOpcode(Myself,12)") + -- + if CGameEffect.m_effectId == 0xC and EEex_IsMaskSet(CGameEffect.m_dWFlags, dmgtype["FIRE"]) and CGameEffect.m_sourceRes:get() ~= "CDFLMGRS" then + if spriteActiveStats.m_nResistFire < 100 then + if not immunityToDamage:evalConditionalAsAIBase(CGameSprite) then + -- op403 "sees" effects after they have passed their probability roll, but before any saving throws have been made against said effect / other immunity mechanisms have taken place + if spriteMagicResistRoll >= spriteActiveStats.m_nResistMagic then + local success = false + -- + for k, v in pairs(savingThrowTable) do + if EEex_IsBitSet(CGameEffect.m_savingThrow, k) then + local adjustedRoll = v[1] + CGameEffect.m_saveMod -- the greater ``CGameEffect.m_saveMod``, the easier is to succeed + local spriteSaveVS = v[2] + -- + if adjustedRoll >= spriteSaveVS then + success = true + end + break + end + end + -- + if success == false or EEex_IsBitSet(CGameEffect.m_special, 0x8) then -- ignore save check if the Save for Half flag is set + local minLvlCheck = EEex_Trigger_ParseConditionalString(string.format("LevelGT(Myself,%d)", CGameEffect.m_minLevel - 1)) + if CGameEffect.m_minLevel <= 0 or minLvlCheck:evalConditionalAsAIBase(CGameSprite) then + local maxLvlCheck = EEex_Trigger_ParseConditionalString(string.format("LevelLT(Myself,%d)", CGameEffect.m_maxLevel + 1)) + if CGameEffect.m_maxLevel <= 0 or maxLvlCheck:evalConditionalAsAIBase(CGameSprite) then + -- + local effectCodes = {} + -- + if roll == 1 then + effectCodes = { + {["op"] = 12, ["p2"] = dmgtype["FIRE"], ["dnum"] = 3, ["dsize"] = 6, ["stype"] = 0x2, ["spec"] = 0x100}, -- 3d6 (save vs. breath for half) + } + else + effectCodes = { + {["op"] = 215, ["res"] = "#SHROUD", ["p2"] = 1, ["dur"] = (6 * roll) - 6}, -- play visual effect (Over target (attached)) + {["op"] = 12, ["p2"] = dmgtype["FIRE"], ["dnum"] = 3, ["dsize"] = 6, ["stype"] = 0x2, ["spec"] = 0x100}, -- 3d6 (save vs. breath for half) + } + for i = 2, roll do + table.insert(effectCodes, {["op"] = 12, ["p2"] = dmgtype["FIRE"], ["dnum"] = 3, ["dsize"] = 6, ["stype"] = 0x2, ["spec"] = 0x100, ["tmg"] = 4, ["dur"] = (6 * i) - 6}) -- 3d6 (save vs. breath for half) + end + end + -- + for _, attributes in ipairs(effectCodes) do + CGameSprite:applyEffect({ + ["effectID"] = attributes["op"] or EEex_Error("opcode number not specified"), + ["dwFlags"] = attributes["p2"] or 0, + ["savingThrow"] = attributes["stype"] or 0, + ["special"] = attributes["spec"] or 0, + ["numDice"] = attributes["dnum"] or 0, + ["diceSize"] = attributes["dsize"] or 0, + ["res"] = attributes["res"] or "", + ["duration"] = attributes["dur"] or 0, + ["durationType"] = attributes["tmg"] or 0, + ["m_sourceRes"] = "CDFLMGRS", + ["sourceID"] = CGameEffect.m_sourceId, + ["sourceTarget"] = CGameEffect.m_sourceTarget, + }) + end + end + -- + maxLvlCheck:free() + end + -- + minLvlCheck:free() + end + end + end + end + end + -- + immunityToDamage:free() +end + +-- greased targets suffer 3d6 additional fire damage per 1d3 rounds (save vs. breath for half) -- + +EEex_Opcode_AddListsResolvedListener(function(sprite) + -- Sanity check + if not EEex_GameObject_IsSprite(sprite) then + return + end + -- internal function that applies the actual condition + local apply = function() + -- Mark the creature as 'condition applied' + sprite:setLocalInt("cdtweaksMakeGreaseIgnitable", 1) + -- + sprite:applyEffect({ + ["effectID"] = 321, -- Remove effects by resource + ["res"] = "CDGRSFLM", + ["sourceID"] = sprite.m_id, + ["sourceTarget"] = sprite.m_id, + }) + sprite:applyEffect({ + ["effectID"] = 403, -- Screen effects + ["durationType"] = 9, + ["res"] = "GTGRSFLM", -- Lua func + ["m_sourceRes"] = "CDGRSFLM", + ["sourceID"] = sprite.m_id, + ["sourceTarget"] = sprite.m_id, + }) + end + -- since ``EEex_Opcode_AddListsResolvedListener`` is running after the effect lists have been evaluated, ``m_bonusStats`` has already been added to ``m_derivedStats`` by the engine + local spriteGrease = sprite.m_derivedStats.m_bGrease + -- + local applyCondition = spriteGrease > 0 + -- + if sprite:getLocalInt("cdtweaksMakeGreaseIgnitable") == 0 then + if applyCondition then + apply() + end + else + if applyCondition then + -- do nothing + else + -- Mark the creature as 'condition removed' + sprite:setLocalInt("cdtweaksMakeGreaseIgnitable", 0) + -- + sprite:applyEffect({ + ["effectID"] = 321, -- Remove effects by resource + ["res"] = "CDGRSFLM", + ["sourceID"] = sprite.m_id, + ["sourceTarget"] = sprite.m_id, + }) + end + end +end) diff --git a/cdtweaks/luke/vvc/#shroud.vvc b/cdtweaks/luke/vvc/#shroud.vvc new file mode 100644 index 00000000..023e4949 Binary files /dev/null and b/cdtweaks/luke/vvc/#shroud.vvc differ diff --git a/cdtweaks/luke/wav/misc_01c.wav b/cdtweaks/luke/wav/misc_01c.wav new file mode 100644 index 00000000..01238af6 Binary files /dev/null and b/cdtweaks/luke/wav/misc_01c.wav differ diff --git a/cdtweaks/readme-cdtweaks.html b/cdtweaks/readme-cdtweaks.html index 84c933fc..9cacd55d 100644 --- a/cdtweaks/readme-cdtweaks.html +++ b/cdtweaks/readme-cdtweaks.html @@ -1098,6 +1098,13 @@

Rule Changes

+ +

Make Grease Ignitable [Luke]
+ EEex

+

+ "Greased" characters suffer 3d6 (save vs. breath for half) addition fire damage for 1d3 rounds when hit by fire. +

+

Convenience Tweaks and/or Cheats

diff --git a/cdtweaks/setup-cdtweaks.tp2 b/cdtweaks/setup-cdtweaks.tp2 index 5e97fb6f..fb8a563e 100644 --- a/cdtweaks/setup-cdtweaks.tp2 +++ b/cdtweaks/setup-cdtweaks.tp2 @@ -2990,6 +2990,20 @@ REQUIRE_PREDICATE MOD_IS_INSTALLED ~EEex.tp2~ 0 @29 REQUIRE_PREDICATE FILE_EXISTS ~cdtweaks/languages/%LANGUAGE%/circle_kick.tra~ @7 LABEL ~cd_tweaks_circle_kick~ +/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// +/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// +///// \\\\\///// +///// Make Grease ignitable \\\\\ +///// \\\\\///// +/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// +/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// + +BEGIN @265000 DESIGNATED 2650 +GROUP @9 +REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet iwdee~ @25 +REQUIRE_PREDICATE MOD_IS_INSTALLED ~EEex.tp2~ 0 @29 +LABEL ~cd_tweaks_make_grease_ignitable~ + /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ ///// \\\\\