Skip to content

Commit

Permalink
handle crab meat better
Browse files Browse the repository at this point in the history
  • Loading branch information
spaghetti-squash committed Feb 14, 2025
1 parent 6d9c76e commit 158a9b2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/garbo/src/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export const MEAT_TARGET_MULTIPLIER = (): number =>

export const propertyManager = new PropertiesManager();

const songboomMeat = () =>
export const songboomMeat = () =>
SongBoom.have() &&
(SongBoom.songChangesLeft() > 0 ||
(SongBoom.song() === "Total Eclipse of Your Meat" &&
Expand Down
24 changes: 17 additions & 7 deletions packages/garbo/src/outfit/target.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
$item,
$items,
$location,
$monster,
Environment,
Guzzlr,
have,
Expand All @@ -20,13 +21,18 @@ import {
validateGarbageFoldable,
waterBreathingEquipment,
} from "./lib";
import { BonusEquipMode, modeValueOfMeat, targetingMeat } from "../lib";
import {
BonusEquipMode,
modeValueOfMeat,
songboomMeat,
targetingMeat,
} from "../lib";
import { globalOptions } from "../config";
import { meatDrop } from "kolmafia";

export function meatTargetOutfit(
spec: OutfitSpec = {},
target = $location.none,
baseMeat?: number,
): Outfit {
cleaverCheck();
validateGarbageFoldable(spec);
Expand All @@ -35,11 +41,15 @@ export function meatTargetOutfit(
new Error(`Failed to construct outfit from spec ${JSON.stringify(spec)}`),
);

if (targetingMeat() || baseMeat) {
const meatDropModifier = baseMeat
? baseMeat / 100
: modeValueOfMeat(BonusEquipMode.MEAT_TARGET);
outfit.modifier.push(`${meatDropModifier} Meat Drop`, "-tie");
if (target === $location`Crab Island`) {
const meat = meatDrop($monster`giant crab`) + songboomMeat();
outfit.modifier.push(`${meat / 100} Meat Drop`, "-tie");
}
if (targetingMeat()) {

This comment has been minimized.

Copy link
@Shiverwarp

Shiverwarp Feb 14, 2025

Contributor

Doesn't this leave us with the same problem if we're targeting meat? Should be an else maybe?

outfit.modifier.push(
`${modeValueOfMeat(BonusEquipMode.MEAT_TARGET)} Meat Drop`,
"-tie",
);
} else if (globalOptions.target.attributes.includes("FREE")) {
outfit.modifier.push("-tie");
}
Expand Down
3 changes: 1 addition & 2 deletions packages/garbo/src/tasks/cockroach/finish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ export const CockroachFinish: Quest<GarboTask> = {
equip: $items`PirateRealm eyepatch`,
avoid: $items`Roman Candelabra`,
},
undefined,
2000,
$location`Crab Island`,
);
return spec;
},
Expand Down

0 comments on commit 158a9b2

Please sign in to comment.