@blizzhackers/d2data 2.7.3 → 2.7.5

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 CHANGED
@@ -429,7 +429,7 @@ function monlevel(mon, level, diff) {
429
429
  lvl = level[s("MonLvlEx")] || 0,
430
430
  mlvl = mon[s("Level")] || 0;
431
431
 
432
- return lvl > mlvl ? lvl : mlvl;
432
+ return (diff && !mon.boss) ? lvl : mlvl;
433
433
  }
434
434
 
435
435
  function forEachMonster(level, diff, func) {
@@ -478,20 +478,38 @@ let monpopulation = {};
478
478
  bosses = full.monstats.filter((mon) => mon.areaId == level.Id),
479
479
  acount = (moncountest[level.Id] && moncountest[level.Id][diff]) || 0,
480
480
  scount = supers.reduce((total, sup) => {
481
+ let mon = full.monstats[sup.Class];
482
+
481
483
  return (
482
484
  total +
483
485
  1 +
484
486
  diff +
485
- ((sup["MinGrp"] || 0) + (sup["MaxGrp"] || 0)) / 2
487
+ avg(
488
+ (sup["MinGrp"] || 0),
489
+ (sup["MaxGrp"] || 0)
490
+ ) +
491
+ avg(
492
+ (mon["PartyMin"] || 0),
493
+ (mon["PartyMax"] || 0)
494
+ )
486
495
  );
487
496
  }, 0),
488
497
  bcount = bosses.reduce((total, mon) => {
489
498
  return (
490
- total + 1 + +((mon["MinGrp"] || 0) + (mon["MaxGrp"] || 0)) / 2
499
+ total +
500
+ 1 +
501
+ avg(
502
+ (mon["MinGrp"] || 0),
503
+ (mon["MaxGrp"] || 0)
504
+ ) +
505
+ avg(
506
+ (mon["PartyMin"] || 0),
507
+ (mon["PartyMax"] || 0)
508
+ )
491
509
  );
492
510
  }, 0),
493
- ucount = avg(l(s("MonUMin")), l(s("MonUMax"))) * 0.8 * 5.5,
494
- ccount = avg(l(s("MonUMin")), l(s("MonUMax"))) * 0.2 * 3,
511
+ ucount = avg(l(s("MonUMin")), l(s("MonUMax"))) * 0.2 * (2.5 + diff),
512
+ ccount = avg(l(s("MonUMin")), l(s("MonUMax"))) * 0.8 * 3,
495
513
  count = acount - ucount - ccount - scount - bcount;
496
514
 
497
515
  if (count > 0) {
@@ -544,9 +562,12 @@ let monpopulation = {};
544
562
  "packCount(N)": 0,
545
563
  "mlvl(H)": 0,
546
564
  "packCount(H)": 0,
565
+ "hasStaticLevel": false,
547
566
  };
567
+
548
568
  monpopulation[level.Id]['superunique'][sup.Superunique][s('mlvl')] = mlvl;
549
569
  monpopulation[level.Id]['superunique'][sup.Superunique][s('packCount')] = sup.hcIdx === 19 ? 1 / 7 : 1;
570
+ monpopulation[level.Id]['superunique'][sup.Superunique].hasStaticLevel = Boolean(mon.boss);
550
571
  });
551
572
 
552
573
  bosses.forEach((mon) => {
@@ -559,9 +580,11 @@ let monpopulation = {};
559
580
  "packCount(N)": 0,
560
581
  "mlvl(H)": 0,
561
582
  "packCount(H)": 0,
583
+ "hasStaticLevel": false,
562
584
  };
563
585
  monpopulation[level.Id]['boss'][mon.Id][s('mlvl')] = mlvl;
564
586
  monpopulation[level.Id]['boss'][mon.Id][s('packCount')] = 1;
587
+ monpopulation[level.Id]['boss'][mon.Id].hasStaticLevel = Boolean(mon.boss);
565
588
  });
566
589
  }
567
590
  });