Skip to content

Commit

Permalink
Fix enemy Ailment Threshold Calculations (#7252)
Browse files Browse the repository at this point in the history
* Fix enemy Ailment Threshold Calculations

The column in the gppk has the same values as the life column but in case it ever changes, it's helpful to switch it now. I'm not sure if life mods afffect Ailment threshold so will need to ask someone at GGG

* Add back life multiplier

---------

Co-authored-by: LocalIdentity <[email protected]>
  • Loading branch information
LocalIdentity and LocalIdentity authored Jan 17, 2024
1 parent 8aa64a5 commit 071813e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Data/Misc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ data.monsterLifeTable = { 22, 26, 31, 36, 42, 48, 55, 62, 70, 78, 87, 97, 107, 1
data.monsterAllyLifeTable = { 15, 16, 18, 20, 22, 24, 27, 29, 32, 35, 38, 41, 44, 48, 52, 56, 60, 65, 70, 75, 81, 87, 93, 99, 106, 114, 121, 130, 138, 148, 158, 168, 179, 190, 203, 215, 229, 244, 259, 275, 292, 310, 328, 348, 369, 392, 415, 440, 465, 493, 522, 552, 584, 618, 653, 691, 730, 772, 816, 862, 910, 961, 1015, 1072, 1131, 1194, 1260, 1329, 1402, 1478, 1559, 1644, 1733, 1827, 1926, 2029, 2138, 2253, 2373, 2500, 2633, 2773, 2919, 3074, 3236, 3406, 3585, 3773, 3970, 4178, 4395, 4624, 4864, 5116, 5381, 5659, 5951, 6257, 6578, 6916, }
data.monsterDamageTable = { 4.9899997711182, 5.5599999427795, 6.1599998474121, 6.8099999427795, 7.5, 8.2299995422363, 9, 9.8199996948242, 10.699999809265, 11.619999885559, 12.60000038147, 13.640000343323, 14.739999771118, 15.909999847412, 17.139999389648, 18.450000762939, 19.829999923706, 21.290000915527, 22.840000152588, 24.469999313354, 26.190000534058, 28.010000228882, 29.940000534058, 31.959999084473, 34.110000610352, 36.360000610352, 38.75, 41.259998321533, 43.909999847412, 46.700000762939, 49.650001525879, 52.75, 56.009998321533, 59.450000762939, 63.080001831055, 66.889999389648, 70.910003662109, 75.129997253418, 79.580001831055, 84.26000213623, 89.180000305176, 94.349998474121, 99.800003051758, 105.51999664307, 111.5299987793, 117.86000061035, 124.5, 131.49000549316, 138.83000183105, 146.5299987793, 154.63000488281, 163.13999938965, 172.07000732422, 181.44999694824, 191.30000305176, 201.63000488281, 212.47999572754, 223.86999511719, 235.83000183105, 248.36999511719, 261.5299987793, 275.32998657227, 289.82000732422, 305.01000976562, 320.94000244141, 337.64999389648, 355.17999267578, 373.54998779297, 392.80999755859, 413.01000976562, 434.17999267578, 456.36999511719, 479.61999511719, 504, 529.53997802734, 556.29998779297, 584.34997558594, 613.72998046875, 644.5, 676.75, 710.52001953125, 745.89001464844, 782.94000244141, 821.72998046875, 862.35998535156, 904.90002441406, 949.44000244141, 996.07000732422, 1044.8900146484, 1096, 1149.5, 1205.5, 1264.1099853516, 1325.4499511719, 1389.6400146484, 1456.8199462891, 1527.1199951172, 1600.6800537109, 1677.6400146484, 1758.1700439453, }
data.monsterArmourTable = { 16, 23, 30, 39, 48, 59, 71, 84, 99, 115, 133, 152, 174, 198, 225, 254, 286, 321, 360, 402, 449, 500, 556, 616, 683, 756, 835, 922, 1016, 1120, 1232, 1354, 1488, 1633, 1790, 1962, 2148, 2351, 2571, 2811, 3070, 3352, 3658, 3990, 4350, 4740, 5163, 5621, 6118, 6656, 7238, 7869, 8552, 9290, 10090, 10955, 11890, 12902, 13996, 15178, 16457, 17838, 19330, 20943, 22685, 24566, 26597, 28790, 31158, 33714, 36473, 39449, 42661, 46127, 49865, 53896, 58245, 62934, 67990, 73441, 79317, 85651, 92477, 99834, 107762, 116303, 125506, 135420, 146098, 157600, 169987, 183326, 197690, 213156, 229806, 247731, 267026, 287795, 310148, 334204, }
data.monsterAilmentThresholdTable = { 22, 26, 31, 36, 42, 48, 55, 62, 70, 78, 87, 97, 107, 119, 131, 144, 158, 173, 190, 207, 226, 246, 267, 290, 315, 341, 370, 400, 432, 467, 504, 543, 585, 630, 678, 730, 785, 843, 905, 972, 1042, 1118, 1198, 1284, 1375, 1472, 1575, 1685, 1802, 1927, 2059, 2200, 2350, 2509, 2678, 2858, 3050, 3253, 3469, 3698, 3942, 4201, 4476, 4768, 5078, 5407, 5756, 6127, 6520, 6937, 7380, 7850, 8348, 8876, 9436, 10030, 10660, 11328, 12036, 12787, 13582, 14425, 15319, 16265, 17268, 18331, 19457, 20649, 21913, 23250, 24667, 26168, 27756, 29438, 31220, 33105, 35101, 37214, 39450, 41817, }
-- From MonsterVarieties.dat combined with SkillTotemVariations.dat
data.totemLifeMult = { [1] = 1, [2] = 1, [3] = 1, [4] = 1.2, [5] = 1, [6] = 1.2, [7] = 1.2, [8] = 1.2, [9] = 1, [10] = 1, [11] = 1, [12] = 1, [13] = 1.2, [15] = 1.2, [16] = 7.44, [17] = 1.2, [18] = 1, [19] = 1, [20] = 1.2, [21] = 1.2, }
data.monsterVarietyLifeMult = {
Expand Down
3 changes: 3 additions & 0 deletions src/Export/Scripts/miscdata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ local life = ""
local allyLife = ""
local damage = ""
local armour = ""
local ailmentThreshold = ""
for stats in dat("DefaultMonsterStats"):Rows() do
evasion = evasion .. stats.Evasion .. ", "
accuracy = accuracy .. stats.Accuracy .. ", "
life = life .. stats.MonsterLife .. ", "
allyLife = allyLife .. stats.MinionLife .. ", "
damage = damage .. stats.Damage .. ", "
armour = armour .. stats.Armour .. ", "
ailmentThreshold = ailmentThreshold .. stats.AilmentThreshold .. ", "
end
out:write('-- From DefaultMonsterStats.dat\n')
out:write('data.monsterEvasionTable = { '..evasion..'}\n')
Expand All @@ -22,6 +24,7 @@ out:write('data.monsterLifeTable = { '..life..'}\n')
out:write('data.monsterAllyLifeTable = { '..allyLife..'}\n')
out:write('data.monsterDamageTable = { '..damage..'}\n')
out:write('data.monsterArmourTable = { '..armour..'}\n')
out:write('data.monsterAilmentThresholdTable = { '..ailmentThreshold..'}\n')

local totemMult = ""
local keys = { }
Expand Down
4 changes: 2 additions & 2 deletions src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4602,15 +4602,15 @@ function calcs.offence(env, actor, activeSkill)

-- Calculate non-damaging ailments effect and duration modifiers
local isBoss = env.configInput["enemyIsBoss"] ~= "None"
local enemyBaseLife = data.monsterLifeTable[env.enemyLevel] * enemyDB:More(nil, "Life")
local enemyAilmentThreshold = data.monsterAilmentThresholdTable[env.enemyLevel]
local enemyMapLifeMult = 1
local enemyMapAilmentMult = 1
if env.enemyLevel >= 66 then
enemyMapLifeMult = isBoss and data.mapLevelBossLifeMult[env.enemyLevel] or data.mapLevelLifeMult[env.enemyLevel]
enemyMapAilmentMult = isBoss and data.mapLevelBossAilmentMult[env.enemyLevel] or enemyMapAilmentMult
end
local enemyTypeMult = isBoss and 7.68 or 1
local enemyThreshold = enemyBaseLife * enemyTypeMult * enemyMapLifeMult * enemyMapAilmentMult * enemyDB:More(nil, "AilmentThreshold")
local enemyThreshold = enemyAilmentThreshold * enemyTypeMult * enemyMapLifeMult * enemyDB:More(nil, "Life") * enemyMapAilmentMult * enemyDB:More(nil, "AilmentThreshold")

local ailments = {
["Chill"] = {
Expand Down

0 comments on commit 071813e

Please sign in to comment.