From 57d6410fa727a4ac0a8d7e93f7913231d85af2b1 Mon Sep 17 00:00:00 2001 From: horrible little slime <69secret69email69@gmail.com> Date: Tue, 17 Dec 2024 20:57:22 -0500 Subject: [PATCH] deleting more useless stuff; switch to orb manager (for caching? I guess?) --- src/lib.ts | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/src/lib.ts b/src/lib.ts index 24a499d..82bbf7a 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -2,12 +2,10 @@ import { Args, ParseError } from "grimoire-kolmafia"; import { descToItem, - haveEquipped, inebrietyLimit, isDarkMode, Item, Location, - Monster, myAdventures, myFamiliar, myInebriety, @@ -17,13 +15,10 @@ import { } from "kolmafia"; import { $familiar, - $item, $location, - Counter, CrystalBall, get, - have, SourceTerminal, } from "libram"; import ISLANDS, { HolidayIsland } from './islands'; @@ -93,7 +88,7 @@ export function getIsland(): HolidayIsland { const islands = args.island.map((island) => ISLANDS[island]); if (islands.length === 1) return islands[0] - const ponderResult = CrystalBall.ponder(); + const ponderResult = OrbManager.ponder(); const goodPrediction = islands.find(({ location, orbTarget }) => ponderResult.get(location) === orbTarget); if (goodPrediction) return goodPrediction; @@ -104,21 +99,6 @@ export function getIsland(): HolidayIsland { return islands[0] } -let orbTarget: Monster | null = null; -export function validateAndSetOrbTarget(target: string, zone: string, affiliation: string) { - if (target === "none") return; - if (!have($item`miniature crystal ball`)) return; - if (!(zone in affiliatedZoneMonsters)) throw new Error("Invalid zone specified"); - const affiliatedMonsters = affiliatedZoneMonsters[zone as keyof typeof affiliatedZoneMonsters]; - if (!(affiliation in affiliatedMonsters)) throw new Error("Invalid affiliation specified"); - const monsters = affiliatedMonsters[affiliation as keyof typeof affiliatedMonsters]; - if (!(target in monsters)) throw new Error("Invalid target specified"); - orbTarget = monsters[target as keyof typeof monsters]; -} -export function getOrbTarget(): Monster | null { - return orbTarget; -} - function getCMCChoices(): { [choice: string]: number } { const options = visitUrl("campground.php?action=workshed"); let i = 0; @@ -220,8 +200,4 @@ export function digitizedMonstersRemaining(): number { untangleDigitizes(turnsAtLastDigitize, digitizesLeft + 1) - SourceTerminal.getDigitizeMonsterCount() ); -} - -export function shrineGazeIfNecessary(): void { - if (getOrbTarget() && !haveEquipped(CrystalBall.orb)) OrbManager.shrineGaze(); -} +};