From c8d7d1a30bcaeb20f4d2eccd37020685010136b8 Mon Sep 17 00:00:00 2001 From: Openarl Date: Sat, 19 Nov 2016 00:06:40 +1000 Subject: [PATCH] Release 1.2.7 - Support the 3 new skills from 2.4.2 - Support Wither - Add Save As button --- Classes/CalcsTab.lua | 2 +- Classes/ImportTab.lua | 2 +- Classes/ItemsTab.lua | 4 +- Data/Gems/act_dex.lua | 72 ++++++++++++++ Data/Gems/act_int.lua | 220 +++++++++++++++++++++++++++++++++++++++++- Data/Gems/act_str.lua | 1 + Data/Gems/sup_str.lua | 2 +- Modules/Build.lua | 102 +++++++++++++------- Modules/Calcs.lua | 22 +++-- README.md | 8 ++ changelog.txt | 7 ++ manifest.xml | 22 ++--- 12 files changed, 405 insertions(+), 59 deletions(-) diff --git a/Classes/CalcsTab.lua b/Classes/CalcsTab.lua index f3b65cd3..8ce269c6 100644 --- a/Classes/CalcsTab.lua +++ b/Classes/CalcsTab.lua @@ -79,7 +79,7 @@ Effective DPS: Curses and enemy properties (such as resistances and status condi }, }, { label = "Aura and Buff Skills", flag = "buffs", textSize = 12, { format = "{output:BuffList}" }, }, { label = "Combat Buffs", flag = "combat", textSize = 12, { format = "{output:CombatList}" }, }, - { label = "Curse Skills", flag = "effective", textSize = 12, { format = "{output:CurseList}" }, }, + { label = "Curses and Debuffs", flag = "effective", textSize = 12, { format = "{output:CurseList}" }, }, }, function(section) wipeTable(section.controls.mainSocketGroup.list) for i, socketGroup in pairs(self.build.skillsTab.socketGroupList) do diff --git a/Classes/ImportTab.lua b/Classes/ImportTab.lua index a9fa9d36..60d0ba2f 100644 --- a/Classes/ImportTab.lua +++ b/Classes/ImportTab.lua @@ -324,7 +324,7 @@ function ImportTabClass:ImportItem(itemData, sockets) ConPrintf("Unrecognised base in imported item: %s", item.baseName) end else - item.name = itemLib.sanitiseItemText(itemData.name) + item.name = itemLib.sanitiseItemText(itemData.typeLine) for baseName, baseData in pairs(data.itemBases) do if item.name:find(baseName, 1, true) then item.baseName = baseName diff --git a/Classes/ItemsTab.lua b/Classes/ItemsTab.lua index a7146cc7..06dfece5 100644 --- a/Classes/ItemsTab.lua +++ b/Classes/ItemsTab.lua @@ -377,7 +377,7 @@ function ItemsTabClass:AddItemTooltip(item, slot, dbMode) main:AddTooltipSeparator(10) -- Special fields for database items - if dbMode and (item.variantList or item.league or item.unreleased) then + if dbMode then if item.variantList then if #item.variantList == 1 then main:AddTooltipLine(16, "^xFFFF30Variant: "..item.variantList[1]) @@ -535,7 +535,7 @@ function ItemsTabClass:AddItemTooltip(item, slot, dbMode) local output = calcFunc(slot.slotName, item ~= selItem and item) local header if item == selItem then - header = "^7Removing this item will give you:" + header = "^7Removing this item from "..slot.label.." will give you:" else header = string.format("^7Equipping this item in %s%s will give you:", slot.label, selItem and " (replacing "..data.colorCodes[selItem.rarity]..selItem.name.."^7)" or "") end diff --git a/Data/Gems/act_dex.lua b/Data/Gems/act_dex.lua index f4d73b62..6f192956 100644 --- a/Data/Gems/act_dex.lua +++ b/Data/Gems/act_dex.lua @@ -196,6 +196,78 @@ gems["Bear Trap"] = { [30] = { 54, 4162, 5826, }, }, } +gems["Blade Flurry"] = { + dexterity = true, + active_skill = true, + attack = true, + area = true, + melee = true, + parts = { + { + name = "1 Stage", + }, + { + name = "6 Stages", + }, + }, + color = 2, + baseFlags = { + attack = true, + melee = true, + area = true, + }, + skillTypes = { [1] = true, [11] = true, [6] = true, [58] = true, [24] = true, }, + baseMods = { + skill("castTime", 1), + skill("manaCost", 4), + mod("Speed", "MORE", 65, ModFlag.Attack), --"active_skill_attack_speed_+%_final" = 65 + --"charged_attack_damage_per_stack_+%_final" = 20 + --"is_area_damage" = ? + skill("showAverage", true), --"base_skill_show_average_damage_instead_of_dps" = ? + --"skill_can_add_multiple_charges_per_action" = ? + mod("Damage", "MORE", 20, ModFlag.Attack, 0, { type = "SkillPart", skillPart = 1 }), + mod("Damage", "MORE", 120, ModFlag.Attack, 0, { type = "SkillPart", skillPart = 2 }), + }, + qualityMods = { + mod("Speed", "INC", 0.5, ModFlag.Attack, 0, nil), --"attack_speed_+%" = 0.5 + }, + levelMods = { + [1] = mod("Damage", "MORE", nil, ModFlag.Attack), + [2] = mod("AreaRadius", "INC", nil), --"base_skill_area_of_effect_+%" + }, + levels = { + [1] = { -45, 0, }, + [2] = { -44.4, 1, }, + [3] = { -43.8, 2, }, + [4] = { -43.2, 3, }, + [5] = { -42.6, 4, }, + [6] = { -42, 5, }, + [7] = { -41.4, 6, }, + [8] = { -40.8, 7, }, + [9] = { -40.2, 8, }, + [10] = { -39.6, 9, }, + [11] = { -39, 10, }, + [12] = { -38.4, 11, }, + [13] = { -37.8, 12, }, + [14] = { -37.2, 13, }, + [15] = { -36.6, 14, }, + [16] = { -36, 15, }, + [17] = { -35.4, 16, }, + [18] = { -34.8, 17, }, + [19] = { -34.2, 18, }, + [20] = { -33.6, 19, }, + [21] = { -33, 20, }, + [22] = { -32.4, 21, }, + [23] = { -31.8, 22, }, + [24] = { -31.2, 23, }, + [25] = { -30.6, 24, }, + [26] = { -30, 25, }, + [27] = { -29.4, 26, }, + [28] = { -28.8, 27, }, + [29] = { -28.2, 28, }, + [30] = { -27.6, 29, }, + }, +} gems["Blade Vortex"] = { dexterity = true, active_skill = true, diff --git a/Data/Gems/act_int.lua b/Data/Gems/act_int.lua index a50fc326..9ef5600f 100644 --- a/Data/Gems/act_int.lua +++ b/Data/Gems/act_int.lua @@ -319,6 +319,70 @@ gems["Ball Lightning"] = { [30] = { 31, 33, 620, }, }, } +gems["Blight"] = { + intelligence = true, + active_skill = true, + spell = true, + chaos = true, + area = true, + duration = true, + color = 3, + baseFlags = { + spell = true, + duration = true, + area = true, + chaos = true, + }, + skillTypes = { [2] = true, [50] = true, [11] = true, [18] = true, [58] = true, [12] = true, [40] = true, [59] = true, [52] = true, }, + baseMods = { + skill("castTime", 0.3), + skill("duration", 2.5), --"base_skill_effect_duration" = 2500 + --"base_secondary_skill_effect_duration" = 800 + mod("MovementSpeed", "INC", -80, 0, 0, nil), --"base_movement_velocity_+%" = -80 + --"display_max_blight_stacks" = 20 + skill("dotIsSpell", true), --"spell_damage_modifiers_apply_to_damage_over_time" = ? + --"is_area_damage" = ? + }, + qualityMods = { + mod("AreaRadius", "INC", 0.5), --"base_skill_area_of_effect_+%" = 0.5 + }, + levelMods = { + [1] = skill("manaCost", nil), + [2] = skill("ChaosDot", nil), --"base_chaos_damage_to_deal_per_minute" + }, + levels = { + [1] = { 2, 1.65, }, + [2] = { 2, 1.8666666666667, }, + [3] = { 2, 2.3333333333333, }, + [4] = { 2, 3.15, }, + [5] = { 2, 4.45, }, + [6] = { 2, 6.5333333333333, }, + [7] = { 2, 8.6333333333333, }, + [8] = { 2, 11.183333333333, }, + [9] = { 2, 14.3, }, + [10] = { 2, 18.083333333333, }, + [11] = { 2, 22.633333333333, }, + [12] = { 3, 28.133333333333, }, + [13] = { 3, 34.75, }, + [14] = { 3, 42.683333333333, }, + [15] = { 3, 52.166666666667, }, + [16] = { 3, 63.483333333333, }, + [17] = { 3, 76.983333333333, }, + [18] = { 4, 93.05, }, + [19] = { 4, 107.05, }, + [20] = { 4, 122.96666666667, }, + [21] = { 4, 134.76666666667, }, + [22] = { 4, 147.6, }, + [23] = { 4, 161.58333333333, }, + [24] = { 5, 176.78333333333, }, + [25] = { 5, 193.31666666667, }, + [26] = { 5, 211.28333333333, }, + [27] = { 5, 230.81666666667, }, + [28] = { 5, 252.05, }, + [29] = { 5, 275.1, }, + [30] = { 5, 300.15, }, + }, +} gems["Bone Offering"] = { minion = true, intelligence = true, @@ -1185,11 +1249,11 @@ gems["Fireball"] = { fire = true, parts = { { - name = "Direct hit", + name = "Projectile", area = false, }, { - name = "Splash damage", + name = "Explosion", area = true, }, }, @@ -1399,6 +1463,7 @@ gems["Flame Dash"] = { skill("critChance", 6), skill("duration", 4), --"base_skill_effect_duration" = 4000 --"is_area_damage" = ? + --"firestorm_use_server_effects" = ? }, qualityMods = { mod("Speed", "INC", 0.5, ModFlag.Spell), --"base_cast_speed_+%" = 0.5 @@ -3351,6 +3416,83 @@ gems["Vaal Righteous Fire"] = { [30] = { 49, }, }, } +gems["Scorching Ray"] = { + intelligence = true, + active_skill = true, + spell = true, + fire = true, + duration = true, + parts = { + { + name = "1 Stage", + }, + { + name = "4 Stages", + }, + { + name = "8 Stages", + }, + }, + color = 3, + baseFlags = { + spell = true, + duration = true, + fire = true, + }, + skillTypes = { [2] = true, [18] = true, [40] = true, [33] = true, [29] = true, [12] = true, [58] = true, [59] = true, [52] = true, }, + baseMods = { + skill("castTime", 0.5), + skill("duration", 1.5), --"base_skill_effect_duration" = 1500 + --"fire_beam_additional_stack_damage_+%_final" = -40 + --"display_max_fire_beam_stacks" = 8 + mod("FireResist", "BASE", -3, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }), --"fire_beam_enemy_fire_resistance_%_per_stack" = -3 + --"fire_beam_enemy_fire_resistance_%_maximum" = -24 + skill("dotIsSpell", true), --"spell_damage_modifiers_apply_to_damage_over_time" = ? + skill("stackCount", 4, { type = "SkillPart", skillPart = 2 }), + skill("stackCount", 8, { type = "SkillPart", skillPart = 3 }), + mod("Damage", "MORE", 180, 0, 0, { type = "SkillPart", skillPart = 2 }), + mod("Damage", "MORE", 420, 0, 0, { type = "SkillPart", skillPart = 3 }), + }, + qualityMods = { + --"fire_beam_length_+%" = 0.5 + }, + levelMods = { + [1] = skill("manaCost", nil), + [2] = skill("FireDot", nil), --"base_fire_damage_to_deal_per_minute" + }, + levels = { + [1] = { 4, 9.5333333333333, }, + [2] = { 4, 12.416666666667, }, + [3] = { 4, 17.266666666667, }, + [4] = { 5, 23.533333333333, }, + [5] = { 5, 31.6, }, + [6] = { 5, 41.95, }, + [7] = { 6, 55.133333333333, }, + [8] = { 6, 67.333333333333, }, + [9] = { 6, 81.9, }, + [10] = { 7, 99.266666666667, }, + [11] = { 7, 119.93333333333, }, + [12] = { 7, 144.51666666667, }, + [13] = { 8, 173.68333333333, }, + [14] = { 8, 208.26666666667, }, + [15] = { 8, 249.23333333333, }, + [16] = { 9, 297.66666666667, }, + [17] = { 9, 334.75, }, + [18] = { 9, 376.18333333333, }, + [19] = { 10, 422.46666666667, }, + [20] = { 10, 474.1, }, + [21] = { 10, 531.73333333333, }, + [22] = { 11, 596, }, + [23] = { 11, 667.65, }, + [24] = { 11, 747.51666666667, }, + [25] = { 12, 836.51666666667, }, + [26] = { 12, 935.63333333333, }, + [27] = { 12, 1046, }, + [28] = { 13, 1168.85, }, + [29] = { 13, 1305.55, }, + [30] = { 13, 1457.6333333333, }, + }, +} gems["Shock Nova"] = { intelligence = true, active_skill = true, @@ -3768,7 +3910,7 @@ gems["Summon Lightning Golem"] = { golem = true, lightning = true, }, - skillTypes = { [36] = true, [35] = true, [19] = true, [9] = true, [21] = true, [26] = true, [2] = true, [18] = true, [17] = true, [49] = true, }, + skillTypes = { [36] = true, [35] = true, [19] = true, [9] = true, [21] = true, [26] = true, [2] = true, [18] = true, [17] = true, [49] = true, [45] = true, }, baseMods = { skill("castTime", 1), --"base_number_of_golems_allowed" = 1 @@ -4046,7 +4188,77 @@ gems["Wither"] = { area = true, duration = true, chaos = true, - unsupported = true, + parts = { + { + name = "1 Stack", + }, + { + name = "5 Stacks", + }, + { + name = "10 Stacks", + }, + { + name = "20 Stacks", + }, + }, + color = 3, + baseFlags = { + spell = true, + area = true, + duration = true, + chaos = true, + }, + skillTypes = { [2] = true, [11] = true, [12] = true, [18] = true, [50] = true, [58] = true, }, + baseMods = { + skill("castTime", 0.28), + mod("ChaosDamageTaken", "INC", 7, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }), --"chaos_damage_taken_+%" = 7 + skill("duration", 0.5), --"base_skill_effect_duration" = 500 + --"base_secondary_skill_effect_duration" = 2000 + skill("stackCount", 5, { type = "SkillPart", skillPart = 2 }), + skill("stackCount", 10, { type = "SkillPart", skillPart = 3 }), + skill("stackCount", 20, { type = "SkillPart", skillPart = 4 }), + }, + qualityMods = { + mod("Duration", "INC", 1), --"skill_effect_duration_+%" = 1 + }, + levelMods = { + [1] = skill("manaCost", nil), + [2] = mod("MovementSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }), --"base_movement_velocity_+%" + [3] = mod("AreaRadius", "INC", nil), --"base_skill_area_of_effect_+%" + }, + levels = { + [1] = { 4, -30, 0, }, + [2] = { 4, -30, 1, }, + [3] = { 4, -30, 2, }, + [4] = { 5, -31, 3, }, + [5] = { 5, -31, 4, }, + [6] = { 5, -31, 5, }, + [7] = { 6, -32, 6, }, + [8] = { 6, -32, 7, }, + [9] = { 6, -32, 8, }, + [10] = { 7, -33, 9, }, + [11] = { 7, -33, 10, }, + [12] = { 7, -33, 11, }, + [13] = { 8, -34, 12, }, + [14] = { 8, -34, 13, }, + [15] = { 8, -34, 14, }, + [16] = { 9, -35, 15, }, + [17] = { 9, -35, 16, }, + [18] = { 9, -35, 17, }, + [19] = { 10, -36, 18, }, + [20] = { 10, -36, 19, }, + [21] = { 10, -36, 20, }, + [22] = { 11, -37, 21, }, + [23] = { 11, -37, 22, }, + [24] = { 11, -37, 23, }, + [25] = { 12, -38, 24, }, + [26] = { 12, -38, 25, }, + [27] = { 12, -38, 26, }, + [28] = { 13, -39, 27, }, + [29] = { 13, -39, 28, }, + [30] = { 13, -39, 29, }, + }, } gems["Wrath"] = { aura = true, diff --git a/Data/Gems/act_str.lua b/Data/Gems/act_str.lua index 2974eb44..a5414768 100644 --- a/Data/Gems/act_str.lua +++ b/Data/Gems/act_str.lua @@ -559,6 +559,7 @@ gems["Earthquake"] = { skill("duration", 1.5), --"base_skill_effect_duration" = 1500 mod("Damage", "MORE", 50, ModFlag.Attack, 0, { type = "SkillPart", skillPart = 2 }), --"quake_slam_fully_charged_explosion_damage_+%_final" = 50 --"is_area_damage" = ? + skill("showAverage", true, { type = "SkillPart", skillPart = 2 }), }, qualityMods = { mod("PhysicalDamage", "INC", 1), --"physical_damage_+%" = 1 diff --git a/Data/Gems/sup_str.lua b/Data/Gems/sup_str.lua index e180057e..542ba7d6 100644 --- a/Data/Gems/sup_str.lua +++ b/Data/Gems/sup_str.lua @@ -619,7 +619,7 @@ gems["Iron Will"] = { strength = true, support = true, color = 1, - requireSkillTypes = { 10, 52, }, + requireSkillTypes = { 10, 52, 59, }, addSkillTypes = { }, excludeSkillTypes = { }, baseMods = { diff --git a/Modules/Build.lua b/Modules/Build.lua index 6dea0125..df95f520 100644 --- a/Modules/Build.lua +++ b/Modules/Build.lua @@ -60,12 +60,45 @@ function buildMode:Init(dbFileName, buildName) SetDrawColor(1, 1, 1) DrawString(x, y + 2, "LEFT", 16, "VAR", "Current build: "..self.buildName) end - self.controls.save = common.New("ButtonControl", {"LEFT",self.controls.buildName,"RIGHT"}, 8, 0, 80, 20, "Save", function() + self.controls.save = common.New("ButtonControl", {"LEFT",self.controls.buildName,"RIGHT"}, 8, 0, 50, 20, "Save", function() self:SaveDBFile() end) - self.controls.save.shown = function() + self.controls.save.enabled = function() return self.unsaved end + self.controls.saveAs = common.New("ButtonControl", {"LEFT",self.controls.save,"RIGHT"}, 8, 0, 70, 20, "Save As", function() + local newFileName, newBuildName + local popup + popup = main:OpenPopup(370, 100, "Save As", { + common.New("LabelControl", nil, 0, 20, 0, 16, "^7Enter new build name:"), + edit = common.New("EditControl", nil, 0, 40, 350, 20, self.buildName, nil, "[%w _+-.()'\"]", 50, function(buf) + newFileName = main.buildPath..buf..".xml" + newBuildName = buf + popup.controls.save.enabled = false + if not buf:match("%S") then + return + end + local out = io.open(newFileName, "r") + if out then + out:close() + return + end + popup.controls.save.enabled = true + end), + save = common.New("ButtonControl", nil, -45, 70, 80, 20, "Save", function() + self.dbFileName = newFileName + self.buildName = newBuildName + main.modeArgs = { newFileName, newBuildName } + self:SaveDBFile() + main:ClosePopup() + end), + common.New("ButtonControl", nil, 45, 70, 80, 20, "Cancel", function() + main:ClosePopup() + end), + }) + popup.controls.save.enabled = false + popup:SelectControl(popup.controls.edit) + end) -- Controls: top bar, right side self.anchorTopBarRight = common.New("Control", nil, function() return main.screenW / 2 + 6 end, 4, 0, 20) @@ -200,17 +233,18 @@ function buildMode:Init(dbFileName, buildName) -- This may be user-customisable in the future self.displayStats = { { mod = "AverageHit", label = "Average Hit", fmt = ".1f", compPercent = true }, - { mod = "Speed", label = "Attack/Cast Rate", fmt = ".2f", compPercent = true }, + { mod = "Speed", label = "Attack Rate", fmt = ".2f", compPercent = true, flag = "attack" }, + { mod = "Speed", label = "Cast Rate", fmt = ".2f", compPercent = true, flag = "spell" }, { mod = "CritChance", label = "Crit Chance", fmt = ".2f%%" }, { 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 = "HitChance", label = "Hit Chance", fmt = "d%%", flag = "attack" }, + { mod = "TotalDPS", label = "Total DPS", fmt = ".1f", compPercent = true, flag = "notAverage" }, { mod = "TotalDot", label = "DoT DPS", fmt = ".1f", compPercent = true }, { mod = "BleedDPS", label = "Bleed DPS", fmt = ".1f", compPercent = true }, { mod = "IgniteDPS", label = "Ignite DPS", fmt = ".1f", compPercent = true }, { mod = "PoisonDPS", label = "Poison DPS", fmt = ".1f", compPercent = true }, { mod = "PoisonDamage", label = "Total Damage per Poison", fmt = ".1f", compPercent = true }, - { mod = "ManaCost", label = "Mana Cost", fmt = "d", compPercent = true }, + { mod = "ManaCost", label = "Mana Cost", fmt = "d", compPercent = true, condFunc = function() return true end }, { }, { mod = "Str", label = "Strength", fmt = "d" }, { mod = "Dex", label = "Dexterity", fmt = "d" }, @@ -460,9 +494,11 @@ function buildMode:RefreshStatList() wipeTable(self.controls.statBox.list) for index, statData in ipairs(self.displayStats) do if statData.mod then - local modVal = self.calcsTab.mainOutput[statData.mod] - if modVal and ((statData.condFunc and statData.condFunc(modVal,self.calcsTab.mainOutput)) or (not statData.condFunc and modVal ~= 0)) then - t_insert(self.controls.statBox.list, { height = 16, "^7"..statData.label..":", string.format("%s%"..statData.fmt, modVal > 0 and "^7" or data.colorCodes.NEGATIVE, modVal * (statData.pc and 100 or 1)) }) + if not statData.flag or self.calcsTab.mainEnv.mainSkill.skillFlags[statData.flag] then + local modVal = self.calcsTab.mainOutput[statData.mod] + if modVal and ((statData.condFunc and statData.condFunc(modVal,self.calcsTab.mainOutput)) or (not statData.condFunc and modVal ~= 0)) then + t_insert(self.controls.statBox.list, { height = 16, "^7"..statData.label..":", string.format("%s%"..statData.fmt, modVal >= 0 and "^7" or data.colorCodes.NEGATIVE, modVal * (statData.pc and 100 or 1)) }) + end end else t_insert(self.controls.statBox.list, { height = 10 }) @@ -470,6 +506,30 @@ function buildMode:RefreshStatList() end end +-- Compare values of all display stats between the two output tables, and add any changed stats to the tooltip +-- Adds the provided header line before the first stat line, if any are added +-- Returns the number of stat lines added +function buildMode:AddStatComparesToTooltip(baseOutput, compareOutput, header) + local count = 0 + for _, statData in ipairs(self.displayStats) do + if statData.mod and (not statData.flag or self.calcsTab.mainEnv.mainSkill.skillFlags[statData.flag]) then + local diff = (compareOutput[statData.mod] or 0) - (baseOutput[statData.mod] or 0) + if diff > 0.001 or diff < -0.001 then + if count == 0 then + main:AddTooltipLine(14, header) + end + local line = string.format("%s%+"..statData.fmt.." %s", diff > 0 and data.colorCodes.POSITIVE or data.colorCodes.NEGATIVE, diff * (statData.pc and 100 or 1), statData.label) + if statData.compPercent and (baseOutput[statData.mod] or 0) ~= 0 and (compareOutput[statData.mod] or 0) ~= 0 then + line = line .. string.format(" (%+.1f%%)", (compareOutput[statData.mod] or 0) / (baseOutput[statData.mod] or 0) * 100 - 100) + end + main:AddTooltipLine(14, line) + count = count + 1 + end + end + end + return count +end + function buildMode:LoadDB(xmlText, fileName) -- Parse the XML local dbXML, errMsg = common.xml.ParseXML(xmlText) @@ -537,28 +597,4 @@ function buildMode:SaveDBFile() file:close() end --- Compare values of all display stats between the two output tables, and add any changed stats to the tooltip --- Adds the provided header line before the first stat line, if any are added --- Returns the number of stat lines added -function buildMode:AddStatComparesToTooltip(baseOutput, compareOutput, header) - local count = 0 - for _, statData in ipairs(self.displayStats) do - if statData.mod then - local diff = (compareOutput[statData.mod] or 0) - (baseOutput[statData.mod] or 0) - if diff > 0.001 or diff < -0.001 then - if count == 0 then - main:AddTooltipLine(14, header) - end - local line = string.format("%s%+"..statData.fmt.." %s", diff > 0 and data.colorCodes.POSITIVE or data.colorCodes.NEGATIVE, diff * (statData.pc and 100 or 1), statData.label) - if statData.compPercent and (baseOutput[statData.mod] or 0) ~= 0 and (compareOutput[statData.mod] or 0) ~= 0 then - line = line .. string.format(" (%+.1f%%)", (compareOutput[statData.mod] or 0) / (baseOutput[statData.mod] or 0) * 100 - 100) - end - main:AddTooltipLine(14, line) - count = count + 1 - end - end - end - return count -end - return buildMode \ No newline at end of file diff --git a/Modules/Calcs.lua b/Modules/Calcs.lua index 3cb5cfc0..2ea561b0 100644 --- a/Modules/Calcs.lua +++ b/Modules/Calcs.lua @@ -178,6 +178,7 @@ local function buildActiveSkillModList(env, activeSkill) skillFlags[k] = nil end end + activeSkill.skillPartName = part.name skillFlags.multiPart = #activeGemParts > 1 end @@ -1054,7 +1055,7 @@ local function performCalcs(env) end if env.mode_effective then if activeSkill.debuffModList then - enemyDB:AddList(activeSkill.debuffModList) + enemyDB:ScaleAddList(activeSkill.debuffModList, activeSkill.skillData.stackCount or 1) end if activeSkill.curseModList then condList["EnemyCursed"] = true @@ -1093,7 +1094,7 @@ local function performCalcs(env) end -- Process misc modifiers - for _, value in ipairs(modDB:Sum("LIST", skillCfg, "Misc")) do + for _, value in ipairs(modDB:Sum("LIST", nil, "Misc")) do if value.type == "Condition" then condList[value.var] = true elseif value.type == "Multiplier" then @@ -1101,7 +1102,7 @@ local function performCalcs(env) end end -- Process enemy modifiers last in case they depend on conditions that were set by misc modifiers - for _, value in ipairs(modDB:Sum("LIST", skillCfg, "Misc")) do + for _, value in ipairs(modDB:Sum("LIST", nil, "Misc")) do if value.type == "EnemyModifier" then enemyDB:AddMod(value.mod) end @@ -1935,6 +1936,7 @@ local function performCalcs(env) -- Calculate skill DOT components local dotCfg = { skillName = skillCfg.skillName, + skillPart = skillCfg.skillPart, slotName = skillCfg.slotName, flags = bor(band(skillCfg.flags, ModFlag.SourceMask), ModFlag.Dot, skillData.dotIsSpell and ModFlag.Spell or 0), keywordFlags = skillCfg.keywordFlags @@ -2408,10 +2410,18 @@ function calcs.buildOutput(build, mode) end for _, activeSkill in ipairs(env.activeSkillList) do if activeSkill.buffModList or activeSkill.auraModList then - t_insert(buffList, activeSkill.activeGem.name) + if activeSkill.skillFlags.multiPart then + t_insert(buffList, activeSkill.activeGem.name .. " (" .. activeSkill.skillPartName .. ")") + else + t_insert(buffList, activeSkill.activeGem.name) + end end - if activeSkill.curseModList then - t_insert(curseList, activeSkill.activeGem.name) + if activeSkill.debuffModList or activeSkill.curseModList then + if activeSkill.skillFlags.multiPart then + t_insert(curseList, activeSkill.activeGem.name .. " (" .. activeSkill.skillPartName .. ")") + else + t_insert(curseList, activeSkill.activeGem.name) + end end end output.BuffList = table.concat(buffList, ", ") diff --git a/README.md b/README.md index 2ed3141d..59216891 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,14 @@ 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.7 - 2016/11/18 + * Added support for the 3 new skills: Blade Flurry, Blight and Scorching Ray + * Added support for Wither + * The debuff will apply automatically when the skill is enabled + * Change the skill part while Wither is selected in the sidebar to choose the stack count + * Added a "Save As" button + * Various minor tweaks + ### 1.2.6 - 2016/11/12 * Added support for the "more Physical Damage" modifier on "Outmatch and Outlast" * Added a splash damage skill part to Fireball diff --git a/changelog.txt b/changelog.txt index 07f12498..c796a339 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,10 @@ +VERSION[1.2.7][2016/11/18] + * Added support for the 3 new skills: Blade Flurry, Blight and Scorching Ray + * Added support for Wither + * The debuff will apply automatically when the skill is enabled + * Change the skill part while Wither is selected in the sidebar to choose the stack count + * Added a "Save As" button + * Various minor tweaks VERSION[1.2.6][2016/11/12] * Added support for the "more Physical Damage" modifier on "Outmatch and Outlast" * Added a splash damage skill part to Fireball diff --git a/manifest.xml b/manifest.xml index 3d429808..c1516c95 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,18 +1,18 @@ - + - + - + @@ -20,11 +20,11 @@ - + - + @@ -41,9 +41,9 @@ - + - + @@ -55,13 +55,13 @@ - - - + + + - +