From 26c1fa51bfc9905da27fccb6bc0d209297663eeb Mon Sep 17 00:00:00 2001 From: Sida Wang <42928828+sida-wang@users.noreply.github.com> Date: Mon, 29 Jan 2024 21:58:16 +1100 Subject: [PATCH 1/2] Add support for Everlasting Sacrifice --- src/Data/ModCache.lua | 3 +-- src/Modules/ConfigOptions.lua | 6 ++++++ src/Modules/ModParser.lua | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index 4ca483d458..d107e237b7 100644 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -7704,8 +7704,7 @@ c["Eternal Youth"]={{[1]={flags=0,keywordFlags=0,name="Keystone",type="LIST",val c["Evasion Rating is Doubled against Projectile Attacks"]={{[1]={flags=0,keywordFlags=0,name="ProjectileEvasion",type="MORE",value=100}},nil} c["Evasion Rating is increased by Overcapped Cold Resistance"]={{[1]={flags=0,keywordFlags=0,name="EvasionRatingIncreasedByOvercappedColdRes",type="FLAG",value=true}},nil} c["Evasion Rating is increased by Uncapped Cold Resistance"]={{[1]={flags=0,keywordFlags=0,name="EvasionRatingIncreasedByUncappedColdRes",type="FLAG",value=true}},nil} -c["Everlasting Sacrifice"]={nil,"Everlasting Sacrifice "} -c["Everlasting Sacrifice Immortal Ambition"]={nil,"Everlasting Sacrifice Immortal Ambition "} +c["Everlasting Sacrifice"]={{[1]={flags=0,keywordFlags=0,name="Condition:EverlastingSacrifice",type="FLAG",value=true}},nil} c["Every 10 seconds, gain 30% of Physical Damage"]={nil,"Every 10 seconds, gain 30% of Physical Damage "} c["Every 10 seconds, gain 30% of Physical Damage as Extra Fire Damage for 4 seconds"]={{[1]={[1]={type="Condition",var="NgamahuFlamesAdvance"},flags=0,keywordFlags=0,name="PhysicalDamageGainAsFire",type="BASE",value=30}},nil} c["Every 10 seconds:"]={{},nil} diff --git a/src/Modules/ConfigOptions.lua b/src/Modules/ConfigOptions.lua index 85b5330dce..bafbcfc35b 100644 --- a/src/Modules/ConfigOptions.lua +++ b/src/Modules/ConfigOptions.lua @@ -1434,6 +1434,12 @@ Huge sets the radius to 11. { var = "GamblesprintMovementSpeed", type = "list", label = "Gamblesprint Movement Speed", defaultIndex=5, list={{val=-40,label="-40%"},{val=-20,label="-20%"},{val=0,label="0%"},{val=20,label="20%"},{val=30,label="30%"},{val=40,label="40%"},{val=60,label="60%"},{val=80,label="80%"},{val=100,label="100%"}}, ifFlag = "Condition:HaveGamblesprint", tooltip = "This option sets the Movement Speed from Gamblesprint boots.", apply = function(val, modList, enemyModList) modList:NewMod("MovementSpeed", "INC", val, "Config", { type = "Condition", var = "Combat" }, { type = "Condition", var = "HaveGamblesprint" }) end }, + { var = "EverlastingSacrifice", type = "check", label = "Do you have Everlasting Sacrifice?", ifFlag = "Condition:EverlastingSacrifice", tooltip = "This option enables the Everlasting Sacrifice buff that grants +5% to all maximum resists.", apply = function(val, modList , enemyModList) + modList:NewMod("FireResistMax", "BASE", 5, "Config", { type = "Condition", var = "Combat" }, { type = "Condition", var = "EverlastingSacrifice"}) + modList:NewMod("ColdResistMax", "BASE", 5, "Config", { type = "Condition", var = "Combat" }, { type = "Condition", var = "EverlastingSacrifice"}) + modList:NewMod("LightningResistMax", "BASE", 5, "Config", { type = "Condition", var = "Combat" }, { type = "Condition", var = "EverlastingSacrifice"}) + modList:NewMod("ChaosResistMax", "BASE", 5, "Config", { type = "Condition", var = "Combat" }, { type = "Condition", var = "EverlastingSacrifice"}) + end }, { var = "buffFanaticism", type = "check", label = "Do you have Fanaticism?", ifFlag = "Condition:CanGainFanaticism", tooltip = "This will enable the Fanaticism buff itself. (Grants 75% more cast speed, reduced skill cost, and increased area of effect)", apply = function(val, modList, enemyModList) modList:NewMod("Condition:Fanaticism", "FLAG", true, "Config", { type = "Condition", var = "Combat" }, { type = "Condition", var = "CanGainFanaticism" }) end }, diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 6d25005543..6153809664 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -2716,6 +2716,10 @@ local specialModList = { --Doomsower, Lion Sword ["attack skills gain (%d+)%% of physical damage as extra fire damage per socketed red gem"] = function(num) return { mod("SocketProperty", "LIST", { value = mod("PhysicalDamageGainAsFire", "BASE", num, nil, ModFlag.Attack) }, { type = "SocketedIn", slotName = "{SlotName}", keyword = "strength", sockets = {1,2,3,4,5,6} }) } end, ["you have vaal pact while all socketed gems are red"] = { mod("GroupProperty", "LIST", { value = mod("Keystone", "LIST", "Vaal Pact") }, { type = "SocketedIn", slotName = "{SlotName}", socketColor = "R", sockets = "all" }) }, + -- Mahuxotl's Machination Steel Kite Shield + ["everlasting sacrifice"] = { + flag("Condition:EverlastingSacrifice") + }, -- Self hit dmg ["take (%d+) (.+) damage when you ignite an enemy"] = function(dmg, _, dmgType) return { mod("EyeOfInnocenceSelfDamage", "LIST", {baseDamage = dmg, damageType = dmgType}) From f3faf6654e98e42701456a1b7f2bdb6a2c5821ec Mon Sep 17 00:00:00 2001 From: Sida Wang <42928828+sida-wang@users.noreply.github.com> Date: Mon, 29 Jan 2024 22:20:06 +1100 Subject: [PATCH 2/2] fix: use ElementalResistMax mod --- src/Modules/ConfigOptions.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Modules/ConfigOptions.lua b/src/Modules/ConfigOptions.lua index bafbcfc35b..fa339fb4cd 100644 --- a/src/Modules/ConfigOptions.lua +++ b/src/Modules/ConfigOptions.lua @@ -1435,9 +1435,7 @@ Huge sets the radius to 11. modList:NewMod("MovementSpeed", "INC", val, "Config", { type = "Condition", var = "Combat" }, { type = "Condition", var = "HaveGamblesprint" }) end }, { var = "EverlastingSacrifice", type = "check", label = "Do you have Everlasting Sacrifice?", ifFlag = "Condition:EverlastingSacrifice", tooltip = "This option enables the Everlasting Sacrifice buff that grants +5% to all maximum resists.", apply = function(val, modList , enemyModList) - modList:NewMod("FireResistMax", "BASE", 5, "Config", { type = "Condition", var = "Combat" }, { type = "Condition", var = "EverlastingSacrifice"}) - modList:NewMod("ColdResistMax", "BASE", 5, "Config", { type = "Condition", var = "Combat" }, { type = "Condition", var = "EverlastingSacrifice"}) - modList:NewMod("LightningResistMax", "BASE", 5, "Config", { type = "Condition", var = "Combat" }, { type = "Condition", var = "EverlastingSacrifice"}) + modList:NewMod("ElementalResistMax", "BASE", 5, "Config", { type = "Condition", var = "Combat" }, { type = "Condition", var = "EverlastingSacrifice"}) modList:NewMod("ChaosResistMax", "BASE", 5, "Config", { type = "Condition", var = "Combat" }, { type = "Condition", var = "EverlastingSacrifice"}) end }, { var = "buffFanaticism", type = "check", label = "Do you have Fanaticism?", ifFlag = "Condition:CanGainFanaticism", tooltip = "This will enable the Fanaticism buff itself. (Grants 75% more cast speed, reduced skill cost, and increased area of effect)", apply = function(val, modList, enemyModList)