From aa192f7bcd94cdaf9d00b013904f551ee200c5c4 Mon Sep 17 00:00:00 2001 From: Openarl Date: Tue, 21 Feb 2017 22:19:12 +1000 Subject: [PATCH] Release 1.3.6 - Added skill part to Barrage - Added crit overcap info to crit breakdown - Default gem level now varies according to the gem's max level - Fixed quality bug introduced in 1.3.5 --- Classes/GemSelectControl.lua | 9 ++++++++- Classes/ImportTab.lua | 4 +++- Classes/SkillsTab.lua | 17 +++++++++++++++-- Data/Gems/act_dex.lua | 13 +++++++++++++ Data/Gems/act_int.lua | 2 +- Data/Gems/sup_int.lua | 2 +- Modules/Calcs.lua | 11 ++++++++--- Modules/ItemTools.lua | 15 +++++++++++---- Modules/ModParser.lua | 1 + README.md | 6 ++++++ changelog.txt | 5 +++++ manifest.xml | 22 +++++++++++----------- 12 files changed, 83 insertions(+), 24 deletions(-) diff --git a/Classes/GemSelectControl.lua b/Classes/GemSelectControl.lua index 7dab9d4c..f3498a7b 100644 --- a/Classes/GemSelectControl.lua +++ b/Classes/GemSelectControl.lua @@ -145,7 +145,7 @@ function GemSelectClass:Draw(viewPort) SetDrawLayer(nil, 5) local cursorX, cursorY = GetCursorPos() self.hoverSel = mOverComp == "DROP" and math.floor((cursorY - y - height + scrollBar.offset) / (height - 4)) + 1 - if self.hoverSel and self.hoverSel < 1 then + if self.hoverSel and not data.gems[self.list[self.hoverSel]] then self.hoverSel = nil end SetViewport(x + 2, y + height + 2, width - 4, dropHeight) @@ -190,6 +190,13 @@ function GemSelectClass:Draw(viewPort) gemList[self.index] = copyTable(oldGem or { level = 20, quality = 0, enabled = true }, true) gemList[self.index].name = self.list[self.hoverSel] gemList[self.index].data = data.gems[self.list[self.hoverSel]] + if gemList[self.index].data.low_max_level and not gemList[self.index].data.levels[gemList[self.index].level] then + if gemList[self.index].data.levels[3][1] then + gemList[self.index].level = 3 + else + gemList[self.index].level = 1 + end + end local output = calcFunc() gemList[self.index] = oldGem self.skillsTab.build:AddStatComparesToTooltip(calcBase, output, "^7Selecting this gem will give you:") diff --git a/Classes/ImportTab.lua b/Classes/ImportTab.lua index 165af9c4..2bc9e27a 100644 --- a/Classes/ImportTab.lua +++ b/Classes/ImportTab.lua @@ -371,7 +371,9 @@ function ImportTabClass:ImportItem(itemData, sockets) if itemData.ilvl > 0 then item.itemLevel = itemData.ilvl end - item.quality = 0 + if item.base.weapon or item.base.armour or item.base.flask then + item.quality = 0 + end if itemData.properties then for _, property in pairs(itemData.properties) do if property.name == "Quality" then diff --git a/Classes/SkillsTab.lua b/Classes/SkillsTab.lua index 5ba404d6..4def0135 100644 --- a/Classes/SkillsTab.lua +++ b/Classes/SkillsTab.lua @@ -230,8 +230,21 @@ function SkillsTabClass:CreateGemSlot(index) slot.quality:SetText("0") slot.enabled.state = true end - self.displayGroup.gemList[index].nameSpec = buf + local gem = self.displayGroup.gemList[index] + local prevDefaultLevel + if gem.data then + prevDefaultLevel = (gem.data.levels[20] and 20) or (gem.data.levels[3][1] and 3) or 1 + end + gem.nameSpec = buf self:ProcessSocketGroup(self.displayGroup) + if gem.data then + local defaultLevel = (gem.data.levels[20] and 20) or (gem.data.levels[3][1] and 3) or 1 + gem.defaultLevel = defaultLevel + if prevDefaultLevel ~= defaultLevel then + gem.level = defaultLevel + slot.level:SetText(tostring(gem.level)) + end + end if addUndo then self:AddUndoState() end @@ -403,7 +416,7 @@ function SkillsTabClass:ProcessSocketGroup(socketGroup) else gem.errMsg, gem.name, gem.data = nil end - if gem.nameSpec:match("%S") or gem.level ~= 20 or gem.quality ~= 0 or gem.enabled ~= true or (socketGroup == self.displayGroup and self.gemSlots[index] and self.gemSlots[index].nameSpec.dropped) then + if gem.nameSpec:match("%S") or gem.level ~= (gem.defaultLevel or 20) or gem.quality ~= 0 or gem.enabled ~= true or (socketGroup == self.displayGroup and self.gemSlots[index] and self.gemSlots[index].nameSpec.dropped) then index = index + 1 else -- Empty gem, remove it diff --git a/Data/Gems/act_dex.lua b/Data/Gems/act_dex.lua index 2e96598b..86127913 100644 --- a/Data/Gems/act_dex.lua +++ b/Data/Gems/act_dex.lua @@ -77,6 +77,19 @@ gems["Barrage"] = { active_skill = true, attack = true, bow = true, + parts = { + { + name = "1 Arrow", + }, + { + name = "All Arrows", + }, + }, + setupFunc = function(env, output) + if env.mainSkill.skillPart == 2 then + env.mainSkill.skillData.dpsMultiplier = output.ProjectileCount + end + end, color = 2, baseFlags = { attack = true, diff --git a/Data/Gems/act_int.lua b/Data/Gems/act_int.lua index be500229..d82804f1 100644 --- a/Data/Gems/act_int.lua +++ b/Data/Gems/act_int.lua @@ -1246,7 +1246,7 @@ gems["Fire Nova Mine"] = { skill("damageEffectiveness", 0.3), skill("critChance", 5), --"base_mine_duration" = 16000 - --"base_spell_repeat_count" = 3 + skill("repeatCount", 3), --"base_spell_repeat_count" = 3 --"base_skill_is_mined" = ? skill("showAverage", true), --"base_skill_show_average_damage_instead_of_dps" = ? --"is_remote_mine" = ? diff --git a/Data/Gems/sup_int.lua b/Data/Gems/sup_int.lua index a3c7c5d6..325280f1 100644 --- a/Data/Gems/sup_int.lua +++ b/Data/Gems/sup_int.lua @@ -1255,7 +1255,7 @@ gems["Spell Echo"] = { excludeSkillTypes = { 30, 37, 41, 42, 15, }, baseMods = { mod("ManaCost", "MORE", 40), - --"base_spell_repeat_count" = 1 + skill("repeatCount", 1), --"base_spell_repeat_count" = 1 mod("Damage", "MORE", -10), --"support_echo_damage_+%_final" = -10 }, qualityMods = { diff --git a/Modules/Calcs.lua b/Modules/Calcs.lua index e0840db2..11fdee1c 100644 --- a/Modules/Calcs.lua +++ b/Modules/Calcs.lua @@ -2095,10 +2095,13 @@ local function performCalcs(env) output.CritChance = 100 else local base = modDB:Sum("BASE", cfg, "CritChance") - output.CritChance = (baseCrit + base) * calcMod(modDB, cfg, "CritChance") + local inc = modDB:Sum("INC", cfg, "CritChance") + local more = modDB:Sum("MORE", cfg, "CritChance") + output.CritChance = (baseCrit + base) * (1 + inc / 100) * more if env.mode_effective then output.CritChance = output.CritChance + enemyDB:Sum("BASE", nil, "SelfExtraCritChance") end + local preCapCritChance = output.CritChance output.CritChance = m_min(output.CritChance, 95) if (baseCrit + base) > 0 then output.CritChance = m_max(output.CritChance, 5) @@ -2112,8 +2115,6 @@ local function performCalcs(env) output.CritChance = output.CritChance * output.HitChance / 100 end if breakdown and output.CritChance ~= baseCrit then - local inc = modDB:Sum("INC", cfg, "CritChance") - local more = modDB:Sum("MORE", cfg, "CritChance") local enemyExtra = enemyDB:Sum("BASE", nil, "SelfExtraCritChance") breakdown.CritChance = { } if base ~= 0 then @@ -2131,6 +2132,10 @@ local function performCalcs(env) t_insert(breakdown.CritChance, s_format("+ %g ^8(extra chance for enemy to be crit)", enemyExtra)) end t_insert(breakdown.CritChance, s_format("= %g", preLuckyCritChance)) + if preCapCritChance > 95 then + local overCap = preCapCritChance - 95 + t_insert(breakdown.CritChance, s_format("Crit is overcapped by %.2f%% (%d%% increased Critical Strike Chance)", overCap, overCap / more / (baseCrit + base) * 100)) + end if env.mode_effective and modDB:Sum("FLAG", cfg, "CritChanceLucky") then t_insert(breakdown.CritChance, "Crit Chance is Lucky:") t_insert(breakdown.CritChance, s_format("1 - (1 - %.4f) x (1 - %.4f)", preLuckyCritChance / 100, preLuckyCritChance / 100)) diff --git a/Modules/ItemTools.lua b/Modules/ItemTools.lua index e52b35e2..5bc0d456 100644 --- a/Modules/ItemTools.lua +++ b/Modules/ItemTools.lua @@ -56,7 +56,7 @@ end function itemLib.parseItemRaw(item) item.name = "?" item.rarity = "UNIQUE" - item.quality = 0 + item.quality = nil item.rawLines = { } for line in string.gmatch(item.raw .. "\r\n", "([^\r\n]*)\r?\n") do line = line:gsub("^%s+",""):gsub("%s+$","") @@ -260,12 +260,19 @@ function itemLib.parseItemRaw(item) if item.variantList then item.variant = m_min(#item.variantList, item.variant or #item.variantList) end + if not item.quality then + itemLib.normaliseQuality(item) + end itemLib.buildItemModList(item) end function itemLib.normaliseQuality(item) - if not item.corrupted and not item.uniqueID and item.base and (item.base.armour or item.base.weapon or item.base.flask) then - item.quality = 20 + if item.base and (item.base.armour or item.base.weapon or item.base.flask) then + if not item.quality then + item.quality = item.corrupted and 0 or 20 + elseif not item.uniqueID and not item.corrupted then + item.quality = 20 + end end end @@ -306,7 +313,7 @@ function itemLib.createItemRaw(item) end t_insert(rawLines, "Selected Variant: "..item.variant) end - if item.quality > 0 then + if item.quality then t_insert(rawLines, "Quality: "..item.quality) end if item.sockets then diff --git a/Modules/ModParser.lua b/Modules/ModParser.lua index b138a299..57d663b2 100644 --- a/Modules/ModParser.lua +++ b/Modules/ModParser.lua @@ -275,6 +275,7 @@ local modFlagList = { ["with ranged weapons"] = { flags = ModFlag.WeaponRanged }, -- Skill types ["spell"] = { flags = ModFlag.Spell }, + ["with spells"] = { flags = ModFlag.Spell }, ["for spells"] = { flags = ModFlag.Spell }, ["with attacks"] = { flags = ModFlag.Attack }, ["for attacks"] = { flags = ModFlag.Attack }, diff --git a/README.md b/README.md index c0d50103..1683efde 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,12 @@ 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.3.6 - 2017/02/21 + * Added a skill part for Barrage that calculates the DPS from all projectiles hitting the target + * The breakdown for Crit Chance in the Calcs tab now shows how far overcapped your crit chance is + * Empower/Enhance/Enlighten now default to level 3; Portal/Detonate Mines default to level 1 + * Fixed issue that caused some existing items to lose quality; all affected items will be fixed automatically + ### 1.3.5 - 2017/02/21 * Added support for the extra Chaos Damage from Malediction * The bonus only applies with "Have you killed Recently?" enabled, and scales based on the number of active curse skills diff --git a/changelog.txt b/changelog.txt index 79fcdf84..4ef289d2 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,8 @@ +VERSION[1.3.6][2017/02/21] + * Added a skill part for Barrage that calculates the DPS from all projectiles hitting the target + * The breakdown for Crit Chance in the Calcs tab now shows how far overcapped your crit chance is + * Empower/Enhance/Enlighten now default to level 3; Portal/Detonate Mines default to level 1 + * Fixed issue that caused some existing items to lose quality; all affected items will be fixed automatically VERSION[1.3.5][2017/02/21] * Added support for the extra Chaos Damage from Malediction * The bonus only applies with "Have you killed Recently?" enabled, and scales based on the number of active curse skills diff --git a/manifest.xml b/manifest.xml index de57e43d..cce26432 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,13 +1,13 @@ - + - + @@ -19,8 +19,8 @@ - - + + @@ -37,20 +37,20 @@ - + - + - + - + @@ -58,12 +58,12 @@ - - + + - +