diff --git a/Classes/ImportTab.lua b/Classes/ImportTab.lua index a1d195d6..c34a7ea9 100644 --- a/Classes/ImportTab.lua +++ b/Classes/ImportTab.lua @@ -426,6 +426,7 @@ function ImportTabClass:ImportItem(itemData, sockets) -- Item already exists in the build, overwrite it newItem.id = repItem.id self.build.itemsTab.list[newItem.id] = newItem + itemLib.buildItemModList(newItem) else self.build.itemsTab:AddItem(newItem, true) end diff --git a/Modules/Calcs.lua b/Modules/Calcs.lua index 40a303f8..031cf838 100644 --- a/Modules/Calcs.lua +++ b/Modules/Calcs.lua @@ -1050,6 +1050,15 @@ local function performCalcs(env) if env.mode_effective then condList["Effective"] = true end + + -- Check for extra modifiers to apply to aura skills + local extraAuraModList = { } + if modDB.mods.ExtraAuraEffect then + for _, mod in ipairs(modDB.mods.ExtraAuraEffect) do + mod.value.source = mod.source + t_insert(extraAuraModList, mod.value) + end + end -- Merge auxillary skill modifiers and calculate skill life and mana reservations env.reserved_LifeBase = 0 @@ -1077,8 +1086,8 @@ local function performCalcs(env) local inc = modDB:Sum("INC", skillCfg, "AuraEffect") + skillModList:Sum("INC", skillCfg, "AuraEffect") local more = modDB:Sum("MORE", skillCfg, "AuraEffect") * skillModList:Sum("MORE", skillCfg, "AuraEffect") modDB:ScaleAddList(activeSkill.auraModList, (1 + inc / 100) * more) + modDB:ScaleAddList(extraAuraModList, (1 + inc / 100) * more) condList["HaveAuraActive"] = true - modDB.multipliers["ActiveAura"] = (modDB.multipliers["ActiveAura"] or 0) + 1 end end if env.mode_effective then @@ -1100,7 +1109,6 @@ local function performCalcs(env) local mult = skillModList:Sum("MORE", skillCfg, "ManaCost") local more = modDB:Sum("MORE", skillCfg, "ManaReserved") * skillModList:Sum("MORE", skillCfg, "ManaReserved") local inc = modDB:Sum("INC", skillCfg, "ManaReserved") + skillModList:Sum("INC", skillCfg, "ManaReserved") - --local cost = m_ceil(m_ceil(m_floor(baseVal * mult) * more) * (1 + inc / 100)) local base = m_floor(baseVal * mult) local cost = base - m_floor(base * -m_floor((100 + inc) * more - 100) / 100) local pool @@ -1875,10 +1883,14 @@ local function performCalcs(env) if (baseCrit + base) > 0 then output.CritChance = m_max(output.CritChance, 5) end - local actualCritChance = output.CritChance + local preLuckyCritChance = output.CritChance if env.mode_effective and modDB:Sum("FLAG", skillCfg, "CritChanceLucky") then output.CritChance = (1 - (1 - output.CritChance / 100) ^ 2) * 100 end + local preHitCheckCritChance = output.CritChance + if env.mode_effective then + output.CritChance = output.CritChance * output.HitChance / 100 + end if breakdown and output.CritChance ~= baseCrit then local inc = modDB:Sum("INC", skillCfg, "CritChance") local more = modDB:Sum("MORE", skillCfg, "CritChance") @@ -1898,10 +1910,16 @@ local function performCalcs(env) if env.mode_effective and enemyExtra ~= 0 then t_insert(breakdown.CritChance, s_format("+ %g ^8(extra chance for enemy to be crit)", enemyExtra)) end - t_insert(breakdown.CritChance, s_format("= %g", actualCritChance)) + t_insert(breakdown.CritChance, s_format("= %g", preLuckyCritChance)) if env.mode_effective and modDB:Sum("FLAG", skillCfg, "CritChanceLucky") then t_insert(breakdown.CritChance, "Crit Chance is Lucky:") - t_insert(breakdown.CritChance, s_format("1 - (1 - %.4f) x (1 - %.4f)", actualCritChance / 100, actualCritChance / 100)) + t_insert(breakdown.CritChance, s_format("1 - (1 - %.4f) x (1 - %.4f)", preLuckyCritChance / 100, preLuckyCritChance / 100)) + t_insert(breakdown.CritChance, s_format("= %.2f", preHitCheckCritChance)) + end + if env.mode_effective and output.HitChance < 100 then + t_insert(breakdown.CritChance, "Crit confirmation roll:") + t_insert(breakdown.CritChance, s_format("%.2f", preHitCheckCritChance)) + t_insert(breakdown.CritChance, s_format("x %.2f ^8(chance to hit)", output.HitChance / 100)) t_insert(breakdown.CritChance, s_format("= %.2f", output.CritChance)) end end diff --git a/Modules/ModParser.lua b/Modules/ModParser.lua index 021dd68d..dbcde714 100644 --- a/Modules/ModParser.lua +++ b/Modules/ModParser.lua @@ -303,7 +303,7 @@ local preFlagList = { ["^socketed curse gems have "] = { tag = { type = "SocketedIn", keyword = "curse" } }, ["^socketed melee gems have "] = { tag = { type = "SocketedIn", keyword = "melee" } }, ["^your flasks grant "] = { }, - ["^auras you cast grant "] = { tag = { type = "Multiplier", var = "ActiveAura" } }, + ["^auras you cast grant "] = { addToAura = true }, ["^you and allies affected by your auras have "] = { tag = { type = "Condition", var = "HaveAuraActive" } }, } @@ -925,6 +925,12 @@ local function parseMod(line, order) tagList = tagList, } end + if modList[1] and modFlag and modFlag.addToAura then + -- Special handling for modifiers that add effects to your auras + for i, effectMod in ipairs(modList) do + modList[i] = mod("ExtraAuraEffect", "LIST", effectMod) + end + end return modList, line:match("%S") and line end diff --git a/README.md b/README.md index b9459c07..4c5b6dd3 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,10 @@ Head over to the [Releases](https://github.com/Openarl/PathOfBuilding/releases) ![ss3](https://cloud.githubusercontent.com/assets/19189971/18089780/f0ff234a-6f04-11e6-8c88-6193fe59a5c4.png) ## Changelog +### 1.2.33 - 2017/01/21 + * The aura effects granted by Unwavering Faith and Commander of Darkness now correctly benefit from aura effect modifiers + * The calculation of crit chance now factors in accuracy when in Effective DPS mode + ### 1.2.32 - 2017/01/15 * The program now calculates Total Damage per Ignite and Total DPS inc. Ignite when you have Emberwake equipped * Added a "Have you been Savage Hit Recently?" option to the Configuration tab diff --git a/changelog.txt b/changelog.txt index 055cfd4a..2291350b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +VERSION[1.2.33][2017/01/21] + * The aura effects granted by Unwavering Faith and Commander of Darkness now correctly benefit from aura effect modifiers + * The calculation of crit chance now factors in accuracy when in Effective DPS mode VERSION[1.2.32][2017/01/15] * The program now calculates Total Damage per Ignite and Total DPS inc. Ignite when you have Emberwake equipped * Added a "Have you been Savage Hit Recently?" option to the Configuration tab diff --git a/manifest.xml b/manifest.xml index 7636d2d4..bae0f7cc 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,13 +1,13 @@ - + - + @@ -20,7 +20,7 @@ - + @@ -44,13 +44,13 @@ - + - +