forked from phenom/healer-man
Release Healer Man 0.1.40
This commit is contained in:
1 parent
ed0d2fea3d
commit
197a64117c
215 files changed
+5131
-181
No files matched your search
@@ -30,14 +30,14 @@ describe("SQL-generated boss loot catalog", () => {
|
||||
});
|
||||
|
||||
it("rolls recognizable boss items while setting item level from the player", () => {
|
||||
const first = rollBossLoot("lady-anacondra", 37, { random: () => 0, now: 12_345 });
|
||||
const last = rollBossLoot("lady-anacondra", 37, { random: () => 0.999, now: 12_346 });
|
||||
const first = rollBossLoot("lady-anacondra", 80, { random: () => 0, now: 12_345 });
|
||||
const last = rollBossLoot("lady-anacondra", 80, { random: () => 0.999, now: 12_346 });
|
||||
|
||||
expect(first).toHaveLength(1);
|
||||
expect(first[0]).toMatchObject({
|
||||
itemId: 5404,
|
||||
name: "Serpent's Shoulders",
|
||||
itemLevel: 37,
|
||||
itemLevel: 85,
|
||||
sourceItemLevel: 23,
|
||||
sourceBossKey: "lady-anacondra",
|
||||
acquiredAt: 12_345,
|
||||
@@ -45,7 +45,7 @@ describe("SQL-generated boss loot catalog", () => {
|
||||
expect(last[0]).toMatchObject({
|
||||
itemId: 10412,
|
||||
name: "Belt of the Fang",
|
||||
itemLevel: 37,
|
||||
itemLevel: 85,
|
||||
sourceItemLevel: 21,
|
||||
});
|
||||
expect(first[0].stats.agility).toBeGreaterThan(0);
|
||||
@@ -62,16 +62,16 @@ describe("SQL-generated boss loot catalog", () => {
|
||||
});
|
||||
|
||||
it("adds at most one bonus weighted item without changing normal rolls", () => {
|
||||
const normal = rollBossLoot("lady-anacondra", 20, {
|
||||
const normal = rollBossLoot("lady-anacondra", 80, {
|
||||
random: () => 0,
|
||||
now: 20_000,
|
||||
});
|
||||
const guaranteedBonus = rollBossLoot("lady-anacondra", 20, {
|
||||
const guaranteedBonus = rollBossLoot("lady-anacondra", 80, {
|
||||
random: () => 0,
|
||||
now: 20_001,
|
||||
bonusItemChance: 1,
|
||||
});
|
||||
const failedBonus = rollBossLoot("lady-anacondra", 20, {
|
||||
const failedBonus = rollBossLoot("lady-anacondra", 80, {
|
||||
random: () => 0.999,
|
||||
now: 20_002,
|
||||
bonusItemChance: 0.5,
|
||||
@@ -83,4 +83,8 @@ describe("SQL-generated boss loot catalog", () => {
|
||||
expect(new Set(guaranteedBonus.map((item) => item.instanceId)).size).toBe(2);
|
||||
expect(guaranteedBonus.every((item) => item.sourceBossKey === "lady-anacondra")).toBe(true);
|
||||
});
|
||||
|
||||
it.each([1, 37, 79])("suppresses equipment and bonus equipment at level %i", (level) => {
|
||||
expect(rollBossLoot("lady-anacondra", level, { random: () => 0, bonusItemChance: 1 })).toEqual([]);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user