Skip to content

Commit 32ac91c

Browse files
LocalIdentityLocalIdentity
andauthored
Adds support for many more tree mods (#1359)
* Triggered Skills * Crossbow and Grenade Skills 30% chance to not consume a bolt if you've Reloaded Recently 25% increased Damage with Crossbows for each type of Ammunition fired in the past 10 seconds 30% chance to not consume a bolt if you've Reloaded Recently 30% chance when you Reload a Crossbow to be immediate Gain 4% of Damage as Extra Fire Damage for every different Grenade fired in the past 8 seconds * Skill costs 12% increased Spell Damage with Spells that cost Life 30% increased Mana Cost Efficiency of Attacks during any Mana Flask Effect 50% of Skill Mana costs Converted to Life Costs during any Life Flask Effect 60% increased Mana Cost Efficiency of Marks * Chain 20% chance for Lightning Skills to Chain an additional time 25% chance to Chain an additional time * Minions 40% increased Spell Damage if one of your Minions has died Recently Minions have +3% to Maximum Cold Resistances Minions have +3% to Maximum Fire Resistances Minions have +3% to Maximum Lightning Resistances * Exposure 15% increased Duration of Ailments against Enemies with Exposure 20% increased chance to inflict Ailments against Enemies with Exposure 30% increased Critical Hit Chance against enemies with Exposure Exposure you inflict lowers Resistances by an additional 5% * Presence 15% increased Critical Hit Chance against Enemies that have entered your Presence Recently 50% increased Critical Damage Bonus against Enemies that have exited your Presence Recently Each Totem applies 2% increased Damage taken to Enemies in their Presence * Ground Effect Gain 15% of Damage as Extra Cold Damage while on Chilled Ground Gain 15% of Damage as Extra Fire Damage while on Ignited Ground Gain 15% of Damage as Extra Lightning Damage while on Shocked Ground * Arcane Surge Arcane Surge grants more Life Regeneration Rate instead of Mana Regeneration Rate * Marks 25% increased Critical Hit Chance against Marked Enemies 25% increased Magnitude of Ailments you inflict against Marked Enemies 4% increased Movement Speed if you've used a Mark Recently Mark Skills have 10% increased Use Speed * Misc Mods 30% reduced penalty to Accuracy Rating at range 40% increased Damage if you've Triggered a Skill Recently 35% increased Critical Hit Chance if you've Triggered a Skill Recently 60% increased Effect of Poison you inflict on targets that are not Poisoned Enemies you kill with Empowered Attacks have a 10% chance to Explode, dealing a tenth of their maximum Life as Fire Damage Inherent Life granted by Strength is halved Pinned Enemies cannot deal Critical Hits Warcries Debilitate Enemies Your Hits cannot be Evaded by Heavy Stunned Enemies Your Hits cannot be Evaded by Pinned Enemies * Config clean up Stop always showing some configs Mana burn isn't even needed any more at this point * Typo --------- Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 6a21a24 commit 32ac91c

File tree

8 files changed

+175
-98
lines changed

8 files changed

+175
-98
lines changed

src/Data/ModCache.lua

Lines changed: 51 additions & 65 deletions
Large diffs are not rendered by default.

src/Data/SkillStatMap.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ return {
178178
["base_skill_cost_life_instead_of_mana"] = {
179179
flag("CostLifeInsteadOfMana"),
180180
},
181+
["generic_ongoing_triggerer_is_invocation_skill"] = {
182+
flag("Condition:InvocationSkill"),
183+
},
181184
["base_skill_cost_life_instead_of_mana_%"] = {
182185
mod("HybridManaAndLifeCost_Life", "BASE", nil),
183186
},

src/Modules/CalcDefence.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,11 @@ function calcs.defence(env, actor)
15301530
if modDB.conditions["AffectedByArcaneSurge"] or modDB:Flag(nil, "Condition:ArcaneSurge") then
15311531
modDB.conditions["AffectedByArcaneSurge"] = true
15321532
local effect = 1 + modDB:Sum("INC", nil, "ArcaneSurgeEffect", "BuffEffectOnSelf") / 100
1533-
modDB:NewMod("ManaRegen", "MORE", (modDB:Max(nil, "ArcaneSurgeManaRegen") or 20) * effect, "Arcane Surge")
1533+
if modDB:Flag(nil, "ArcaneSurgeLifeRegen") then
1534+
modDB:NewMod("LifeRegen", "MORE", (modDB:Max(nil, "ArcaneSurgeManaRegen") or 20) * effect, "Arcane Surge")
1535+
else
1536+
modDB:NewMod("ManaRegen", "MORE", (modDB:Max(nil, "ArcaneSurgeManaRegen") or 20) * effect, "Arcane Surge")
1537+
end
15341538
modDB:NewMod("Speed", "INC", (modDB:Max(nil, "ArcaneSurgeCastSpeed") or 15) * effect, "Arcane Surge", ModFlag.Cast)
15351539
local arcaneSurgeDamage = modDB:Max(nil, "ArcaneSurgeDamage") or 0
15361540
if arcaneSurgeDamage ~= 0 then modDB:NewMod("Damage", "MORE", arcaneSurgeDamage * effect, "Arcane Surge", ModFlag.Spell) end

src/Modules/CalcOffence.lua

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ function calcs.offence(env, actor, activeSkill)
11531153
if skillModList:Flag(skillCfg, "CannotChain") or skillModList:Flag(skillCfg, "NoAdditionalChains")then
11541154
output.ChainMaxString = "Cannot chain"
11551155
else
1156-
output.ChainMax = skillModList:Sum("BASE", skillCfg, "ChainCountMax", not skillFlags.projectile and "BeamChainCountMax" or nil) * skillModList:More(skillCfg, "ChainCountMax", not skillFlags.projectile and "BeamChainCountMax" or nil)
1156+
output.ChainMax = (skillModList:Sum("BASE", skillCfg, "ChainCountMax", not skillFlags.projectile and "BeamChainCountMax" or nil) + skillModList:Sum("BASE", skillCfg, "ChainChance") / 100) * skillModList:More(skillCfg, "ChainCountMax", not skillFlags.projectile and "BeamChainCountMax" or nil)
11571157
output.TerrainChain = m_min(skillModList:Sum("BASE", skillCfg, "TerrainChainChance"), 100)
11581158
if skillModList:Flag(skillCfg, "AdditionalProjectilesAddChainsInstead") then
11591159
output.ChainMax = output.ChainMax + m_floor((skillModList:Sum("BASE", skillCfg, "ProjectileCount") - 1) * skillModList:More(skillCfg, "ProjectileCount"))
@@ -2660,6 +2660,7 @@ function calcs.offence(env, actor, activeSkill)
26602660
output.BoltCount = skillData.boltCount
26612661
output.EffectiveBoltCount = output.BoltCount
26622662
output.ChanceToNotConsumeAmmo = activeSkill.skillModList:Sum("BASE", activeSkill.skillCfg, "ChanceToNotConsumeAmmo")
2663+
output.ChanceToReloadInstantly = m_min(activeSkill.skillModList:Sum("BASE", activeSkill.skillCfg, "InstantReloadChance"), 100)
26632664
if output.ChanceToNotConsumeAmmo > 0 then
26642665
if output.ChanceToNotConsumeAmmo < 100 then
26652666
output.EffectiveBoltCount = output.BoltCount / (1 - (output.ChanceToNotConsumeAmmo / 100))
@@ -2670,11 +2671,12 @@ function calcs.offence(env, actor, activeSkill)
26702671
output.TotalFiringTime = 1 / output.FiringRate * ((output.ChanceToNotConsumeAmmo >= 100) and 0 or output.EffectiveBoltCount)
26712672
output.ReloadRate = 1 / skillData.reloadTime
26722673
output.ReloadTime = skillData.reloadTime
2673-
output.Speed = (output.ChanceToNotConsumeAmmo >= 100) and output.FiringRate or (1 / ((output.TotalFiringTime + output.ReloadTime) / (output.EffectiveBoltCount)))
2674+
output.EffectiveReloadTime = output.ReloadTime * (1 - output.ChanceToReloadInstantly / 100)
2675+
output.Speed = (output.ChanceToNotConsumeAmmo >= 100) and output.FiringRate or (1 / ((output.TotalFiringTime + output.EffectiveReloadTime) / (output.EffectiveBoltCount)))
26742676

26752677
-- Average bolts reloaded past six second for purposes of calculating Fresh Clip support damage bonus
2676-
local boltsReloadedPastSixSeconds = skillModList:Override({ source = "Config"}, "Multiplier:BoltsReloadedPastSixSeconds") or (output.ChanceToNotConsumeAmmo > 100) and 0 or (output.BoltCount * 6 / (output.TotalFiringTime + output.ReloadTime)) -- assume 0 bolts reloaded when none are consumed
2677-
local boltsReloadedPastEightSeconds = skillModList:Override({ source = "Config"}, "Multiplier:BoltsReloadedPastEightSeconds") or (output.ChanceToNotConsumeAmmo > 100) and 0 or (output.BoltCount * 8 / (output.TotalFiringTime + output.ReloadTime)) -- assume 0 bolts reloaded when none are consumed
2678+
local boltsReloadedPastSixSeconds = skillModList:Override({ source = "Config"}, "Multiplier:BoltsReloadedPastSixSeconds") or (output.ChanceToNotConsumeAmmo > 100) and 0 or (output.BoltCount * 6 / (output.TotalFiringTime + output.EffectiveReloadTime)) -- assume 0 bolts reloaded when none are consumed
2679+
local boltsReloadedPastEightSeconds = skillModList:Override({ source = "Config"}, "Multiplier:BoltsReloadedPastEightSeconds") or (output.ChanceToNotConsumeAmmo > 100) and 0 or (output.BoltCount * 8 / (output.TotalFiringTime + output.EffectiveReloadTime)) -- assume 0 bolts reloaded when none are consumed
26782680
if boltsReloadedPastSixSeconds > 0 then
26792681
skillModList:ReplaceMod("Multiplier:BoltsReloadedPastSixSeconds", "BASE", boltsReloadedPastSixSeconds, activeSkill.activeEffect.grantedEffect.name)
26802682
end
@@ -2734,10 +2736,10 @@ function calcs.offence(env, actor, activeSkill)
27342736

27352737
breakdown.Speed = { }
27362738
t_insert(breakdown.Speed, s_format(" %.2fs ^8(total firing time)", output.TotalFiringTime))
2737-
t_insert(breakdown.Speed, s_format("+ %.2fs ^8(reload time)", output.ReloadTime))
2738-
t_insert(breakdown.Speed, s_format("= %.2fs ^8(total attack time)", output.TotalFiringTime + output.ReloadTime))
2739+
t_insert(breakdown.Speed, s_format("+ %.2fs ^8(eff. reload time)", output.EffectiveReloadTime))
2740+
t_insert(breakdown.Speed, s_format("= %.2fs ^8(total attack time)", output.TotalFiringTime + output.EffectiveReloadTime))
27392741
t_insert(breakdown.Speed, s_format("\n"))
2740-
t_insert(breakdown.Speed, s_format(" %.2fs ^8(total attack time)", output.TotalFiringTime + output.ReloadTime))
2742+
t_insert(breakdown.Speed, s_format(" %.2fs ^8(total attack time)", output.TotalFiringTime + output.EffectiveReloadTime))
27412743
t_insert(breakdown.Speed, s_format("/ %.2f ^8(eff. bolt count)", output.EffectiveBoltCount))
27422744
t_insert(breakdown.Speed, s_format("= %.2fs ^8(eff. attack time)", 1 / output.Speed))
27432745
t_insert(breakdown.Speed, s_format("\n"))
@@ -4138,11 +4140,13 @@ function calcs.offence(env, actor, activeSkill)
41384140
-- Combine stats related to reload and bolt functionality
41394141
combineStat("FiringRate", "AVERAGE")
41404142
combineStat("ReloadTime", "AVERAGE")
4143+
combineStat("EffectiveReloadTime", "AVERAGE")
41414144
combineStat("ReloadRate", "AVERAGE")
41424145
combineStat("BoltCount", "AVERAGE")
41434146
combineStat("EffectiveBoltCount", "AVERAGE")
41444147
combineStat("TotalFiringTime", "AVERAGE")
41454148
combineStat("ChanceToNotConsumeAmmo", "AVERAGE")
4149+
combineStat("ChanceToReloadInstantly", "AVERAGE")
41464150

41474151
-- Add stats related to "Chance to not consume a bolt" to breakdown
41484152
if breakdown then
@@ -4153,6 +4157,13 @@ function calcs.offence(env, actor, activeSkill)
41534157
t_insert(breakdown.EffectiveBoltCount, s_format("\n"))
41544158
t_insert(breakdown.EffectiveBoltCount, s_format("= %.2f ^8(effective bolt count)", output.EffectiveBoltCount or (1/0))) -- 1/0 is used as a stand-in for "infinite"
41554159
end
4160+
if output.ChanceToReloadInstantly then
4161+
breakdown.EffectiveReloadTime = { }
4162+
t_insert(breakdown.EffectiveReloadTime, s_format("%.2f ^8(reload time)", output.ReloadTime))
4163+
t_insert(breakdown.EffectiveReloadTime, s_format("* (1 - %.2f) ^8(chance to reload instantly)", m_min(output.ChanceToReloadInstantly / 100, 1)))
4164+
t_insert(breakdown.EffectiveReloadTime, s_format("\n"))
4165+
t_insert(breakdown.EffectiveReloadTime, s_format("= %.2f ^8(effective reload time)", output.EffectiveReloadTime))
4166+
end
41564167

41574168
end
41584169
-- Game data specifies "base skill show average damage instead of dps" for many crossbow skills, where that doesn't make sense for PoB (e.g. Explosive Shot)
@@ -5425,8 +5436,8 @@ function calcs.offence(env, actor, activeSkill)
54255436
elseif skillModList:Flag(nil, "HasSeals") and skillModList:Flag(nil, "UseMaxUnleash") then
54265437
useSpeed = env.player.mainSkill.skillData.hitTimeOverride / repeats
54275438
timeType = "full unleash"
5428-
elseif output.ReloadTime then -- Crossbows: Account for mana cost only happening on reload (once all bolts are fired)
5429-
useSpeed = (not output.EffectiveBoltCount) and 0 or (1 / (output.TotalFiringTime + output.ReloadTime))
5439+
elseif output.EffectiveReloadTime then -- Crossbows: Account for mana cost only happening on reload (once all bolts are fired)
5440+
useSpeed = (not output.EffectiveBoltCount) and 0 or (1 / (output.TotalFiringTime + output.EffectiveReloadTime))
54305441
timeType = "effective reload"
54315442
else
54325443
useSpeed = (output.Cooldown and output.Cooldown > 0 and (output.Speed > 0 and output.Speed or 1 / output.Cooldown) or output.Speed) / repeats

src/Modules/CalcPerform.lua

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,8 +1011,8 @@ function calcs.perform(env, skipEHP)
10111011
output.WarcryPower = modDB:Override(nil, "WarcryPower") or modDB:Sum("BASE", nil, "WarcryPower") or 0
10121012
modDB.multipliers["WarcryPower"] = output.WarcryPower
10131013

1014-
local minionTypeCount = 0
1015-
local minionType = { }
1014+
local minionTypeCount, ammoTypeCount, grenadeTypeCount = 0, 0, 0
1015+
local minionType, ammoType, grenadeType = { }, { }, { }
10161016
for _, activeSkill in ipairs(env.player.activeSkillList) do
10171017
local skillFlags
10181018
if env.mode == "CALCS" then
@@ -1087,6 +1087,16 @@ function calcs.perform(env, skipEHP)
10871087
minionType[activeSkill.activeEffect.grantedEffect.id] = true
10881088
end
10891089
env.modDB.multipliers["PersistentMinionTypes"] = minionTypeCount
1090+
if activeSkill.skillTypes[SkillType.CrossbowAmmoSkill] and not ammoType[activeSkill.activeEffect.grantedEffect.id] then
1091+
ammoTypeCount = ammoTypeCount + 1
1092+
ammoType[activeSkill.activeEffect.grantedEffect.id] = true
1093+
end
1094+
env.modDB.multipliers["AmmoTypes"] = ammoTypeCount
1095+
if activeSkill.skillTypes[SkillType.Grenade] and not grenadeType[activeSkill.activeEffect.grantedEffect.id] then
1096+
grenadeTypeCount = grenadeTypeCount + 1
1097+
grenadeType[activeSkill.activeEffect.grantedEffect.id] = true
1098+
end
1099+
env.modDB.multipliers["GrenadeTypes"] = grenadeTypeCount
10901100
if activeSkill.activeEffect.grantedEffect and activeSkill.skillTypes[SkillType.CreatesCompanion] then
10911101
modDB:NewMod("Condition:HaveCompanion", "FLAG", true, activeSkill.activeEffect.grantedEffect.name)
10921102
end
@@ -2937,6 +2947,7 @@ function calcs.perform(env, skipEHP)
29372947
end
29382948
min = min * (modDB:Sum("INC", nil, element.."ExposureEffect") / 100 + 1)
29392949
enemyDB:NewMod("Condition:Has"..element.."Exposure", "FLAG", true, "")
2950+
enemyDB:NewMod("Condition:HasExposure", "FLAG", true, "")
29402951
enemyDB:NewMod(element.."Resist", "BASE", m_min(min, modDB:Override(nil, "ExposureMin")), source)
29412952
modDB:NewMod("Condition:AppliedExposureRecently", "FLAG", true, "")
29422953
end

src/Modules/CalcSections.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ return {
499499
{ label = "Inc. Reload Speed", haveOutput = "ReloadTime", notFlag = "triggered", { format = "{0:mod:1}%", { modName = "ReloadSpeed", modType = "INC", cfg = "skill"}, }, },
500500
{ label = "More Reload Speed", haveOutput = "ReloadTime", notFlag = "triggered", { format = "{0:mod:1}%", { modName = "ReloadSpeed", modType = "MORE", cfg = "skill"}, }, },
501501
{ label = "Reload Time", haveOutput = "ReloadTime", notFlag = "triggered", { format = "{2:output:ReloadTime}s", { breakdown = "ReloadTime" }, }, },
502+
{ label = "Eff. Reload Time", haveOutput = "ChanceToReloadInstantly", { format = "{2:output:EffectiveReloadTime}", { breakdown = "EffectiveReloadTime" }, }, },
502503
{ label = "Attacks per second", flag = "bothWeaponAttack", notFlag = "triggered", { format = "{2:output:Speed}", { breakdown = "Speed" }, }, },
503504
{ label = "Attack time", flag = "attack", notFlag = "triggered", { format = "{2:output:Time}s", { breakdown = "MainHand.Time" }, }, },
504505
{ label = "Inc. Cast Speed", flag = "spell", notFlag = "triggered", { format = "{0:mod:1}%", { modName = "Speed", modType = "INC", cfg = "skill", }, }, },
@@ -679,7 +680,7 @@ return {
679680
{ label = "2 Add. Proj. Chance", haveOutput = "TwoAdditionalProjectiles", { format = "{output:TwoAdditionalProjectiles}%", { modName = { "TwoAdditionalProjectilesChance", "NoAdditionalProjectiles" }, cfg = "skill" }, }, },
680681
{ label = "Pierce Count", haveOutput = "PierceCount", { format = "{output:PierceCountString}", { modName = { "CannotPierce", "PierceCount", "PierceChance", "PierceAllTargets" }, cfg = "skill" }, }, },
681682
{ label = "Fork Count", haveOutput = "ForkCountMax", { format = "{output:ForkCountString}", { modName = { "CannotFork", "ForkCountMax" }, cfg = "skill" }, }, },
682-
{ label = "Max Chain Count", haveOutput = "ChainMax", { format = "{output:ChainMaxString}", { modName = { "CannotChain", "ChainCountMax", "NoAdditionalChains" }, cfg = "skill" }, }, },
683+
{ label = "Max Chain Count", haveOutput = "ChainMax", { format = "{output:ChainMaxString}", { modName = { "CannotChain", "ChainCountMax", "ChainChance", "NoAdditionalChains" }, cfg = "skill" }, }, },
683684
{ label = "Terrain Chain", haveOutput = "TerrainChain", { format = "{output:TerrainChain}%", { modName = { "TerrainChainChance", "NoAdditionalChains" }, cfg = "skill" }, }, },
684685
{ label = "Split Count", haveOutput = "SplitCountString", { format = "{output:SplitCountString}",
685686
{ label = "Player modifiers", modName = { "CannotSplit", "SplitCount", "AdditionalProjectilesAddSplitsInstead", "AdditionalChainsAddSplitsInstead" }, cfg = "skill" },

0 commit comments

Comments
 (0)