diff --git a/src/Data/Misc.lua b/src/Data/Misc.lua index a11304ef84..6d2333db39 100644 --- a/src/Data/Misc.lua +++ b/src/Data/Misc.lua @@ -3,7 +3,7 @@ local data = ... -- From DefaultMonsterStats.dat data.monsterEvasionTable = { 24, 30, 36, 43, 49, 56, 63, 70, 77, 84, 91, 98, 105, 113, 120, 128, 136, 144, 152, 160, 168, 176, 185, 193, 202, 211, 220, 229, 238, 247, 257, 266, 276, 286, 296, 306, 316, 326, 337, 347, 358, 369, 380, 391, 403, 414, 426, 438, 449, 462, 474, 486, 499, 511, 524, 537, 551, 564, 578, 591, 605, 619, 634, 648, 663, 677, 692, 708, 723, 738, 754, 770, 786, 803, 819, 836, 853, 870, 887, 905, 923, 941, 959, 977, 996, 1015, 1034, 1053, 1073, 1093, 1113, 1133, 1154, 1174, 1195, 1217, 1238, 1260, 1282, 1304, } -data.monsterAccuracyTable = { 26, 31, 36, 41, 46, 51, 57, 62, 68, 75, 81, 88, 95, 102, 109, 117, 125, 134, 142, 151, 161, 170, 180, 191, 202, 213, 224, 236, 248, 261, 274, 288, 302, 317, 332, 348, 364, 380, 398, 416, 434, 453, 473, 493, 514, 536, 558, 581, 605, 629, 655, 681, 708, 736, 765, 794, 825, 856, 889, 923, 957, 993, 1030, 1068, 1107, 1147, 1189, 1232, 1276, 1321, 1368, 1416, 1466, 1517, 1570, 1625, 1681, 1738, 1798, 1859, 1922, 1987, 2054, 2123, 2194, 2266, 2342, 2419, 2498, 2580, 2665, 2751, 2841, 2933, 3027, 3124, 3225, 3328, 3434, 3543, } +data.monsterAccuracyTable = { 32, 35, 39, 43, 48, 52, 57, 62, 67, 72, 78, 84, 90, 96, 103, 110, 117, 124, 132, 140, 149, 158, 167, 176, 186, 196, 207, 218, 230, 242, 254, 267, 281, 295, 309, 325, 340, 356, 373, 391, 409, 428, 447, 468, 489, 511, 533, 557, 581, 606, 632, 659, 688, 717, 747, 778, 810, 844, 878, 914, 951, 990, 1030, 1071, 1114, 1158, 1204, 1251, 1300, 1351, 1403, 1457, 1514, 1572, 1632, 1694, 1758, 1824, 1893, 1964, 2038, 2114, 2192, 2273, 2357, 2444, 2534, 2626, 2722, 2821, 2923, 3029, 3138, 3251, 3368, 3488, 3613, 3741, 3874, 4011, } data.monsterLifeTable = { 15, 20, 24, 28, 33, 38, 45, 50, 58, 67, 78, 89, 103, 118, 134, 158, 178, 200, 224, 249, 276, 305, 335, 366, 400, 434, 472, 510, 551, 593, 637, 683, 731, 790, 853, 921, 995, 1074, 1160, 1253, 1353, 1462, 1578, 1705, 1841, 1967, 2101, 2244, 2395, 2556, 2726, 2909, 3102, 3307, 3525, 3756, 4002, 4264, 4540, 4834, 5147, 5478, 5829, 6203, 6513, 6904, 7318, 7757, 8222, 8716, 9239, 9793, 10381, 11003, 11664, 12363, 13105, 13892, 14725, 15609, 16545, 17538, 18590, 19705, 20888, 22141, 23469, 24878, 26370, 27953, 29630, 31407, 33292, 35289, 37407, 39651, 42030, 44552, 47225, 50059, } data.monsterAllyLifeTable = { 51, 83, 116, 150, 186, 223, 261, 300, 341, 382, 426, 471, 517, 565, 614, 665, 718, 772, 828, 886, 945, 1007, 1070, 1135, 1203, 1272, 1344, 1417, 1493, 1571, 1652, 1734, 1820, 1907, 1998, 2091, 2186, 2285, 2386, 2490, 2598, 2708, 2821, 2938, 3058, 3181, 3307, 3438, 3571, 3709, 3850, 3995, 4144, 4298, 4455, 4617, 4783, 4953, 5128, 5308, 5493, 5682, 5877, 6077, 6282, 6492, 6708, 6930, 7157, 7391, 7630, 7876, 8128, 8387, 8652, 8924, 9203, 9489, 9783, 10084, 10393, 10710, 11034, 11367, 11708, 12058, 12417, 12785, 13161, 13548, 13944, 14350, 14766, 15192, 15629, 16076, 16535, 17005, 17486, 17980, } data.monsterDamageTable = { 9.1599998474121, 10.260000228882, 11.390000343323, 12.569999694824, 13.779999732971, 15.029999732971, 16.319999694824, 17.64999961853, 19.020000457764, 20.440000534058, 21.89999961853, 23.409999847412, 24.969999313354, 26.569999694824, 28.229999542236, 29.930000305176, 31.690000534058, 33.5, 35.369998931885, 37.290000915527, 39.270000457764, 41.310001373291, 43.409999847412, 45.569999694824, 47.799999237061, 50.090000152588, 52.450000762939, 54.880001068115, 57.369998931885, 59.939998626709, 62.590000152588, 65.309997558594, 68.099998474121, 70.980003356934, 73.940002441406, 76.980003356934, 80.110000610352, 83.319999694824, 86.629997253418, 90.019996643066, 93.51000213623, 97.099998474121, 100.79000091553, 104.56999969482, 108.45999908447, 112.45999908447, 116.56999969482, 120.7799987793, 125.12000274658, 129.55999755859, 134.13000488281, 138.82000732422, 143.63999938965, 148.58000183105, 153.66000366211, 158.86999511719, 164.21000671387, 169.69999694824, 175.33999633789, 181.11999511719, 187.05000305176, 193.13999938965, 199.38000488281, 205.78999328613, 212.36000061035, 219.11000061035, 226.0299987793, 233.11999511719, 240.39999389648, 247.86000061035, 255.52000427246, 263.36999511719, 271.42001342773, 279.67999267578, 288.14001464844, 296.82000732422, 305.7200012207, 314.83999633789, 324.19000244141, 333.7799987793, 343.60000610352, 353.67001342773, 364, 374.57998657227, 385.42001342773, 396.5299987793, 407.92001342773, 419.57998657227, 431.54000854492, 443.79000854492, 456.33999633789, 469.20001220703, 482.38000488281, 495.86999511719, 509.70001220703, 523.85998535156, 538.36999511719, 553.22998046875, 568.46002197266, 584.04998779297, } @@ -16,9 +16,9 @@ data.minionLevelTable = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 -- From GameConstants.dat data.gameConstants = { - ["MonsterAccuracyBase"] = 22, - ["MonsterAccuracyIncremental"] = 380, - ["MonsterAccuracyImprovement"] = 2.2, + ["MonsterAccuracyBase"] = 28, + ["MonsterAccuracyIncremental"] = 280, + ["MonsterAccuracyImprovement"] = 2.6, ["MonsterArmourBase"] = 2, ["MonsterArmourIncremental"] = 1.75, ["MonsterArmourStrengthRatioMultiplier"] = 3, @@ -125,11 +125,10 @@ data.characterConstants = { ["max_viper_strike_orbs"] = 4, ["max_fuse_arrow_orbs"] = 5, ["max_fire_beam_stacks"] = 8, - ["base_evasion_rating"] = 27, + ["base_evasion_rating"] = 7, ["life_per_level"] = 12, ["mana_per_level"] = 4, ["accuracy_rating_per_level"] = 6, - ["evasion_rating_per_level"] = 300, ["unarmed_base_critical_strike_chance"] = 500, ["base_critical_hit_damage_bonus"] = 100, ["strength_per_level"] = 0, diff --git a/src/Modules/CalcDefence.lua b/src/Modules/CalcDefence.lua index 0d70fd054c..4d30789c8f 100644 --- a/src/Modules/CalcDefence.lua +++ b/src/Modules/CalcDefence.lua @@ -35,6 +35,14 @@ function calcs.hitChance(evasion, accuracy, uncapped) local rawChance = ( accuracy * 1.25 ) / ( accuracy + evasion * 0.3 ) * 100 return uncapped and m_max(round(rawChance), 5) or m_max(m_min(round(rawChance), 100), 5) end +-- Calculate monster hit chance +function calcs.monsterHitChance(evasion, accuracy) + if accuracy < 0 then + return 5 + end + local rawChance = ( 1 - ( 0.95 * evasion ) / ( evasion + 4 * accuracy ) ) * 100 + return m_max(m_min(round(rawChance), 100), 5) +end -- Calculate Deflect chance function calcs.deflectChance(deflection, accuracy) if deflection < 1 then @@ -1394,11 +1402,11 @@ function calcs.defence(env, actor) local evadeChance = modDB:Sum("BASE", nil, "EvadeChance") local hitChance = calcLib.mod(enemyDB, nil, "HitChance") local evadeMax = modDB:Max(nil, "EvadeChanceMax") or data.misc.EvadeChanceCap - output.EvadeChance = 100 - (calcs.hitChance(output.Evasion, enemyAccuracy) - evadeChance) * hitChance - output.MeleeEvadeChance = m_max(0, m_min(evadeMax, (100 - (calcs.hitChance(output.MeleeEvasion, enemyAccuracy) - evadeChance) * hitChance) * calcLib.mod(modDB, nil, "EvadeChance", "MeleeEvadeChance"))) - output.ProjectileEvadeChance = m_max(0, m_min(evadeMax, (100 - (calcs.hitChance(output.ProjectileEvasion, enemyAccuracy) - evadeChance) * hitChance) * calcLib.mod(modDB, nil, "EvadeChance", "ProjectileEvadeChance"))) - output.SpellEvadeChance = m_max(0, m_min(evadeMax, (100 - (calcs.hitChance(output.SpellEvasion, enemyAccuracy) - evadeChance) * hitChance) * calcLib.mod(modDB, nil, "EvadeChance", "SpellEvadeChance"))) - output.SpellProjectileEvadeChance = m_max(0, m_min(evadeMax, (100 - (calcs.hitChance(output.SpellProjectileEvasion, enemyAccuracy) - evadeChance) * hitChance) * calcLib.mod(modDB, nil, "EvadeChance", "ProjectileEvadeChance", "SpellProjectileEvadeChance"))) + output.EvadeChance = 100 - (calcs.monsterHitChance(output.Evasion, enemyAccuracy) - evadeChance) * hitChance + output.MeleeEvadeChance = m_max(0, m_min(evadeMax, (100 - (calcs.monsterHitChance(output.MeleeEvasion, enemyAccuracy) - evadeChance) * hitChance) * calcLib.mod(modDB, nil, "EvadeChance", "MeleeEvadeChance"))) + output.ProjectileEvadeChance = m_max(0, m_min(evadeMax, (100 - (calcs.monsterHitChance(output.ProjectileEvasion, enemyAccuracy) - evadeChance) * hitChance) * calcLib.mod(modDB, nil, "EvadeChance", "ProjectileEvadeChance"))) + output.SpellEvadeChance = m_max(0, m_min(evadeMax, (100 - (calcs.monsterHitChance(output.SpellEvasion, enemyAccuracy) - evadeChance) * hitChance) * calcLib.mod(modDB, nil, "EvadeChance", "SpellEvadeChance"))) + output.SpellProjectileEvadeChance = m_max(0, m_min(evadeMax, (100 - (calcs.monsterHitChance(output.SpellProjectileEvasion, enemyAccuracy) - evadeChance) * hitChance) * calcLib.mod(modDB, nil, "EvadeChance", "ProjectileEvadeChance", "SpellProjectileEvadeChance"))) -- Condition for displaying evade chance only if melee or projectile evade chance have the same values if output.MeleeEvadeChance ~= output.ProjectileEvadeChance and output.MeleeEvadeChance ~= output.SpellEvadeChance and output.MeleeEvadeChance ~= output.SpellProjectileEvadeChance then output.splitEvade = true diff --git a/src/Modules/CalcSetup.lua b/src/Modules/CalcSetup.lua index 03309708d3..06c0c46f49 100644 --- a/src/Modules/CalcSetup.lua +++ b/src/Modules/CalcSetup.lua @@ -603,7 +603,7 @@ function calcs.initEnv(build, mode, override, specEnv) modDB:NewMod("Spirit", "BASE", 0, "Base") modDB:NewMod("Devotion", "BASE", 0, "Base") modDB:NewMod("Tribute", "BASE", 0, "Base") - modDB:NewMod("Evasion", "BASE", data.characterConstants["evasion_rating_per_level"] / 100, "Base", { type = "Multiplier", var = "Level", base = data.characterConstants["base_evasion_rating"] }) + modDB:NewMod("Evasion", "BASE", data.characterConstants["base_evasion_rating"], "Base") modDB:NewMod("Accuracy", "BASE", data.characterConstants["accuracy_rating_per_level"], "Base", { type = "Multiplier", var = "Level", base = -data.characterConstants["accuracy_rating_per_level"] }) modDB:NewMod("CritMultiplier", "BASE", data.characterConstants["base_critical_hit_damage_bonus"], "Base") modDB:NewMod("DotMultiplier", "BASE", 50, "Base", { type = "Condition", var = "CriticalStrike" })