Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
LocalIdentity committed Aug 25, 2023
2 parents cda2e32 + 7bd61c9 commit 8ff3cf4
Show file tree
Hide file tree
Showing 11 changed files with 121 additions and 53 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## [v2.33.1](https://github.com/PathOfBuildingCommunity/PathOfBuilding/tree/v2.33.1) (2023/08/25)

[Full Changelog](https://github.com/PathOfBuildingCommunity/PathOfBuilding/compare/v2.33.0...v2.33.1)

<!-- Release notes generated using configuration in .github/release.yml at dev -->

## What's Changed
### Fixed Crashes
- Fix crash when using a trigger Wand mod [\#6486](https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/6486) ([Paliak](https://github.com/Paliak))
- Fix crash when using a trigger Helmet Focus mod [\#6486](https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/6486) ([Paliak](https://github.com/Paliak))
- Fix crash when using Flamewood Support [\#6486](https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/6486) ([Paliak](https://github.com/Paliak))
### User Interface
- Display Channel time in the sidebar for Skills triggered by Snipe [\#6486](https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/6486) ([Paliak](https://github.com/Paliak))
### Fixed Bugs
- Fix Hungry Loop not recognising Elemental Army [\#6489](https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/6489) ([Paliak](https://github.com/Paliak))
- Fix separate Totem Duration affecting Skill Duration [\#6488](https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/6488) ([Paliak](https://github.com/Paliak))
- Fix Melding of the Flesh not working correctly with Chieftain Valako ascendancy [\#6490](https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/6490) ([Paliak](https://github.com/Paliak))
- Fix Flamewood Support not being affected by Totem mods [\#6487](https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/6487) ([Paliak](https://github.com/Paliak))



## [v2.33.0](https://github.com/PathOfBuildingCommunity/PathOfBuilding/tree/v2.33.0) (2023/08/25)

[Full Changelog](https://github.com/PathOfBuildingCommunity/PathOfBuilding/compare/v2.32.2...v2.33.0)
Expand Down
17 changes: 17 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
VERSION[2.33.1][2023/08/25]

--- Fixed Crashes ---
* Fix crash when using a trigger Wand mod (Paliak)
* Fix crash when using a trigger Helmet Focus mod (Paliak)
* Fix crash when using Flamewood Support (Paliak)

--- User Interface ---
* Display Channel time in the sidebar for Skills triggered by Snipe (Paliak)

--- Fixed Bugs ---
* Fix Hungry Loop not recognising Elemental Army (Paliak)
* Fix separate Totem Duration affecting Skill Duration (Paliak)
* Fix Melding of the Flesh not working correctly with Chieftain Valako ascendancy (Paliak)
* Fix Flamewood Support not being affected by Totem mods (Paliak)


VERSION[2.33.0][2023/08/25]

--- New to Path of Building ---
Expand Down
6 changes: 5 additions & 1 deletion src/Data/SkillStatMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,11 @@ return {
div = 60,
},
["totem_duration_+%"] = {
mod("Duration", "INC", nil, 0, KeywordFlag.Totem),
mod("TotemDuration", "INC", nil),
},
["base_totem_duration"] = {
mod("TotemDuration", "BASE", nil),
div = 1000
},
-- Minion
["minion_damage_+%"] = {
Expand Down
1 change: 1 addition & 0 deletions src/Data/Skills/sup_str.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2326,6 +2326,7 @@ skills["AvengingFlame"] = {
},
baseFlags = {
area = true,
totem = true,
},
qualityStats = {
Default = {
Expand Down
2 changes: 1 addition & 1 deletion src/Export/Skills/sup_str.txt
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ local skills, mod, flag, skill = ...
-- Display only
}
},
#flags area
#flags area totem
#mods

#skill SupportFortify
Expand Down
3 changes: 2 additions & 1 deletion src/Modules/Build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,11 @@ function buildMode:Init(dbFileName, buildName, buildXML, convertBuild)
{ stat = "WarcryCastTime", label = "Cast Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, flag = "warcry" },
{ stat = "HitSpeed", label = "Hit Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return not o.TriggerTime end },
{ stat = "HitTime", label = "Channel Time", fmt = ".2fs", compPercent = true, flag = "channelRelease", lowerIsBetter = true, condFunc = function(v,o) return not o.TriggerTime end },
{ stat = "ChannelTimeToTrigger", label = "Channel Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, },
{ stat = "TrapThrowingTime", label = "Trap Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, },
{ stat = "TrapCooldown", label = "Trap Cooldown", fmt = ".3fs", lowerIsBetter = true },
{ stat = "MineLayingTime", label = "Mine Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, },
{ stat = "TotemPlacementTime", label = "Totem Placement Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, },
{ stat = "TotemPlacementTime", label = "Totem Placement Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return not o.TriggerTime end },
{ stat = "PreEffectiveCritChance", label = "Crit Chance", fmt = ".2f%%" },
{ stat = "CritChance", label = "Effective Crit Chance", fmt = ".2f%%", condFunc = function(v,o) return v ~= o.PreEffectiveCritChance end },
{ stat = "CritMultiplier", label = "Crit Multiplier", fmt = "d%%", pc = true, condFunc = function(v,o) return (o.CritChance or 0) > 0 end },
Expand Down
35 changes: 17 additions & 18 deletions src/Modules/CalcDefence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -295,24 +295,6 @@ function calcs.defence(env, actor)

-- Resistances
output["PhysicalResist"] = 0

-- Highest Maximum Elemental Resistance for Melding of the Flesh
if modDB:Flag(nil, "ElementalResistMaxIsHighestResistMax") then
local highestResistMax = 0;
local highestResistMaxType = "";
for _, elem in ipairs(resistTypeList) do
local resistMax = modDB:Override(nil, elem.."ResistMax") or m_min(data.misc.MaxResistCap, modDB:Sum("BASE", nil, elem.."ResistMax", isElemental[elem] and "ElementalResistMax"))
if resistMax > highestResistMax and isElemental[elem] then
highestResistMax = resistMax;
highestResistMaxType = elem;
end
end
for _, elem in ipairs(resistTypeList) do
if isElemental[elem] then
modDB:NewMod(elem.."ResistMax", "OVERRIDE", highestResistMax, highestResistMaxType.." Melding of the Flesh");
end
end
end

-- Process Resistance conversion mods
for _, resFrom in ipairs(resistTypeList) do
Expand Down Expand Up @@ -355,6 +337,23 @@ function calcs.defence(env, actor)
end
end

-- Highest Maximum Elemental Resistance for Melding of the Flesh
if modDB:Flag(nil, "ElementalResistMaxIsHighestResistMax") then
local highestResistMax = 0;
local highestResistMaxType = "";
for _, elem in ipairs(resistTypeList) do
local resistMax = modDB:Override(nil, elem.."ResistMax") or m_min(data.misc.MaxResistCap, modDB:Sum("BASE", nil, elem.."ResistMax", isElemental[elem] and "ElementalResistMax"))
if resistMax > highestResistMax and isElemental[elem] then
highestResistMax = resistMax;
highestResistMaxType = elem;
end
end
for _, elem in ipairs(resistTypeList) do
if isElemental[elem] then
modDB:NewMod(elem.."ResistMax", "OVERRIDE", highestResistMax, highestResistMaxType.." Melding of the Flesh");
end
end
end

for _, elem in ipairs(resistTypeList) do
local min, max, total, totemTotal, totemMax
Expand Down
15 changes: 14 additions & 1 deletion src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,20 @@ function calcs.offence(env, actor, activeSkill)
}
end
end

output.TotemDurationMod = calcLib.mod(skillModList, skillCfg, "Duration", "PrimaryDuration", "TotemDuration")
local TotemDurationBase = skillModList:Sum("BASE", skillCfg, "TotemDuration")
output.TotemDuration = m_ceil(TotemDurationBase * output.TotemDurationMod * data.misc.ServerTickRate) / data.misc.ServerTickRate
if breakdown then
breakdown.TotemDurationMod = breakdown.mod(skillModList, skillCfg, "Duration", "PrimaryDuration", "TotemDuration")
breakdown.TotemDuration = {
s_format("%.2fs ^8(base)", TotemDurationBase),
}
if output.TotemDurationMod ~= 1 then
t_insert(breakdown.TotemDuration, s_format("x %.4f ^8(duration modifier)", output.TotemDurationMod))
end
t_insert(breakdown.TotemDuration, s_format("rounded up to nearest server tick"))
t_insert(breakdown.TotemDuration, s_format("= %.3fs", output.TotemDuration))
end
end

-- Skill uptime
Expand Down
25 changes: 16 additions & 9 deletions src/Modules/CalcSections.lua
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ return {
{ modName = "CooldownRecovery", cfg = "skill" },
}, },
{ label = "Stored Uses", haveOutput = "StoredUses", { format = "{output:StoredUses}",
{ breakdown = "StoredUses" },
{ breakdown = "StoredUses" },
{ modName = "AdditionalCooldownUses", cfg = "skill" },
}, },
{ label = "Duration Mod", flag = "duration", { format = "x {4:output:DurationMod}",
Expand Down Expand Up @@ -730,19 +730,26 @@ return {
{ label = "Area of Effect modifiers", modName = "MineDetonationAreaOfEffect", cfg = "skill" },
}, },
{ label = "Mine Aura Radius", haveOutput = "MineAuraRadius", { format = "{0:output:MineAuraRadius}", { breakdown = "MineAuraRadius" }, }, },
{ label = "Totem Place Time", flag = "totem", { format = "{2:output:TotemPlacementTime}s",
{ label = "Totem Place Time", flag = "totem", notFlag = "triggered", { format = "{2:output:TotemPlacementTime}s",
{ breakdown = "TotemPlacementTime" },
{ modName = "TotemPlacementSpeed", cfg = "skill" },
}, },
{ label = "Active Totem Limit", flag = "totem", { format = "{0:output:ActiveTotemLimit}",
{ label = "Active Totem Limit", flag = "totem", notFlag = "triggered", { format = "{0:output:ActiveTotemLimit}",
{ breakdown = "ActiveTotemLimit" },
{ modName = { "ActiveTotemLimit", "ActiveBallistaLimit" }, cfg = "skill" },
}, },
{ label = "Totem Life Mod", flag = "totem", { format = "x {2:output:TotemLifeMod}",
{ label = "Totem Duration Mod", flagList = {"duration", "totem"}, { format = "x {4:output:TotemDurationMod}",
{ breakdown = "TotemDurationMod" },
{ modName = { "Duration", "PrimaryDuration", "TotemDuration" }, cfg = "skill" },
}, },
{ label = "Totem Duration", flagList = {"duration", "totem"}, { format = "x {4:output:TotemDuration}",
{ breakdown = "TotemDuration" },
}, },
{ label = "Totem Life Mod", flag = "totem", notFlag = "triggered", { format = "x {2:output:TotemLifeMod}",
{ breakdown = "TotemLifeMod" },
{ modName = "TotemLife", cfg = "skill" },
}, },
{ label = "Totem Life", flag = "totem", { format = "{0:output:TotemLife}", { breakdown = "TotemLife" }, }, },
{ label = "Totem Life", flag = "totem", notFlag = "triggered", { format = "{0:output:TotemLife}", { breakdown = "TotemLife" }, }, },
{ label = "Totem ES", haveOutput = "TotemEnergyShield", { format = "{0:output:TotemEnergyShield}",
{ breakdown = "TotemEnergyShield" },
{ modName = "TotemEnergyShield", cfg = "skill" },
Expand All @@ -756,19 +763,19 @@ return {
{ modName = "TotemArmour", cfg = "skill" },
}, },
{ label = "Active Brand Limit", flag = "brand", { format = "{0:output:ActiveBrandLimit}", { modName = "ActiveBrandLimit", cfg = "skill" }, }, },
{ label = "Totem Fire Res", flag = "totem", { format = "{0:output:TotemFireResist}% (+{0:output:TotemFireResistOverCap}%)",
{ label = "Totem Fire Res", flag = "totem", notFlag = "triggered",{ format = "{0:output:TotemFireResist}% (+{0:output:TotemFireResistOverCap}%)",
{ breakdown = "TotemFireResist" },
{ modName = { "TotemFireResistMax", "TotemElementalResistMax", "TotemFireResist", "TotemElementalResist" }, },
}, },
{ label = "Totem Cold Res", flag="totem", { format = "{0:output:TotemColdResist}% (+{0:output:TotemColdResistOverCap}%)",
{ label = "Totem Cold Res", flag = "totem", notFlag = "triggered", { format = "{0:output:TotemColdResist}% (+{0:output:TotemColdResistOverCap}%)",
{ breakdown = "TotemColdResist" },
{ modName = { "TotemColdResistMax", "TotemElementalResistMax", "TotemColdResist", "TotemElementalResist" }, },
}, },
{ label = "Totem Lightning Res", flag="totem", { format = "{0:output:TotemLightningResist}% (+{0:output:TotemLightningResistOverCap}%)",
{ label = "Totem Lightning Res", flag = "totem", notFlag = "triggered", { format = "{0:output:TotemLightningResist}% (+{0:output:TotemLightningResistOverCap}%)",
{ breakdown = "TotemLightningResist" },
{ modName = { "TotemLightningResistMax", "TotemElementalResistMax", "TotemLightningResist", "TotemElementalResist" }, },
}, },
{ label = "Totem Chaos Res", flag="totem", { format = "{0:output:TotemChaosResist}% (+{0:output:TotemChaosResistOverCap}%)",
{ label = "Totem Chaos Res", flag = "totem", notFlag = "triggered", { format = "{0:output:TotemChaosResist}% (+{0:output:TotemChaosResistOverCap}%)",
{ breakdown = "TotemChaosResist" },
{ modName = { "TotemChaosResistMax", "TotemChaosResist" }, },
}, },
Expand Down
45 changes: 25 additions & 20 deletions src/Modules/CalcTriggers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ local function mirageArcherHandler(env)
end

local function helmetFocusHandler(env)
if not env.player.mainSkill.skillFlags.minion and not env.player.mainSkill.skillFlags.disable then
if not env.player.mainSkill.skillFlags.minion and not env.player.mainSkill.skillFlags.disable and env.player.mainSkill.triggeredBy then
local triggerName = "Focus"
env.player.mainSkill.skillData.triggered = true
local output = env.player.output
Expand Down Expand Up @@ -564,6 +564,7 @@ local function CWCHandler(env)

-- Account for Trigger-related INC/MORE modifiers
addTriggerIncMoreMods(env.player.mainSkill, env.player.mainSkill)
env.player.output.ChannelTimeToTrigger = source.skillData.triggerTime
env.player.mainSkill.skillData.triggered = true
env.player.mainSkill.skillFlags.globalTrigger = true
env.player.mainSkill.skillData.triggerSource = source
Expand Down Expand Up @@ -847,7 +848,7 @@ local function defaultTriggerHandler(env, config)
end
end
if #triggeredSkills > 0 or not config.triggeredSkillCond then
if not source and not actor.mainSkill.skillFlags.globalTrigger then
if not source and not (actor.mainSkill.skillFlags.globalTrigger and config.triggeredSkillCond) then
actor.mainSkill.skillData.triggered = nil
actor.mainSkill.infoMessage2 = "DPS reported assuming Self-Cast"
actor.mainSkill.infoMessage = s_format("No %s Triggering Skill Found", config.triggerName)
Expand Down Expand Up @@ -1446,26 +1447,28 @@ local configTable = {
triggeredSkillCond = function(env, skill) return skill.skillData.triggeredByUnique and env.player.mainSkill.socketGroup.slot == skill.socketGroup.slot end}
end,
["Trigger Craft"] = function(env)
local trigRate, source, uuid, useCastRate, triggeredSkills
triggeredSkills = {}
for _, skill in ipairs(env.player.activeSkillList) do
local triggered = skill.skillData.triggeredByUnique or skill.skillData.triggered or skill.skillTypes[SkillType.InbuiltTrigger] or skill.skillTypes[SkillType.Triggered]
if (skill.skillTypes[SkillType.Damage] or skill.skillTypes[SkillType.Attack] or skill.skillTypes[SkillType.Spell]) and skill ~= env.player.mainSkill and not skill.skillData.triggeredByCraft and not skill.activeEffect.grantedEffect.fromItem and not triggered then
source, trigRate, uuid = findTriggerSkill(env, skill, source, trigRate)
if skill.skillFlags and (skill.skillFlags.totem or skill.skillFlags.golem or skill.skillFlags.banner or skill.skillFlags.ballista) and skill.activeEffect.grantedEffect.castTime then
if skill.activeEffect.grantedEffect.levels ~= nil then
trigRate = 1 / (skill.activeEffect.grantedEffect.castTime + (skill.activeEffect.grantedEffect.levels[skill.activeEffect.level].cooldown or 0))
else
trigRate = 1 / skill.activeEffect.grantedEffect.castTime
if env.player.mainSkill.skillData.triggeredByCraft then
local trigRate, source, uuid, useCastRate, triggeredSkills
triggeredSkills = {}
for _, skill in ipairs(env.player.activeSkillList) do
local triggered = skill.skillData.triggeredByUnique or skill.skillData.triggered or skill.skillTypes[SkillType.InbuiltTrigger] or skill.skillTypes[SkillType.Triggered]
if (skill.skillTypes[SkillType.Damage] or skill.skillTypes[SkillType.Attack] or skill.skillTypes[SkillType.Spell]) and not skill.skillFlags.aura and skill ~= env.player.mainSkill and not skill.skillData.triggeredByCraft and not skill.activeEffect.grantedEffect.fromItem and not triggered then
source, trigRate, uuid = findTriggerSkill(env, skill, source, trigRate)
if skill.skillFlags and (skill.skillFlags.totem or skill.skillFlags.golem or skill.skillFlags.banner or skill.skillFlags.ballista) and skill.activeEffect.grantedEffect.castTime then
if skill.activeEffect.grantedEffect.levels ~= nil then
trigRate = 1 / (skill.activeEffect.grantedEffect.castTime + (skill.activeEffect.grantedEffect.levels[skill.activeEffect.level].cooldown or 0))
else
trigRate = 1 / skill.activeEffect.grantedEffect.castTime
end
useCastRate = true
end
useCastRate = true
end
if skill.skillData.triggeredByCraft and env.player.mainSkill.socketGroup.slot == skill.socketGroup.slot then
t_insert(triggeredSkills, packageSkillDataForSimulation(skill))
end
end
if skill.skillData.triggeredByCraft and env.player.mainSkill.socketGroup.slot == skill.socketGroup.slot then
t_insert(triggeredSkills, packageSkillDataForSimulation(skill))
end
return {trigRate = trigRate, source = source, uuid = uuid, useCastRate = useCastRate, triggeredSkills = triggeredSkills}
end
return {trigRate = trigRate, source = source, uuid = uuid, useCastRate = useCastRate, triggeredSkills = triggeredSkills}
end,
["Kitava's Thirst"] = function(env)
local requiredManaCost = env.player.modDB:Sum("BASE", nil, "KitavaRequiredManaCost")
Expand All @@ -1483,10 +1486,10 @@ local configTable = {
end,
["Mjolner"] = function()
return {triggerSkillCond = function(env, skill)
return (skill.skillTypes[SkillType.Damage] or skill.skillTypes[SkillType.Attack]) and band(skill.skillCfg.flags, bor(ModFlag.Mace, ModFlag.Weapon1H)) > 0
return (skill.skillTypes[SkillType.Damage] or skill.skillTypes[SkillType.Attack]) and band(skill.skillCfg.flags, bor(ModFlag.Mace, ModFlag.Weapon1H)) > 0 and not slotMatch(env, skill)
end,
triggeredSkillCond = function(env, skill)
return skill.skillData.triggeredByMjolner and env.player.mainSkill.socketGroup.slot == skill.socketGroup.slot
return skill.skillData.triggeredByMjolner and slotMatch(env, skill)
end}
end,
["Cospri's Malice"] = function()
Expand Down Expand Up @@ -1703,8 +1706,10 @@ local configTable = {
skill.skillData.hitTimeMultiplier = snipeStages - 0.5
source, _, uuid = findTriggerSkill(env, skill, source)
trigRate = GlobalCache.cachedData["CACHE"][uuid].Env.player.output.HitSpeed
env.player.output.ChannelTimeToTrigger = GlobalCache.cachedData["CACHE"][uuid].Env.player.output.HitTime
end
end

return {trigRate = trigRate, source = source}
else
env.player.mainSkill.skillData.triggered = nil
Expand Down
4 changes: 2 additions & 2 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ local modNameList = {
-- Totem/trap/mine/brand modifiers
["totem placement speed"] = "TotemPlacementSpeed",
["totem life"] = "TotemLife",
["totem duration"] = { "Duration", keywordFlags = KeywordFlag.Totem },
["totem duration"] = "TotemDuration",
["maximum number of summoned totems"] = "ActiveTotemLimit",
["maximum number of summoned totems."] = "ActiveTotemLimit", -- Mark plz
["maximum number of summoned ballista totems"] = { "ActiveBallistaLimit", tag = { type = "SkillType", skillType = SkillType.TotemsAreBallistae } },
Expand Down Expand Up @@ -1780,7 +1780,7 @@ local function triggerExtraSkill(name, level, noSupports, sourceSkill, triggerCh
end
end
local function extraSupport(name, level, slot)
local skillId = gemIdLookup[name] or gemIdLookup[name:gsub("^increased ","")]
local skillId = gemIdLookup[name] or gemIdLookup[name:gsub("^increased ","")] or gemIdLookup[name:gsub(" support$","")]

if itemSlotName == "main hand" then
slot = "Weapon 1"
Expand Down

0 comments on commit 8ff3cf4

Please sign in to comment.