diff --git a/Classes/CalcBreakdownControl.lua b/Classes/CalcBreakdownControl.lua
index b9cd9998..0ff54ca9 100644
--- a/Classes/CalcBreakdownControl.lua
+++ b/Classes/CalcBreakdownControl.lua
@@ -93,7 +93,7 @@ function CalcBreakdownClass:SetBreakdownData(displayData, pinned)
end
function CalcBreakdownClass:AddBreakdownSection(sectionData)
- local breakdown = self.calcsTab.gridEnv.breakdown[sectionData.breakdown]
+ local breakdown = self.calcsTab.calcsEnv.breakdown[sectionData.breakdown]
if not breakdown then
return
end
@@ -164,7 +164,7 @@ function CalcBreakdownClass:AddBreakdownSection(sectionData)
end
function CalcBreakdownClass:AddModSection(sectionData)
- local env = self.calcsTab.gridEnv
+ local env = self.calcsTab.calcsEnv
local build = self.calcsTab.build
local cfg = (sectionData.cfg and copyTable(env.mainSkill[sectionData.cfg.."Cfg"])) or { }
cfg.source = sectionData.modSource
@@ -187,9 +187,9 @@ function CalcBreakdownClass:AddModSection(sectionData)
{ label = "Value", key = "value" },
{ label = "Stat", key = "name" },
{ label = "Skill types", key = "flags" },
- { label = "Tags", key = "tags" },
+ { label = "Notes", key = "tags" },
{ label = "Source", key = "source" },
- { label = "Name", key = "sourceName" },
+ { label = "Source Name", key = "sourceName" },
},
}
t_insert(self.sectionList, section)
@@ -283,8 +283,8 @@ function CalcBreakdownClass:AddModSection(sectionData)
elseif row.mod.source == "Tree:Jewel" then
row.sourceName = "Jewel conversion"
end
- elseif sourceType == "Gem" then
- row.sourceName = row.mod.source:match("Gem:(.+)")
+ elseif sourceType == "Skill" then
+ row.sourceName = row.mod.source:match("Skill:(.+)")
end
if row.mod.flags ~= 0 or row.mod.keywordFlags ~= 0 then
local flagNames = { }
diff --git a/Classes/CalcSectionControl.lua b/Classes/CalcSectionControl.lua
index 27ea22ca..b13c22e5 100644
--- a/Classes/CalcSectionControl.lua
+++ b/Classes/CalcSectionControl.lua
@@ -73,7 +73,7 @@ function CalcSectionClass:IsMouseOver()
end
function CalcSectionClass:UpdateSize()
- local skillFlags = self.calcsTab.gridEnv.mainSkill.skillFlags
+ local skillFlags = self.calcsTab.calcsEnv.mainSkill.skillFlags
self.enabled = not self.flag or skillFlags[self.flag]
if self.collapsed or not self.enabled then
self.height = 22
@@ -138,7 +138,7 @@ function CalcSectionClass:FormatStr(str, output, colData)
end)
str = str:gsub("{(%d+):mod:(%d+)}", function(p, n)
local sectionData = colData[tonumber(n)]
- local env = self.calcsTab.gridEnv
+ local env = self.calcsTab.calcsEnv
local modCfg = (sectionData.cfg and env.mainSkill[sectionData.cfg.."Cfg"]) or { }
if sectionData.modSource then
modCfg.source = sectionData.modSource
@@ -161,8 +161,8 @@ function CalcSectionClass:Draw(viewPort)
local x, y = self:GetPos()
local width, height = self:GetSize()
local cursorX, cursorY = GetCursorPos()
- local env = self.calcsTab.gridEnv
- local output = self.calcsTab.gridOutput
+ local env = self.calcsTab.calcsEnv
+ local output = self.calcsTab.calcsOutput
SetDrawLayer(nil, -10)
SetDrawColor(self.col)
DrawImage(nil, x, y, width, height)
diff --git a/Classes/CalcsTab.lua b/Classes/CalcsTab.lua
index dc359ea5..23993bd9 100644
--- a/Classes/CalcsTab.lua
+++ b/Classes/CalcsTab.lua
@@ -323,9 +323,9 @@ function CalcsTabClass:BuildOutput()
self.mainEnv = self.calcs.buildOutput(self.build, "MAIN")
self.mainOutput = self.mainEnv.output
- self.gridEnv = self.calcs.buildOutput(self.build, "GRID")
- self.gridOutput = self.gridEnv.output
- self.gridBreakdown = self.gridEnv.breakdown
+ self.calcsEnv = self.calcs.buildOutput(self.build, "CALCS")
+ self.calcsOutput = self.calcsEnv.output
+ self.calcsBreakdown = self.calcsEnv.breakdown
if self.displayData then
self.controls.breakdown:SetBreakdownData()
diff --git a/Classes/ConfigTab.lua b/Classes/ConfigTab.lua
index 45c6b152..855134fc 100644
--- a/Classes/ConfigTab.lua
+++ b/Classes/ConfigTab.lua
@@ -256,10 +256,10 @@ end
function ConfigTabClass:ImportCalcSettings()
local input = self.input
- local gridInput = self.build.calcsTab.input
+ local calcsInput = self.build.calcsTab.input
local function import(old, new)
- input[new] = gridInput[old]
- gridInput[old] = nil
+ input[new] = calcsInput[old]
+ calcsInput[old] = nil
end
import("Cond_LowLife", "conditionLowLife")
import("Cond_FullLife", "conditionFullLife")
diff --git a/Modules/Build.lua b/Modules/Build.lua
index a37716b7..241aa8f3 100644
--- a/Modules/Build.lua
+++ b/Modules/Build.lua
@@ -195,7 +195,7 @@ function buildMode:Init(dbFileName, buildName)
{ mod = "AverageHit", label = "Average Hit", fmt = ".1f", compPercent = true },
{ mod = "Speed", label = "Attack/Cast Rate", fmt = ".2f", compPercent = true },
{ mod = "CritChance", label = "Crit Chance", fmt = ".2f%%" },
- { mod = "CritMultiplier", label = "Crit Multiplier", fmt = "d%%", pc = true },
+ { mod = "CritMultiplier", label = "Crit Multiplier", fmt = "d%%", pc = true, condFunc = function(v,o) return o.CritChance > 0 end },
{ mod = "HitChance", label = "Hit Chance", fmt = "d%%", condFunc = function(v,o) return v < 100 end },
{ mod = "TotalDPS", label = "Total DPS", fmt = ".1f", compPercent = true },
{ mod = "TotalDot", label = "DoT DPS", fmt = ".1f", compPercent = true },
diff --git a/Modules/CalcSections.lua b/Modules/CalcSections.lua
index 6b87a071..5073d8fd 100644
--- a/Modules/CalcSections.lua
+++ b/Modules/CalcSections.lua
@@ -7,6 +7,7 @@
return {
{ 3, "HitDamage", 1, "Skill Hit Damage", data.colorCodes.OFFENCE, {
extra = "{output:DisplayDamage}",
+ flag = "hit",
colWidth = 95,
{
{ format = "All Types:", },
@@ -154,6 +155,7 @@ return {
} },
{ 1, "Crit", 1, "Crits", data.colorCodes.OFFENCE, {
extra = "{2:output:CritChance}% x{2:output:CritMultiplier}",
+ flag = "hit",
{ label = "Inc. Crit Chance", { format = "{0:mod:1}%", { modName = "CritChance", modType = "INC", cfg = "skill" }, }, },
{ label = "Crit Chance", { format = "{2:output:CritChance}%", { breakdown = "CritChance" }, { modName = "CritChance", cfg = "skill" }, }, },
{ label = "Crit Multiplier", { format = "x {2:output:CritMultiplier}", { modName = "CritMultiplier", cfg = "skill"}, }, },
@@ -211,6 +213,7 @@ return {
{ label = "Ignite Duration", { format = "{2:output:IgniteDuration}s", { breakdown = "IgniteDuration" }, { label = "Player modifiers", modName = "EnemyIgniteDuration", cfg = "skill" }, { label = "Enemy modifiers", modName = "SelfIgniteDuration", enemy = true }, }, },
} },
{ 1, "MiscEffects", 1, "Other Effects", data.colorCodes.OFFENCE, {
+ flag = "hit",
{ label = "Chance to Shock", flag = "shock", { format = "{0:output:ShockChance}%", { label = "Player modifiers", modName = "EnemyShockChance", cfg = "skill" }, { label = "Enemy modifiers", modName = "SelfShockChance", enemy = true }, }, },
{ label = "Shock Dur. Mod", flag = "shock", { format = "x {2:output:ShockDurationMod}", { label = "Player modifiers", modName = "EnemyShockDuration", cfg = "skill" }, { label = "Enemy modifiers", modName = "SelfShockDuration", enemy = true }, }, },
{ label = "Chance to Freeze", flag = "freeze", { format = "{0:output:FreezeChance}%", { label = "Player modifiers", modName = "EnemyFreezeChance", cfg = "skill" }, { label = "Enemy modifiers", modName = "SelfFreezeChance", enemy = true }, }, },
diff --git a/Modules/Calcs.lua b/Modules/Calcs.lua
index 1312aee8..76d8a301 100644
--- a/Modules/Calcs.lua
+++ b/Modules/Calcs.lua
@@ -187,6 +187,7 @@ local function buildActiveSkillModList(env, activeSkill)
-- Initialise skill flag set
local skillFlags = copyTable(activeSkill.baseFlags)
+ skillFlags.hit = activeSkill.skillTypes[SkillType.Attack] or activeSkill.skillTypes[SkillType.Hit]
-- Set weapon flags
local weapon1Type = env.itemList["Weapon 1"] and env.itemList["Weapon 1"].type or "None"
@@ -215,7 +216,9 @@ local function buildActiveSkillModList(env, activeSkill)
-- Build skill mod flag set
local skillModFlags = 0
- skillModFlags = bor(skillModFlags, ModFlag.Hit)
+ if skillFlags.hit then
+ skillModFlags = bor(skillModFlags, ModFlag.Hit)
+ end
if skillFlags.spell then
skillModFlags = bor(skillModFlags, ModFlag.Spell)
elseif skillFlags.attack then
@@ -557,7 +560,7 @@ local function initEnv(build, mode)
local env = { }
env.build = build
env.configInput = build.configTab.input
- env.gridInput = build.calcsTab.input
+ env.calcsInput = build.calcsTab.input
env.mode = mode
env.classId = build.spec.curClassId
@@ -790,11 +793,11 @@ local function mergeMainMods(env, repSlotName, repItem)
env.modDB:AddList(buildNodeModList(env, build.spec.allocNodes, true))
-- Determine main skill group
- if env.mode == "GRID" then
- env.gridInput.skill_number = m_min(m_max(#build.skillsTab.socketGroupList, 1), env.gridInput.skill_number or 1)
- env.mainSocketGroup = env.gridInput.skill_number
- env.skillPart = env.gridInput.skill_part or 1
- env.buffMode = env.gridInput.misc_buffMode
+ if env.mode == "CALCS" then
+ env.calcsInput.skill_number = m_min(m_max(#build.skillsTab.socketGroupList, 1), env.calcsInput.skill_number or 1)
+ env.mainSocketGroup = env.calcsInput.skill_number
+ env.skillPart = env.calcsInput.skill_part or 1
+ env.buffMode = env.calcsInput.misc_buffMode
else
build.mainSocketGroup = m_min(m_max(#build.skillsTab.socketGroupList, 1), build.mainSocketGroup or 1)
env.mainSocketGroup = build.mainSocketGroup
@@ -861,9 +864,9 @@ local function mergeMainMods(env, repSlotName, repItem)
if index == env.mainSocketGroup and #socketGroupSkillList > 0 then
-- Select the main skill from this socket group
local activeSkillIndex
- if env.mode == "GRID" then
- env.gridInput.skill_activeNumber = m_min(#socketGroupSkillList, env.gridInput.skill_activeNumber or 1)
- activeSkillIndex = env.gridInput.skill_activeNumber
+ if env.mode == "CALCS" then
+ env.calcsInput.skill_activeNumber = m_min(#socketGroupSkillList, env.calcsInput.skill_activeNumber or 1)
+ activeSkillIndex = env.calcsInput.skill_activeNumber
else
socketGroup.mainActiveSkill = m_min(#socketGroupSkillList, socketGroup.mainActiveSkill or 1)
activeSkillIndex = socketGroup.mainActiveSkill
@@ -923,7 +926,7 @@ local function performCalcs(env)
env.output = output
modDB.stats = output
local breakdown
- if env.mode == "GRID" then
+ if env.mode == "CALCS" then
breakdown = { }
env.breakdown = breakdown
end
@@ -1733,7 +1736,7 @@ local function performCalcs(env)
local hitSource = (env.mode_skillType == "ATTACK") and env.weaponData1 or env.mainSkill.skillData
for _, damageType in ipairs(dmgTypeList) do
local min, max
- if canDeal[damageType] then
+ if skillFlags.hit and canDeal[damageType] then
if breakdown then
breakdown[damageType] = {
damageComponents = { }
@@ -1771,7 +1774,7 @@ local function performCalcs(env)
local mult = (1 - (resist - pen) / 100) * (1 + taken / 100)
min = min * mult
max = max * mult
- if env.mode == "GRID" then
+ if env.mode == "CALCS" then
output[damageType.."EffMult"] = mult
end
if breakdown and mult ~= 1 then
@@ -1807,7 +1810,7 @@ local function performCalcs(env)
}
end
end
- if env.mode == "GRID" then
+ if env.mode == "CALCS" then
output[damageType.."Min"] = min
output[damageType.."Max"] = max
end
@@ -1865,7 +1868,7 @@ local function performCalcs(env)
output.AverageHit = (totalMin + totalMax) / 2 * output.CritEffect
output.AverageDamage = output.AverageHit * output.HitChance / 100
output.TotalDPS = output.AverageDamage * output.Speed * (skillData.dpsMultiplier or 1)
- if env.mode == "GRID" then
+ if env.mode == "CALCS" then
if env.mode_average then
output.DisplayDamage = s_format("%.1f average damage", output.AverageDamage)
else
@@ -2429,7 +2432,7 @@ function calcs.getItemCalculator(build)
end)
end
--- Build output for display in the grid or side bar
+-- Build output for display in the side bar or calcs tab
function calcs.buildOutput(build, mode)
-- Build output
local env = initEnv(build, mode)
@@ -2447,7 +2450,7 @@ function calcs.buildOutput(build, mode)
for _, stat in pairs({"Life", "Mana", "Armour", "Evasion", "EnergyShield"}) do
output["Spec:"..stat.."Inc"] = env.modDB:Sum("INC", specCfg, stat)
end
- elseif mode == "GRID" then
+ elseif mode == "CALCS" then
-- Calculate XP modifier
--[[ FIXME
if input.monster_level and input.monster_level > 0 then
diff --git a/Modules/Data.lua b/Modules/Data.lua
index fc062676..c9082a39 100644
--- a/Modules/Data.lua
+++ b/Modules/Data.lua
@@ -152,7 +152,7 @@ for gemName, gemData in pairs(data.gems) do
-- Add sources for gem mods
for _, list in pairs({gemData.baseMods, gemData.qualityMods, gemData.levelMods}) do
for _, mod in pairs(list) do
- mod.source = "Gem:"..gemName
+ mod.source = "Skill:"..gemName
end
end
end
diff --git a/README.md b/README.md
index 1cd29d99..02b8cd43 100644
--- a/README.md
+++ b/README.md
@@ -49,7 +49,7 @@ Head over to the [Releases](https://github.com/Openarl/PathOfBuilding/releases)

## Changelog
-### 1.2.0 - 2016/10/00
+### 1.2.0 - 2016/11/01
With this update, the program's internal modifier system has been completely overhauled.
On its own this overhaul doesn't change much from the user's perspective, but it has opened the way for some
significant upgrades:
diff --git a/changelog.txt b/changelog.txt
index e22dca6e..805dadce 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,4 +1,4 @@
-VERSION[1.2.0][2016/10/00]
+VERSION[1.2.0][2016/11/01]
With this update, the program's internal modifier system has been completely overhauled.
On its own this overhaul doesn't change much from the user's perspective, but it has opened the way for some
significant upgrades:
diff --git a/manifest.xml b/manifest.xml
index cacf6585..921e3152 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -7,14 +7,14 @@
-
+
-
-
-
+
+
+
-
+
@@ -41,12 +41,12 @@
-
+
-
-
+
+
-
+