diff --git a/Modules/Build.lua b/Modules/Build.lua index f0b579f5..a3182f9c 100644 --- a/Modules/Build.lua +++ b/Modules/Build.lua @@ -10,6 +10,8 @@ local ipairs = ipairs local t_insert = table.insert local m_min = math.min local m_max = math.max +local m_floor = math.floor +local m_abs = math.abs local buildMode = common.New("ControlHost") @@ -124,9 +126,36 @@ function buildMode:Init(dbFileName, buildName) end end self.controls.characterLevel = common.New("EditControl", {"LEFT",self.anchorTopBarRight,"RIGHT"}, 0, 0, 106, 20, "", "Level", "[%d]", 3, function(buf) - self.characterLevel = tonumber(buf) or 1 + self.characterLevel = m_min(tonumber(buf) or 1, 100) self.buildFlag = true end) + self.controls.characterLevel.tooltip = function() + local ret = "Experience multiplier:" + local playerLevel = self.characterLevel + local safeZone = 3 + m_floor(playerLevel / 16) + for level, expLevel in ipairs(data.monsterExperienceLevelMap) do + local diff = m_abs(playerLevel - expLevel) - safeZone + local mult + if diff <= 0 then + mult = 1 + else + mult = ((playerLevel + 5) / (playerLevel + 5 + diff ^ 2.5)) ^ 1.5 + end + if playerLevel >= 95 then + mult = mult * (1 / (1 + 0.1 * (playerLevel - 94))) + end + if mult > 0.01 then + ret = ret .. "\n" .. level + if level >= 68 then + ret = ret .. string.format(" (Tier %d)", level - 67) + else + + end + ret = ret .. string.format(": %.1f%%", mult * 100) + end + end + return ret + end self.controls.classDrop = common.New("DropDownControl", {"LEFT",self.controls.characterLevel,"RIGHT"}, 8, 0, 100, 20, nil, function(index, val) local classId = self.tree.classNameMap[val] if classId ~= self.spec.curClassId then @@ -496,7 +525,7 @@ function buildMode:OnFrame(inputEvents) SetDrawColor(0.85, 0.85, 0.85) DrawImage(nil, sideBarWidth - 4, 32, 4, main.screenH - 32) - self:DrawControls(viewPort) + self:DrawControls(main.viewPort) end function buildMode:RefreshStatList() diff --git a/Modules/Calcs.lua b/Modules/Calcs.lua index 1657c6dc..24ead98b 100644 --- a/Modules/Calcs.lua +++ b/Modules/Calcs.lua @@ -1114,6 +1114,7 @@ local function performCalcs(env) end -- Process conditions that can depend on other conditions + condList["NotKilledRecently"] = not condList["KilledRecently"] if env.mode_effective then if condList["EnemyIgnited"] then condList["EnemyBurning"] = true @@ -2399,17 +2400,6 @@ function calcs.buildOutput(build, mode) output["Spec:"..stat.."Inc"] = env.modDB:Sum("INC", specCfg, stat) end elseif mode == "CALCS" then - -- Calculate XP modifier - --[[ FIXME? - if input.monster_level and input.monster_level > 0 then - local playerLevel = build.characterLevel - local diff = m_abs(playerLevel - input.monster_level) - 3 - m_floor(playerLevel / 16) - if diff <= 0 then - output.MonsterXP = 1 - else - output.MonsterXP = m_max(0.01, ((playerLevel + 5) / (playerLevel + 5 + diff ^ 2.5)) ^ 1.5) - end - end]] local buffList = { } local combatList = { } local curseList = { } diff --git a/Modules/Data.lua b/Modules/Data.lua index 01d706e9..8d6420fa 100644 --- a/Modules/Data.lua +++ b/Modules/Data.lua @@ -201,6 +201,11 @@ data.monsterLifeTable = { 15, 17, 20, 23, 26, 30, 33, 37, 41, 46, 50, 55, 60, 66 -- From MonsterVarieties.dat combined with SkillTotemVariations.dat data.totemLifeMult = { [1] = 2.94, [2] = 2.94, [3] = 2.94, [4] = 2.94, [5] = 2.94, [6] = 4.2, [7] = 2.94, [8] = 2.94, [9] = 2.94, [10] = 2.94, [11] = 2.94, [12] = 2.94, [13] = 4.5, } +data.monsterExperienceLevelMap = { [71] = 70.94, [72] = 71.82, [73] = 72.64, [74] = 73.40, [75] = 74.10, [76] = 74.74, [77] = 75.32, [78] = 75.84, [79] = 76.30, [80] = 76.70, [81] = 77.04, [82] = 77.32, [83] = 77.54, [84] = 77.70, } +for i = 1, 70 do + data.monsterExperienceLevelMap[i] = i +end + data.weaponTypeInfo = { ["None"] = { oneHand = true, melee = true, flag = ModFlag.Unarmed }, ["Bow"] = { oneHand = false, melee = false, flag = ModFlag.Bow }, diff --git a/README.md b/README.md index af534dba..f1aa9042 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,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.12 - 2016/11/22 + * Hovering over the character level input will now show the experience penalties for relevant area levels + * Fixed the "not Killed Recently" condition on "Rite of Ruin" + ### 1.2.11 - 2016/11/22 * Added support for the Minion Damage-related modifiers on The Scourge * Fixed error when hovering over Kongming's Stratagem diff --git a/changelog.txt b/changelog.txt index a008f95f..726c7236 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +VERSION[1.2.12][2016/11/22] + * Hovering over the character level input will now show the experience penalties for relevant area levels + * Fixed the "not Killed Recently" condition on "Rite of Ruin" VERSION[1.2.11][2016/11/22] * Added support for the Minion Damage-related modifiers on The Scourge * Fixed error when hovering over Kongming's Stratagem diff --git a/manifest.xml b/manifest.xml index fb335361..d4e6db14 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,13 +1,13 @@ - + - + @@ -41,12 +41,12 @@ - + - + - +