From 4c33941932a5eac177c03c2ae65ad356e40eeb01 Mon Sep 17 00:00:00 2001 From: nwjgit Date: Mon, 3 Jun 2024 11:15:48 -0500 Subject: [PATCH 1/2] fix --- src/meta/types.ts | 1 + src/simulation/monsters/bosses/Bryophyta.ts | 2 +- src/simulation/monsters/low/g-m/MossGiant.ts | 4 ++-- src/structures/LootTable.ts | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/meta/types.ts b/src/meta/types.ts index cd70ecbe4..1593f6fad 100644 --- a/src/meta/types.ts +++ b/src/meta/types.ts @@ -361,6 +361,7 @@ export interface BankItem { export interface LootTableMoreOptions { multiply?: boolean; + freeze?: boolean; } export interface LootTableItem { diff --git a/src/simulation/monsters/bosses/Bryophyta.ts b/src/simulation/monsters/bosses/Bryophyta.ts index 6a2e56084..9f64cbb3b 100644 --- a/src/simulation/monsters/bosses/Bryophyta.ts +++ b/src/simulation/monsters/bosses/Bryophyta.ts @@ -54,7 +54,7 @@ const BryophytaTable = new LootTable() .add("Bryophyta's essence", 1, 1) /* Tertiary */ - .tertiary(16, "Mossy key") + .tertiary(16, "Mossy key", 1, { freeze: true }) .tertiary(400, "Long bone") .tertiary(5000, "Giant champion scroll") .tertiary(5013, "Curved bone"); diff --git a/src/simulation/monsters/low/g-m/MossGiant.ts b/src/simulation/monsters/low/g-m/MossGiant.ts index 497dd9046..9a57ce860 100644 --- a/src/simulation/monsters/low/g-m/MossGiant.ts +++ b/src/simulation/monsters/low/g-m/MossGiant.ts @@ -47,10 +47,10 @@ const MossGiantTable = new LootTable() /* Gem drop table */ .add(GemTable, 1, 4) - /* Tertiary, Averaged mossy key */ + /* Tertiary */ .tertiary(24, "Ensouled giant head") .tertiary(45, "Clue scroll (beginner)") - .tertiary(55, "Mossy key") + .tertiary(150, "Mossy key") .tertiary(400, "Long bone") .tertiary(5000, "Giant champion scroll") .tertiary(5013, "Curved bone"); diff --git a/src/structures/LootTable.ts b/src/structures/LootTable.ts index 26c2ea0e5..423956255 100644 --- a/src/structures/LootTable.ts +++ b/src/structures/LootTable.ts @@ -184,6 +184,7 @@ export default class LootTable { const effectiveTertiaryItems = options?.tertiaryItemPercentageChanges ? this.tertiaryItems.map((i) => { if (typeof i.item !== "number") return i; + if(i.options?.freeze === true) return i; const change = options.tertiaryItemPercentageChanges?.get(Items.get(i.item)!.name); if (!change) return i; return { From 941bd52d62aa8c4679fa563c92e86a42a2e83efc Mon Sep 17 00:00:00 2001 From: nwjgit Date: Mon, 3 Jun 2024 11:51:58 -0500 Subject: [PATCH 2/2] fix --- src/structures/LootTable.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/LootTable.ts b/src/structures/LootTable.ts index 423956255..93c54bcb1 100644 --- a/src/structures/LootTable.ts +++ b/src/structures/LootTable.ts @@ -184,7 +184,7 @@ export default class LootTable { const effectiveTertiaryItems = options?.tertiaryItemPercentageChanges ? this.tertiaryItems.map((i) => { if (typeof i.item !== "number") return i; - if(i.options?.freeze === true) return i; + if (i.options?.freeze === true) return i; const change = options.tertiaryItemPercentageChanges?.get(Items.get(i.item)!.name); if (!change) return i; return {