Skip to content

Commit

Permalink
2.6.8 update
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewgdewar committed Jan 10, 2025
1 parent 6a2ef0f commit ee1e7ae
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
Binary file removed dist/DewardianDev-MOAR-2.6.7.zip
Binary file not shown.
Binary file added dist/DewardianDev-MOAR-2.6.8.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "MOAR",
"version": "2.6.7",
"version": "2.6.8",
"main": "src/mod.js",
"license": "MIT",
"author": "DewardianDev",
Expand Down
24 changes: 18 additions & 6 deletions src/Spawning/buildBossWaves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,17 +254,29 @@ export function buildBossWaves(
);
// console.log(locationList[index].base.BossLocationSpawn.length);

const bossesToSkip = new Set(["sectantPriest", "pmcBot"]);
// Apply the percentages on all bosses, cull those that won't spawn, make all bosses 100 chance that remain.
locationList[index].base.BossLocationSpawn = locationList[
index
].base.BossLocationSpawn.filter(({ BossChance, BossName }, bossIndex) => {
if (BossChance < 100 && BossChance / 100 < Math.random()) {
return false;
].base.BossLocationSpawn.filter(
({ BossChance, BossName, TriggerId }, bossIndex) => {
if (
!TriggerId &&
!bossesToSkip.has(BossName) &&
BossChance < 100 &&
BossChance / 100 < Math.random()
) {
return false;
}
return true;
}
return true;
}).map((boss) => ({ ...boss, ...{ BossChance: 100 } }));
).map((boss) =>
bossesToSkip.has(boss.BossName) || !!boss.TriggerId
? boss
: { ...boss, ...{ BossChance: 100 } }
);

// if (mapName === "customs")
// if (mapName === "rezervbase")
// console.log(mapName, locationList[index].base.BossLocationSpawn);
});

Expand Down

0 comments on commit ee1e7ae

Please sign in to comment.