Skip to content

Embezzler lucky #2367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Jun 15, 2025
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1405d59
Support for lucky adventures for embezzlers
Shiverwarp May 2, 2025
355bbcb
Run the fights
Shiverwarp May 2, 2025
f5c78e4
Change where we fight embezzlers if not targetingMeat
Shiverwarp May 2, 2025
d67480c
Run fights after buffing
Shiverwarp May 2, 2025
373d239
Check for lucky in meatTargetOutfit
Shiverwarp May 3, 2025
53a0202
Move check earlier in ready:
Shiverwarp May 3, 2025
a491fd7
Pretty up meatTargetOutfit call
Shiverwarp May 3, 2025
8896926
Add turns, consolidate nonbarf lucky
Shiverwarp May 3, 2025
9f5f80b
copyTargetCount() related changes
Shiverwarp May 4, 2025
dc726b9
top level variable classic
Shiverwarp May 4, 2025
1866836
Using a function to fix undefined error
Shiverwarp May 4, 2025
997c579
Implement highMeatMonsterTargets()
Shiverwarp May 5, 2025
4723b91
Put AlternateTask in engine
Shiverwarp May 5, 2025
6487d41
type fixes for embezzlers
spaghetti-squash May 5, 2025
94e13fb
pull out garboStrategy into combatStrategy.ts
Shiverwarp May 5, 2025
8e156d7
Check for exclusion first
Shiverwarp May 6, 2025
40b2500
Avoid scepter sometimes
Shiverwarp May 8, 2025
bbb4f25
Merge branch 'main' into embezzler-lucky
Ignose May 16, 2025
38a1b83
Merge branch 'main' into embezzler-lucky
spaghetti-squash Jun 4, 2025
ead758c
only call highMeatMonsterCount once for robort
Shiverwarp Jun 4, 2025
d4cc632
Merge branch 'embezzler-lucky' of https://github.com/loathers/garbage…
Shiverwarp Jun 4, 2025
69ff33c
Merge branch 'main' of https://github.com/loathers/garbage-collector …
Shiverwarp Jun 10, 2025
1d6eef9
new GarboStrategy import
Shiverwarp Jun 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/garbo/src/fights.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ import { garboValue } from "./garboValue";
import { wanderer } from "./garboWanderer";
import { runTargetFight } from "./target/execution";
import { TargetFightRunOptions } from "./target/staging";
import { FreeFightQuest, runGarboQuests } from "./tasks";
import { EmbezzlerFightsQuest, FreeFightQuest, runGarboQuests } from "./tasks";
import {
expectedFreeFightQuestFights,
possibleFreeFightQuestTentacleFights,
Expand Down Expand Up @@ -412,6 +412,7 @@ export function dailyFights(): void {
// check if user wants to wish for the copy target before doing setup
if (!getNextCopyTargetFight()) return;
meatTargetSetup();
if (targetingMeat()) runGarboQuests([EmbezzlerFightsQuest]);

// PROFESSOR COPIES
if (have($familiar`Pocket Professor`)) {
Expand Down
3 changes: 3 additions & 0 deletions packages/garbo/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ import {
propertyManager,
questStep,
safeRestore,
targetingMeat,
userConfirmDialog,
valueDrops,
} from "./lib";
Expand All @@ -88,6 +89,7 @@ import {
BarfTurnQuests,
CockroachSetup,
DailyFamiliarsQuest,
EmbezzlerFightsQuest,
PostQuest,
runGarboQuests,
runSafeGarboQuests,
Expand Down Expand Up @@ -610,6 +612,7 @@ export function main(argString = ""): void {
maximize("MP", false);
meatMood().execute(estimatedGarboTurns());
runGarboQuests([BuffExtensionQuest, PostBuffExtensionQuest]);
if (!targetingMeat()) runGarboQuests([EmbezzlerFightsQuest]);
try {
runGarboQuests([PostQuest(), ...BarfTurnQuests]);

Expand Down
12 changes: 12 additions & 0 deletions packages/garbo/src/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ import {
ClosedCircuitPayphone,
CombatLoversLocket,
Counter,
Delayed,
ensureFreeRun,
FindActionSourceConstraints,
get,
Expand All @@ -107,6 +108,9 @@ import { acquire } from "./acquire";
import { globalOptions } from "./config";
import { garboAverageValue, garboValue } from "./garboValue";
import { Outfit, OutfitSpec } from "grimoire-kolmafia";
import { GarboTask } from "./tasks/engine";

export type AlternateTask = GarboTask & { turns: Delayed<number> };

export const eventLog: {
initialCopyTargetsFought: number;
Expand Down Expand Up @@ -1084,6 +1088,14 @@ const luckyAdventures: LuckyAdventure[] = [
get("valueOfAdventure")
: 0,
},
{
location: $location`Cobb's Knob Treasury`,
phase: "target",
value: () =>
canAdventure($location`Cobb's Knob Treasury`)
? 3 * get("valueOfAdventure") // Rough estimation, they have 4x the basemeat of barf
: 0,
},
];

function determineBestLuckyAdventure(): LuckyAdventure {
Expand Down
6 changes: 6 additions & 0 deletions packages/garbo/src/outfit/target.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ export function meatTargetOutfit(
if (target === $location`Crab Island`) {
const meat = meatDrop($monster`giant giant crab`) + songboomMeat();
outfit.modifier.push(`${meat / 100} Meat Drop`, "-tie");
} else if (
target === $location`Cobb's Knob Treasury` &&
have($effect`Lucky!`)
) {
const meat = meatDrop($monster`Knob Goblin Embezzler`) + songboomMeat();
outfit.modifier.push(`${meat / 100} Meat Drop`, "-tie");
} else if (targetingMeat()) {
outfit.modifier.push(
`${modeValueOfMeat(BonusEquipMode.MEAT_TARGET)} Meat Drop`,
Expand Down
90 changes: 4 additions & 86 deletions packages/garbo/src/target/fights.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
abort,
canAdventure,
cliExecute,
getClanLounge,
haveEquipped,
isBanished,
Expand All @@ -17,7 +16,6 @@ import {
runCombat,
use,
userConfirm,
useSkill,
visitUrl,
} from "kolmafia";
import { DraggableFight } from "garbo-lib";
Expand All @@ -31,7 +29,6 @@ import {
$locations,
$monster,
$skill,
AprilingBandHelmet,
ChateauMantegna,
ChestMimic,
clamp,
Expand Down Expand Up @@ -59,7 +56,6 @@ import {
} from "../combat";
import {
averageTargetNet,
getBestLuckyAdventure,
getUsingFreeBunnyBanish,
HIGHLIGHT,
ltbRun,
Expand All @@ -72,7 +68,6 @@ import {
equipOrbIfDesired,
gregReady,
possibleGregCrystalBall,
shouldAugustCast,
totalGregCharges,
} from "../resources";
import { acquire } from "../acquire";
Expand All @@ -83,6 +78,7 @@ import {
TargetFightConfigOptions as CopyTargetFightConfigOptions,
RunOptions,
} from "./lib";
import { embezzlerFights } from "../tasks/embezzler";

export class CopyTargetFight implements CopyTargetFightConfigOptions {
name: string;
Expand Down Expand Up @@ -233,85 +229,6 @@ export const chainStarters = [
);
},
),
new CopyTargetFight(
"Scepter Semirare",
() =>
canAdventure($location`Cobb's Knob Treasury`) &&
shouldAugustCast($skill`Aug. 2nd: Find an Eleven-Leaf Clover Day`) &&
globalOptions.target === $monster`Knob Goblin Embezzler`,
() => 0, // prevent circular reference
(options: RunOptions) => {
retrieveItem($item`august scepter`);
useSkill($skill`Aug. 2nd: Find an Eleven-Leaf Clover Day`);
if (!have($effect`Lucky!`)) {
set("_aug2Cast", true);
return;
}
const adventureFunction = options.useAuto
? garboAdventureAuto
: garboAdventure;
adventureFunction(
$location`Cobb's Knob Treasury`,
options.macro,
options.macro,
);
},
),
new CopyTargetFight(
"Saxophone semirare",
() =>
getBestLuckyAdventure().phase === "target" &&
getBestLuckyAdventure().value() > 0 &&
canAdventure($location`Cobb's Knob Treasury`) &&
AprilingBandHelmet.canPlay($item`Apriling band saxophone`) &&
globalOptions.target === $monster`Knob Goblin Embezzler`,
() => 0,
(options: RunOptions) => {
AprilingBandHelmet.play($item`Apriling band saxophone`);
if (!have($effect`Lucky!`)) return;
const adventureFunction = options.useAuto
? garboAdventureAuto
: garboAdventure;
adventureFunction(
$location`Cobb's Knob Treasury`,
options.macro,
options.macro,
);
},
),
new CopyTargetFight(
"Pillkeeper Semirare",
() =>
have($item`Eight Days a Week Pill Keeper`) &&
canAdventure($location`Cobb's Knob Treasury`) &&
!get("_freePillKeeperUsed") &&
!have($effect`Lucky!`) &&
globalOptions.target === $monster`Knob Goblin Embezzler`,
() =>
have($item`Eight Days a Week Pill Keeper`) &&
canAdventure($location`Cobb's Knob Treasury`) &&
!get("_freePillKeeperUsed") &&
!have($effect`Lucky!`) &&
globalOptions.target === $monster`Knob Goblin Embezzler`
? 1
: 0,
(options: RunOptions) => {
retrieveItem($item`Eight Days a Week Pill Keeper`);
cliExecute("pillkeeper semirare");
if (!have($effect`Lucky!`)) {
set("_freePillKeeperUsed", true);
return;
}
const adventureFunction = options.useAuto
? garboAdventureAuto
: garboAdventure;
adventureFunction(
$location`Cobb's Knob Treasury`,
options.macro,
options.macro,
);
},
),
new CopyTargetFight(
"Mimic Eggs",
() => ChestMimic.differentiableQuantity(globalOptions.target) >= 1,
Expand Down Expand Up @@ -1098,8 +1015,9 @@ export const copyTargetSources = [
];

export function copyTargetCount(): number {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this worth having two separate functions (or a boolean arg) for? is everywhere we call copyTargetCount a place where we want to include embezzlers? even if you're fighting, say, roaches?

return sum(copyTargetSources, (source: CopyTargetFight) =>
source.potential(),
return (
sum(copyTargetSources, (source: CopyTargetFight) => source.potential()) +
embezzlerFights()
);
}

Expand Down
Loading