From 232d619eeb2f798d218cc9f25978b7138b488d3f Mon Sep 17 00:00:00 2001 From: Nerotox Date: Tue, 16 Jul 2024 06:07:54 +0200 Subject: [PATCH 1/2] add support for quant/rarity vs frozen/shocked enemies. add support for bisco's quanit/rarity vs normal/magic enemies --- src/Modules/CalcPerform.lua | 6 ++++++ src/Modules/CalcSections.lua | 2 ++ src/Modules/ModParser.lua | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua index 611b629f0c..6f7adb09a6 100644 --- a/src/Modules/CalcPerform.lua +++ b/src/Modules/CalcPerform.lua @@ -1252,6 +1252,12 @@ function calcs.perform(env, skipEHP) end end + -- Special Rarity / Quantity Calc for Bisco's + local lootQuantityNormalEnemies = modDB:Sum("INC", nil, "LootQuantityNormalEnemies") + output.LootQuantityNormalEnemies = (lootQuantityNormalEnemies > 0) and lootQuantityNormalEnemies + modDB:Sum("INC", nil, "LootQuantity") or 0 + local lootRarityMagicEnemies = modDB:Sum("INC", nil, "LootRarityMagicEnemies") + output.LootRarityMagicEnemies = (lootRarityMagicEnemies > 0) and lootRarityMagicEnemies + modDB:Sum("INC", nil, "LootRarity") or 0 + local breakdown = nil if env.mode == "CALCS" then -- Initialise breakdown module diff --git a/src/Modules/CalcSections.lua b/src/Modules/CalcSections.lua index cae68aca70..4dcc3d2cd8 100644 --- a/src/Modules/CalcSections.lua +++ b/src/Modules/CalcSections.lua @@ -1313,7 +1313,9 @@ return { }, }, { label = "Maximum Rage", haveOutput = "MaximumRage", { format = "{0:output:MaximumRage}", { modName = "MaximumRage" }, }, }, { label = "Inc. Item Quantity", { format = "{0:mod:1}%", { modName = "LootQuantity", modType = "INC", cfg = "skill" }, }, }, + { label = "IIQ for Normal Mobs", haveOutput = "LootQuantityNormalEnemies", { format = "{0:output:LootQuantityNormalEnemies}%", { modName = { "LootQuantityNormalEnemies", "LootQuantity" }}, }, }, { label = "Inc. Item Rarity", { format = "{0:mod:1}%", { modName = "LootRarity", modType = "INC", cfg = "skill" }, }, }, + { label = "IIR for Magic Mobs", haveOutput = "LootRarityMagicEnemies", { format = "{0:output:LootRarityMagicEnemies}%", { modName = { "LootRarityMagicEnemies", "LootRarity" }}, }, }, { label = "Culling Strike", haveOutput = "CullPercent", { format = "{0:output:CullPercent}%", { modName = { "CullPercent", "CriticalCullPercent" }, cfg = "skill" } } }, { label = "Enemy Life Recovery", haveOutput = "EnemyLifeRegen", { format = "{0:output:EnemyLifeRegen}%", { modName = "LifeRegen", modType = "INC", enemy = true }, }, }, { label = "Enemy Mana Recovery", haveOutput = "EnemyManaRegen", { format = "{0:output:EnemyManaRegen}%", { modName = "ManaRegen", modType = "INC", enemy = true }, }, }, diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 4183873c7b..b95459e52f 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -729,6 +729,7 @@ local modNameList = { ["rarity of items found"] = "LootRarity", ["rarity of items dropped"] = "LootRarity", ["quantity of items found"] = "LootQuantity", + ["quantity of items dropped"] = "LootQuantity", ["item quantity"] = "LootQuantity", ["strength requirement"] = "StrRequirement", ["dexterity requirement"] = "DexRequirement", @@ -1768,6 +1769,8 @@ local modTagList = { ["against enemies on consecrated ground"] = { tag = { type = "ActorCondition", actor = "enemy", var = "OnConsecratedGround" } }, ["if (%d+)%% of curse duration expired"] = function(num) return { tag = { type = "MultiplierThreshold", actor = "enemy", var = "CurseExpired", threshold = num } } end, ["against enemies with (%w+) exposure"] = function(element) return { tag = { type = "ActorCondition", actor = "enemy", var = "Has"..(firstToUpper(element).."Exposure") } } end, + ["by s?l?a?i?n? ?frozen enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Frozen" }}, + ["by s?l?a?i?n? ?shocked enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Shocked" }}, -- Enemy multipliers ["per freeze, shock [ao][nr]d? ignite on enemy"] = { tag = { type = "Multiplier", var = "FreezeShockIgniteOnEnemy" } }, ["per poison affecting enemy"] = { tag = { type = "Multiplier", actor = "enemy", var = "PoisonStack" } }, @@ -4732,6 +4735,9 @@ local specialModList = { ["regenerate (%d+) mana per second while any enemy is in your righteous fire or scorching ray"] = function( num) return { mod("ManaRegen", "BASE", num, { type = "Condition", var = "InRFOrScorchingRay" }) } end, ["%+(%d+)%% to wave of conviction damage over time multiplier per ([%d%.]+) seconds of duration expired"] = function(num) return { mod("WaveOfConvictionDurationDotMulti", "INC", num) } end, ["when an enemy hit deals elemental damage to you, their resistance to those elements becomes zero for (%d+) seconds"] = { flag("Condition:HaveTrickstersSmile"), }, + -- Conditional Player Quantity / Rarity + ["(%d+)%% increased quantity of items dropped by slain normal enemies"] = function(num) return { mod("LootQuantityNormalEnemies", "INC", num) } end, + ["(%d+)%% increased rarity of items dropped by slain magic enemies"] = function(num) return { mod("LootRarityMagicEnemies", "INC", num) } end, -- Pantheon: Soul of Tukohama support ["while stationary, gain ([%d%.]+)%% of life regenerated per second every second, up to a maximum of (%d+)%%"] = function(num, _, limit) return { mod("LifeRegenPercent", "BASE", num, { type = "Multiplier", var = "StationarySeconds", limit = tonumber(limit), limitTotal = true }, { type = "Condition", var = "Stationary" }), From 9bf4f7d66777cdbf6a2c857d984b11f2c893f751 Mon Sep 17 00:00:00 2001 From: Nerotox Date: Tue, 16 Jul 2024 06:26:26 +0200 Subject: [PATCH 2/2] codestyle fixes --- src/Modules/CalcSections.lua | 4 ++-- src/Modules/ModParser.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Modules/CalcSections.lua b/src/Modules/CalcSections.lua index 4dcc3d2cd8..81e9be9e5c 100644 --- a/src/Modules/CalcSections.lua +++ b/src/Modules/CalcSections.lua @@ -1313,9 +1313,9 @@ return { }, }, { label = "Maximum Rage", haveOutput = "MaximumRage", { format = "{0:output:MaximumRage}", { modName = "MaximumRage" }, }, }, { label = "Inc. Item Quantity", { format = "{0:mod:1}%", { modName = "LootQuantity", modType = "INC", cfg = "skill" }, }, }, - { label = "IIQ for Normal Mobs", haveOutput = "LootQuantityNormalEnemies", { format = "{0:output:LootQuantityNormalEnemies}%", { modName = { "LootQuantityNormalEnemies", "LootQuantity" }}, }, }, + { label = "IIQ for Normal Mobs", haveOutput = "LootQuantityNormalEnemies", { format = "{0:output:LootQuantityNormalEnemies}%", { modName = { "LootQuantityNormalEnemies", "LootQuantity" } }, }, }, { label = "Inc. Item Rarity", { format = "{0:mod:1}%", { modName = "LootRarity", modType = "INC", cfg = "skill" }, }, }, - { label = "IIR for Magic Mobs", haveOutput = "LootRarityMagicEnemies", { format = "{0:output:LootRarityMagicEnemies}%", { modName = { "LootRarityMagicEnemies", "LootRarity" }}, }, }, + { label = "IIR for Magic Mobs", haveOutput = "LootRarityMagicEnemies", { format = "{0:output:LootRarityMagicEnemies}%", { modName = { "LootRarityMagicEnemies", "LootRarity" } }, }, }, { label = "Culling Strike", haveOutput = "CullPercent", { format = "{0:output:CullPercent}%", { modName = { "CullPercent", "CriticalCullPercent" }, cfg = "skill" } } }, { label = "Enemy Life Recovery", haveOutput = "EnemyLifeRegen", { format = "{0:output:EnemyLifeRegen}%", { modName = "LifeRegen", modType = "INC", enemy = true }, }, }, { label = "Enemy Mana Recovery", haveOutput = "EnemyManaRegen", { format = "{0:output:EnemyManaRegen}%", { modName = "ManaRegen", modType = "INC", enemy = true }, }, }, diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index b95459e52f..3c42879b17 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -1769,8 +1769,8 @@ local modTagList = { ["against enemies on consecrated ground"] = { tag = { type = "ActorCondition", actor = "enemy", var = "OnConsecratedGround" } }, ["if (%d+)%% of curse duration expired"] = function(num) return { tag = { type = "MultiplierThreshold", actor = "enemy", var = "CurseExpired", threshold = num } } end, ["against enemies with (%w+) exposure"] = function(element) return { tag = { type = "ActorCondition", actor = "enemy", var = "Has"..(firstToUpper(element).."Exposure") } } end, - ["by s?l?a?i?n? ?frozen enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Frozen" }}, - ["by s?l?a?i?n? ?shocked enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Shocked" }}, + ["by s?l?a?i?n? ?frozen enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Frozen" } }, + ["by s?l?a?i?n? ?shocked enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Shocked" } }, -- Enemy multipliers ["per freeze, shock [ao][nr]d? ignite on enemy"] = { tag = { type = "Multiplier", var = "FreezeShockIgniteOnEnemy" } }, ["per poison affecting enemy"] = { tag = { type = "Multiplier", actor = "enemy", var = "PoisonStack" } },