Skip to content

Commit 06e1e6f

Browse files
moxajLocalIdentity
andauthored
Implement Blood Shrines (#10186)
* Implement Blood Shrines * Fix Blood Shrine calculations Fix Shrine of Crows applying to DoT damage instead of just hits Fix Trigger chance on toad shrine not including 25% chance to trigger * Move Explosive Toad chance to trigger calculations --------- Co-authored-by: LocalIdentity <31035929+LocalIdentity@users.noreply.github.com>
1 parent c03e939 commit 06e1e6f

7 files changed

Lines changed: 60 additions & 2 deletions

File tree

‎src/Data/ModCache.lua‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16252,8 +16252,7 @@ c["Gain a Spirit Charge on Kill Recover 5% of Life when you lose a Spirit Charge
1625216252
c["Gain a Void Charge every 0.5 seconds"]={nil,"a Void Charge every 0.5 seconds "}
1625316253
c["Gain a Void Charge every second"]={nil,"a Void Charge every second "}
1625416254
c["Gain a Void Charge every second 5 Maximum Void Charges"]={nil,"a Void Charge every second 5 Maximum Void Charges "}
16255-
c["Gain a random Blood Shrine buff every 10 seconds"]={nil,"a random Blood Shrine buff every 10 seconds "}
16256-
c["Gain a random Blood Shrine buff every 10 seconds 2% increased Effect of Shrine Buffs on you for each 5% of Life Reserved"]={nil,"a random Blood Shrine buff every 10 seconds 2% increased Effect of Shrine Buffs on you "}
16255+
c["Gain a random Blood Shrine buff every 10 seconds"]={{[1]={flags=0,keywordFlags=0,name="Condition:CanHaveBloodShrines",type="FLAG",value=true}},nil}
1625716256
c["Gain a random Shrine Buff for 30 seconds when you Kill a Rare or Unique Enemy"]={{[1]={flags=0,keywordFlags=0,name="Condition:CanHaveRegularShrines",type="FLAG",value=true}},nil}
1625816257
c["Gain a random Shrine buff every 10 seconds"]={{[1]={flags=0,keywordFlags=0,name="Condition:CanHaveRegularShrines",type="FLAG",value=true}},nil}
1625916258
c["Gain a random shrine buff every 10 seconds"]={{[1]={flags=0,keywordFlags=0,name="Condition:CanHaveRegularShrines",type="FLAG",value=true}},nil}

‎src/Modules/CalcPerform.lua‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,24 @@ local function doActorAttribsConditions(env, actor)
372372
modDB:NewMod("ElementalResistMax", "BASE", m_floor(2 * shrineEffectMod), "Lesser Resistance Shrine")
373373
modDB:NewMod("ChaosResistMax", "BASE", m_floor(2 * shrineEffectMod), "Lesser Resistance Shrine")
374374
end
375+
if modDB:Flag(nil, "BloodShrineOfRats") then
376+
modDB:NewMod("ElementalDamageGainAsChaos", "BASE", m_floor(30 * shrineEffectMod), "Blood Shrine of Rats")
377+
end
378+
if modDB:Flag(nil, "BloodShrineOfLocusts") then
379+
modDB:NewMod("DotMultiplier", "BASE", m_floor(30 * shrineEffectMod), "Blood Shrine of Locusts")
380+
end
381+
if modDB:Flag(nil, "BloodShrineOfToads") then
382+
modDB:NewMod("BloodShrineExplodingToadTriggerChance", "BASE", m_floor(25 * shrineEffectMod), "Blood Shrine of Toads")
383+
end
384+
if modDB:Flag(nil, "BloodShrineOfCrows") then
385+
modDB:NewMod("ChaosResist", "BASE", m_floor(50 * shrineEffectMod), "Blood Shrine of Crows")
386+
modDB:NewMod("ElementalDamageFromHitsTakenAsChaos", "BASE", m_floor(10 * shrineEffectMod), "Blood Shrine of Crows")
387+
modDB:NewMod("PhysicalDamageFromHitsTakenAsChaos", "BASE", m_floor(10 * shrineEffectMod), "Blood Shrine of Crows")
388+
end
389+
if modDB:Flag(nil, "BloodShrineOfBats") then
390+
modDB:NewMod("EnemyCurseLimit", "BASE", m_floor(1 * shrineEffectMod), "Blood Shrine of Bats")
391+
modDB:NewMod("ExtraCurse", "LIST", { skillId = "Enfeeble", level = 1 }, "Blood Shrine of Bats")
392+
end
375393
end
376394
if env.mode_effective then
377395
if env.player.mainSkill.skillModList:Sum("BASE", env.player.mainSkill.skillCfg, "FireExposureChance") > 0 or modDB:Sum("BASE", nil, "FireExposureChance") > 0 then

‎src/Modules/CalcSetup.lua‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ function calcs.initModDB(env, modDB)
104104
modDB:NewMod("LesserMassiveShrine", "FLAG", true, "Base", { type = "Condition", var = "LesserMassiveShrine" }, { type = "Condition", var = "MassiveShrine", neg = true })
105105
modDB:NewMod("LesserReplenishingShrine", "FLAG", true, "Base", { type = "Condition", var = "LesserReplenishingShrine" }, { type = "Condition", var = "ReplenishingShrine", neg = true })
106106
modDB:NewMod("LesserResistanceShrine", "FLAG", true, "Base", { type = "Condition", var = "LesserResistanceShrine" }, { type = "Condition", var = "ResistanceShrine", neg = true })
107+
modDB:NewMod("BloodShrineOfRats", "FLAG", true, "Base", { type = "Condition", var = "BloodShrineOfRats" })
108+
modDB:NewMod("BloodShrineOfLocusts", "FLAG", true, "Base", { type = "Condition", var = "BloodShrineOfLocusts" })
109+
modDB:NewMod("BloodShrineOfToads", "FLAG", true, "Base", { type = "Condition", var = "BloodShrineOfToads" })
110+
modDB:NewMod("BloodShrineOfCrows", "FLAG", true, "Base", { type = "Condition", var = "BloodShrineOfCrows" })
111+
modDB:NewMod("BloodShrineOfBats", "FLAG", true, "Base", { type = "Condition", var = "BloodShrineOfBats" })
107112
modDB:NewMod("AlchemistsGenius", "FLAG", true, "Base", { type = "Condition", var = "AlchemistsGenius" })
108113
modDB:NewMod("LuckyHits", "FLAG", true, "Base", { type = "Condition", var = "LuckyHits" })
109114
modDB:NewMod("Convergence", "FLAG", true, "Base", { type = "Condition", var = "Convergence" })

‎src/Modules/CalcTriggers.lua‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,6 +1544,11 @@ local configTable = {
15441544
end
15451545
}
15461546
end,
1547+
["BloodShrineUniqueTriggeredExplodingToad"] = function(env)
1548+
local triggerChance = env.player.mainSkill.activeEffect.srcInstance.triggerChance + env.player.modDB:Sum("BASE", nil, "BloodShrineExplodingToadTriggerChance")
1549+
return {assumingEveryHitKills = true, triggerChance = m_min(triggerChance, 100),
1550+
triggerSkillCond = function(env, skill) return skill.skillTypes[SkillType.Damage] or skill.skillTypes[SkillType.Attack] end}
1551+
end,
15471552
["bursting toad"] = function(env)
15481553
local triggerInterval = m_huge
15491554
-- All gems in the socket group should return the same HexToadCooldown even when there are multiple hextoad support gems slotted

‎src/Modules/Calcs.lua‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,21 @@ function calcs.buildOutput(build, mode)
772772
if env.modDB:Flag(nil, "LesserResistanceShrine") then
773773
t_insert(combatList, "Lesser Resistance Shrine")
774774
end
775+
if env.modDB:Flag(nil, "BloodShrineOfRats") then
776+
t_insert(combatList, "Blood Shrine of Rats")
777+
end
778+
if env.modDB:Flag(nil, "BloodShrineOfLocusts") then
779+
t_insert(combatList, "Blood Shrine of Locusts")
780+
end
781+
if env.modDB:Flag(nil, "BloodShrineOfToads") then
782+
t_insert(combatList, "Blood Shrine of Toads")
783+
end
784+
if env.modDB:Flag(nil, "BloodShrineOfCrows") then
785+
t_insert(combatList, "Blood Shrine of Crows")
786+
end
787+
if env.modDB:Flag(nil, "BloodShrineOfBats") then
788+
t_insert(combatList, "Blood Shrine of Bats")
789+
end
775790
for name in pairs(env.buffs) do
776791
t_insert(buffList, name)
777792
end

‎src/Modules/ConfigOptions.lua‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,6 +1760,21 @@ Huge sets the radius to 11.
17601760
{ var = "buffLesserResistanceShrine", type = "check", label = "Have Lesser Resistance Shrine?", ifFlag = "Condition:CanHaveLesserShrines", tooltip = "This will enable the Lesser Resistance Shrine buff.\n\t+25% to all Elemental Resistances\n\t+2% to all maximum Resistances", apply = function(val, modList, enemyModList)
17611761
modList:NewMod("Condition:LesserResistanceShrine", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
17621762
end },
1763+
{ var = "buffBloodShrineOfRats", type = "check", label = "Have Blood Shrine of Rats?", ifFlag = "Condition:CanHaveBloodShrines", tooltip = "This will enable the Blood Shrine of Rats buff.\n\tGain 30% of Elemental Damage as Extra Chaos Damage", apply = function(val, modList, enemyModList)
1764+
modList:NewMod("Condition:BloodShrineOfRats", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
1765+
end },
1766+
{ var = "buffBloodShrineOfLocusts", type = "check", label = "Have Blood Shrine of Locusts?", ifFlag = "Condition:CanHaveBloodShrines", tooltip = "This will enable the Blood Shrine of Locusts buff.\n\t+30% to Damage over Time Multiplier", apply = function(val, modList, enemyModList)
1767+
modList:NewMod("Condition:BloodShrineOfLocusts", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
1768+
end },
1769+
{ var = "buffBloodShrineOfToads", type = "check", label = "Have Blood Shrine of Toads?", ifFlag = "Condition:CanHaveBloodShrines", tooltip = "This will enable the Blood Shrine of Toads buff.\n\tExplosive Toad has an additional 25% chance to Trigger when you kill an Enemy", apply = function(val, modList, enemyModList)
1770+
modList:NewMod("Condition:BloodShrineOfToads", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
1771+
end },
1772+
{ var = "buffBloodShrineOfCrows", type = "check", label = "Have Blood Shrine of Crows?", ifFlag = "Condition:CanHaveBloodShrines", tooltip = "This will enable the Blood Shrine of Crows buff.\n\t+50% to Chaos Resistance\n\t10% of Elemental Damage taken as Chaos Damage\n\t10% of Physical Damage taken as Chaos Damage", apply = function(val, modList, enemyModList)
1773+
modList:NewMod("Condition:BloodShrineOfCrows", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
1774+
end },
1775+
{ var = "buffBloodShrineOfBats", type = "check", label = "Have Blood Shrine of Bats?", ifFlag = "Condition:CanHaveBloodShrines", tooltip = "This will enable the Blood Shrine of Bats buff.\n\tCurse Enemies with Enfeeble on Hit\n\tYou can apply an additional Curse", apply = function(val, modList, enemyModList)
1776+
modList:NewMod("Condition:BloodShrineOfBats", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
1777+
end },
17631778
-- Section: Effective DPS options
17641779
{ section = "For Effective DPS", col = 1 },
17651780
{ var = "skillForkCount", type = "count", label = "# of times Skill has Forked:", ifFlag = "forking", apply = function(val, modList, enemyModList)

‎src/Modules/ModParser.lua‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5658,6 +5658,7 @@ local specialModList = {
56585658
["gain elusive on critical strike"] = { flag("Condition:CanBeElusive") },
56595659
["gain a random shrine buff every (%d+) seconds"] = { flag("Condition:CanHaveRegularShrines") },
56605660
["gain a random shrine buff for (%d+) seconds when you kill a rare or unique enemy"] = { flag("Condition:CanHaveRegularShrines") },
5661+
["gain a random blood shrine buff every (%d+) seconds"] = { flag("Condition:CanHaveBloodShrines") },
56615662
["(%d+)%% chance to gain elusive when you block while dual wielding"] = { flag("Condition:CanBeElusive", { type = "Condition", var = "DualWielding" }) },
56625663
["elusive on you reduces in effect (%d+)%% slower"] = function(num) return { mod("ElusiveEffectLossSlower", "INC", num) } end,
56635664
["elusive's effect on you is increased instead for the first (%d+) seconds"] = function(num) return { mod("ElusiveEffectIncreaseDuration", "BASE", num) } end,

0 commit comments

Comments
 (0)