Skip to content

Commit

Permalink
When Bill asks for a thing you do it
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignose committed Sep 27, 2024
1 parent 1593f78 commit 2e9fa2a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
22 changes: 2 additions & 20 deletions packages/garbo/src/familiar/freeFightFamiliar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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",
});
Expand Down
12 changes: 12 additions & 0 deletions packages/garbo/src/familiar/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}

0 comments on commit 2e9fa2a

Please sign in to comment.