diff --git a/Classes/ConfigTab.lua b/Classes/ConfigTab.lua index 2f6ceaf7..113c6ce1 100644 --- a/Classes/ConfigTab.lua +++ b/Classes/ConfigTab.lua @@ -77,6 +77,9 @@ local varList = { modList:NewMod("Misc", "LIST", { type = "Condition", var = "BlockedHitFromUniqueEnemyRecently" }, "Config", { type = "Condition", var = "Combat" }) end }, { section = "For Effective DPS" }, + { var = "critChanceLucky", type = "check", label = "Is your Crit Chance Lucky?", apply = function(val, modList, enemyModList) + modList:NewMod("CritChanceLucky", "FLAG", true, "Config", { type = "Condition", var = "Effective" }) + end }, { var = "conditionEnemyFullLife", type = "check", label = "Is the enemy on Full Life?", apply = function(val, modList, enemyModList) modList:NewMod("Misc", "LIST", { type = "Condition", var = "EnemyFullLife" }, "Config", { type = "Condition", var = "Effective" }) end }, @@ -98,6 +101,9 @@ local varList = { { var = "conditionEnemyMaimed", type = "check", label = "Is the enemy Maimed?", apply = function(val, modList, enemyModList) modList:NewMod("Misc", "LIST", { type = "Condition", var = "EnemyMaimed" }, "Config", { type = "Condition", var = "Effective" }) end }, + { var = "conditionEnemyHindered", type = "check", label = "Is the enemy Hindered?", apply = function(val, modList, enemyModList) + modList:NewMod("Misc", "LIST", { type = "Condition", var = "EnemyHindered" }, "Config", { type = "Condition", var = "Effective" }) + end }, { var = "conditionEnemyBurning", type = "check", label = "Is the enemy Burning?", apply = function(val, modList, enemyModList) modList:NewMod("Misc", "LIST", { type = "Condition", var = "EnemyBurning" }, "Config", { type = "Condition", var = "Effective" }) end }, diff --git a/Data/Gems/sup_dex.lua b/Data/Gems/sup_dex.lua index 7d9995ff..ed6f30e7 100644 --- a/Data/Gems/sup_dex.lua +++ b/Data/Gems/sup_dex.lua @@ -172,6 +172,7 @@ gems["Cast On Critical Strike"] = { mod("ManaCost", "MORE", 40), --"cast_linked_spells_on_attack_crit_%" = 100 --"spell_uncastable_if_triggerable" = ? + skill("showAverage", true, { type = "SkillType", skillType = 36 }), }, qualityMods = { mod("CritChance", "INC", 1, 0, 0, nil), --"critical_strike_chance_+%" = 1 diff --git a/Modules/Calcs.lua b/Modules/Calcs.lua index 49f25647..b6bed42a 100644 --- a/Modules/Calcs.lua +++ b/Modules/Calcs.lua @@ -1868,6 +1868,10 @@ local function performCalcs(env) if (baseCrit + base) > 0 then output.CritChance = m_max(output.CritChance, 5) end + local actualCritChance = output.CritChance + if env.mode_effective and modDB:Sum("FLAG", skillCfg, "CritChanceLucky") then + output.CritChance = (1 - (1 - output.CritChance / 100) ^ 2) * 100 + end if breakdown and output.CritChance ~= baseCrit then local inc = modDB:Sum("INC", skillCfg, "CritChance") local more = modDB:Sum("MORE", skillCfg, "CritChance") @@ -1887,7 +1891,12 @@ 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", output.CritChance)) + t_insert(breakdown.CritChance, s_format("= %g", actualCritChance)) + 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("= %.2f", output.CritChance)) + end end end if modDB:Sum("FLAG", skillCfg, "NoCritDamage") then @@ -2589,10 +2598,10 @@ function calcs.buildOutput(build, mode) output.CombatList = table.concat(combatList, ", ") output.CurseList = table.concat(curseList, ", ") - --infoDump(env) + infoDump(env) end return env end -return calcs +return calcs \ No newline at end of file diff --git a/Modules/ModParser.lua b/Modules/ModParser.lua index 7c6b21e0..4df3e4b8 100644 --- a/Modules/ModParser.lua +++ b/Modules/ModParser.lua @@ -398,6 +398,7 @@ local modTagList = { ["against enemies that are on low life"] = { tag = { type = "Condition", var = "EnemyLowLife" }, flags = ModFlag.Hit }, ["against bleeding enemies"] = { tag = { type = "Condition", var = "EnemyBleeding" }, flags = ModFlag.Hit }, ["against poisoned enemies"] = { tag = { type = "Condition", var = "EnemyPoisoned" }, flags = ModFlag.Hit }, + ["against hindered enemies"] = { tag = { type = "Condition", var = "EnemyHindered" }, flags = ModFlag.Hit }, ["against burning enemies"] = { tag = { type = "Condition", var = "EnemyBurning" }, flags = ModFlag.Hit }, ["against ignited enemies"] = { tag = { type = "Condition", var = "EnemyIgnited" }, flags = ModFlag.Hit }, ["against shocked enemies"] = { tag = { type = "Condition", var = "EnemyShocked" }, flags = ModFlag.Hit }, diff --git a/README.md b/README.md index 5c769931..47e452e3 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.29 - 2016/12/26 + * Added an "Enemy is Hindered" option to the Configuration tab + * Added a "Crit Chance is Lucky" option to the Configuration tab + ### 1.2.28 - 2016/12/22 * Added skill parts to Blade Vortex to enable calculation of DPS with different blade counts * Blade Vortex now has a hit rate override which replaces the cast rate when calculating the skill's DPS diff --git a/changelog.txt b/changelog.txt index deb55fa6..b5458dfc 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +VERSION[1.2.29][2016/12/26] + * Added an "Enemy is Hindered" option to the Configuration tab + * Added a "Crit Chance is Lucky" option to the Configuration tab VERSION[1.2.28][2016/12/22] * Added skill parts to Blade Vortex to enable calculation of DPS with different blade counts * Blade Vortex now has a hit rate override which replaces the cast rate when calculating the skill's DPS diff --git a/manifest.xml b/manifest.xml index 19a9cf8f..088d34c6 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,20 +1,20 @@ - + - + - + @@ -44,13 +44,13 @@ - + - + @@ -60,7 +60,7 @@ - +