diff --git a/packages/garbo/src/familiar/freeFightFamiliar.ts b/packages/garbo/src/familiar/freeFightFamiliar.ts index cbc82f964..d10f79384 100644 --- a/packages/garbo/src/familiar/freeFightFamiliar.ts +++ b/packages/garbo/src/familiar/freeFightFamiliar.ts @@ -9,20 +9,18 @@ import { $familiar, $item, $location, - $phylum, clamp, findLeprechaunMultiplier, get, getModifier, have, - Snapper, } from "libram"; import { canOpenRedPresent } from "."; import { garboValue } from "../garboValue"; import getConstantValueFamiliars from "./constantValueFamiliars"; import getDropFamiliars from "./dropFamiliars"; import getExperienceFamiliars from "./experienceFamiliars"; -import { GeneralFamiliar, timeToMeatify } from "./lib"; +import { GeneralFamiliar, snapperValue, timeToMeatify } from "./lib"; import { meatFamiliar } from "./meatFamiliar"; import { gooseDroneEligible, valueDrops } from "../lib"; import { globalOptions } from "../config"; @@ -102,25 +100,9 @@ export function menu( ? !["Macrometeorite", "Powerful Glove"].includes(fight) : true ) { - const item = Snapper.phylumItem.get(globalOptions.target.phylum); - // Special handling for penguin envelopes - const itemValue = - globalOptions.target.phylum === $phylum`Penguin` - ? 25_000 - : item - ? garboValue(item) - : 0; - familiarMenu.push({ familiar: $familiar`Red-Nosed Snapper`, - expectedValue: - copyTargetCount() > - 11 - - (Snapper.getTrackedPhylum() === globalOptions.target.phylum - ? Snapper.getProgress() - : 0) - ? itemValue - : 0, + expectedValue: snapperValue(), leprechaunMultiplier: 0, limit: "special", }); diff --git a/packages/garbo/src/familiar/lib.ts b/packages/garbo/src/familiar/lib.ts index 7d33bfa44..4b9f4c94a 100644 --- a/packages/garbo/src/familiar/lib.ts +++ b/packages/garbo/src/familiar/lib.ts @@ -14,11 +14,13 @@ import { clamp, get, have, + Snapper, sumNumbers, } from "libram"; import { globalOptions } from "../config"; import { baseMeat, ESTIMATED_OVERDRUNK_TURNS, turnsToNC } from "../lib"; import { digitizedMonstersRemaining, estimatedGarboTurns } from "../turns"; +import { garboValue } from "../garboValue"; export type GeneralFamiliar = { familiar: Familiar; @@ -131,3 +133,13 @@ export function estimatedBarfExperience(): number { return sumNumbers(sources); } + +const ESTIMATED_ENVELOPE_VALUE = 25_000; + +export function snapperValue(): number { + const item = Snapper.phylumItem.get(globalOptions.target.phylum); + if (!item) return 0; + + if (item === $item`envelope full of Meat`) return ESTIMATED_ENVELOPE_VALUE; + return garboValue(item); +}