From 5cd8e5c2292d15c71c2c35e653dd34455c69b9cc Mon Sep 17 00:00:00 2001 From: David Medgyesy Date: Fri, 27 Nov 2026 16:29:37 +0100 Subject: [PATCH] Add The Arkhon Grim Fate to the Shaper boss skill presets The Arkhon makes The Shaper gain 80% of Physical Damage as extra Damage of a random Element. The option shows when a Shaper skill preset is selected and works like the existing random element mode: Average gives a third to each element, or the full value can go to one element. --- spec/System/TestGrimFate_spec.lua | 44 +++++++++++++++++++++++++++++++ src/Modules/ConfigOptions.lua | 17 ++++++++++++ src/Modules/Data.lua | 1 + 3 files changed, 62 insertions(+) create mode 100644 spec/System/TestGrimFate_spec.lua diff --git a/spec/System/TestGrimFate_spec.lua b/spec/System/TestGrimFate_spec.lua new file mode 100644 index 00000000000..d9ed7088dd9 --- /dev/null +++ b/spec/System/TestGrimFate_spec.lua @@ -0,0 +1,44 @@ +describe("TestGrimFate", function() + before_each(function() + newBuild() + end) + + local function enemyDamage(preset, arkhon) + build.configTab.input.presetBossSkills = preset + build.configTab.input.grimFateArkhon = arkhon + build.configTab:BuildModList() + runCallback("OnFrame") + local output = build.calcsTab.mainOutput + return { + Physical = output.PhysicalEnemyDamage, + Fire = output.FireEnemyDamage, + Cold = output.ColdEnemyDamage, + Lightning = output.LightningEnemyDamage, + } + end + + it("adds The Arkhon's 80% Physical as extra elemental damage to Shaper Slam", function() + local base = enemyDamage("Shaper Slam", "NONE") + assert.is_true(base.Physical > 0) + assert.are.equal(0, base.Fire) + + local average = enemyDamage("Shaper Slam", "AVERAGE") + assert.are.equal(base.Physical, average.Physical) + for _, element in ipairs({ "Fire", "Cold", "Lightning" }) do + assert.is_true(average[element] > 0, element) + end + + local fire = enemyDamage("Shaper Slam", "FIRE") + assert.near(average.Fire * 3, fire.Fire, 0.01) + assert.are.equal(0, fire.Cold) + assert.are.equal(0, fire.Lightning) + end) + + it("doesn't change other boss skills", function() + local base = enemyDamage("Sirus Meteor", "NONE") + local withFate = enemyDamage("Sirus Meteor", "FIRE") + for _, damageType in ipairs({ "Physical", "Fire", "Cold", "Lightning" }) do + assert.are.equal(base[damageType], withFate[damageType], damageType) + end + end) +end) diff --git a/src/Modules/ConfigOptions.lua b/src/Modules/ConfigOptions.lua index 18ca0dc1255..b2b877a3bb2 100644 --- a/src/Modules/ConfigOptions.lua +++ b/src/Modules/ConfigOptions.lua @@ -2354,6 +2354,9 @@ Huge sets the radius to 11. end modList:NewMod("BossSkillActive", "FLAG", true, "Config") + if val:match("^Shaper ") then + modList:NewMod("ShaperBossSkillActive", "FLAG", true, "Config") + end -- boss specific mods if val == "Atziri Flameblast" and isUber then @@ -2379,6 +2382,20 @@ Huge sets the radius to 11. build.configTab.varControls['enemyDamageType'].enabled = true end end }, + { var = "grimFateArkhon", type = "list", label = "Grim Fate: The Arkhon", ifFlag = "ShaperBossSkillActive", tooltip = "The Arkhon Grim Fate makes The Shaper gain 80% of Physical Damage as extra Damage of a random Element.\n\tAverage: one third of the value as ^xB97123Fire^7, ^x3F6DB3Cold^7 and ^xADAA47Lightning ^7each, the expected damage over many hits\n\t^xB97123Fire ^7/ ^x3F6DB3Cold ^7/ ^xADAA47Lightning^7: the full value as that element, for a single hit of that element", list = {{val="NONE",label="None"},{val="AVERAGE",label="Average"},{val="FIRE",label="^xB97123Fire"},{val="COLD",label="^x3F6DB3Cold"},{val="LIGHTNING",label="^xADAA47Lightning"}}, apply = function(val, modList, enemyModList, build) + local preset = build.configTab.input.presetBossSkills + if val == "NONE" or not (preset and preset:match("^Shaper ")) then + return + end + local gain = data.misc.GrimFateArkhonPhysicalGainAsRandom + if val == "AVERAGE" then + for _, element in ipairs({ "Fire", "Cold", "Lightning" }) do + enemyModList:NewMod("PhysicalDamageGainAs"..element, "BASE", gain / 3, "Grim Fate: The Arkhon") + end + else + enemyModList:NewMod("PhysicalDamageGainAs"..val:sub(1, 1)..val:sub(2):lower(), "BASE", gain, "Grim Fate: The Arkhon") + end + end }, { var = "enemyDamageRollRange", type = "integer", label = "Enemy Skill Roll Range %:", ifFlag = "BossSkillActive", tooltip = "The percentage of the roll range the enemy hits for \n eg at 100% the enemy deals its maximum damage", defaultPlaceholderState = 70, hideIfInvalid = true }, { var = "enemyDamageType", type = "list", label = "Enemy Damage Type:", tooltip = "Controls which types of damage the EHP calculation uses:\n\tAverage: uses the Average of all typed damage types (except Damage Over Time and Untyped)\n\nIf a specific damage type is selected, that will be the only type used.", list = { {val="Average",label="Average"}, diff --git a/src/Modules/Data.lua b/src/Modules/Data.lua index d3aa27f9312..883b84c56ad 100644 --- a/src/Modules/Data.lua +++ b/src/Modules/Data.lua @@ -285,6 +285,7 @@ data.misc = { -- magic numbers pinnacleBossPen = 15 / 5, uberBossDPSMult = 10 / 4.25, uberBossPen = 40 / 5, + GrimFateArkhonPhysicalGainAsRandom = 80, -- The Arkhon Grim Fate, poedb Grim_Fates -- ehp helper function magic numbers ehpCalcSpeedUp = 8, -- max damage can be increased for more accuracy