@blizzhackers/d2data 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/.eslintrc.js +59 -0
  2. package/LICENSE +21 -0
  3. package/README.md +12 -0
  4. package/_config.yml +1 -0
  5. package/compile.js +789 -0
  6. package/docs/Avqest.ttf +0 -0
  7. package/docs/_config.yml +1 -0
  8. package/docs/armor.js +134 -0
  9. package/docs/css/d2font.css +10 -0
  10. package/docs/drops/.vscode/extensions.json +3 -0
  11. package/docs/drops/README.md +7 -0
  12. package/docs/drops/dist/assets/index.12ae3c90.js +6675 -0
  13. package/docs/drops/dist/index.html +24 -0
  14. package/docs/drops/index.html +23 -0
  15. package/docs/drops/package-lock.json +1143 -0
  16. package/docs/drops/package.json +17 -0
  17. package/docs/drops/src/App.vue +870 -0
  18. package/docs/drops/src/main.js +4 -0
  19. package/docs/drops/vite.config.js +8 -0
  20. package/docs/drops.html +10 -0
  21. package/docs/effort.css +118 -0
  22. package/docs/effort.js +367 -0
  23. package/docs/elem-effort.html +130 -0
  24. package/docs/images/0-0.svg +18 -0
  25. package/docs/images/0-1.svg +17 -0
  26. package/docs/images/0-2.svg +17 -0
  27. package/docs/images/1-0.svg +18 -0
  28. package/docs/images/1-1.svg +18 -0
  29. package/docs/images/1-2.svg +17 -0
  30. package/docs/images/2-0.svg +17 -0
  31. package/docs/images/2-1.svg +11 -0
  32. package/docs/images/2-2.svg +18 -0
  33. package/docs/images/3-0.svg +17 -0
  34. package/docs/images/3-1.svg +18 -0
  35. package/docs/images/3-2.svg +18 -0
  36. package/docs/images/4-0.svg +18 -0
  37. package/docs/images/4-1.svg +18 -0
  38. package/docs/images/4-2.svg +18 -0
  39. package/docs/images/5-0.svg +18 -0
  40. package/docs/images/5-1.svg +18 -0
  41. package/docs/images/5-2.svg +14 -0
  42. package/docs/images/6-0.svg +17 -0
  43. package/docs/images/6-1.svg +17 -0
  44. package/docs/images/6-2.svg +17 -0
  45. package/docs/images/AmSkillicon.png +0 -0
  46. package/docs/images/AsSkillicon.png +0 -0
  47. package/docs/images/BaSkillicon.png +0 -0
  48. package/docs/images/DrSkillicon.png +0 -0
  49. package/docs/images/NeSkillicon.png +0 -0
  50. package/docs/images/PaSkillicon.png +0 -0
  51. package/docs/images/Skillicon.png +0 -0
  52. package/docs/images/SoSkillicon.png +0 -0
  53. package/docs/index.md +5 -0
  54. package/docs/items.html +170 -0
  55. package/docs/leveling/.vscode/extensions.json +3 -0
  56. package/docs/leveling/README.md +7 -0
  57. package/docs/leveling/dist/assets/index.f9765357.js +1 -0
  58. package/docs/leveling/dist/index.html +24 -0
  59. package/docs/leveling/index.html +23 -0
  60. package/docs/leveling/package-lock.json +1143 -0
  61. package/docs/leveling/package.json +17 -0
  62. package/docs/leveling/src/App.vue +526 -0
  63. package/docs/leveling/src/main.js +4 -0
  64. package/docs/leveling/vite.config.js +8 -0
  65. package/docs/runewords/.vscode/extensions.json +3 -0
  66. package/docs/runewords/README.md +7 -0
  67. package/docs/runewords/dist/assets/index.0838f27c.js +6673 -0
  68. package/docs/runewords/dist/assets/index.73bf3e23.css +1 -0
  69. package/docs/runewords/dist/index.html +25 -0
  70. package/docs/runewords/index.html +23 -0
  71. package/docs/runewords/package-lock.json +1143 -0
  72. package/docs/runewords/package.json +17 -0
  73. package/docs/runewords/src/App.vue +781 -0
  74. package/docs/runewords/src/main.js +4 -0
  75. package/docs/runewords/src/modorder.json +234 -0
  76. package/docs/runewords/vite.config.js +8 -0
  77. package/docs/skills.css +1250 -0
  78. package/docs/skills.html +63 -0
  79. package/docs/skills.js +2192 -0
  80. package/docs/vue-setup.js +12 -0
  81. package/docs/weapons.js +149 -0
  82. package/font-example.html +34 -0
  83. package/json/.gitkeep +0 -0
  84. package/json/actinfo.json +116 -0
  85. package/json/armor.json +17232 -0
  86. package/json/armtype.json +17 -0
  87. package/json/atomic.json +1026 -0
  88. package/json/automagic.json +696 -0
  89. package/json/automap.json +40732 -0
  90. package/json/belts.json +743 -0
  91. package/json/bodylocs.json +52 -0
  92. package/json/books.json +34 -0
  93. package/json/charstats.json +525 -0
  94. package/json/colors.json +107 -0
  95. package/json/compcode.json +577 -0
  96. package/json/composit.json +82 -0
  97. package/json/cubemain.json +2112 -0
  98. package/json/cubemod.json +57 -0
  99. package/json/difficultylevels.json +110 -0
  100. package/json/elemtypes.json +62 -0
  101. package/json/events.json +72 -0
  102. package/json/experience.json +1214 -0
  103. package/json/gamble.json +520 -0
  104. package/json/gems.json +1868 -0
  105. package/json/hireling.json +7640 -0
  106. package/json/hitclass.json +67 -0
  107. package/json/inventory.json +2148 -0
  108. package/json/itemratio.json +134 -0
  109. package/json/items.json +54705 -0
  110. package/json/itemstatcost.json +5503 -0
  111. package/json/itemtypes.json +2567 -0
  112. package/json/levels.json +15515 -0
  113. package/json/localestrings-chi.json +8717 -0
  114. package/json/localestrings-deu.json +8717 -0
  115. package/json/localestrings-eng.json +8722 -0
  116. package/json/localestrings-esp.json +8717 -0
  117. package/json/localestrings-fra.json +8718 -0
  118. package/json/localestrings-ita.json +8717 -0
  119. package/json/localestrings-kor.json +8715 -0
  120. package/json/localestrings-pol.json +8716 -0
  121. package/json/lowqualityitems.json +6 -0
  122. package/json/lvlmaze.json +910 -0
  123. package/json/lvlprest.json +28595 -0
  124. package/json/lvlsub.json +824 -0
  125. package/json/lvltypes.json +1377 -0
  126. package/json/lvlwarp.json +1515 -0
  127. package/json/magicprefix.json +12349 -0
  128. package/json/magicsuffix.json +13833 -0
  129. package/json/misc.json +11602 -0
  130. package/json/misscalc.json +217 -0
  131. package/json/missiles.json +23871 -0
  132. package/json/monai.json +1111 -0
  133. package/json/moncountest.json +642 -0
  134. package/json/monequip.json +361 -0
  135. package/json/monlvl.json +3665 -0
  136. package/json/monmode.json +98 -0
  137. package/json/monplace.json +39 -0
  138. package/json/monpopulationest.json +17383 -0
  139. package/json/monpreset.json +922 -0
  140. package/json/monprop.json +144 -0
  141. package/json/monseq.json +5211 -0
  142. package/json/monsounds.json +2530 -0
  143. package/json/monstats.json +66101 -0
  144. package/json/monstats2.json +34882 -0
  145. package/json/montype.json +274 -0
  146. package/json/monumod.json +504 -0
  147. package/json/npc.json +232 -0
  148. package/json/objects.json +87041 -0
  149. package/json/objgroup.json +3733 -0
  150. package/json/objmode.json +42 -0
  151. package/json/objpreset.json +2906 -0
  152. package/json/objtype.json +2457 -0
  153. package/json/overlay.json +8008 -0
  154. package/json/pettype.json +226 -0
  155. package/json/playerclass.json +39 -0
  156. package/json/plrmode.json +122 -0
  157. package/json/plrtype.json +39 -0
  158. package/json/properties.json +2823 -0
  159. package/json/qualityitems.json +149 -0
  160. package/json/rareprefix.json +296 -0
  161. package/json/raresuffix.json +921 -0
  162. package/json/runes.json +3280 -0
  163. package/json/setitems.json +3871 -0
  164. package/json/sets.json +1001 -0
  165. package/json/shrines.json +319 -0
  166. package/json/skillcalc.json +457 -0
  167. package/json/skilldesc.json +7532 -0
  168. package/json/skills.json +16717 -0
  169. package/json/soundenviron.json +2862 -0
  170. package/json/sounds.json +446543 -0
  171. package/json/states.json +1578 -0
  172. package/json/storepage.json +22 -0
  173. package/json/superuniques.json +1405 -0
  174. package/json/tcprecalc.json +29302 -0
  175. package/json/treasureclassex.json +14932 -0
  176. package/json/treasureclassgroupsex.json +711 -0
  177. package/json/uniqueappellation.json +27 -0
  178. package/json/uniqueitems.json +14171 -0
  179. package/json/uniqueprefix.json +55 -0
  180. package/json/uniquesuffix.json +71 -0
  181. package/json/wanderingmon.json +3 -0
  182. package/json/weapons.json +25875 -0
  183. package/objext.js +53 -0
  184. package/package.json +16 -0
  185. package/string.js +42 -0
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Vue && Vue.directive('tooltip', {
4
+ bind: function (el, binding) {
5
+ if (binding.value) {
6
+ $(el).tooltip({
7
+ title: binding.value,
8
+ placement: 'bottom',
9
+ });
10
+ }
11
+ },
12
+ });
@@ -0,0 +1,149 @@
1
+ 'use strict'; /* global Vue */
2
+
3
+ (function () {
4
+ let data = fetch('https://raw.githubusercontent.com/blizzhackers/d2data/master/json/weapons.json');
5
+
6
+ function first (...values) {
7
+ return values.filter(v => v !== undefined).shift();
8
+ }
9
+
10
+ new Vue({
11
+ el: '#weaponapp',
12
+ data: {
13
+ visible: false,
14
+ pageTitle: 'Diablo 2 Weapon Browser',
15
+ items: [],
16
+ sortColumn: undefined,
17
+ contains: '',
18
+ levelreqlower: 0,
19
+ levelrequpper: 99,
20
+ tier: 0,
21
+ sockets: 0,
22
+ maxlevelreq: 99,
23
+ requireonehand: false,
24
+ requiretwohand: false,
25
+ requiremissile: false,
26
+ itemtype: 'All',
27
+ itemtypes: {
28
+ All: 'All',
29
+ },
30
+ defaults: {
31
+ value: '??',
32
+ headstyle: 'width:1px;user-select:none;cursor:pointer;text-align:center;',
33
+ style: 'text-align: center;',
34
+ },
35
+ columns: [
36
+ { label: '', value: '', headstyle: 'width:auto;user-select:none;cursor:pointer;' },
37
+ { label: 'Item Name (code)', key: 'name', render: item => item.name + ' (' + item.code + ')', headstyle: 'width:1px;user-select:none;cursor:pointer;text-align:center;white-space:nowrap;', style: 'text-align:center;white-space:nowrap;', tooltip: 'The item name (and internal item code).' },
38
+ { label: 'Type', key: 'type', render: item => item.type || '??', sortDefault: '??', tooltip: 'The category this item belongs to.' },
39
+ { label: 'Speed', key: 'speed', render: item => item.speed || 0, sortDefault: 0, tooltip: 'Higher values mean slower weapons.' },
40
+ { label: 'Req Level', key: 'levelreq', render: item => item.levelreq || 0, sortDefault: 0, tooltip: 'The minimum level required to equip this item.' },
41
+ { label: 'Tier', key: 'tier', render: item => item.tierName, sortDefault: 0, defaultSortOrder: -1, tooltip: 'Each item has Normal, Exceptional, and Elite variants. Elite is the best.' },
42
+ { label: 'Sock', key: 'gemsockets', render: item => item.gemsockets || 0, sortDefault: 0, tooltip: 'The maximum number of sockets an item can possibly have.' },
43
+ { label: 'Req Str', key: 'reqstr', render: item => item.reqstr || 0, sortDefault: 0, tooltip: 'The minimum amount of strength required to equip this item (before modifiers).' },
44
+ { label: 'Req Dex', key: 'reqdex', render: item => item.reqdex || 0, sortDefault: 0, tooltip: 'The minimum amount of dexterity required to equip this item (before modifiers).' },
45
+ { label: 'Str Use', key: 'StrBonus', render: item => (item.StrBonus || 0) + '%', sortDefault: 0, tooltip: 'The amount that strength contributes to damage. A 75% modifier means every 100 strength is +75% damage bonus.' },
46
+ { label: 'Dex Use', key: 'DexBonus', render: item => (item.DexBonus || 0) + '%', sortDefault: 0, tooltip: 'The amount that dexterity contributes to damage. A 75% modifier means every 100 dexterity is +75% damage bonus.' },
47
+ { label: '1h Damage', key: 'dps', render: item => item.dps || '??', sortDefault: 0, defaultSortOrder: -1, tooltip: 'Damage is averaged and adjusted for speed. This is not a proper dps.' },
48
+ { label: '2h Damage', key: '2handdps', render: item => item['2handdps'] || '??', sortDefault: 0, defaultSortOrder: -1, tooltip: 'Damage is averaged and adjusted for speed. This is not a proper dps.' },
49
+ { label: 'Rng Damage', key: 'misdps', render: item => item.misdps || '??', sortDefault: 0, defaultSortOrder: -1, tooltip: 'Damage is averaged and adjusted for speed. This is not a proper dps.' },
50
+ { label: '', value: '', headstyle: 'width:auto;user-select:none;cursor:pointer;' },
51
+ ]
52
+ },
53
+ methods: {
54
+ sort: function (column) {
55
+ if (this.sortColumn === column) {
56
+ column.sortOrder = -column.sortOrder;
57
+ } else {
58
+ if (this.sortColumn) {
59
+ delete this.sortColumn.headclass;
60
+ }
61
+
62
+ this.sortColumn = column;
63
+ column.sortOrder = column.sortOrder || column.defaultSortOrder || 1;
64
+ }
65
+
66
+ column.headclass = column.sortOrder > 0 ? 'text-primary' : 'text-danger';
67
+
68
+ this.item = this.items.sort((a, b) => {
69
+ let av = first(column.value, a[column.key], column.sortDefault);
70
+ let bv = first(column.value, b[column.key], column.sortDefault);
71
+ let ret = av < bv ? -column.sortOrder : av > bv ? column.sortOrder : 0;
72
+
73
+ return ret;
74
+ });
75
+ },
76
+ resetValues: function () {
77
+ this.contains = '';
78
+ this.levelreqlower = 0;
79
+ this.levelrequpper = this.maxlevelreq;
80
+ this.sockets = 0;
81
+ this.tier = 0;
82
+ this.itemtype = 'All';
83
+ this.requireonehand = false;
84
+ this.requiretwohand = false;
85
+ this.requiremissile = false;
86
+ },
87
+ canShow: function (item) {
88
+ if (item.name.toLowerCase().indexOf(this.contains.toLowerCase()) < 0) {
89
+ return false;
90
+ }
91
+
92
+ if (+this.levelreqlower && +item.levelreq < +this.levelreqlower) {
93
+ return false;
94
+ }
95
+
96
+ if (+this.levelrequpper && +item.levelreq > +this.levelrequpper) {
97
+ return false;
98
+ }
99
+
100
+ if (+this.tier && +item.tier !== +this.tier) {
101
+ return false;
102
+ }
103
+
104
+ if (this.itemtype !== 'All' && this.itemtype !== item.type) {
105
+ return false;
106
+ }
107
+
108
+ if (this.sockets && (item.gemsockets || 0) < this.sockets) {
109
+ return false;
110
+ }
111
+
112
+ if (this.requireonehand && !item.dps) {
113
+ return false;
114
+ }
115
+
116
+ if (this.requiretwohand && !item['2handdps']) {
117
+ return false;
118
+ }
119
+
120
+ if (this.requiremissile && !item.misdps) {
121
+ return false;
122
+ }
123
+
124
+ return true;
125
+ },
126
+ first,
127
+ },
128
+ created: async function () {
129
+ data = await data;
130
+ data = await data.json();
131
+ this.items = Object.values(data).map(v => {
132
+ v.speed = v.speed || 0;
133
+ v.avgdam = (v.mindam + v.maxdam) / 2 || 0;
134
+ v.dps = v.avgdam * (100 - v.speed) / 100 || 0;
135
+ v['2handavgdam'] = (v['2handmindam'] + v['2handmaxdam']) / 2 || 0;
136
+ v['2handdps'] = v['2handavgdam'] * (100 - v.speed) / 100 || 0;
137
+ v.avgmisdam = (v.minmisdam + v.maxmisdam) / 2 || 0;
138
+ v.misdps = v.avgmisdam * (100 - v.speed) / 100 || 0;
139
+ v.levelreq = v.levelreq || 0;
140
+ v.tier = v.code === v.ultracode ? 3 : v.code === v.ubercode ? 2 : 1;
141
+ v.tierName = ['None', 'Norm', 'Excep', 'Elite'][v.tier];
142
+ this.itemtypes[v.type || 'none'] = v.type || 'none';
143
+
144
+ return v;
145
+ }).filter(i => i.spawnable);
146
+ this.visible = true;
147
+ },
148
+ });
149
+ })();
@@ -0,0 +1,34 @@
1
+ <html>
2
+ <head>
3
+ <title>Diablo 2 font example</title>
4
+ <link rel="stylesheet" href="https://blizzhackers.github.io/d2data/css/d2font.css">
5
+ <style>
6
+ html, body {
7
+ font-size: 17px;
8
+ background-color: #111111;
9
+ color: #909090;
10
+ filter: blur(0.4px);
11
+ }
12
+
13
+ .orange {
14
+ color: #e99210;
15
+ }
16
+
17
+ .text-center {
18
+ text-align: center;
19
+ }
20
+
21
+ .capital {
22
+ font-size: 1.4em;
23
+ }
24
+ </style>
25
+ </head>
26
+ <body class="text-center avquest">
27
+ <div class="orange">Vex Rune</div>
28
+ <div>Can be Inserted into Socketed Items</div><br>
29
+ <div>Weapons: 7% Mana stolen per hit</div>
30
+ <div>Armor: +5% to Maximum Fire Resist</div>
31
+ <div>Helms: +5% to Maxiumum Fire Resist</div>
32
+ <div>Shields: +5% to Maximum Fire Resist</div>
33
+ </body>
34
+ </html>
package/json/.gitkeep ADDED
File without changes
@@ -0,0 +1,116 @@
1
+ {
2
+ "1": {
3
+ "act": 1,
4
+ "town": "Act 1 - Town",
5
+ "start": "Act 1 - Town",
6
+ "maxnpcitemlevel": 12,
7
+ "classlevelrangestart": "Act 1 - Wilderness 1",
8
+ "classlevelrangeend": "Act 1 - Catacombs 4",
9
+ "wanderingnpcstart": 0,
10
+ "wanderingnpcrange": 1,
11
+ "commonactcof": "cmncof_a1",
12
+ "waypoint1": "Act 1 - Town",
13
+ "waypoint2": "Act 1 - Wilderness 2",
14
+ "waypoint3": "Act 1 - Wilderness 3",
15
+ "waypoint4": "Act 1 - Wilderness 4",
16
+ "waypoint5": "Act 1 - Wilderness 5",
17
+ "waypoint6": "Act 1 - Courtyard 1",
18
+ "waypoint7": "Act 1 - Jail 1",
19
+ "waypoint8": "Act 1 - Courtyard 2",
20
+ "waypoint9": "Act 1 - Catacombs 2",
21
+ "wanderingMonsterPopulateChance": 3,
22
+ "wanderingMonsterRegionTotal": 3,
23
+ "wanderingPopulateRandomChance": 32768,
24
+ "lineNumber": 0
25
+ },
26
+ "2": {
27
+ "act": 2,
28
+ "town": "Act 2 - Town",
29
+ "start": "Act 2 - Town",
30
+ "maxnpcitemlevel": 20,
31
+ "classlevelrangestart": "Act 2 - Desert 1",
32
+ "classlevelrangeend": "Act 2 - Duriel's Lair",
33
+ "wanderingnpcstart": 0,
34
+ "wanderingnpcrange": 0,
35
+ "commonactcof": "cmncof_a2",
36
+ "waypoint1": "Act 2 - Town",
37
+ "waypoint2": "Act 2 - Sewer 1 B",
38
+ "waypoint3": "Act 2 - Desert 2",
39
+ "waypoint4": "Act 2 - Tomb 2 B",
40
+ "waypoint5": "Act 2 - Desert 3",
41
+ "waypoint6": "Act 2 - Desert 4",
42
+ "waypoint7": "Act 2 - Basement 1",
43
+ "waypoint8": "Act 2 - Arcane",
44
+ "waypoint9": "Act 2 - Valley of the Kings",
45
+ "wanderingMonsterPopulateChance": 3,
46
+ "wanderingMonsterRegionTotal": 3,
47
+ "wanderingPopulateRandomChance": 32768,
48
+ "lineNumber": 1
49
+ },
50
+ "3": {
51
+ "act": 3,
52
+ "town": "Act 3 - Town",
53
+ "start": "Act 3 - Town",
54
+ "maxnpcitemlevel": 28,
55
+ "classlevelrangestart": "Act 3 - Jungle 1",
56
+ "classlevelrangeend": "Act 3 - Mephisto 3",
57
+ "wanderingnpcstart": 0,
58
+ "wanderingnpcrange": 0,
59
+ "commonactcof": "cmncof_a3",
60
+ "waypoint1": "Act 3 - Town",
61
+ "waypoint2": "Act 3 - Jungle 1",
62
+ "waypoint3": "Act 3 - Jungle 2",
63
+ "waypoint4": "Act 3 - Jungle 3",
64
+ "waypoint5": "Act 3 - Kurast 1",
65
+ "waypoint6": "Act 3 - Kurast 2",
66
+ "waypoint7": "Act 3 - Kurast 3",
67
+ "waypoint8": "Act 3 - Travincal",
68
+ "waypoint9": "Act 3 - Mephisto 2",
69
+ "wanderingMonsterPopulateChance": 3,
70
+ "wanderingMonsterRegionTotal": 3,
71
+ "wanderingPopulateRandomChance": 32768,
72
+ "lineNumber": 2
73
+ },
74
+ "4": {
75
+ "act": 4,
76
+ "town": "Act 4 - Town",
77
+ "start": "Act 4 - Town",
78
+ "maxnpcitemlevel": 36,
79
+ "classlevelrangestart": "Act 4 - Mesa 1",
80
+ "classlevelrangeend": "Act 4 - Diablo 1",
81
+ "wanderingnpcstart": 0,
82
+ "wanderingnpcrange": 0,
83
+ "commonactcof": "cmncof_a4",
84
+ "waypoint1": "Act 4 - Town",
85
+ "waypoint2": "Act 4 - Mesa 3",
86
+ "waypoint3": "Act 4 - Lava 1",
87
+ "wanderingMonsterPopulateChance": 3,
88
+ "wanderingMonsterRegionTotal": 3,
89
+ "wanderingPopulateRandomChance": 32768,
90
+ "lineNumber": 3
91
+ },
92
+ "5": {
93
+ "act": 5,
94
+ "town": "Act 5 - Town",
95
+ "start": "Act 5 - Town",
96
+ "maxnpcitemlevel": 45,
97
+ "classlevelrangestart": "Act 5 - Town",
98
+ "classlevelrangeend": "Act 5 - Pandemonium Finale",
99
+ "wanderingnpcstart": 0,
100
+ "wanderingnpcrange": 0,
101
+ "commonactcof": "cmncof_a6",
102
+ "waypoint1": "Act 5 - Town",
103
+ "waypoint2": "Act 5 - Barricade 1",
104
+ "waypoint3": "Act 5 - Barricade 2",
105
+ "waypoint4": "Act 5 - Ice Cave 1",
106
+ "waypoint5": "Act 5 - Ice Cave 2",
107
+ "waypoint6": "Act 5 - Temple 2",
108
+ "waypoint7": "Act 5 - Barricade Snow",
109
+ "waypoint8": "Act 5 - Ice Cave 3",
110
+ "waypoint9": "Act 5 - Baal Temple 2",
111
+ "wanderingMonsterPopulateChance": 3,
112
+ "wanderingMonsterRegionTotal": 3,
113
+ "wanderingPopulateRandomChance": 32768,
114
+ "lineNumber": 4
115
+ }
116
+ }