@blizzhackers/d2data 2.7.13 → 2.7.15
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.
- package/compile.js +74 -7
- package/json/actprofile.json +760 -306
- package/json/coldmasterybreakpoints.json +8 -0
- package/package.json +1 -1
package/compile.js
CHANGED
|
@@ -639,17 +639,21 @@ let dmgtypes = [
|
|
|
639
639
|
'ResPo',
|
|
640
640
|
];
|
|
641
641
|
|
|
642
|
-
let
|
|
642
|
+
let progressionAreas = [ // Areas that we're forced to deal with while progressing through the main quest lines.
|
|
643
643
|
// Act 1
|
|
644
|
-
2,3,4,5,6,7,10,26,27,28,29,30,31,32,33,34,35,36,
|
|
644
|
+
2,3,4,5,6,7,10,26,27,28,29,30,31,32,33,34,35,36,
|
|
645
645
|
// Act 2
|
|
646
|
-
41,42,43,44,45,46,50,51,52,53,54,56,57,58,60,61,62,63,64,66,67,68,69,70,71,72,73,
|
|
646
|
+
41,42,43,44,45,46,50,51,52,53,54,56,57,58,60,61,62,63,64,66,67,68,69,70,71,72,73,
|
|
647
647
|
// Act 3
|
|
648
|
-
76,77,78,79,80,81,82,83,85,88,89,91,92,93,100,101,
|
|
648
|
+
76,77,78,79,80,81,82,83,85,88,89,91,92,93,100,101,
|
|
649
649
|
// Act 4
|
|
650
|
-
104,105,106,107,
|
|
650
|
+
104,105,106,107,
|
|
651
651
|
// Act 5
|
|
652
|
-
110,111,112,113,115,117,118,120,128,129,130,
|
|
652
|
+
110,111,112,113,115,117,118,120,128,129,130,
|
|
653
|
+
];
|
|
654
|
+
|
|
655
|
+
let bossAreas = [ // Areas that we're forced to deal with for boss farming.
|
|
656
|
+
37,74,102,108,131,132,
|
|
653
657
|
];
|
|
654
658
|
|
|
655
659
|
for (let diff of [0, 1, 2]) {
|
|
@@ -666,7 +670,7 @@ for (let diff of [0, 1, 2]) {
|
|
|
666
670
|
continue;
|
|
667
671
|
}
|
|
668
672
|
|
|
669
|
-
let category =
|
|
673
|
+
let category = bossAreas.indexOf(levelid) >= 0 ? 'boss' : (progressionAreas.indexOf(levelid) >= 0 ? 'progression' : 'optional');
|
|
670
674
|
|
|
671
675
|
for (let montype of montypes) {
|
|
672
676
|
for (let id in pop[montype]) {
|
|
@@ -754,6 +758,68 @@ for (let diff of [0, 1, 2]) {
|
|
|
754
758
|
}
|
|
755
759
|
})(actprofile);
|
|
756
760
|
|
|
761
|
+
let coldmasterybreakpoints = {}, coldhpbyres = {};
|
|
762
|
+
|
|
763
|
+
for (let act of Object.values(actprofile)) {
|
|
764
|
+
for (let resset of Object.values(act)) {
|
|
765
|
+
if (resset['ResCo(H)']) {
|
|
766
|
+
for (let res in resset['ResCo(H)']) {
|
|
767
|
+
res = Number(res);
|
|
768
|
+
coldhpbyres[res] = coldhpbyres[res] || 0;
|
|
769
|
+
coldhpbyres[res] += resset['ResCo(H)'][res];
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
(function () {
|
|
776
|
+
for (let mastery = 0; mastery <= 195; mastery === 0 ? mastery = 20 : mastery ++) {
|
|
777
|
+
let ehp = 0;
|
|
778
|
+
|
|
779
|
+
for (let res in coldhpbyres) {
|
|
780
|
+
res = Number(res);
|
|
781
|
+
let pierce = (res >= 100 ? (mastery / 5) : mastery);
|
|
782
|
+
let mod = Math.min(2, 1 - (Math.min(95, res) - pierce) / 100);
|
|
783
|
+
ehp += coldhpbyres[res] / mod;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
coldmasterybreakpoints[mastery] = ehp;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
let masterylist = Object.keys(coldmasterybreakpoints);
|
|
790
|
+
|
|
791
|
+
for (let i = masterylist.length - 1; i; i--) {
|
|
792
|
+
coldmasterybreakpoints[masterylist[i]] = (coldmasterybreakpoints[masterylist[i - 1]] / coldmasterybreakpoints[masterylist[i]] - 1);
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
coldmasterybreakpoints[0] = 0;
|
|
796
|
+
|
|
797
|
+
for (let c = 0; c < 2; c++) {
|
|
798
|
+
for (let i = masterylist.length - 1; i; i--) {
|
|
799
|
+
coldmasterybreakpoints[masterylist[i]] = coldmasterybreakpoints[masterylist[i]] - coldmasterybreakpoints[masterylist[i - 1]];
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
for (let i = masterylist.length - 1; i; i--) {
|
|
804
|
+
coldmasterybreakpoints[masterylist[i]] = coldmasterybreakpoints[masterylist[i]] * 10000;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
let newMasteryList = {}, mmin = Infinity;
|
|
808
|
+
|
|
809
|
+
for (let i = masterylist.length; i; i--) {
|
|
810
|
+
if (coldmasterybreakpoints[masterylist[i]] <= -0.5) {
|
|
811
|
+
mmin = Math.min(mmin, -coldmasterybreakpoints[masterylist[i]]);
|
|
812
|
+
newMasteryList[masterylist[i - 1]] = -coldmasterybreakpoints[masterylist[i]];
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
for (let key in newMasteryList) {
|
|
817
|
+
newMasteryList[key] = Math.round(newMasteryList[key] / mmin);
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
coldmasterybreakpoints = newMasteryList;
|
|
821
|
+
})();
|
|
822
|
+
|
|
757
823
|
let tcprecalc = {};
|
|
758
824
|
|
|
759
825
|
full.treasureclassex.forEach((tc, key) => {
|
|
@@ -907,3 +973,4 @@ fs.writeFileSync(outDir + 'treasureclassgroupsex.json', JSON.stringify(groupsEx,
|
|
|
907
973
|
fs.writeFileSync(outDir + 'monpopulationest.json', JSON.stringify(monpopulation, null, ' '));
|
|
908
974
|
fs.writeFileSync(outDir + 'tcprecalc.json', JSON.stringify(tcprecalc, null, ' '));
|
|
909
975
|
fs.writeFileSync(outDir + 'actprofile.json', JSON.stringify(actprofile, null, ' '));
|
|
976
|
+
fs.writeFileSync(outDir + 'coldmasterybreakpoints.json', JSON.stringify(coldmasterybreakpoints, null, ' '));
|