From 90b536c40f6890670c85c99e7aa92ea0df21c3b0 Mon Sep 17 00:00:00 2001 From: Sainan Date: Wed, 22 Jan 2025 09:02:20 +0100 Subject: [PATCH] fix: exclude riven buffs from being a curse --- src/controllers/api/rerollRandomModController.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/api/rerollRandomModController.ts b/src/controllers/api/rerollRandomModController.ts index 42fdf337..ba72dc43 100644 --- a/src/controllers/api/rerollRandomModController.ts +++ b/src/controllers/api/rerollRandomModController.ts @@ -67,7 +67,9 @@ const randomiseStats = (randomModType: string, fingerprint: IUnveiledRivenFinger fingerprint.curses = []; if (Math.random() < 0.5) { - const entry = getRandomElement(meta.upgradeEntries!.filter(x => x.canBeCurse)); + const entry = getRandomElement( + meta.upgradeEntries!.filter(x => x.canBeCurse && !fingerprint.buffs.find(y => y.Tag == x.tag)) + ); fingerprint.curses.push({ Tag: entry.tag, Value: Math.trunc(Math.random() * 0x40000000) }); } };