From 8ad7213bc11fff8e22a7f2e7aba0a312c14f7518 Mon Sep 17 00:00:00 2001 From: Paliak <91493239+Paliak@users.noreply.github.com> Date: Thu, 18 Aug 2022 14:22:58 +0200 Subject: [PATCH 01/11] FIX: fix binary mods from auras scaling with aura effect --- src/Data/Skills/act_dex.lua | 6 ++++++ src/Data/Skills/act_int.lua | 19 +++++++++++-------- src/Data/Skills/act_str.lua | 3 +++ src/Export/Skills/act_dex.txt | 6 ++++++ src/Export/Skills/act_int.txt | 19 +++++++++++-------- src/Export/Skills/act_str.txt | 3 +++ src/Modules/CalcPerform.lua | 4 ++++ 7 files changed, 44 insertions(+), 16 deletions(-) diff --git a/src/Data/Skills/act_dex.lua b/src/Data/Skills/act_dex.lua index 0f58cbe439..ff6e5dac11 100644 --- a/src/Data/Skills/act_dex.lua +++ b/src/Data/Skills/act_dex.lua @@ -6533,6 +6533,12 @@ skills["ColdImpurity"] = { ["base_maximum_cold_damage_resistance_%"] = { mod("ColdResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), }, + ["base_immune_to_freeze"] = { + mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + }, + ["base_immune_to_chill"] = { + mod("AvoidChill", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + }, }, baseFlags = { spell = true, diff --git a/src/Data/Skills/act_int.lua b/src/Data/Skills/act_int.lua index 38535809ca..34676a0d1a 100644 --- a/src/Data/Skills/act_int.lua +++ b/src/Data/Skills/act_int.lua @@ -1616,7 +1616,7 @@ skills["VaalClarity"] = { castTime = 0, statMap = { ["no_mana_cost"] = { - mod("ManaCost", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), + mod("ManaCost", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true}), value = -100, }, }, @@ -7566,13 +7566,13 @@ skills["Purity"] = { }, baseMods = { skill("radius", 40), - mod("AvoidShock", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), - mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), - mod("AvoidChill", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), - mod("AvoidIgnite", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), - mod("AvoidSap", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), - mod("AvoidBrittle", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), - mod("AvoidScorch", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), + mod("AvoidShock", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + mod("AvoidChill", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + mod("AvoidIgnite", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + mod("AvoidSap", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + mod("AvoidBrittle", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + mod("AvoidScorch", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), }, qualityStats = { Default = { @@ -7737,6 +7737,9 @@ skills["LightningImpurity"] = { ["base_maximum_lightning_damage_resistance_%"] = { mod("LightningResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), }, + ["base_immune_to_shock"] = { + mod("AvoidShock", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + }, }, baseFlags = { spell = true, diff --git a/src/Data/Skills/act_str.lua b/src/Data/Skills/act_str.lua index 76b4c80d59..7a316bc214 100644 --- a/src/Data/Skills/act_str.lua +++ b/src/Data/Skills/act_str.lua @@ -5384,6 +5384,9 @@ skills["FireImpurity"] = { ["base_maximum_fire_damage_resistance_%"] = { mod("FireResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), }, + ["base_immune_to_ignite"] = { + mod("AvoidIgnite", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + }, }, baseFlags = { spell = true, diff --git a/src/Export/Skills/act_dex.txt b/src/Export/Skills/act_dex.txt index f9a395840c..fd0e018530 100644 --- a/src/Export/Skills/act_dex.txt +++ b/src/Export/Skills/act_dex.txt @@ -1214,6 +1214,12 @@ local skills, mod, flag, skill = ... ["base_maximum_cold_damage_resistance_%"] = { mod("ColdResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), }, + ["base_immune_to_freeze"] = { + mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + }, + ["base_immune_to_chill"] = { + mod("AvoidChill", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + }, }, #mods diff --git a/src/Export/Skills/act_int.txt b/src/Export/Skills/act_int.txt index d0b7544775..d442d27fb5 100644 --- a/src/Export/Skills/act_int.txt +++ b/src/Export/Skills/act_int.txt @@ -432,7 +432,7 @@ local skills, mod, flag, skill = ... #flags spell aura area duration statMap = { ["no_mana_cost"] = { - mod("ManaCost", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), + mod("ManaCost", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true}), value = -100, }, }, @@ -1566,13 +1566,13 @@ local skills, mod, flag, skill = ... }, }, #baseMod skill("radius", 40) -#baseMod mod("AvoidShock", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }) -#baseMod mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }) -#baseMod mod("AvoidChill", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }) -#baseMod mod("AvoidIgnite", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }) -#baseMod mod("AvoidSap", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }) -#baseMod mod("AvoidBrittle", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }) -#baseMod mod("AvoidScorch", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura" }) +#baseMod mod("AvoidShock", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), +#baseMod mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), +#baseMod mod("AvoidChill", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), +#baseMod mod("AvoidIgnite", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), +#baseMod mod("AvoidSap", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), +#baseMod mod("AvoidBrittle", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), +#baseMod mod("AvoidScorch", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), #mods #skill LightningResistAura @@ -1603,6 +1603,9 @@ local skills, mod, flag, skill = ... ["base_maximum_lightning_damage_resistance_%"] = { mod("LightningResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), }, + ["base_immune_to_shock"] = { + mod("AvoidShock", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + }, }, #mods diff --git a/src/Export/Skills/act_str.txt b/src/Export/Skills/act_str.txt index a3c49861dc..b8ee7258f8 100644 --- a/src/Export/Skills/act_str.txt +++ b/src/Export/Skills/act_str.txt @@ -958,6 +958,9 @@ local skills, mod, flag, skill = ... ["base_maximum_fire_damage_resistance_%"] = { mod("FireResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), }, + ["base_immune_to_ignite"] = { + mod("AvoidIgnite", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + }, }, #mods diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua index 1a4687abf8..f72f811d81 100644 --- a/src/Modules/CalcPerform.lua +++ b/src/Modules/CalcPerform.lua @@ -1865,6 +1865,7 @@ function calcs.perform(env, avoidCache) srcList:ScaleAddList(buff.modList, mult) srcList:ScaleAddList(extraAuraModList, mult) mergeBuff(srcList, buffs, buff.name) + mergeBuff(buff.unscalableModList, buffs, buff.name) end if env.minion and not (modDB:Flag(nil, "SelfAurasCannotAffectAllies") or modDB:Flag(nil, "SelfAurasOnlyAffectYou") or modDB:Flag(nil, "SelfAuraSkillsCannotAffectAllies")) then activeSkill.minionBuffSkill = true @@ -1877,6 +1878,7 @@ function calcs.perform(env, avoidCache) srcList:ScaleAddList(buff.modList, mult) srcList:ScaleAddList(extraAuraModList, mult) mergeBuff(srcList, minionBuffs, buff.name) + mergeBuff(buff.unscalableModList, buffs, buff.name) end end elseif buff.type == "Debuff" or buff.type == "AuraDebuff" then @@ -1999,6 +2001,7 @@ function calcs.perform(env, avoidCache) local more = skillModList:More(skillCfg, "AuraEffect", "BuffEffect") * modDB:More(nil, "BuffEffectOnSelf", "AuraEffectOnSelf") srcList:ScaleAddList(buff.modList, (1 + inc / 100) * more) mergeBuff(srcList, buffs, buff.name) + mergeBuff(buff.unscalableModList, buffs, buff.name) end if env.minion and (env.minion ~= activeSkill.minion or not activeSkill.skillData.auraCannotAffectSelf) then local srcList = new("ModList") @@ -2006,6 +2009,7 @@ function calcs.perform(env, avoidCache) local more = skillModList:More(skillCfg, "AuraEffect", "BuffEffect") * env.minion.modDB:More(nil, "BuffEffectOnSelf", "AuraEffectOnSelf") srcList:ScaleAddList(buff.modList, (1 + inc / 100) * more) mergeBuff(srcList, minionBuffs, buff.name) + mergeBuff(buff.unscalableModList, minionBuffs, buff.name) end end elseif buff.type == "Curse" then From 3809093107ce8b76bc1ec87b150e4cbd5c5b15a7 Mon Sep 17 00:00:00 2001 From: Paliak <91493239+Paliak@users.noreply.github.com> Date: Thu, 18 Aug 2022 15:17:06 +0200 Subject: [PATCH 02/11] FIX: fix odd scaling of avoid modifiers from auras. --- src/Data/SkillStatMap.lua | 12 ------------ src/Data/Skills/act_dex.lua | 14 ++++++++++++-- src/Data/Skills/act_int.lua | 8 +++++++- src/Data/Skills/act_str.lua | 5 ++++- src/Export/Skills/act_dex.txt | 10 ++++++++-- src/Export/Skills/act_int.txt | 3 ++- src/Export/Skills/act_str.txt | 3 ++- 7 files changed, 35 insertions(+), 20 deletions(-) diff --git a/src/Data/SkillStatMap.lua b/src/Data/SkillStatMap.lua index 9c93cc0f04..9749de6062 100644 --- a/src/Data/SkillStatMap.lua +++ b/src/Data/SkillStatMap.lua @@ -415,18 +415,6 @@ return { ["base_avoid_stun_%"] = { mod("AvoidStun", "BASE", nil), }, -["base_immune_to_shock"] = { - mod("AvoidShock", "BASE", 100), -}, -["base_immune_to_chill"] = { - mod("AvoidChill", "BASE", 100), -}, -["base_immune_to_freeze"] = { - mod("AvoidFreeze", "BASE", 100), -}, -["base_immune_to_ignite"] = { - mod("AvoidIgnite", "BASE", 100), -}, ["avoid_interruption_while_using_this_skill_%"] = { mod("AvoidInterruptStun", "BASE", nil) }, diff --git a/src/Data/Skills/act_dex.lua b/src/Data/Skills/act_dex.lua index ff6e5dac11..966ce9bf41 100644 --- a/src/Data/Skills/act_dex.lua +++ b/src/Data/Skills/act_dex.lua @@ -213,6 +213,12 @@ skills["ArcticArmour"] = { ["new_arctic_armour_fire_damage_taken_when_hit_+%_final"] = { mod("FireDamageTakenWhenHit", "MORE", nil, 0, 0, { type = "Condition", var = "Stationary" }, { type = "GlobalEffect", effectType = "Buff" }), }, + ["base_immune_to_freeze"] = { + --Display only + }, + }, + baseMods = { + mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), }, baseFlags = { spell = true, @@ -6534,12 +6540,16 @@ skills["ColdImpurity"] = { mod("ColdResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), }, ["base_immune_to_freeze"] = { - mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + --Display only }, ["base_immune_to_chill"] = { - mod("AvoidChill", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + --Display only }, }, + baseMods = { + mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + mod("AvoidChill", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + }, baseFlags = { spell = true, aura = true, diff --git a/src/Data/Skills/act_int.lua b/src/Data/Skills/act_int.lua index 34676a0d1a..c3a8f94bdb 100644 --- a/src/Data/Skills/act_int.lua +++ b/src/Data/Skills/act_int.lua @@ -7558,6 +7558,9 @@ skills["Purity"] = { ["reduce_enemy_elemental_resistance_%"] = { mod("ElementalPenetration", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), }, + ["immune_to_status_ailments"] = { + --Display only + } }, baseFlags = { spell = true, @@ -7738,9 +7741,12 @@ skills["LightningImpurity"] = { mod("LightningResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), }, ["base_immune_to_shock"] = { - mod("AvoidShock", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + --Display only }, }, + baseMods = { + mod("AvoidShock", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + }, baseFlags = { spell = true, aura = true, diff --git a/src/Data/Skills/act_str.lua b/src/Data/Skills/act_str.lua index 7a316bc214..c74fc7081e 100644 --- a/src/Data/Skills/act_str.lua +++ b/src/Data/Skills/act_str.lua @@ -5385,9 +5385,12 @@ skills["FireImpurity"] = { mod("FireResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), }, ["base_immune_to_ignite"] = { - mod("AvoidIgnite", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + --Display only }, }, + baseMods = { + mod("AvoidIgnite", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + }, baseFlags = { spell = true, aura = true, diff --git a/src/Export/Skills/act_dex.txt b/src/Export/Skills/act_dex.txt index fd0e018530..30ff84fbbb 100644 --- a/src/Export/Skills/act_dex.txt +++ b/src/Export/Skills/act_dex.txt @@ -52,7 +52,11 @@ local skills, mod, flag, skill = ... ["new_arctic_armour_fire_damage_taken_when_hit_+%_final"] = { mod("FireDamageTakenWhenHit", "MORE", nil, 0, 0, { type = "Condition", var = "Stationary" }, { type = "GlobalEffect", effectType = "Buff" }), }, + ["base_immune_to_freeze"] = { + --Display only + }, }, +#baseMod mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), #mods #skill ArtilleryBallista @@ -1215,12 +1219,14 @@ local skills, mod, flag, skill = ... mod("ColdResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), }, ["base_immune_to_freeze"] = { - mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + --Display only }, ["base_immune_to_chill"] = { - mod("AvoidChill", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + --Display only }, }, +#baseMod mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), +#baseMod mod("AvoidChill", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), #mods #skill RainOfArrows diff --git a/src/Export/Skills/act_int.txt b/src/Export/Skills/act_int.txt index d442d27fb5..4d827999a7 100644 --- a/src/Export/Skills/act_int.txt +++ b/src/Export/Skills/act_int.txt @@ -1604,9 +1604,10 @@ local skills, mod, flag, skill = ... mod("LightningResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), }, ["base_immune_to_shock"] = { - mod("AvoidShock", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + --Display only }, }, +#baseMod mod("AvoidShock", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), #mods #skill MortarBarrageMine diff --git a/src/Export/Skills/act_str.txt b/src/Export/Skills/act_str.txt index b8ee7258f8..328bf01916 100644 --- a/src/Export/Skills/act_str.txt +++ b/src/Export/Skills/act_str.txt @@ -959,9 +959,10 @@ local skills, mod, flag, skill = ... mod("FireResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), }, ["base_immune_to_ignite"] = { - mod("AvoidIgnite", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + --Display only }, }, +#baseMod mod("AvoidIgnite", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), #mods #skill RageVortex From d04048864e985b2c8e2516112285d6c945835c49 Mon Sep 17 00:00:00 2001 From: Paliak <91493239+Paliak@users.noreply.github.com> Date: Thu, 18 Aug 2022 18:51:46 +0200 Subject: [PATCH 03/11] FIX: wron argument to mergeBuffs --- src/Modules/CalcPerform.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua index f72f811d81..2c658d71ab 100644 --- a/src/Modules/CalcPerform.lua +++ b/src/Modules/CalcPerform.lua @@ -1878,7 +1878,7 @@ function calcs.perform(env, avoidCache) srcList:ScaleAddList(buff.modList, mult) srcList:ScaleAddList(extraAuraModList, mult) mergeBuff(srcList, minionBuffs, buff.name) - mergeBuff(buff.unscalableModList, buffs, buff.name) + mergeBuff(buff.unscalableModList, minionBuffs, buff.name) end end elseif buff.type == "Debuff" or buff.type == "AuraDebuff" then From 711e9c76fcad0d2594d46e6da00af98ac0229573 Mon Sep 17 00:00:00 2001 From: Paliak <91493239+Paliak@users.noreply.github.com> Date: Sat, 20 Aug 2022 18:55:21 +0200 Subject: [PATCH 04/11] FIX: Add unscalabe flags to tempest shield shock avoidance and add a dummy display stat. Re add entries in skillStatMap in case they're used by something. --- src/Data/SkillStatMap.lua | 12 ++++++++++++ src/Data/Skills/act_int.lua | 5 ++++- src/Export/Skills/act_int.txt | 5 ++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/Data/SkillStatMap.lua b/src/Data/SkillStatMap.lua index 9749de6062..9c93cc0f04 100644 --- a/src/Data/SkillStatMap.lua +++ b/src/Data/SkillStatMap.lua @@ -415,6 +415,18 @@ return { ["base_avoid_stun_%"] = { mod("AvoidStun", "BASE", nil), }, +["base_immune_to_shock"] = { + mod("AvoidShock", "BASE", 100), +}, +["base_immune_to_chill"] = { + mod("AvoidChill", "BASE", 100), +}, +["base_immune_to_freeze"] = { + mod("AvoidFreeze", "BASE", 100), +}, +["base_immune_to_ignite"] = { + mod("AvoidIgnite", "BASE", 100), +}, ["avoid_interruption_while_using_this_skill_%"] = { mod("AvoidInterruptStun", "BASE", nil) }, diff --git a/src/Data/Skills/act_int.lua b/src/Data/Skills/act_int.lua index c3a8f94bdb..1c5645224c 100644 --- a/src/Data/Skills/act_int.lua +++ b/src/Data/Skills/act_int.lua @@ -11018,6 +11018,9 @@ skills["TempestShield"] = { ["shield_spell_block_%"] = { mod("SpellBlockChance", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }), }, + ["skill_display_buff_grants_shock_immunity"] = { + --Dispaly only + } }, baseFlags = { spell = true, @@ -11025,7 +11028,7 @@ skills["TempestShield"] = { chaining = true, }, baseMods = { - mod("AvoidShock", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Buff" }), + mod("AvoidShock", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }), }, qualityStats = { Default = { diff --git a/src/Export/Skills/act_int.txt b/src/Export/Skills/act_int.txt index 4d827999a7..247cb70ecf 100644 --- a/src/Export/Skills/act_int.txt +++ b/src/Export/Skills/act_int.txt @@ -2192,8 +2192,11 @@ local skills, mod, flag, skill = ... ["shield_spell_block_%"] = { mod("SpellBlockChance", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }), }, + ["skill_display_buff_grants_shock_immunity"] = { + --Dispaly only + } }, -#baseMod mod("AvoidShock", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Buff" }) +#baseMod mod("AvoidShock", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }) #mods #skill VoltaxicBurst From bce18ec8419b6d863deeb671b156f150f914e674 Mon Sep 17 00:00:00 2001 From: QuickStick <31533893+QuickStick123@users.noreply.github.com> Date: Tue, 6 Sep 2022 16:50:47 +1000 Subject: [PATCH 05/11] Add support for poision immunity and fix scalability --- src/Classes/ModStore.lua | 9 ++- src/Modules/ModParser.lua | 135 +++++++++++++++++++------------------- 2 files changed, 76 insertions(+), 68 deletions(-) diff --git a/src/Classes/ModStore.lua b/src/Classes/ModStore.lua index e5ff9ff20a..0ec2935779 100644 --- a/src/Classes/ModStore.lua +++ b/src/Classes/ModStore.lua @@ -34,7 +34,14 @@ local ModStoreClass = newClass("ModStore", function(self, parent) end) function ModStoreClass:ScaleAddMod(mod, scale) - if scale == 1 then + local unscalable = false + for _, effects in ipairs(mod) do + if effects.type == "Unscalable" then + unscalable = true + break + end + end + if scale == 1 or unscalable then self:AddMod(mod) else scale = m_max(scale, 0) diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 6a1012a3a5..96c53dd923 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -1736,7 +1736,7 @@ local specialModList = { ["immune to elemental ailments while on consecrated ground"] = function() local mods = { } for i, ailment in ipairs(data.elementalAilmentTypeList) do - mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "OnConsecratedGround" }) + mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "OnConsecratedGround" }, { type = "Unscalable" }) end return mods end, @@ -1762,7 +1762,7 @@ local specialModList = { flag("Condition:CanGainRage"), }, ["inherent effects from having rage are tripled"] = { mod("Multiplier:RageEffect", "BASE", 2) }, - ["cannot be stunned while you have at least (%d+) rage"] = function(num) return { mod("AvoidStun", "BASE", 100, { type = "MultiplierThreshold", var = "Rage", threshold = num }) } end, + ["cannot be stunned while you have at least (%d+) rage"] = function(num) return { mod("AvoidStun", "BASE", 100, { type = "MultiplierThreshold", var = "Rage", threshold = num }, { type = "Unscalable" }) } end, ["lose ([%d%.]+)%% of life per second per rage while you are not losing rage"] = function(num) return { mod("LifeDegen", "BASE", 1, { type = "PercentStat", stat = "Life", percent = num }, { type = "Multiplier", var = "Rage"}) } end, ["if you've warcried recently, you and nearby allies have (%d+)%% increased attack speed"] = function(num) return { mod("ExtraAura", "LIST", { mod = mod("Speed", "INC", num, nil, ModFlag.Attack) }, { type = "Condition", var = "UsedWarcryRecently" }) } end, ["gain (%d+)%% increased armour per (%d+) power for 8 seconds when you warcry, up to a maximum of (%d+)%%"] = function(num, _, div, limit) return { @@ -1774,8 +1774,8 @@ local specialModList = { ["exerted attacks deal (%d+)%% more attack damage if a warcry sacrificed rage recently"] = function(num) return { mod("ExertAttackIncrease", "MORE", num, nil, ModFlag.Attack, 0) } end, ["deal (%d+)%% less damage"] = function(num) return { mod("Damage", "MORE", -num) } end, -- Champion - ["cannot be stunned while you have fortify"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "Fortified" }) }, - ["cannot be stunned while fortified"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "Fortified" }) }, + ["cannot be stunned while you have fortify"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "Fortified" }, { type = "Unscalable" }) }, + ["cannot be stunned while fortified"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "Fortified" }, { type = "Unscalable" }) }, ["fortify"] = { flag("Condition:Fortified") }, ["you have (%d+) fortification"] = function(num) return { flag("Condition:Fortified") @@ -1837,7 +1837,7 @@ local specialModList = { }, ["(%d+)%% increased area of effect while you don't have convergence"] = function(num) return { mod("AreaOfEffect", "INC", num, { type = "Condition", neg = true, var = "Convergence" }) } end, ["exposure you inflict applies an extra (%-?%d+)%% to the affected resistance"] = function(num) return { mod("ExtraExposure", "BASE", num) } end, - ["cannot take reflected elemental damage"] = { mod("ElementalReflectedDamageTaken", "MORE", -100) }, + ["cannot take reflected elemental damage"] = { mod("ElementalReflectedDamageTaken", "MORE", -100, { type = "Unscalable" }) }, ["every %d+ seconds:"] = { }, ["gain chilling conflux for %d seconds"] = { flag("PhysicalCanChill", { type = "Condition", var = "ChillingConflux" }), @@ -1879,7 +1879,7 @@ local specialModList = { ["immune to elemental ailments while affected by glorious madness"] = function() local mods = { } for i, ailment in ipairs(data.elementalAilmentTypeList) do - mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "AffectedByGloriousMadness" }) + mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "AffectedByGloriousMadness" }, { type = "Unscalable" }) end return mods end, @@ -1976,7 +1976,7 @@ local specialModList = { ["grants maximum energy shield equal to (%d+)%% of your reserved mana to you and nearby allies"] = function(num) return { mod("GrantReservedManaAsAura", "LIST", { mod = mod("EnergyShield", "BASE", num / 100) }) } end, ["warcries cost no mana"] = { mod("ManaCost", "MORE", -100, nil, 0, KeywordFlag.Warcry) }, ["%+(%d+)%% chance to block attack damage for %d seconds? every %d seconds"] = function(num) return { mod("BlockChance", "BASE", num, { type = "Condition", var = "BastionOfHopeActive" }) } end, - ["if you've blocked in the past %d+ seconds, you and nearby allies cannot be stunned"] = { mod("ExtraAura", "LIST", { mod = mod("AvoidStun", "BASE", 100) }, { type = "Condition", var = "BlockedRecently" }) }, + ["if you've blocked in the past %d+ seconds, you and nearby allies cannot be stunned"] = { mod("ExtraAura", "LIST", { mod = mod("AvoidStun", "BASE", 100) }, { type = "Condition", var = "BlockedRecently" }, { type = "Unscalable" }) }, ["if you've attacked recently, you and nearby allies have %+(%d+)%% chance to block attack damage"] = function(num) return { mod("ExtraAura", "LIST", { mod = mod("BlockChance", "BASE", num) }, { type = "Condition", var = "AttackedRecently" }) } end, ["if you've cast a spell recently, you and nearby allies have %+(%d+)%% chance to block spell damage"] = function(num) return { mod("ExtraAura", "LIST", { mod = mod("SpellBlockChance", "BASE", num) }, { type = "Condition", var = "CastSpellRecently" }) } end, ["while there is at least one nearby ally, you and nearby allies deal (%d+)%% more damage"] = function(num) return { mod("ExtraAura", "LIST", { mod = mod("Damage", "MORE", num) }, { type = "MultiplierThreshold", var = "NearbyAlly", threshold = 1 }) } end, @@ -1990,7 +1990,7 @@ local specialModList = { ["immune to elemental ailments while you have arcane surge"] = function() local mods = { } for i, ailment in ipairs(data.elementalAilmentTypeList) do - mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "AffectedByArcaneSurge" }) + mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "AffectedByArcaneSurge" }, { type = "Unscalable" }) end return mods end, @@ -2023,10 +2023,10 @@ local specialModList = { } end, -- Juggernaut ["armour received from body armour is doubled"] = { flag("Unbreakable") }, - ["action speed cannot be modified to below base value"] = { mod("MinimumActionSpeed", "MAX", 100) }, + ["action speed cannot be modified to below base value"] = { mod("MinimumActionSpeed", "MAX", 100, { type = "Unscalable" }) }, ["movement speed cannot be modified to below base value"] = { flag("MovementSpeedCannotBeBelowBase") }, - ["you cannot be slowed to below base speed"] = { mod("MinimumActionSpeed", "MAX", 100) }, - ["cannot be slowed to below base speed"] = { mod("MinimumActionSpeed", "MAX", 100) }, + ["you cannot be slowed to below base speed"] = { mod("MinimumActionSpeed", "MAX", 100, { type = "Unscalable" }) }, + ["cannot be slowed to below base speed"] = { mod("MinimumActionSpeed", "MAX", 100, { type = "Unscalable" }) }, ["gain accuracy rating equal to your strength"] = { mod("Accuracy", "BASE", 1, { type = "PerStat", stat = "Str" }) }, ["gain accuracy rating equal to twice your strength"] = { mod("Accuracy", "BASE", 2, { type = "PerStat", stat = "Str" }) }, -- Necromancer @@ -2054,7 +2054,7 @@ local specialModList = { ["when you kill an enemy, for each curse on that enemy, gain (%d+)%% of non%-chaos damage as extra chaos damage for 4 seconds"] = function(num) return { mod("NonChaosDamageGainAsChaos", "BASE", num, { type = "Condition", var = "KilledRecently" }, { type = "Multiplier", var = "CurseOnEnemy" }), } end, - ["cannot be stunned while you have energy shield"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "HaveEnergyShield" }) }, + ["cannot be stunned while you have energy shield"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "HaveEnergyShield" }, { type = "Unscalable" }) }, ["every second, inflict withered on nearby enemies for (%d+) seconds"] = { flag("Condition:CanWither") }, ["nearby hindered enemies deal (%d+)%% reduced damage over time"] = function(num) return { mod("EnemyModifier", "LIST", { mod = mod("DamageOverTime", "INC", -num) }, { type = "ActorCondition", actor = "enemy", var = "Hindered" }) } end, ["nearby chilled enemies deal (%d+)%% reduced damage with hits"] = function(num) return { mod("EnemyModifier", "LIST", { mod = mod("Damage", "INC", -num) }, { type = "ActorCondition", actor = "enemy", var = "Chilled" }) } end, @@ -2064,7 +2064,7 @@ local specialModList = { ["immune to elemental ailments during any flask effect"] = function() local mods = { } for i, ailment in ipairs(data.elementalAilmentTypeList) do - mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "UsingFlask" }) + mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "UsingFlask" }, { type = "Unscalable" }) end return mods end, @@ -2073,7 +2073,7 @@ local specialModList = { ["immune to elemental ailments while phasing"] = function() local mods = { } for i, ailment in ipairs(data.elementalAilmentTypeList) do - mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "Phasing" }) + mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "Phasing" }, { type = "Unscalable" }) end return mods end, @@ -2084,26 +2084,26 @@ local specialModList = { } end, -- Saboteur ["immune to ignite and shock"] = { - mod("AvoidIgnite", "BASE", 100), - mod("AvoidShock", "BASE", 100), + mod("AvoidIgnite", "BASE", 100, { type = "Unscalable" }), + mod("AvoidShock", "BASE", 100, { type = "Unscalable" }), }, ["you gain (%d+)%% increased damage for each trap"] = function(num) return { mod("Damage", "INC", num, { type = "PerStat", stat = "ActiveTrapLimit" }) } end, ["you gain (%d+)%% increased area of effect for each mine"] = function(num) return { mod("AreaOfEffect", "INC", num, { type = "PerStat", stat = "ActiveMineLimit" }) } end, -- Slayer ["deal up to (%d+)%% more melee damage to enemies, based on proximity"] = function(num) return { mod("Damage", "MORE", num, nil, bor(ModFlag.Attack, ModFlag.Melee), { type = "MeleeProximity", ramp = {1,0} }) } end, - ["cannot be stunned while leeching"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "Leeching" }) }, - ["you are immune to bleeding while leeching"] = { mod("AvoidBleed", "BASE", 100, { type = "Condition", var = "Leeching" }) }, + ["cannot be stunned while leeching"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "Leeching" }, { type = "Unscalable" }) }, + ["you are immune to bleeding while leeching"] = { mod("AvoidBleed", "BASE", 100, { type = "Condition", var = "Leeching" }, { type = "Unscalable" }) }, ["life leech effects are not removed at full life"] = { flag("CanLeechLifeOnFullLife") }, ["life leech effects are not removed when unreserved life is filled"] = { flag("CanLeechLifeOnFullLife") }, ["energy shield leech effects from attacks are not removed at full energy shield"] = { flag("CanLeechEnergyShieldOnFullEnergyShield") }, - ["cannot take reflected physical damage"] = { mod("PhysicalReflectedDamageTaken", "MORE", -100) }, + ["cannot take reflected physical damage"] = { mod("PhysicalReflectedDamageTaken", "MORE", -100, { type = "Unscalable" }) }, ["gain (%d+)%% increased movement speed for 20 seconds when you kill an enemy"] = function(num) return { mod("MovementSpeed", "INC", num, { type = "Condition", var = "KilledRecently" }) } end, ["gain (%d+)%% increased attack speed for 20 seconds when you kill a rare or unique enemy"] = function(num) return { mod("Speed", "INC", num, nil, ModFlag.Attack, 0, { type = "Condition", var = "KilledUniqueEnemy" }) } end, ["kill enemies that have (%d+)%% or lower life when hit by your skills"] = function(num) return { mod("CullPercent", "MAX", num) } end, -- Trickster ["(%d+)%% chance to gain (%d+)%% of non%-chaos damage with hits as extra chaos damage"] = function(num, _, perc) return { mod("NonChaosDamageGainAsChaos", "BASE", num / 100 * tonumber(perc)) } end, ["movement skills cost no mana"] = { mod("ManaCost", "MORE", -100, nil, 0, KeywordFlag.Movement) }, - ["cannot be stunned while you have ghost shrouds"] = function(num) return { mod("AvoidStun", "BASE", 100, { type = "MultiplierThreshold", var = "GhostShroud", threshold = 1 }) } end, + ["cannot be stunned while you have ghost shrouds"] = function(num) return { mod("AvoidStun", "BASE", 100, { type = "MultiplierThreshold", var = "GhostShroud", threshold = 1 }, { type = "Unscalable" }) } end, ["your action speed is at least (%d+)%% of base value"] = function(num) return { mod("MinimumActionSpeed", "MAX", num) } end, ["nearby enemy monsters' action speed is at most (%d+)%% of base value"] = function(num) return { mod("EnemyModifier", "LIST", { mod = mod("MaximumActionSpeedReduction", "MAX", 100 - num)} )} end, ["prevent %+(%d+)%% of suppressed spell damage while on full energy shield"] = function(num) return { mod("SpellSuppressionEffect", "BASE", num, { type = "Condition", var = "FullEnergyShield" }) } end, @@ -2477,7 +2477,7 @@ local specialModList = { ["immune to elemental ailments while on consecrated ground if you have at least (%d+) devotion"] = function(num) local mods = { } for i, ailment in ipairs(data.elementalAilmentTypeList) do - mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "OnConsecratedGround" }, { type = "StatThreshold", stat = "Devotion", threshold = num }) + mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "OnConsecratedGround" }, { type = "StatThreshold", stat = "Devotion", threshold = num }, { type = "Unscalable" }) end return mods end, @@ -2655,7 +2655,7 @@ local specialModList = { mod("SkillData", "LIST", { key = "decay", value = num, merge = "MAX" }, { type = "ActorCondition", actor = "enemy", var = "Cursed"}) } end, ["temporal chains has (%d+)%% reduced effect on you"] = function(num) return { mod("CurseEffectOnSelf", "INC", -num, { type = "SkillName", skillName = "Temporal Chains" }) } end, - ["unaffected by temporal chains"] = { mod("CurseEffectOnSelf", "MORE", -100, { type = "SkillName", skillName = "Temporal Chains" }) }, + ["unaffected by temporal chains"] = { mod("CurseEffectOnSelf", "MORE", -100, { type = "SkillName", skillName = "Temporal Chains" }, { type = "Unscalable" }) }, ["([%+%-][%d%.]+) seconds to cat's stealth duration"] = function(num) return { mod("PrimaryDuration", "BASE", num, { type = "SkillName", skillName = "Aspect of the Cat" }) } end, ["([%+%-][%d%.]+) seconds to cat's agility duration"] = function(num) return { mod("SecondaryDuration", "BASE", num, { type = "SkillName", skillName = "Aspect of the Cat" }) } end, ["([%+%-][%d%.]+) seconds to avian's might duration"] = function(num) return { mod("PrimaryDuration", "BASE", num, { type = "SkillName", skillName = "Aspect of the Avian" }) } end, @@ -3107,57 +3107,58 @@ local specialModList = { ["ignore all movement penalties from armour"] = { flag("Condition:IgnoreMovementPenalties") }, ["gain armour equal to your reserved mana"] = { mod("Armour", "BASE", 1, { type = "PerStat", stat = "ManaReserved", div = 1 }) }, ["(%d+)%% increased armour per (%d+) reserved mana"] = function(num, _, mana) return { mod("Armour", "INC", num, { type = "PerStat", stat = "ManaReserved", div = tonumber(mana) }) } end, - ["cannot be stunned"] = { mod("AvoidStun", "BASE", 100) }, - ["cannot be stunned if you haven't been hit recently"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "BeenHitRecently", neg = true }) }, - ["cannot be stunned if you have at least (%d+) crab barriers"] = function(num) return { mod("AvoidStun", "BASE", 100, { type = "StatThreshold", stat = "CrabBarriers", threshold = num }) } end, - ["cannot be blinded"] = { mod("AvoidBlind", "BASE", 100) }, - ["cannot be shocked"] = { mod("AvoidShock", "BASE", 100) }, - ["immune to shock"] = { mod("AvoidShock", "BASE", 100) }, - ["cannot be frozen"] = { mod("AvoidFreeze", "BASE", 100) }, - ["immune to freeze"] = { mod("AvoidFreeze", "BASE", 100) }, - ["cannot be chilled"] = { mod("AvoidChill", "BASE", 100) }, - ["immune to chill"] = { mod("AvoidChill", "BASE", 100) }, - ["cannot be ignited"] = { mod("AvoidIgnite", "BASE", 100) }, - ["immune to ignite"] = { mod("AvoidIgnite", "BASE", 100) }, - ["cannot be ignited while at maximum endurance charges"] = { mod("AvoidIgnite", "BASE", 100, {type = "StatThreshold", stat = "EnduranceCharges", thresholdStat = "EnduranceChargesMax" }) }, - ["cannot be chilled while at maximum frenzy charges"] = { mod("AvoidChill", "BASE", 100, {type = "StatThreshold", stat = "FrenzyCharges", thresholdStat = "FrenzyChargesMax" }) }, - ["cannot be shocked while at maximum power charges"] = { mod("AvoidShock", "BASE", 100, {type = "StatThreshold", stat = "PowerCharges", thresholdStat = "PowerChargesMax" }) }, - ["you cannot be shocked while at maximum endurance charges"] = { mod("AvoidShock", "BASE", 100, { type = "StatThreshold", stat = "EnduranceCharges", thresholdStat = "EnduranceChargesMax" }) }, - ["you cannot be shocked while chilled"] = { mod("AvoidShock", "BASE", 100, { type = "condition", var = "Chilled" }) }, - ["cannot be shocked while chilled"] = { mod("AvoidShock", "BASE", 100, { type = "condition", var = "Chilled" }) }, - ["cannot be shocked if intelligence is higher than strength"] = { mod("AvoidShock", "BASE", 100, { type = "Condition", var = "IntHigherThanStr" }) }, - ["cannot be frozen if dexterity is higher than intelligence"] = { mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "DexHigherThanInt" }) }, - ["cannot be frozen if energy shield recharge has started recently"] = { mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "EnergyShieldRechargeRecently" }) }, - ["cannot be ignited if strength is higher than dexterity"] = { mod("AvoidIgnite", "BASE", 100, { type = "Condition", var = "StrHigherThanDex" }) }, - ["cannot be chilled while burning"] = { mod("AvoidChill", "BASE", 100, { type = "Condition", var = "Burning" }) }, - ["cannot be chilled while you have onslaught"] = { mod("AvoidChill", "BASE", 100, { type = "Condition", var = "Onslaught" }) }, - ["cannot be chilled during onslaught"] = { mod("AvoidChill", "BASE", 100, { type = "Condition", var = "Onslaught" }) }, - ["cannot be inflicted with bleeding"] = { mod("AvoidBleed", "BASE", 100) }, - ["bleeding cannot be inflicted on you"] = { mod("AvoidBleed", "BASE", 100) }, - ["you are immune to bleeding"] = { mod("AvoidBleed", "BASE", 100) }, - ["immune to poison"] = { mod("AvoidPoison", "BASE", 100) }, - ["immunity to shock during flask effect"] = { mod("AvoidShock", "BASE", 100, { type = "Condition", var = "UsingFlask" }) }, + ["cannot be stunned"] = { mod("AvoidStun", "BASE", 100, { type = "Unscalable" }) }, + ["cannot be stunned if you haven't been hit recently"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "BeenHitRecently", neg = true }, { type = "Unscalable" }) }, + ["cannot be stunned if you have at least (%d+) crab barriers"] = function(num) return { mod("AvoidStun", "BASE", 100, { type = "StatThreshold", stat = "CrabBarriers", threshold = num }, { type = "Unscalable" }) } end, + ["cannot be blinded"] = { mod("AvoidBlind", "BASE", 100, { type = "Unscalable" }) }, + ["cannot be shocked"] = { mod("AvoidShock", "BASE", 100, { type = "Unscalable" }) }, + ["immune to shock"] = { mod("AvoidShock", "BASE", 100, { type = "Unscalable" }) }, + ["cannot be frozen"] = { mod("AvoidFreeze", "BASE", 100, { type = "Unscalable" }) }, + ["immune to freeze"] = { mod("AvoidFreeze", "BASE", 100, { type = "Unscalable" }) }, + ["cannot be chilled"] = { mod("AvoidChill", "BASE", 100, { type = "Unscalable" }) }, + ["immune to chill"] = { mod("AvoidChill", "BASE", 100, { type = "Unscalable" }) }, + ["cannot be ignited"] = { mod("AvoidIgnite", "BASE", 100, { type = "Unscalable" }) }, + ["immune to ignite"] = { mod("AvoidIgnite", "BASE", 100, { type = "Unscalable" }) }, + ["cannot be ignited while at maximum endurance charges"] = { mod("AvoidIgnite", "BASE", 100, {type = "StatThreshold", stat = "EnduranceCharges", thresholdStat = "EnduranceChargesMax" }, { type = "Unscalable" }) }, + ["cannot be chilled while at maximum frenzy charges"] = { mod("AvoidChill", "BASE", 100, {type = "StatThreshold", stat = "FrenzyCharges", thresholdStat = "FrenzyChargesMax" }, { type = "Unscalable" }) }, + ["cannot be shocked while at maximum power charges"] = { mod("AvoidShock", "BASE", 100, {type = "StatThreshold", stat = "PowerCharges", thresholdStat = "PowerChargesMax" }, { type = "Unscalable" }) }, + ["you cannot be shocked while at maximum endurance charges"] = { mod("AvoidShock", "BASE", 100, { type = "StatThreshold", stat = "EnduranceCharges", thresholdStat = "EnduranceChargesMax" }, { type = "Unscalable" }) }, + ["you cannot be shocked while chilled"] = { mod("AvoidShock", "BASE", 100, { type = "condition", var = "Chilled" }, { type = "Unscalable" }) }, + ["cannot be shocked while chilled"] = { mod("AvoidShock", "BASE", 100, { type = "condition", var = "Chilled" }, { type = "Unscalable" }) }, + ["cannot be shocked if intelligence is higher than strength"] = { mod("AvoidShock", "BASE", 100, { type = "Condition", var = "IntHigherThanStr" }, { type = "Unscalable" }) }, + ["cannot be frozen if dexterity is higher than intelligence"] = { mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "DexHigherThanInt" }, { type = "Unscalable" }) }, + ["cannot be frozen if energy shield recharge has started recently"] = { mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "EnergyShieldRechargeRecently" }, { type = "Unscalable" }) }, + ["cannot be ignited if strength is higher than dexterity"] = { mod("AvoidIgnite", "BASE", 100, { type = "Condition", var = "StrHigherThanDex" }, { type = "Unscalable" }) }, + ["cannot be chilled while burning"] = { mod("AvoidChill", "BASE", 100, { type = "Condition", var = "Burning" }, { type = "Unscalable" }) }, + ["cannot be chilled while you have onslaught"] = { mod("AvoidChill", "BASE", 100, { type = "Condition", var = "Onslaught" }, { type = "Unscalable" }) }, + ["cannot be chilled during onslaught"] = { mod("AvoidChill", "BASE", 100, { type = "Condition", var = "Onslaught" }, { type = "Unscalable" }) }, + ["cannot be inflicted with bleeding"] = { mod("AvoidBleed", "BASE", 100, { type = "Unscalable" }) }, + ["bleeding cannot be inflicted on you"] = { mod("AvoidBleed", "BASE", 100), { type = "Unscalable" } }, + ["you are immune to bleeding"] = { mod("AvoidBleed", "BASE", 100, { type = "Unscalable" }) }, + ["immune to poison"] = { mod("AvoidPoison", "BASE", 100, { type = "Unscalable" }) }, + ["immune to poison during flask effect"] = { mod("AvoidPoison", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }) }, + ["immunity to poison during flask effect"] = { mod("AvoidPoison", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }) }, + ["immunity to shock during flask effect"] = { mod("AvoidShock", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }) }, ["immunity to freeze and chill during flask effect"] = { - mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "UsingFlask" }), - mod("AvoidChill", "BASE", 100, { type = "Condition", var = "UsingFlask" }), + mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }), + mod("AvoidChill", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }), }, ["immune to freeze and chill while ignited"] = { - mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "Ignited" }), - mod("AvoidChill", "BASE", 100, { type = "Condition", var = "Ignited" }), + mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "Ignited"}, { type = "Unscalable" }), + mod("AvoidChill", "BASE", 100, { type = "Condition", var = "Ignited"}, { type = "Unscalable" }), }, - ["immunity to ignite during flask effect"] = { mod("AvoidIgnite", "BASE", 100, { type = "Condition", var = "UsingFlask" }) }, - ["immunity to bleeding during flask effect"] = { mod("AvoidBleed", "BASE", 100, { type = "Condition", var = "UsingFlask" }) }, - ["immune to poison during flask effect"] = { mod("AvoidPoison", "BASE", 100, { type = "Condition", var = "UsingFlask" }) }, - ["immune to curses during flask effect"] = { mod("AvoidCurse", "BASE", 100, { type = "Condition", var = "UsingFlask" }) }, + ["immunity to ignite during flask effect"] = { mod("AvoidIgnite", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }) }, + ["immunity to bleeding during flask effect"] = { mod("AvoidBleed", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }) }, + ["immune to curses during flask effect"] = { mod("AvoidCurse", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }) }, ["immune to freeze, chill, curses and stuns during flask effect"] = { - mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "UsingFlask" }), - mod("AvoidChill", "BASE", 100, { type = "Condition", var = "UsingFlask" }), - mod("AvoidCurse", "BASE", 100, { type = "Condition", var = "UsingFlask" }), - mod("AvoidStun", "BASE", 100, { type = "Condition", var = "UsingFlask" }), + mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }), + mod("AvoidChill", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }), + mod("AvoidCurse", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }), + mod("AvoidStun", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }), }, - ["unaffected by curses"] = { mod("CurseEffectOnSelf", "MORE", -100) }, - ["unaffected by curses while affected by zealotry"] = { mod("CurseEffectOnSelf", "MORE", -100, { type = "Condition", var = "AffectedByZealotry" }) }, - ["immune to curses while you have at least (%d+) rage"] = function(num) return { mod("AvoidCurse", "BASE", 100, { type = "MultiplierThreshold", var = "Rage", threshold = num }) } end, + ["unaffected by curses"] = { mod("CurseEffectOnSelf", "MORE", -100, { type = "Unscalable" }) }, + ["unaffected by curses while affected by zealotry"] = { mod("CurseEffectOnSelf", "MORE", -100, { type = "Condition", var = "AffectedByZealotry" }, { type = "Unscalable" }) }, + ["immune to curses while you have at least (%d+) rage"] = function(num) return { mod("AvoidCurse", "BASE", 100, { type = "MultiplierThreshold", var = "Rage", threshold = num }, { type = "Unscalable" }) } end, ["the effect of chill on you is reversed"] = { flag("SelfChillEffectIsReversed") }, ["your movement speed is (%d+)%% of its base value"] = function(num) return { mod("MovementSpeed", "OVERRIDE", num / 100) } end, ["action speed cannot be modified to below (%d+)%% base value"] = function(num) return { mod("MinimumActionSpeed", "MAX", num) } end, From c4b5eca90e703816d3f48b62c836256b28c0975f Mon Sep 17 00:00:00 2001 From: QuickStick <31533893+QuickStick123@users.noreply.github.com> Date: Tue, 6 Sep 2022 19:44:19 +1000 Subject: [PATCH 06/11] Use a more standard format. --- src/Classes/ModStore.lua | 2 +- src/Modules/ModParser.lua | 136 +++++++++++++++++++------------------- 2 files changed, 69 insertions(+), 69 deletions(-) diff --git a/src/Classes/ModStore.lua b/src/Classes/ModStore.lua index 0ec2935779..bc3f8da2d5 100644 --- a/src/Classes/ModStore.lua +++ b/src/Classes/ModStore.lua @@ -36,7 +36,7 @@ end) function ModStoreClass:ScaleAddMod(mod, scale) local unscalable = false for _, effects in ipairs(mod) do - if effects.type == "Unscalable" then + if effects.unscalable then unscalable = true break end diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 96c53dd923..53515be377 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -1736,7 +1736,7 @@ local specialModList = { ["immune to elemental ailments while on consecrated ground"] = function() local mods = { } for i, ailment in ipairs(data.elementalAilmentTypeList) do - mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "OnConsecratedGround" }, { type = "Unscalable" }) + mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "OnConsecratedGround" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) end return mods end, @@ -1762,7 +1762,7 @@ local specialModList = { flag("Condition:CanGainRage"), }, ["inherent effects from having rage are tripled"] = { mod("Multiplier:RageEffect", "BASE", 2) }, - ["cannot be stunned while you have at least (%d+) rage"] = function(num) return { mod("AvoidStun", "BASE", 100, { type = "MultiplierThreshold", var = "Rage", threshold = num }, { type = "Unscalable" }) } end, + ["cannot be stunned while you have at least (%d+) rage"] = function(num) return { mod("AvoidStun", "BASE", 100, { type = "MultiplierThreshold", var = "Rage", threshold = num }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) } end, ["lose ([%d%.]+)%% of life per second per rage while you are not losing rage"] = function(num) return { mod("LifeDegen", "BASE", 1, { type = "PercentStat", stat = "Life", percent = num }, { type = "Multiplier", var = "Rage"}) } end, ["if you've warcried recently, you and nearby allies have (%d+)%% increased attack speed"] = function(num) return { mod("ExtraAura", "LIST", { mod = mod("Speed", "INC", num, nil, ModFlag.Attack) }, { type = "Condition", var = "UsedWarcryRecently" }) } end, ["gain (%d+)%% increased armour per (%d+) power for 8 seconds when you warcry, up to a maximum of (%d+)%%"] = function(num, _, div, limit) return { @@ -1774,8 +1774,8 @@ local specialModList = { ["exerted attacks deal (%d+)%% more attack damage if a warcry sacrificed rage recently"] = function(num) return { mod("ExertAttackIncrease", "MORE", num, nil, ModFlag.Attack, 0) } end, ["deal (%d+)%% less damage"] = function(num) return { mod("Damage", "MORE", -num) } end, -- Champion - ["cannot be stunned while you have fortify"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "Fortified" }, { type = "Unscalable" }) }, - ["cannot be stunned while fortified"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "Fortified" }, { type = "Unscalable" }) }, + ["cannot be stunned while you have fortify"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "Fortified" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be stunned while fortified"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "Fortified" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, ["fortify"] = { flag("Condition:Fortified") }, ["you have (%d+) fortification"] = function(num) return { flag("Condition:Fortified") @@ -1837,7 +1837,7 @@ local specialModList = { }, ["(%d+)%% increased area of effect while you don't have convergence"] = function(num) return { mod("AreaOfEffect", "INC", num, { type = "Condition", neg = true, var = "Convergence" }) } end, ["exposure you inflict applies an extra (%-?%d+)%% to the affected resistance"] = function(num) return { mod("ExtraExposure", "BASE", num) } end, - ["cannot take reflected elemental damage"] = { mod("ElementalReflectedDamageTaken", "MORE", -100, { type = "Unscalable" }) }, + ["cannot take reflected elemental damage"] = { mod("ElementalReflectedDamageTaken", "MORE", -100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, ["every %d+ seconds:"] = { }, ["gain chilling conflux for %d seconds"] = { flag("PhysicalCanChill", { type = "Condition", var = "ChillingConflux" }), @@ -1879,7 +1879,7 @@ local specialModList = { ["immune to elemental ailments while affected by glorious madness"] = function() local mods = { } for i, ailment in ipairs(data.elementalAilmentTypeList) do - mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "AffectedByGloriousMadness" }, { type = "Unscalable" }) + mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "AffectedByGloriousMadness" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) end return mods end, @@ -1976,7 +1976,7 @@ local specialModList = { ["grants maximum energy shield equal to (%d+)%% of your reserved mana to you and nearby allies"] = function(num) return { mod("GrantReservedManaAsAura", "LIST", { mod = mod("EnergyShield", "BASE", num / 100) }) } end, ["warcries cost no mana"] = { mod("ManaCost", "MORE", -100, nil, 0, KeywordFlag.Warcry) }, ["%+(%d+)%% chance to block attack damage for %d seconds? every %d seconds"] = function(num) return { mod("BlockChance", "BASE", num, { type = "Condition", var = "BastionOfHopeActive" }) } end, - ["if you've blocked in the past %d+ seconds, you and nearby allies cannot be stunned"] = { mod("ExtraAura", "LIST", { mod = mod("AvoidStun", "BASE", 100) }, { type = "Condition", var = "BlockedRecently" }, { type = "Unscalable" }) }, + ["if you've blocked in the past %d+ seconds, you and nearby allies cannot be stunned"] = { mod("ExtraAura", "LIST", { mod = mod("AvoidStun", "BASE", 100) }, { type = "Condition", var = "BlockedRecently" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, ["if you've attacked recently, you and nearby allies have %+(%d+)%% chance to block attack damage"] = function(num) return { mod("ExtraAura", "LIST", { mod = mod("BlockChance", "BASE", num) }, { type = "Condition", var = "AttackedRecently" }) } end, ["if you've cast a spell recently, you and nearby allies have %+(%d+)%% chance to block spell damage"] = function(num) return { mod("ExtraAura", "LIST", { mod = mod("SpellBlockChance", "BASE", num) }, { type = "Condition", var = "CastSpellRecently" }) } end, ["while there is at least one nearby ally, you and nearby allies deal (%d+)%% more damage"] = function(num) return { mod("ExtraAura", "LIST", { mod = mod("Damage", "MORE", num) }, { type = "MultiplierThreshold", var = "NearbyAlly", threshold = 1 }) } end, @@ -1990,7 +1990,7 @@ local specialModList = { ["immune to elemental ailments while you have arcane surge"] = function() local mods = { } for i, ailment in ipairs(data.elementalAilmentTypeList) do - mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "AffectedByArcaneSurge" }, { type = "Unscalable" }) + mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "AffectedByArcaneSurge" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) end return mods end, @@ -2023,10 +2023,10 @@ local specialModList = { } end, -- Juggernaut ["armour received from body armour is doubled"] = { flag("Unbreakable") }, - ["action speed cannot be modified to below base value"] = { mod("MinimumActionSpeed", "MAX", 100, { type = "Unscalable" }) }, + ["action speed cannot be modified to below base value"] = { mod("MinimumActionSpeed", "MAX", 100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, ["movement speed cannot be modified to below base value"] = { flag("MovementSpeedCannotBeBelowBase") }, - ["you cannot be slowed to below base speed"] = { mod("MinimumActionSpeed", "MAX", 100, { type = "Unscalable" }) }, - ["cannot be slowed to below base speed"] = { mod("MinimumActionSpeed", "MAX", 100, { type = "Unscalable" }) }, + ["you cannot be slowed to below base speed"] = { mod("MinimumActionSpeed", "MAX", 100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be slowed to below base speed"] = { mod("MinimumActionSpeed", "MAX", 100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, ["gain accuracy rating equal to your strength"] = { mod("Accuracy", "BASE", 1, { type = "PerStat", stat = "Str" }) }, ["gain accuracy rating equal to twice your strength"] = { mod("Accuracy", "BASE", 2, { type = "PerStat", stat = "Str" }) }, -- Necromancer @@ -2054,7 +2054,7 @@ local specialModList = { ["when you kill an enemy, for each curse on that enemy, gain (%d+)%% of non%-chaos damage as extra chaos damage for 4 seconds"] = function(num) return { mod("NonChaosDamageGainAsChaos", "BASE", num, { type = "Condition", var = "KilledRecently" }, { type = "Multiplier", var = "CurseOnEnemy" }), } end, - ["cannot be stunned while you have energy shield"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "HaveEnergyShield" }, { type = "Unscalable" }) }, + ["cannot be stunned while you have energy shield"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "HaveEnergyShield" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, ["every second, inflict withered on nearby enemies for (%d+) seconds"] = { flag("Condition:CanWither") }, ["nearby hindered enemies deal (%d+)%% reduced damage over time"] = function(num) return { mod("EnemyModifier", "LIST", { mod = mod("DamageOverTime", "INC", -num) }, { type = "ActorCondition", actor = "enemy", var = "Hindered" }) } end, ["nearby chilled enemies deal (%d+)%% reduced damage with hits"] = function(num) return { mod("EnemyModifier", "LIST", { mod = mod("Damage", "INC", -num) }, { type = "ActorCondition", actor = "enemy", var = "Chilled" }) } end, @@ -2064,7 +2064,7 @@ local specialModList = { ["immune to elemental ailments during any flask effect"] = function() local mods = { } for i, ailment in ipairs(data.elementalAilmentTypeList) do - mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "UsingFlask" }, { type = "Unscalable" }) + mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "UsingFlask" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) end return mods end, @@ -2073,7 +2073,7 @@ local specialModList = { ["immune to elemental ailments while phasing"] = function() local mods = { } for i, ailment in ipairs(data.elementalAilmentTypeList) do - mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "Phasing" }, { type = "Unscalable" }) + mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "Phasing" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) end return mods end, @@ -2084,26 +2084,26 @@ local specialModList = { } end, -- Saboteur ["immune to ignite and shock"] = { - mod("AvoidIgnite", "BASE", 100, { type = "Unscalable" }), - mod("AvoidShock", "BASE", 100, { type = "Unscalable" }), + mod("AvoidIgnite", "BASE", 100, { type = "GlobalEffect", effectType = "Global", unscalable = true }), + mod("AvoidShock", "BASE", 100, { type = "GlobalEffect", effectType = "Global", unscalable = true }), }, ["you gain (%d+)%% increased damage for each trap"] = function(num) return { mod("Damage", "INC", num, { type = "PerStat", stat = "ActiveTrapLimit" }) } end, ["you gain (%d+)%% increased area of effect for each mine"] = function(num) return { mod("AreaOfEffect", "INC", num, { type = "PerStat", stat = "ActiveMineLimit" }) } end, -- Slayer ["deal up to (%d+)%% more melee damage to enemies, based on proximity"] = function(num) return { mod("Damage", "MORE", num, nil, bor(ModFlag.Attack, ModFlag.Melee), { type = "MeleeProximity", ramp = {1,0} }) } end, - ["cannot be stunned while leeching"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "Leeching" }, { type = "Unscalable" }) }, - ["you are immune to bleeding while leeching"] = { mod("AvoidBleed", "BASE", 100, { type = "Condition", var = "Leeching" }, { type = "Unscalable" }) }, + ["cannot be stunned while leeching"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "Leeching" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["you are immune to bleeding while leeching"] = { mod("AvoidBleed", "BASE", 100, { type = "Condition", var = "Leeching" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, ["life leech effects are not removed at full life"] = { flag("CanLeechLifeOnFullLife") }, ["life leech effects are not removed when unreserved life is filled"] = { flag("CanLeechLifeOnFullLife") }, ["energy shield leech effects from attacks are not removed at full energy shield"] = { flag("CanLeechEnergyShieldOnFullEnergyShield") }, - ["cannot take reflected physical damage"] = { mod("PhysicalReflectedDamageTaken", "MORE", -100, { type = "Unscalable" }) }, + ["cannot take reflected physical damage"] = { mod("PhysicalReflectedDamageTaken", "MORE", -100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, ["gain (%d+)%% increased movement speed for 20 seconds when you kill an enemy"] = function(num) return { mod("MovementSpeed", "INC", num, { type = "Condition", var = "KilledRecently" }) } end, ["gain (%d+)%% increased attack speed for 20 seconds when you kill a rare or unique enemy"] = function(num) return { mod("Speed", "INC", num, nil, ModFlag.Attack, 0, { type = "Condition", var = "KilledUniqueEnemy" }) } end, ["kill enemies that have (%d+)%% or lower life when hit by your skills"] = function(num) return { mod("CullPercent", "MAX", num) } end, -- Trickster ["(%d+)%% chance to gain (%d+)%% of non%-chaos damage with hits as extra chaos damage"] = function(num, _, perc) return { mod("NonChaosDamageGainAsChaos", "BASE", num / 100 * tonumber(perc)) } end, ["movement skills cost no mana"] = { mod("ManaCost", "MORE", -100, nil, 0, KeywordFlag.Movement) }, - ["cannot be stunned while you have ghost shrouds"] = function(num) return { mod("AvoidStun", "BASE", 100, { type = "MultiplierThreshold", var = "GhostShroud", threshold = 1 }, { type = "Unscalable" }) } end, + ["cannot be stunned while you have ghost shrouds"] = function(num) return { mod("AvoidStun", "BASE", 100, { type = "MultiplierThreshold", var = "GhostShroud", threshold = 1 }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) } end, ["your action speed is at least (%d+)%% of base value"] = function(num) return { mod("MinimumActionSpeed", "MAX", num) } end, ["nearby enemy monsters' action speed is at most (%d+)%% of base value"] = function(num) return { mod("EnemyModifier", "LIST", { mod = mod("MaximumActionSpeedReduction", "MAX", 100 - num)} )} end, ["prevent %+(%d+)%% of suppressed spell damage while on full energy shield"] = function(num) return { mod("SpellSuppressionEffect", "BASE", num, { type = "Condition", var = "FullEnergyShield" }) } end, @@ -2477,7 +2477,7 @@ local specialModList = { ["immune to elemental ailments while on consecrated ground if you have at least (%d+) devotion"] = function(num) local mods = { } for i, ailment in ipairs(data.elementalAilmentTypeList) do - mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "OnConsecratedGround" }, { type = "StatThreshold", stat = "Devotion", threshold = num }, { type = "Unscalable" }) + mods[i] = mod("Avoid"..ailment, "BASE", 100, { type = "Condition", var = "OnConsecratedGround" }, { type = "StatThreshold", stat = "Devotion", threshold = num }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) end return mods end, @@ -2655,7 +2655,7 @@ local specialModList = { mod("SkillData", "LIST", { key = "decay", value = num, merge = "MAX" }, { type = "ActorCondition", actor = "enemy", var = "Cursed"}) } end, ["temporal chains has (%d+)%% reduced effect on you"] = function(num) return { mod("CurseEffectOnSelf", "INC", -num, { type = "SkillName", skillName = "Temporal Chains" }) } end, - ["unaffected by temporal chains"] = { mod("CurseEffectOnSelf", "MORE", -100, { type = "SkillName", skillName = "Temporal Chains" }, { type = "Unscalable" }) }, + ["unaffected by temporal chains"] = { mod("CurseEffectOnSelf", "MORE", -100, { type = "SkillName", skillName = "Temporal Chains" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, ["([%+%-][%d%.]+) seconds to cat's stealth duration"] = function(num) return { mod("PrimaryDuration", "BASE", num, { type = "SkillName", skillName = "Aspect of the Cat" }) } end, ["([%+%-][%d%.]+) seconds to cat's agility duration"] = function(num) return { mod("SecondaryDuration", "BASE", num, { type = "SkillName", skillName = "Aspect of the Cat" }) } end, ["([%+%-][%d%.]+) seconds to avian's might duration"] = function(num) return { mod("PrimaryDuration", "BASE", num, { type = "SkillName", skillName = "Aspect of the Avian" }) } end, @@ -3107,58 +3107,58 @@ local specialModList = { ["ignore all movement penalties from armour"] = { flag("Condition:IgnoreMovementPenalties") }, ["gain armour equal to your reserved mana"] = { mod("Armour", "BASE", 1, { type = "PerStat", stat = "ManaReserved", div = 1 }) }, ["(%d+)%% increased armour per (%d+) reserved mana"] = function(num, _, mana) return { mod("Armour", "INC", num, { type = "PerStat", stat = "ManaReserved", div = tonumber(mana) }) } end, - ["cannot be stunned"] = { mod("AvoidStun", "BASE", 100, { type = "Unscalable" }) }, - ["cannot be stunned if you haven't been hit recently"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "BeenHitRecently", neg = true }, { type = "Unscalable" }) }, - ["cannot be stunned if you have at least (%d+) crab barriers"] = function(num) return { mod("AvoidStun", "BASE", 100, { type = "StatThreshold", stat = "CrabBarriers", threshold = num }, { type = "Unscalable" }) } end, - ["cannot be blinded"] = { mod("AvoidBlind", "BASE", 100, { type = "Unscalable" }) }, - ["cannot be shocked"] = { mod("AvoidShock", "BASE", 100, { type = "Unscalable" }) }, - ["immune to shock"] = { mod("AvoidShock", "BASE", 100, { type = "Unscalable" }) }, - ["cannot be frozen"] = { mod("AvoidFreeze", "BASE", 100, { type = "Unscalable" }) }, - ["immune to freeze"] = { mod("AvoidFreeze", "BASE", 100, { type = "Unscalable" }) }, - ["cannot be chilled"] = { mod("AvoidChill", "BASE", 100, { type = "Unscalable" }) }, - ["immune to chill"] = { mod("AvoidChill", "BASE", 100, { type = "Unscalable" }) }, - ["cannot be ignited"] = { mod("AvoidIgnite", "BASE", 100, { type = "Unscalable" }) }, - ["immune to ignite"] = { mod("AvoidIgnite", "BASE", 100, { type = "Unscalable" }) }, - ["cannot be ignited while at maximum endurance charges"] = { mod("AvoidIgnite", "BASE", 100, {type = "StatThreshold", stat = "EnduranceCharges", thresholdStat = "EnduranceChargesMax" }, { type = "Unscalable" }) }, - ["cannot be chilled while at maximum frenzy charges"] = { mod("AvoidChill", "BASE", 100, {type = "StatThreshold", stat = "FrenzyCharges", thresholdStat = "FrenzyChargesMax" }, { type = "Unscalable" }) }, - ["cannot be shocked while at maximum power charges"] = { mod("AvoidShock", "BASE", 100, {type = "StatThreshold", stat = "PowerCharges", thresholdStat = "PowerChargesMax" }, { type = "Unscalable" }) }, - ["you cannot be shocked while at maximum endurance charges"] = { mod("AvoidShock", "BASE", 100, { type = "StatThreshold", stat = "EnduranceCharges", thresholdStat = "EnduranceChargesMax" }, { type = "Unscalable" }) }, - ["you cannot be shocked while chilled"] = { mod("AvoidShock", "BASE", 100, { type = "condition", var = "Chilled" }, { type = "Unscalable" }) }, - ["cannot be shocked while chilled"] = { mod("AvoidShock", "BASE", 100, { type = "condition", var = "Chilled" }, { type = "Unscalable" }) }, - ["cannot be shocked if intelligence is higher than strength"] = { mod("AvoidShock", "BASE", 100, { type = "Condition", var = "IntHigherThanStr" }, { type = "Unscalable" }) }, - ["cannot be frozen if dexterity is higher than intelligence"] = { mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "DexHigherThanInt" }, { type = "Unscalable" }) }, - ["cannot be frozen if energy shield recharge has started recently"] = { mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "EnergyShieldRechargeRecently" }, { type = "Unscalable" }) }, - ["cannot be ignited if strength is higher than dexterity"] = { mod("AvoidIgnite", "BASE", 100, { type = "Condition", var = "StrHigherThanDex" }, { type = "Unscalable" }) }, - ["cannot be chilled while burning"] = { mod("AvoidChill", "BASE", 100, { type = "Condition", var = "Burning" }, { type = "Unscalable" }) }, - ["cannot be chilled while you have onslaught"] = { mod("AvoidChill", "BASE", 100, { type = "Condition", var = "Onslaught" }, { type = "Unscalable" }) }, - ["cannot be chilled during onslaught"] = { mod("AvoidChill", "BASE", 100, { type = "Condition", var = "Onslaught" }, { type = "Unscalable" }) }, - ["cannot be inflicted with bleeding"] = { mod("AvoidBleed", "BASE", 100, { type = "Unscalable" }) }, - ["bleeding cannot be inflicted on you"] = { mod("AvoidBleed", "BASE", 100), { type = "Unscalable" } }, - ["you are immune to bleeding"] = { mod("AvoidBleed", "BASE", 100, { type = "Unscalable" }) }, - ["immune to poison"] = { mod("AvoidPoison", "BASE", 100, { type = "Unscalable" }) }, - ["immune to poison during flask effect"] = { mod("AvoidPoison", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }) }, - ["immunity to poison during flask effect"] = { mod("AvoidPoison", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }) }, - ["immunity to shock during flask effect"] = { mod("AvoidShock", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }) }, + ["cannot be stunned"] = { mod("AvoidStun", "BASE", 100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be stunned if you haven't been hit recently"] = { mod("AvoidStun", "BASE", 100, { type = "Condition", var = "BeenHitRecently", neg = true }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be stunned if you have at least (%d+) crab barriers"] = function(num) return { mod("AvoidStun", "BASE", 100, { type = "StatThreshold", stat = "CrabBarriers", threshold = num }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) } end, + ["cannot be blinded"] = { mod("AvoidBlind", "BASE", 100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be shocked"] = { mod("AvoidShock", "BASE", 100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["immune to shock"] = { mod("AvoidShock", "BASE", 100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be frozen"] = { mod("AvoidFreeze", "BASE", 100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["immune to freeze"] = { mod("AvoidFreeze", "BASE", 100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be chilled"] = { mod("AvoidChill", "BASE", 100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["immune to chill"] = { mod("AvoidChill", "BASE", 100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be ignited"] = { mod("AvoidIgnite", "BASE", 100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["immune to ignite"] = { mod("AvoidIgnite", "BASE", 100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be ignited while at maximum endurance charges"] = { mod("AvoidIgnite", "BASE", 100, {type = "StatThreshold", stat = "EnduranceCharges", thresholdStat = "EnduranceChargesMax" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be chilled while at maximum frenzy charges"] = { mod("AvoidChill", "BASE", 100, {type = "StatThreshold", stat = "FrenzyCharges", thresholdStat = "FrenzyChargesMax" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be shocked while at maximum power charges"] = { mod("AvoidShock", "BASE", 100, {type = "StatThreshold", stat = "PowerCharges", thresholdStat = "PowerChargesMax" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["you cannot be shocked while at maximum endurance charges"] = { mod("AvoidShock", "BASE", 100, { type = "StatThreshold", stat = "EnduranceCharges", thresholdStat = "EnduranceChargesMax" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["you cannot be shocked while chilled"] = { mod("AvoidShock", "BASE", 100, { type = "condition", var = "Chilled" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be shocked while chilled"] = { mod("AvoidShock", "BASE", 100, { type = "condition", var = "Chilled" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be shocked if intelligence is higher than strength"] = { mod("AvoidShock", "BASE", 100, { type = "Condition", var = "IntHigherThanStr" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be frozen if dexterity is higher than intelligence"] = { mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "DexHigherThanInt" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be frozen if energy shield recharge has started recently"] = { mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "EnergyShieldRechargeRecently" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be ignited if strength is higher than dexterity"] = { mod("AvoidIgnite", "BASE", 100, { type = "Condition", var = "StrHigherThanDex" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be chilled while burning"] = { mod("AvoidChill", "BASE", 100, { type = "Condition", var = "Burning" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be chilled while you have onslaught"] = { mod("AvoidChill", "BASE", 100, { type = "Condition", var = "Onslaught" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be chilled during onslaught"] = { mod("AvoidChill", "BASE", 100, { type = "Condition", var = "Onslaught" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["cannot be inflicted with bleeding"] = { mod("AvoidBleed", "BASE", 100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["bleeding cannot be inflicted on you"] = { mod("AvoidBleed", "BASE", 100), { type = "GlobalEffect", effectType = "Global", unscalable = true } }, + ["you are immune to bleeding"] = { mod("AvoidBleed", "BASE", 100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["immune to poison"] = { mod("AvoidPoison", "BASE", 100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["immune to poison during flask effect"] = { mod("AvoidPoison", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["immunity to poison during flask effect"] = { mod("AvoidPoison", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["immunity to shock during flask effect"] = { mod("AvoidShock", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, ["immunity to freeze and chill during flask effect"] = { - mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }), - mod("AvoidChill", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }), + mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "GlobalEffect", effectType = "Global", unscalable = true }), + mod("AvoidChill", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "GlobalEffect", effectType = "Global", unscalable = true }), }, ["immune to freeze and chill while ignited"] = { - mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "Ignited"}, { type = "Unscalable" }), - mod("AvoidChill", "BASE", 100, { type = "Condition", var = "Ignited"}, { type = "Unscalable" }), + mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "Ignited"}, { type = "GlobalEffect", effectType = "Global", unscalable = true }), + mod("AvoidChill", "BASE", 100, { type = "Condition", var = "Ignited"}, { type = "GlobalEffect", effectType = "Global", unscalable = true }), }, - ["immunity to ignite during flask effect"] = { mod("AvoidIgnite", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }) }, - ["immunity to bleeding during flask effect"] = { mod("AvoidBleed", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }) }, - ["immune to curses during flask effect"] = { mod("AvoidCurse", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }) }, + ["immunity to ignite during flask effect"] = { mod("AvoidIgnite", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["immunity to bleeding during flask effect"] = { mod("AvoidBleed", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["immune to curses during flask effect"] = { mod("AvoidCurse", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, ["immune to freeze, chill, curses and stuns during flask effect"] = { - mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }), - mod("AvoidChill", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }), - mod("AvoidCurse", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }), - mod("AvoidStun", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "Unscalable" }), + mod("AvoidFreeze", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "GlobalEffect", effectType = "Global", unscalable = true }), + mod("AvoidChill", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "GlobalEffect", effectType = "Global", unscalable = true }), + mod("AvoidCurse", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "GlobalEffect", effectType = "Global", unscalable = true }), + mod("AvoidStun", "BASE", 100, { type = "Condition", var = "UsingFlask"}, { type = "GlobalEffect", effectType = "Global", unscalable = true }), }, - ["unaffected by curses"] = { mod("CurseEffectOnSelf", "MORE", -100, { type = "Unscalable" }) }, - ["unaffected by curses while affected by zealotry"] = { mod("CurseEffectOnSelf", "MORE", -100, { type = "Condition", var = "AffectedByZealotry" }, { type = "Unscalable" }) }, - ["immune to curses while you have at least (%d+) rage"] = function(num) return { mod("AvoidCurse", "BASE", 100, { type = "MultiplierThreshold", var = "Rage", threshold = num }, { type = "Unscalable" }) } end, + ["unaffected by curses"] = { mod("CurseEffectOnSelf", "MORE", -100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["unaffected by curses while affected by zealotry"] = { mod("CurseEffectOnSelf", "MORE", -100, { type = "Condition", var = "AffectedByZealotry" }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) }, + ["immune to curses while you have at least (%d+) rage"] = function(num) return { mod("AvoidCurse", "BASE", 100, { type = "MultiplierThreshold", var = "Rage", threshold = num }, { type = "GlobalEffect", effectType = "Global", unscalable = true }) } end, ["the effect of chill on you is reversed"] = { flag("SelfChillEffectIsReversed") }, ["your movement speed is (%d+)%% of its base value"] = function(num) return { mod("MovementSpeed", "OVERRIDE", num / 100) } end, ["action speed cannot be modified to below (%d+)%% base value"] = function(num) return { mod("MinimumActionSpeed", "MAX", num) } end, From cb25ab5d08770690413cf1f007b356b4d7a8e30f Mon Sep 17 00:00:00 2001 From: QuickStick <31533893+QuickStick123@users.noreply.github.com> Date: Tue, 6 Sep 2022 19:54:45 +1000 Subject: [PATCH 07/11] Cleanup unscalable mod list --- src/Modules/CalcActiveSkill.lua | 3 +-- src/Modules/CalcPerform.lua | 5 ----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Modules/CalcActiveSkill.lua b/src/Modules/CalcActiveSkill.lua index 34e02269ac..3348ddc595 100644 --- a/src/Modules/CalcActiveSkill.lua +++ b/src/Modules/CalcActiveSkill.lua @@ -637,7 +637,6 @@ function calcs.buildActiveSkillModList(env, activeSkill) applyNotPlayer = effectTag.applyNotPlayer, applyMinions = effectTag.applyMinions, modList = { }, - unscalableModList = { }, } if skillModList[i].source == activeGrantedEffect.modSource then -- Inherit buff configuration from the active skill @@ -650,7 +649,7 @@ function calcs.buildActiveSkillModList(env, activeSkill) t_insert(activeSkill.buffList, buff) end local match = false - local modList = effectTag.unscalable and buff.unscalableModList or buff.modList + local modList = buff.modList for d = 1, #modList do local destMod = modList[d] if modLib.compareModParams(skillModList[i], destMod) and (destMod.type == "BASE" or destMod.type == "INC") then diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua index 86b31df3e9..de2a4a2aa0 100644 --- a/src/Modules/CalcPerform.lua +++ b/src/Modules/CalcPerform.lua @@ -1800,7 +1800,6 @@ function calcs.perform(env, avoidCache) local more = modStore:More(skillCfg, "BuffEffect", "BuffEffectOnSelf") srcList:ScaleAddList(buff.modList, (1 + inc / 100) * more) mergeBuff(srcList, buffs, buff.name) - mergeBuff(buff.unscalableModList, buffs, buff.name) if activeSkill.skillData.thisIsNotABuff then buffs[buff.name].notBuff = true end @@ -1813,7 +1812,6 @@ function calcs.perform(env, avoidCache) local more = modStore:More(skillCfg, "BuffEffect", "BuffEffectOnMinion") * env.minion.modDB:More(nil, "BuffEffectOnSelf") srcList:ScaleAddList(buff.modList, (1 + inc / 100) * more) mergeBuff(srcList, minionBuffs, buff.name) - mergeBuff(buff.unscalableModList, minionBuffs, buff.name) end end elseif buff.type == "Guard" then @@ -1827,7 +1825,6 @@ function calcs.perform(env, avoidCache) local more = modStore:More(skillCfg, "BuffEffect", "BuffEffectOnSelf") srcList:ScaleAddList(buff.modList, (1 + inc / 100) * more) mergeBuff(srcList, guards, buff.name) - mergeBuff(buff.unscalableModList, guards, buff.name) end end elseif buff.type == "Aura" then @@ -1975,7 +1972,6 @@ function calcs.perform(env, avoidCache) local more = modStore:More(skillCfg, "BuffEffect") * modDB:More(nil, "BuffEffectOnSelf") srcList:ScaleAddList(buff.modList, (1 + inc / 100) * more) mergeBuff(srcList, buffs, buff.name) - mergeBuff(buff.unscalableModList, buffs, buff.name) end if env.minion and (env.minion == castingMinion or buff.applyAllies) then env.minion.modDB.conditions["AffectedBy"..buff.name:gsub(" ","")] = true @@ -1984,7 +1980,6 @@ function calcs.perform(env, avoidCache) local more = modStore:More(skillCfg, "BuffEffect", "BuffEffectOnSelf") srcList:ScaleAddList(buff.modList, (1 + inc / 100) * more) mergeBuff(srcList, minionBuffs, buff.name) - mergeBuff(buff.unscalableModList, minionBuffs, buff.name) end end elseif buff.type == "Aura" then From fac0931dc210d638f111892271c12bf2f039af65 Mon Sep 17 00:00:00 2001 From: QuickStick <31533893+QuickStick123@users.noreply.github.com> Date: Tue, 6 Sep 2022 19:55:43 +1000 Subject: [PATCH 08/11] minor cleanup --- src/Data/Skills/other.lua | 4 ++-- src/Export/Skills/other.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Data/Skills/other.lua b/src/Data/Skills/other.lua index 4f33dc2e36..b3636b16b2 100644 --- a/src/Data/Skills/other.lua +++ b/src/Data/Skills/other.lua @@ -283,12 +283,12 @@ skills["BloodOffering"] = { mod("Damage", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }), }, ["blood_offering_%_of_life_to_lose"] = { - mod("Multiplier:BloodOfferingLifeSacrificed", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable=true }, { type = "PerStat", stat = "LifeUnreserved", actor = "parent" }), + mod("Multiplier:BloodOfferingLifeSacrificed", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "PerStat", stat = "LifeUnreserved", actor = "parent" }), div = 100, }, ["blood_offering_%_of_lost_life_to_regenerate_as_life_per_second"] = { mod("LifeRegen", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }, { type = "Multiplier", var = "BloodOfferingLifeSacrificed" }), - mod("Multiplier:BloodOfferingBaseRegen", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable=true }, { type = "Multiplier", var = "BloodOfferingLifeSacrificed" }), + mod("Multiplier:BloodOfferingBaseRegen", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "Multiplier", var = "BloodOfferingLifeSacrificed" }), div = 100, }, ["blood_offering_life_regenerated_+%_final_per_corpse"] = { diff --git a/src/Export/Skills/other.txt b/src/Export/Skills/other.txt index 52a166fe0f..fc1f82986c 100644 --- a/src/Export/Skills/other.txt +++ b/src/Export/Skills/other.txt @@ -113,12 +113,12 @@ local skills, mod, flag, skill = ... mod("Damage", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }), }, ["blood_offering_%_of_life_to_lose"] = { - mod("Multiplier:BloodOfferingLifeSacrificed", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable=true }, { type = "PerStat", stat = "LifeUnreserved", actor = "parent" }), + mod("Multiplier:BloodOfferingLifeSacrificed", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "PerStat", stat = "LifeUnreserved", actor = "parent" }), div = 100, }, ["blood_offering_%_of_lost_life_to_regenerate_as_life_per_second"] = { mod("LifeRegen", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }, { type = "Multiplier", var = "BloodOfferingLifeSacrificed" }), - mod("Multiplier:BloodOfferingBaseRegen", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable=true }, { type = "Multiplier", var = "BloodOfferingLifeSacrificed" }), + mod("Multiplier:BloodOfferingBaseRegen", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "Multiplier", var = "BloodOfferingLifeSacrificed" }), div = 100, }, ["blood_offering_life_regenerated_+%_final_per_corpse"] = { From 8d8aefb8477912d4ea56a5031c5704a0862c50df Mon Sep 17 00:00:00 2001 From: QuickStick <31533893+QuickStick123@users.noreply.github.com> Date: Tue, 6 Sep 2022 22:22:12 +1000 Subject: [PATCH 09/11] Fix other related issues and add support for a couple mods. (#1) * Fix Up several other instances of this and add support for a couple aura mods while at it. * FIX: add a check in case (env.configInput["enemyCritChance"] ends up nil. Co-authored-by: Paliak <91493239+Paliak@users.noreply.github.com> --- src/Data/SkillStatMap.lua | 4 ++++ src/Data/Skills/act_dex.lua | 6 +++++- src/Data/Skills/act_int.lua | 5 ++++- src/Data/Skills/act_str.lua | 5 ++++- src/Data/Skills/other.lua | 6 ++++++ src/Export/Skills/act_dex.txt | 6 +++++- src/Export/Skills/act_int.txt | 5 ++++- src/Export/Skills/act_str.txt | 5 ++++- src/Export/Skills/other.txt | 6 ++++++ src/Modules/CalcDefence.lua | 3 ++- src/Modules/CalcSections.lua | 1 + 11 files changed, 45 insertions(+), 7 deletions(-) diff --git a/src/Data/SkillStatMap.lua b/src/Data/SkillStatMap.lua index 3039049d04..d3f752e624 100644 --- a/src/Data/SkillStatMap.lua +++ b/src/Data/SkillStatMap.lua @@ -1662,6 +1662,10 @@ return { ["banner_area_of_effect_+%_per_stage"] = { mod("AreaOfEffect", "INC", nil, 0, 0, { type = "Multiplier", var = "BannerStage" }, { type = "Condition", var = "BannerPlanted" }), }, +["banner_additional_base_duration_per_stage_ms"] = { + mod("PrimaryDuration", "BASE", nil, 0, 0, { type = "Multiplier", var = "BannerStage" }, { type = "Condition", var = "BannerPlanted" }), + div = 1000, +}, -- Other ["triggered_skill_damage_+%"] = { mod("TriggeredDamage", "INC", nil, 0, 0, { type = "SkillType", skillType = SkillType.Triggered }), diff --git a/src/Data/Skills/act_dex.lua b/src/Data/Skills/act_dex.lua index 6bc2a4dc0d..02fe9a082c 100644 --- a/src/Data/Skills/act_dex.lua +++ b/src/Data/Skills/act_dex.lua @@ -4701,6 +4701,10 @@ skills["Hatred"] = { ["hatred_aura_cold_damage_+%_final"] = { mod("ColdDamage", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), }, + ["chill_and_freeze_duration_+%"] = { + mod("EnemyChillDuration", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), + mod("EnemyFreezeDuration", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), + }, ["movement_velocity_+%_on_chilled_ground"] = { mod("MovementSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }, {type = "Condition", var = "OnChilledGround"}) } @@ -6633,7 +6637,7 @@ skills["ColdImpurity"] = { castTime = 0, statMap = { ["hits_ignore_my_cold_resistance"] = { - flag("SelfIgnoreColdResistance", { type = "GlobalEffect", effectType = "Debuff" }), + flag("SelfIgnoreColdResistance", { type = "GlobalEffect", effectType = "AuraDebuff" }), }, ["base_maximum_cold_damage_resistance_%"] = { mod("ColdResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), diff --git a/src/Data/Skills/act_int.lua b/src/Data/Skills/act_int.lua index 729518fc5f..f3bae06c09 100644 --- a/src/Data/Skills/act_int.lua +++ b/src/Data/Skills/act_int.lua @@ -1540,6 +1540,9 @@ skills["Clarity"] = { ["damage_+%_on_full_mana"] = { mod("Damage", "INC", nil, 0, 0, { type = "Condition", var = "FullMana" }, { type = "GlobalEffect", effectType = "Aura" }), }, + ["flask_mana_to_recover_+%"] = { + mod("FlaskManaRecovery", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), + }, }, baseFlags = { spell = true, @@ -7949,7 +7952,7 @@ skills["LightningImpurity"] = { castTime = 0, statMap = { ["hits_ignore_my_lightning_resistance"] = { - flag("SelfIgnoreLightningResistance", { type = "GlobalEffect", effectType = "Debuff" }) + flag("SelfIgnoreLightningResistance", { type = "GlobalEffect", effectType = "AuraDebuff" }) }, ["base_maximum_lightning_damage_resistance_%"] = { mod("LightningResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), diff --git a/src/Data/Skills/act_str.lua b/src/Data/Skills/act_str.lua index fc24dff606..f184831096 100644 --- a/src/Data/Skills/act_str.lua +++ b/src/Data/Skills/act_str.lua @@ -1972,6 +1972,9 @@ skills["DefianceBanner"] = { ["evasion_and_physical_damage_reduction_rating_+%"] = { mod("ArmourAndEvasion", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), }, + ["armour_evasion_banner_critical_strike_chance_+%"] = { + mod("EnemyCritChance", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), + }, }, baseFlags = { spell = true, @@ -5382,7 +5385,7 @@ skills["FireImpurity"] = { castTime = 0, statMap = { ["hits_ignore_my_fire_resistance"] = { - flag("SelfIgnoreFireResistance", { type = "GlobalEffect", effectType = "Debuff" }) + flag("SelfIgnoreFireResistance", { type = "GlobalEffect", effectType = "AuraDebuff" }) }, ["base_maximum_fire_damage_resistance_%"] = { mod("FireResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), diff --git a/src/Data/Skills/other.lua b/src/Data/Skills/other.lua index b3636b16b2..7c4cabf4d2 100644 --- a/src/Data/Skills/other.lua +++ b/src/Data/Skills/other.lua @@ -1335,8 +1335,14 @@ skills["VaalAuraElementalDamageHealing"] = { area = true, duration = true, }, + statMap = { + ["immune_to_curses"] = { + --Display only + }, + }, baseMods = { skill("radius", 40), + mod("AvoidCurse", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), }, constantStats = { { "base_skill_effect_duration", 5000 }, diff --git a/src/Export/Skills/act_dex.txt b/src/Export/Skills/act_dex.txt index 34a33f7eb6..72673f6d4f 100644 --- a/src/Export/Skills/act_dex.txt +++ b/src/Export/Skills/act_dex.txt @@ -905,6 +905,10 @@ local skills, mod, flag, skill = ... ["hatred_aura_cold_damage_+%_final"] = { mod("ColdDamage", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), }, + ["chill_and_freeze_duration_+%"] = { + mod("EnemyChillDuration", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), + mod("EnemyFreezeDuration", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), + }, ["movement_velocity_+%_on_chilled_ground"] = { mod("MovementSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }, {type = "Condition", var = "OnChilledGround"}) } @@ -1241,7 +1245,7 @@ local skills, mod, flag, skill = ... #flags spell aura area duration statMap = { ["hits_ignore_my_cold_resistance"] = { - flag("SelfIgnoreColdResistance", { type = "GlobalEffect", effectType = "Debuff" }), + flag("SelfIgnoreColdResistance", { type = "GlobalEffect", effectType = "AuraDebuff" }), }, ["base_maximum_cold_damage_resistance_%"] = { mod("ColdResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), diff --git a/src/Export/Skills/act_int.txt b/src/Export/Skills/act_int.txt index 2919b8957e..e8672ccebb 100644 --- a/src/Export/Skills/act_int.txt +++ b/src/Export/Skills/act_int.txt @@ -424,6 +424,9 @@ local skills, mod, flag, skill = ... ["damage_+%_on_full_mana"] = { mod("Damage", "INC", nil, 0, 0, { type = "Condition", var = "FullMana" }, { type = "GlobalEffect", effectType = "Aura" }), }, + ["flask_mana_to_recover_+%"] = { + mod("FlaskManaRecovery", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), + }, }, #baseMod skill("radius", 40) #mods @@ -1652,7 +1655,7 @@ local skills, mod, flag, skill = ... #flags spell aura area duration statMap = { ["hits_ignore_my_lightning_resistance"] = { - flag("SelfIgnoreLightningResistance", { type = "GlobalEffect", effectType = "Debuff" }) + flag("SelfIgnoreLightningResistance", { type = "GlobalEffect", effectType = "AuraDebuff" }) }, ["base_maximum_lightning_damage_resistance_%"] = { mod("LightningResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), diff --git a/src/Export/Skills/act_str.txt b/src/Export/Skills/act_str.txt index 328bf01916..99b2c04212 100644 --- a/src/Export/Skills/act_str.txt +++ b/src/Export/Skills/act_str.txt @@ -344,6 +344,9 @@ local skills, mod, flag, skill = ... ["evasion_and_physical_damage_reduction_rating_+%"] = { mod("ArmourAndEvasion", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), }, + ["armour_evasion_banner_critical_strike_chance_+%"] = { + mod("EnemyCritChance", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), + }, }, #baseMod skill("radius", 46) #baseMod skill("manaReservationPercent", 0, { type = "Condition", var = "BannerPlanted" }) @@ -953,7 +956,7 @@ local skills, mod, flag, skill = ... #flags spell aura area duration statMap = { ["hits_ignore_my_fire_resistance"] = { - flag("SelfIgnoreFireResistance", { type = "GlobalEffect", effectType = "Debuff" }) + flag("SelfIgnoreFireResistance", { type = "GlobalEffect", effectType = "AuraDebuff" }) }, ["base_maximum_fire_damage_resistance_%"] = { mod("FireResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Aura" }), diff --git a/src/Export/Skills/other.txt b/src/Export/Skills/other.txt index fc1f82986c..1d2141a3ec 100644 --- a/src/Export/Skills/other.txt +++ b/src/Export/Skills/other.txt @@ -397,7 +397,13 @@ local skills, mod, flag, skill = ... #skill VaalAuraElementalDamageHealing #flags spell aura area duration fromItem = true, + statMap = { + ["immune_to_curses"] = { + --Display Only + }, + }, #baseMod skill("radius", 40) +#baseMod mod("AvoidCurse", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), #mods #skill GoreShockwave diff --git a/src/Modules/CalcDefence.lua b/src/Modules/CalcDefence.lua index 0870e1da30..36a866d1d3 100644 --- a/src/Modules/CalcDefence.lua +++ b/src/Modules/CalcDefence.lua @@ -881,6 +881,7 @@ function calcs.defence(env, actor) for _, ailment in ipairs(data.ailmentTypeList) do output[ailment.."AvoidChance"] = m_min(modDB:Sum("BASE", nil, "Avoid"..ailment), 100) end + output.CurseAvoidChance = m_min(modDB:Sum("BASE", nil, "AvoidCurse"), 100) output.CritExtraDamageReduction = m_min(modDB:Sum("BASE", nil, "ReduceCritExtraDamage"), 100) output.LightRadiusMod = calcLib.mod(modDB, nil, "LightRadius") if breakdown then @@ -916,7 +917,7 @@ function calcs.defence(env, actor) }, } end - local enemyCritChance = env.configInput["enemyCritChance"] or env.configPlaceholder["enemyCritChance"] or 0 + local enemyCritChance = (env.configInput["enemyCritChance"] or 0) * (1 + modDB:Sum("INC", nil, "EnemyCritChance") / 100) local enemyCritDamage = env.configInput["enemyCritDamage"] or env.configPlaceholder["enemyCritDamage"] or 0 output["EnemyCritEffect"] = 1 + enemyCritChance / 100 * (enemyCritDamage / 100) * (1 - output.CritExtraDamageReduction / 100) for _, damageType in ipairs(dmgTypeList) do diff --git a/src/Modules/CalcSections.lua b/src/Modules/CalcSections.lua index bd04d580da..4c443359ab 100644 --- a/src/Modules/CalcSections.lua +++ b/src/Modules/CalcSections.lua @@ -1499,6 +1499,7 @@ return { { label = "Scorch Avoid Ch.", haveOutput = "ScorchAvoidChance", { format = "{0:output:ScorchAvoidChance}%", { modName = "AvoidScorch" }, }, }, { label = "Bleed Avoid Ch.", haveOutput = "BleedAvoidChance", { format = "{0:output:BleedAvoidChance}%", { modName = "AvoidBleed" }, }, }, { label = "Poison Avoid Ch.", haveOutput = "PoisonAvoidChance", { format = "{0:output:PoisonAvoidChance}%", { modName = "AvoidPoison" }, }, }, + { label = "Curse Avoid Ch.", haveOutput = "CurseAvoidChance", { format = "{0:output:CurseAvoidChance}%", { modName = "AvoidCurse" }, }, }, { label = "Crit Reduction", haveOutput = "CritExtraDamageReduction", { format = "{0:output:CritExtraDamageReduction}%", { modName = "ReduceCritExtraDamage" }, }, }, { label = "Blind Duration", haveOutput = "SelfBlindDuration", { format = "{0:output:SelfBlindDuration}%", { modName = "SelfBlindDuration" }, }, }, } }, { defaultCollapsed = true, label = "Other Ailment Defences", data = { From 2e61d1e3c731e1b1d6b29fbc19175a6f2219e461 Mon Sep 17 00:00:00 2001 From: Paliak <91493239+Paliak@users.noreply.github.com> Date: Tue, 6 Sep 2022 14:27:19 +0200 Subject: [PATCH 10/11] FIX: Artic Armour is a buff not an aura. --- src/Data/Skills/act_dex.lua | 2 +- src/Export/Skills/act_dex.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Data/Skills/act_dex.lua b/src/Data/Skills/act_dex.lua index 02fe9a082c..3c2e9b4dfa 100644 --- a/src/Data/Skills/act_dex.lua +++ b/src/Data/Skills/act_dex.lua @@ -317,7 +317,7 @@ skills["ArcticArmour"] = { }, }, baseMods = { - mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), + mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }), }, baseFlags = { spell = true, diff --git a/src/Export/Skills/act_dex.txt b/src/Export/Skills/act_dex.txt index 72673f6d4f..d9ed18417c 100644 --- a/src/Export/Skills/act_dex.txt +++ b/src/Export/Skills/act_dex.txt @@ -77,7 +77,7 @@ local skills, mod, flag, skill = ... --Display only }, }, -#baseMod mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Aura", unscalable = true }), +#baseMod mod("AvoidFreeze", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }), #mods #skill ArtilleryBallista From 9e31a862eac554bf9b9653849568f02178be025c Mon Sep 17 00:00:00 2001 From: Paliak <91493239+Paliak@users.noreply.github.com> Date: Tue, 6 Sep 2022 14:36:12 +0200 Subject: [PATCH 11/11] FIX: Typo. --- src/Data/Skills/act_int.lua | 2 +- src/Export/Skills/act_int.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Data/Skills/act_int.lua b/src/Data/Skills/act_int.lua index f3bae06c09..e443470ddc 100644 --- a/src/Data/Skills/act_int.lua +++ b/src/Data/Skills/act_int.lua @@ -11228,7 +11228,7 @@ skills["TempestShield"] = { mod("SpellBlockChance", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }), }, ["skill_display_buff_grants_shock_immunity"] = { - --Dispaly only + --Display only } }, baseFlags = { diff --git a/src/Export/Skills/act_int.txt b/src/Export/Skills/act_int.txt index e8672ccebb..fe55f92269 100644 --- a/src/Export/Skills/act_int.txt +++ b/src/Export/Skills/act_int.txt @@ -2247,7 +2247,7 @@ local skills, mod, flag, skill = ... mod("SpellBlockChance", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }), }, ["skill_display_buff_grants_shock_immunity"] = { - --Dispaly only + --Display only } }, #baseMod mod("AvoidShock", "BASE", 100, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true })