forked from PathOfBuildingCommunity/PathOfBuilding
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Data.lua
669 lines (625 loc) · 21.5 KB
/
Data.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
-- Path of Building
--
-- Module: Data
-- Contains static data used by other modules.
--
LoadModule("Data/Global")
local m_min = math.min
local m_max = math.max
local m_floor = math.floor
local t_insert = table.insert
local t_concat = table.concat
local function makeSkillMod(modName, modType, modVal, flags, keywordFlags, ...)
return {
name = modName,
type = modType,
value = modVal,
flags = flags or 0,
keywordFlags = keywordFlags or 0,
...
}
end
local function makeFlagMod(modName, ...)
return makeSkillMod(modName, "FLAG", true, 0, 0, ...)
end
local function makeSkillDataMod(dataKey, dataValue, ...)
return makeSkillMod("SkillData", "LIST", { key = dataKey, value = dataValue }, 0, 0, ...)
end
local function processMod(grantedEffect, mod)
mod.source = grantedEffect.modSource
if type(mod.value) == "table" and mod.value.mod then
mod.value.mod.source = "Skill:"..grantedEffect.id
end
for _, tag in ipairs(mod) do
if tag.type == "GlobalEffect" then
grantedEffect.hasGlobalEffect = true
break
end
end
end
-----------------
-- Common Data --
-----------------
-- These are semi-structured
----------------------------------------
-- Everything not in a later category
-- Item mods & jewel data
-- Boss data, skills and minions
-- Remaining Item Data and uniques
----------------------------------------
data = { }
data.powerStatList = {
{ stat=nil, label="Offence/Defence", combinedOffDef=true, ignoreForItems=true },
{ stat=nil, label="Name", itemField="Name", ignoreForNodes=true, reverseSort=true, transform=function(value) return value:gsub("^The ","") end},
{ stat="FullDPS", label="Full DPS" },
{ stat="CombinedDPS", label="Combined DPS" },
{ stat="TotalDPS", label="Hit DPS" },
{ stat="WithImpaleDPS", label="Impale + Hit DPS" },
{ stat="AverageDamage", label="Average Hit" },
{ stat="Speed", label="Attack/Cast Speed" },
{ stat="TotalDot", label="DoT DPS" },
{ stat="BleedDPS", label="Bleed DPS" },
{ stat="IgniteDPS", label="Ignite DPS" },
{ stat="PoisonDPS", label="Poison DPS" },
{ stat="Life", label="Health" },
{ stat="LifeRegen", label="Health regen" },
{ stat="LifeLeechRate", label="Health leech" },
{ stat="Armour", label="Armor" },
{ stat="Evasion", label="Evasion" },
{ stat="EnergyShield", label="Energy Shield" },
{ stat="EnergyShieldRecoveryCap", label="Recoverable ES" },
{ stat="EnergyShieldRegen", label="Energy Shield regen" },
{ stat="EnergyShieldLeechRate", label="Energy Shield leech" },
{ stat="Mana", label="Mana" },
{ stat="ManaRegen", label="Mana regen" },
{ stat="ManaLeechRate", label="Mana leech" },
{ stat="Ward", label="Ward" },
{ stat="Str", label="Strength" },
{ stat="Dex", label="Dexterity" },
{ stat="Int", label="Intelligence" },
{ stat="TotalAttr", label="Total Attributes" },
{ stat="MeleeAvoidChance", label="Melee avoid chance" },
{ stat="SpellAvoidChance", label="Spell avoid chance" },
{ stat="ProjectileAvoidChance", label="Projectile avoid chance" },
{ stat="TotalEHP", label="Effective Hit Pool" },
{ stat="SecondMinimalMaximumHitTaken", label="Eff. Maximum Hit Taken" },
{ stat="PhysicalTakenHit", label="Taken Phys dmg", transform=function(value) return -value end },
{ stat="LightningTakenHit", label="Taken Lightning dmg", transform=function(value) return -value end },
{ stat="ColdTakenHit", label="Taken Cold dmg", transform=function(value) return -value end },
{ stat="FireTakenHit", label="Taken Fire dmg", transform=function(value) return -value end },
{ stat="ChaosTakenHit", label="Taken Chaos dmg", transform=function(value) return -value end },
{ stat="CritChance", label="Crit Chance" },
{ stat="CritMultiplier", label="Crit Multiplier" },
{ stat="BleedChance", label="Bleed Chance" },
{ stat="FreezeChance", label="Freeze Chance" },
{ stat="IgniteChance", label="Ignite Chance" },
{ stat="ShockChance", label="Shock Chance" },
{ stat="EffectiveMovementSpeedMod", label="Move speed" },
{ stat="BlockChance", label="Block Chance" },
{ stat="SpellBlockChance", label="Spell Block Chance" },
{ stat="SpellSuppressionChance", label="Spell Suppression Chance" },
}
data.misc = { -- magic numbers
AccuracyPerDexBase = 2,
LowPoolThreshold = 0.5,
TemporalChainsEffectCap = 75,
BuffExpirationSlowCap = 0.25,
DamageReductionCap = 90,
ResistFloor = -200,
MaxResistCap = 90,
EvadeChanceCap = 95,
DodgeChanceCap = 75,
SuppressionChanceCap = 100,
SuppressionEffect = 50,
AvoidChanceCap = 75,
EnergyShieldRechargeBase = 0.33,
EnergyShieldRechargeDelay = 2,
WardRechargeDelay = 4,
Transfiguration = 0.3,
EnemyMaxResist = 75,
LeechRateBase = 0.02,
DotDpsCap = 35791394, -- (2 ^ 31 - 1) / 60 (int max / 60 seconds)
BleedPercentBase = 70,
BleedDurationBase = 5,
PoisonPercentBase = 0.30,
PoisonDurationBase = 2,
IgnitePercentBase = 0.9,
IgniteDurationBase = 4,
ImpaleStoredDamageBase = 0.1,
TrapTriggerRadiusBase = 10,
MineDetonationRadiusBase = 60,
MineAuraRadiusBase = 35,
BrandAttachmentRangeBase = 30,
ProjectileDistanceCap = 150,
MinStunChanceNeeded = 20,
StunBaseMult = 200,
StunBaseDuration = 0.35,
StunNotMeleeDamageMult = 0.75,
MaxEnemyLevel = 85,
maxExperiencePenaltyFreeAreaLevel = 70,
experiencePenaltyMultiplier = 0.06,
-- Expected values to calculate EHP
stdBossDPSMult = 4 / 4.40,
pinnacleBossDPSMult = 8 / 4.40,
pinnacleBossPen = 15 / 5,
uberBossDPSMult = 10 / 4.25,
uberBossPen = 40 / 5,
-- ehp helper function magic numbers
ehpCalcSpeedUp = 8,
-- max damage can be increased for more accuracy
ehpCalcMaxDamage = 100000000,
-- max iterations can be increased for more accuracy this should be perfectly accurate unless it runs out of iterations and so high eHP values will be underestimated.
ehpCalcMaxIterationsToCalc = 50,
-- maximum increase for stat weights, only used in trader for now.
maxStatIncrease = 2, -- 100% increased
-- PvP scaling used for hogm
PvpElemental1 = 0.55,
PvpElemental2 = 150,
PvpNonElemental1 = 0.57,
PvpNonElemental2 = 90,
}
data.skillColorMap = { colorCodes.STRENGTH, colorCodes.DEXTERITY, colorCodes.INTELLIGENCE, colorCodes.NORMAL }
do
---@param areaLevel number
---@return number
local function effectiveMonsterLevel(areaLevel)
--- Areas with area level above a certain penalty-free level are considered to have
--- a scaling lower effective monster level for experience penalty calculations.
if areaLevel <= data.misc.maxExperiencePenaltyFreeAreaLevel then
return areaLevel
end
return areaLevel - triangular(areaLevel - data.misc.maxExperiencePenaltyFreeAreaLevel) * data.misc.experiencePenaltyMultiplier
end
---@type table<number, number>
data.monsterExperienceLevelMap = {}
-- to max enemy level + 2 to keep functionality the same
for i = 1, (data.misc.MaxEnemyLevel + 2) do
data.monsterExperienceLevelMap[i] = effectiveMonsterLevel(i)
end
end
data.cursePriority = {
["Temporal Chains"] = 1, -- Despair and Elemental Weakness override Temporal Chains.
["Enfeeble"] = 2, -- Elemental Weakness and Vulnerability override Enfeeble.
["Vulnerability"] = 3, -- Despair and Elemental Weakness override Vulnerability. Vulnerability was reworked in 3.1.0.
["Elemental Weakness"] = 4, -- Despair and Flammability override Elemental Weakness.
["Flammability"] = 5, -- Frostbite overrides Flammability.
["Frostbite"] = 6, -- Conductivity overrides Frostbite.
["Conductivity"] = 7,
["Despair"] = 8, -- Despair was created in 3.1.0.
["Punishment"] = 9, -- Punishment was reworked in 3.12.0.
["Warlord's Mark"] = 10,
["Assassin's Mark"] = 11,
["Sniper's Mark"] = 12,
["Poacher's Mark"] = 13,
["SocketPriorityBase"] = 100,
["Weapon 1"] = 1000,
["Amulet"] = 2000,
["Helmet"] = 3000,
["Weapon 2"] = 4000,
["Body Armour"] = 5000,
["Gloves"] = 6000,
["Boots"] = 7000,
["Ring 1"] = 8000,
["Ring 2"] = 9000,
["CurseFromEquipment"] = 10000,
["CurseFromAura"] = 20000,
}
-- TODO
data.ailmentTypeList = { "Ignite" }
data.elementalAilmentTypeList = { "Ignite" }
data.nonDamagingAilmentTypeList = {}
data.nonElementalAilmentTypeList = {}
data.nonDamagingAilment = {
["Chill"] = { associatedType = "Cold", alt = false, default = 10, min = 5, max = 30, precision = 0, duration = 2 },
["Freeze"] = { associatedType = "Cold", alt = false, default = nil, min = 0.3, max = 3, precision = 2, duration = nil },
["Shock"] = { associatedType = "Lightning", alt = false, default = 15, min = 5, max = 50, precision = 0, duration = 2 },
["Scorch"] = { associatedType = "Fire", alt = true, default = 10, min = 0, max = 30, precision = 0, duration = 4 },
["Brittle"] = { associatedType = "Cold", alt = true, default = 2, min = 0, max = 6, precision = 2, duration = 4 },
["Sap"] = { associatedType = "Lightning", alt = true, default = 6, min = 0, max = 20, precision = 0, duration = 4 },
}
-- Used in ModStoreClass:ScaleAddMod(...) to identify high precision modifiers
data.defaultHighPrecision = 1
data.highPrecisionMods = {
["CritChance"] = {
["BASE"] = 2,
},
["SelfCritChance"] = {
["BASE"] = 2,
},
["LifeRegenPercent"] = {
["BASE"] = 2,
},
["ManaRegenPercent"] = {
["BASE"] = 2,
},
["EnergyShieldRegenPercent"] = {
["BASE"] = 2,
},
["LifeRegen"] = {
["BASE"] = 1,
},
["ManaRegen"] = {
["BASE"] = 1,
},
["EnergyShieldRegen"] = {
["BASE"] = 1,
},
["LifeDegenPercent"] = {
["BASE"] = 2,
},
["ManaDegenPercent"] = {
["BASE"] = 2,
},
["EnergyShieldDegenPercent"] = {
["BASE"] = 2,
},
["LifeDegen"] = {
["BASE"] = 1,
},
["ManaDegen"] = {
["BASE"] = 1,
},
["EnergyShieldDegen"] = {
["BASE"] = 1,
},
["DamageLifeLeech"] = {
["BASE"] = 2,
},
["PhysicalDamageLifeLeech"] = {
["BASE"] = 2,
},
["ElementalDamageLifeLeech"] = {
["BASE"] = 2,
},
["FireDamageLifeLeech"] = {
["BASE"] = 2,
},
["ColdDamageLifeLeech"] = {
["BASE"] = 2,
},
["LightningDamageLifeLeech"] = {
["BASE"] = 2,
},
["ChaosDamageLifeLeech"] = {
["BASE"] = 2,
},
["DamageManaLeech"] = {
["BASE"] = 2,
},
["PhysicalDamageManaLeech"] = {
["BASE"] = 2,
},
["ElementalDamageManaLeech"] = {
["BASE"] = 2,
},
["FireDamageManaLeech"] = {
["BASE"] = 2,
},
["ColdDamageManaLeech"] = {
["BASE"] = 2,
},
["LightningDamageManaLeech"] = {
["BASE"] = 2,
},
["ChaosDamageManaLeech"] = {
["BASE"] = 2,
},
["DamageEnergyShieldLeech"] = {
["BASE"] = 2,
},
["PhysicalDamageEnergyShieldLeech"] = {
["BASE"] = 2,
},
["ElementalDamageEnergyShieldLeech"] = {
["BASE"] = 2,
},
["FireDamageEnergyShieldLeech"] = {
["BASE"] = 2,
},
["ColdDamageEnergyShieldLeech"] = {
["BASE"] = 2,
},
["LightningDamageEnergyShieldLeech"] = {
["BASE"] = 2,
},
["ChaosDamageEnergyShieldLeech"] = {
["BASE"] = 2,
},
["SupportManaMultiplier"] = {
["MORE"] = 4,
}
}
data.weaponTypeInfo = {
["None"] = { oneHand = true, melee = true, flag = "Unarmed" },
["Bow"] = { oneHand = false, melee = false, flag = "Bow" },
["Dagger"] = { oneHand = true, melee = true, flag = "Dagger" },
["Two-Handed Staff"] = { oneHand = false, melee = true, flag = "Staff" },
["Wand"] = { oneHand = true, melee = false, flag = "Wand" },
["One-Handed Axe"] = { oneHand = true, melee = true, flag = "Axe" },
["One-Handed Mace"] = { oneHand = true, melee = true, flag = "Mace" },
["One-Handed Sword"] = { oneHand = true, melee = true, flag = "Sword" },
["Sceptre"] = { oneHand = true, melee = true, flag = "Mace", label = "Sceptre" },
["Two-Handed Axe"] = { oneHand = false, melee = true, flag = "Axe" },
["Two-Handed Mace"] = { oneHand = false, melee = true, flag = "Mace" },
["Two-Handed Sword"] = { oneHand = false, melee = true, flag = "Sword" },
["Two-Handed Spear"] = { oneHand = false, melee = true, flag = "Spear" },
}
data.unarmedWeaponData = {
[0] = { type = "None", AttackRate = 1.2, CritChance = 0, PhysicalMin = 2, PhysicalMax = 6 }, -- Scion
[1] = { type = "None", AttackRate = 1.2, CritChance = 0, PhysicalMin = 2, PhysicalMax = 8 }, -- Marauder
[2] = { type = "None", AttackRate = 1.2, CritChance = 0, PhysicalMin = 2, PhysicalMax = 5 }, -- Ranger
[3] = { type = "None", AttackRate = 1.2, CritChance = 0, PhysicalMin = 2, PhysicalMax = 5 }, -- Witch
[4] = { type = "None", AttackRate = 1.2, CritChance = 0, PhysicalMin = 2, PhysicalMax = 6 }, -- Duelist
[5] = { type = "None", AttackRate = 1.2, CritChance = 0, PhysicalMin = 2, PhysicalMax = 6 }, -- Templar
[6] = { type = "None", AttackRate = 1.2, CritChance = 0, PhysicalMin = 2, PhysicalMax = 5 }, -- Shadow
}
data.setJewelRadiiGlobally = function(treeVersion)
local major, minor = treeVersion:match("(%d+)_(%d+)")
if tonumber(major) <= 3 and tonumber(minor) <= 15 then
data.jewelRadius = data.jewelRadii["3_15"]
else
data.jewelRadius = data.jewelRadii["3_16"]
end
local maxJewelRadius = 0
for _, radiusInfo in ipairs(data.jewelRadius) do
radiusInfo.outerSquared = radiusInfo.outer * radiusInfo.outer
radiusInfo.innerSquared = radiusInfo.inner * radiusInfo.inner
if radiusInfo.outer > maxJewelRadius then
maxJewelRadius = radiusInfo.outer
end
end
data.maxJewelRadius = maxJewelRadius
end
data.jewelRadii = {
["3_15"] = {
{ inner = 0, outer = 800, col = "^xBB6600", label = "Small" },
{ inner = 0, outer = 1200, col = "^x66FFCC", label = "Medium" },
{ inner = 0, outer = 1500, col = "^x2222CC", label = "Large" },
{ inner = 850, outer = 1100, col = "^xD35400", label = "Variable" },
{ inner = 1150, outer = 1400, col = "^x66FFCC", label = "Variable" },
{ inner = 1450, outer = 1700, col = "^x2222CC", label = "Variable" },
{ inner = 1750, outer = 2000, col = "^xC100FF", label = "Variable" },
{ inner = 1750, outer = 2000, col = "^xC100FF", label = "Variable" },
},
["3_16"] = {
{ inner = 0, outer = 960, col = "^xBB6600", label = "Small" },
{ inner = 0, outer = 1440, col = "^x66FFCC", label = "Medium" },
{ inner = 0, outer = 1800, col = "^x2222CC", label = "Large" },
{ inner = 960, outer = 1320, col = "^xD35400", label = "Variable" },
{ inner = 1320, outer = 1680, col = "^x66FFCC", label = "Variable" },
{ inner = 1680, outer = 2040, col = "^x2222CC", label = "Variable" },
{ inner = 2040, outer = 2400, col = "^xC100FF", label = "Variable" },
{ inner = 2400, outer = 2880, col = "^x0B9300", label = "Variable" },
}
}
data.jewelRadius = data.setJewelRadiiGlobally(latestTreeVersion)
data.enchantmentSource = {
{ name = "ENKINDLING", label = "Enkindling Orb" },
{ name = "INSTILLING", label = "Instilling Orb" },
{ name = "HEIST", label = "Heist" },
{ name = "HARVEST", label = "Harvest" },
{ name = "DEDICATION", label = "Dedication to the Goddess" },
{ name = "ENDGAME", label = "Eternal Labyrinth" },
{ name = "MERCILESS", label = "Merciless Labyrinth" },
{ name = "CRUEL", label = "Cruel Labyrinth" },
{ name = "NORMAL", label = "Normal Labyrinth" },
}
-- Misc data tables
LoadModule("Data/Misc", data)
-- Stat descriptions
data.describeStats = LoadModule("Modules/StatDescriber")
-- Load item modifiers
data.itemMods = {
Item = readJsonFile("Data/ModItem.json"),
}
data.costs = LoadModule("Data/Costs")
do
local map = { }
for i, value in ipairs(data.costs) do
map[value.Resource] = i
end
setmetatable(data.costs, { __index = function(t, k) return t[map[k]] end })
end
-- Manually seeded modifier tag against item slot table for Mastery Item Condition based modifiers
-- Data is informed by getTagBasedModifiers() located in Item.lua
data.itemTagSpecial = {
["life"] = {
["body armour"] = {
-- Keystone
"Blood Magic",
"Eternal Youth",
"Ghost Reaver",
"Mind Over Matter",
"The Agnostic",
"Vaal Pact",
"Zealot's Oath",
-- Special Cases
"^Cannot Leech$",
},
},
["evasion"] = {
["ring"] = {
-- Delve
"chance to Evade",
-- Unique
"Cannot Evade",
},
},
}
data.itemTagSpecialExclusionPattern = {
["life"] = {
["body armour"] = {
"increased Damage while Leeching Life",
"Life as Physical Damage",
"Life as Extra Maximum Energy Shield",
"maximum Life as Fire Damage",
"when on Full Life",
"Enemy's life",
"Life From You",
"^Socketed Gems are Supported by Level"
},
["boots"] = {
"Enemy's Life", -- Legacy of Fury
},
["belt"] = {
"Life as Extra Maximum Energy Shield", -- Soul Tether
},
["helmet"] = {
"Recouped as Life", -- Flame Exarch
"Life when you Suppress", -- Elevore
},
},
["evasion"] = {
["ring"] = {
},
},
}
-- Load bosses
do
data.bosses = { }
LoadModule("Data/Bosses", data.bosses)
local count, uberCount = 0, 0
local armourTotal, evasionTotal = 0, 0
local uberArmourTotal, uberEvasionTotal = 0, 0
for _, boss in pairs(data.bosses) do
if boss.isUber then
uberCount = uberCount + 1
uberArmourTotal = uberArmourTotal + boss.armourMult
uberEvasionTotal = uberEvasionTotal + boss.evasionMult
end
count = count + 1
armourTotal = armourTotal + boss.armourMult
evasionTotal = evasionTotal + boss.evasionMult
end
data.bossStats = {
PinnacleArmourMean = 100 + armourTotal / count,
PinnacleEvasionMean = 100 + evasionTotal / count,
UberArmourMean = 100 + uberArmourTotal / uberCount,
UberEvasionMean = 100 + uberEvasionTotal / uberCount
}
data.bossSkills, data.bossSkillsList = LoadModule("Data/BossSkills")
data.enemyIsBossTooltip = [[Bosses' damage is monster damage scaled to an average damage of their attacks
This is divided by 4.40 to represent 4 damage types + some (40% as much) ^xD02090chaos
^7Fill in the exact damage numbers if more precision is needed
Bosses' armour and evasion multiplier are calculated using the average of the boss type
Standard Boss adds the following modifiers:
+40% to enemy Elemental Resistances
+25% to enemy ^xD02090Chaos Resistance
^7]]..tostring(m_floor(data.misc.stdBossDPSMult * 100))..[[% of monster Damage of each type
]]..tostring(m_floor(data.misc.stdBossDPSMult * 4.4 * 100))..[[% of monster Damage total
Guardian / Pinnacle Boss adds the following modifiers:
+50% to enemy Elemental Resistances
+30% to enemy ^xD02090Chaos Resistance
^7]]..tostring(m_floor(data.bossStats.PinnacleArmourMean))..[[% of monster Armour
]]..tostring(m_floor(data.bossStats.PinnacleEvasionMean))..[[% of monster ^x33FF77Evasion
^7]]..tostring(m_floor(data.misc.pinnacleBossDPSMult * 100))..[[% of monster Damage of each type
]]..tostring(m_floor(data.misc.pinnacleBossDPSMult * 4.4 * 100))..[[% of monster Damage total
]]..tostring(data.misc.pinnacleBossPen)..[[% penetration
Uber Pinnacle Boss adds the following modifiers:
+50% to enemy Elemental Resistances
+30% to enemy ^xD02090Chaos Resistance
^7]]..tostring(m_floor(data.bossStats.UberArmourMean))..[[% of monster Armour
]]..tostring(m_floor(data.bossStats.UberEvasionMean))..[[% of monster ^x33FF77Evasion
^770% less to enemy Damage taken
]]..tostring(m_floor(data.misc.uberBossDPSMult * 100))..[[% of monster Damage of each type
]]..tostring(m_floor(data.misc.uberBossDPSMult * 4.25 * 100))..[[% of monster Damage total
]]..tostring(data.misc.uberBossPen)..[[% penetration]]
end
-- Load skills
data.skills = readJsonFile("Data/skills.json")
data.skillStatMap = LoadModule("Data/SkillStatMap", makeSkillMod, makeFlagMod, makeSkillDataMod)
data.skillStatMapMeta = {
__index = function(t, key)
local map = data.skillStatMap[key]
if map then
map = copyTable(map)
t[key] = map
for _, mod in ipairs(map) do
processMod(t._grantedEffect, mod)
end
return map
end
end
}
for skillId, grantedEffect in pairs(data.skills) do
grantedEffect.id = skillId
grantedEffect.modSource = "Skill:"..skillId
-- Add sources for skill mods, and check for global effects
for _, list in pairs({grantedEffect.baseMods, grantedEffect.qualityMods, grantedEffect.levelMods}) do
for _, mod in pairs(list) do
if mod.name then
processMod(grantedEffect, mod)
else
for _, mod in ipairs(mod) do
processMod(grantedEffect, mod)
end
end
end
end
-- Install stat map metatable
grantedEffect.statMap = grantedEffect.statMap or { }
setmetatable(grantedEffect.statMap, data.skillStatMapMeta)
grantedEffect.statMap._grantedEffect = grantedEffect
for _, map in pairs(grantedEffect.statMap) do
-- Some mods need different scalars for different stats, but the same value. Putting them in a group allows this
for _, modOrGroup in ipairs(map) do
if modOrGroup.name then
processMod(grantedEffect, modOrGroup)
else
for _, mod in ipairs(modOrGroup) do
processMod(grantedEffect, mod)
end
end
end
end
--- Compute skill types
grantedEffect.skillTypes = {}
for name, type in pairs(SkillType) do
if bit.band(grantedEffect.skillTypeTags, type) > 0 then
grantedEffect.skillTypes[type] = true
end
end
end
-- Load minions
data.minions = readJsonFile("Data/minions.json")
-- Item bases
data.itemBases = readJsonFile("Data/Bases/bases.json")
data.LETools_itemBases = readJsonFile("Data/LEToolsImport/bases.json")
data.LETools_affixes = readJsonFile("Data/LEToolsImport/affixes.json")
-- Build lists of item bases, separated by type
data.itemBaseLists = { }
for name, base in pairs(data.itemBases) do
if not base.hidden then
local type = base.type
if base.subType then
type = type .. ": " .. base.subType
end
data.itemBaseLists[type] = data.itemBaseLists[type] or { }
table.insert(data.itemBaseLists[type], { label = name:gsub(" %(.+%)",""), name = name, base = base })
end
end
data.itemBaseTypeList = { }
for type, list in pairs(data.itemBaseLists) do
table.insert(data.itemBaseTypeList, type)
table.sort(list, function(a, b)
if a.base.req and b.base.req then
if a.base.req.level == b.base.req.level then
return a.name < b.name
else
return (a.base.req.level or 1) > (b.base.req.level or 1)
end
elseif a.base.req and not b.base.req then
return true
elseif b.base.req and not a.base.req then
return false
else
return a.name < b.name
end
end)
end
table.sort(data.itemBaseTypeList)
-- Rare templates
data.rares = {}
-- Uniques (loaded after version-specific data because reasons)
data.uniques = readJsonFile("Data/Uniques/uniques.json")
data.uniqueMods = { }