Skip to content

Commit

Permalink
Do our priority free runs
Browse files Browse the repository at this point in the history
  • Loading branch information
Shiverwarp committed Jun 9, 2024
1 parent 15dc8ce commit 95d349b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions packages/garbo/src/fights.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1995,7 +1995,7 @@ function embezzlersInProgress(): boolean {
);
}

export function freeRunFights(): void {
export function freeRunFights(priorityOnly: boolean): void {
if (myInebriety() > inebrietyLimit()) return;
if (embezzlersInProgress()) return;

Expand All @@ -2004,10 +2004,6 @@ export function freeRunFights(): void {
1324: 5, // Fight a random partier
});

const onlyPriorityRuns =
globalOptions.prefs.yachtzeechain &&
!get("_garboYachtzeeChainCompleted", false);

const stashRun = stashAmount($item`navel ring of navel gazing`)
? $items`navel ring of navel gazing`
: stashAmount($item`Greatest American Pants`)
Expand All @@ -2019,7 +2015,7 @@ export function freeRunFights(): void {
for (const priorityRunFight of priorityFreeRunFightSources) {
priorityRunFight.runAll();
}
if (onlyPriorityRuns) return;
if (priorityOnly) return;
for (const freeRunFightSource of freeRunFightSources) {
freeRunFightSource.runAll();
}
Expand All @@ -2035,6 +2031,9 @@ export function freeFights(): void {
1324: 5, // Fight a random partier
});

// Run our priorty free runs first
freeRunFights(true);

killRobortCreaturesForFree();

// Use free fights on melanges if we have Tote/Squint and prices are reasonable.
Expand Down Expand Up @@ -2083,7 +2082,7 @@ export function freeFights(): void {
// TODO: freeFightMood()
runGarboQuests([PostQuest(), FreeFightQuest]);

freeRunFights();
freeRunFights(false);

tryFillLatte();
postFreeFightDailySetup();
Expand Down
2 changes: 1 addition & 1 deletion packages/garbo/src/yachtzee/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export function oldyachtzeeChain(): void {
runDiet();
prepRobortender(); // Recompute robo drinks' worth after diet is finally consumed
}
freeRunFights();
freeRunFights(false);
postFreeFightDailySetup();
}

Expand Down

0 comments on commit 95d349b

Please sign in to comment.