From 958cace4afbebbfc56b37619091b5a2ff4bbd712 Mon Sep 17 00:00:00 2001 From: FannyPackFan <97768000+FannyPackFan@users.noreply.github.com> Date: Fri, 14 Jan 2022 23:51:31 -0700 Subject: [PATCH] Added support for normal and corrupted gauntlet in kill simulator --- src/lib/workers/kill.worker.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/lib/workers/kill.worker.ts b/src/lib/workers/kill.worker.ts index 50f539c538..46812f4fe2 100644 --- a/src/lib/workers/kill.worker.ts +++ b/src/lib/workers/kill.worker.ts @@ -1,6 +1,7 @@ import { Bank, Misc, Monsters } from 'oldschooljs'; import { addBanks } from 'oldschooljs/dist/util/bank'; +import { gauntlet } from '../simulation/gauntlet'; import { KillWorkerArgs } from '.'; export function cleanString(str: string) { @@ -39,6 +40,28 @@ export default ({ quantity, bossName, limit, catacombs, onTask }: KillWorkerArgs } return new Bank(bank); } + + if (['gauntlet', 'the gauntlet'].some(alias => stringMatches(alias, bossName))) { + let bank = new Bank(); + if (quantity > 2_000) { + return 'I can only do a maximum of 2k gauntlet kills at a time!'; + } + for (let i = 0; i < quantity; i++) { + bank.add(gauntlet({ died: false, type: 'normal' })); + } + return bank; + } + + if (['corrupted gauntlet', 'cgaunt', 'cg'].some(alias => stringMatches(alias, bossName))) { + let bank = new Bank(); + if (quantity > 2_000) { + return 'I can only do a maximum of 2k corrupted gauntlet kills at a time!'; + } + for (let i = 0; i < quantity; i++) { + bank.add(gauntlet({ died: false, type: 'corrupted' })); + } + return bank; + } return "I don't have that monster!"; };