Skip to content

Commit c0b26b0

Browse files
committed
support snapper as a familiar
1 parent f43e011 commit c0b26b0

File tree

3 files changed

+43
-2
lines changed

3 files changed

+43
-2
lines changed

src/familiar/freeFightFamiliar.ts

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
import { Familiar, familiarWeight, inebrietyLimit, Location, myInebriety } from "kolmafia";
2-
import { $familiar, $item, $location, clamp, findLeprechaunMultiplier, get, have } from "libram";
2+
import {
3+
$familiar,
4+
$item,
5+
$location,
6+
$phylum,
7+
$skill,
8+
clamp,
9+
findLeprechaunMultiplier,
10+
get,
11+
have,
12+
Snapper,
13+
} from "libram";
314
import { canOpenRedPresent } from ".";
415
import { garboValue } from "../value";
516
import getConstantValueFamiliars from "./constantValueFamiliars";
@@ -69,6 +80,25 @@ export function menu(options: MenuOptions = {}): GeneralFamiliar[] {
6980
limit: "special",
7081
});
7182
}
83+
if (
84+
location === $location`Barf Mountain` &&
85+
Snapper.have() &&
86+
Snapper.getTrackedPhylum() === $phylum`dude`
87+
) {
88+
// when running snapper, there are 4 dudes in the z
89+
const dudeRate =
90+
4 /
91+
(4 + // 4 dudes
92+
1 + // 1 garbage tourist
93+
(have($skill`Transcendent Olfaction`) ? 3 : 0) +
94+
(have($skill`Gallapagosian Mating Call`) ? 1 : 0));
95+
familiarMenu.push({
96+
familiar: $familiar`Red-Nosed Snapper`,
97+
expectedValue: (dudeRate * garboValue($item`human musk`)) / 11,
98+
leprechaunMultiplier: 0,
99+
limit: "none",
100+
});
101+
}
72102
}
73103

74104
const meatFam = meatFamiliar();

src/fights.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ import {
106106
Requirement,
107107
Robortender,
108108
set,
109+
Snapper,
109110
SourceTerminal,
110111
sum,
111112
tryFindFreeRun,
@@ -994,7 +995,9 @@ const freeFightSources = [
994995
new FreeFight(
995996
() => (wantPills() ? 5 - get("_saberForceUses") : 0),
996997
() => {
997-
if (have($familiar`Red-Nosed Snapper`)) cliExecute(`snapper ${$phylum`dude`}`);
998+
if (Snapper.have() && Snapper.getTrackedPhylum() !== $phylum`dude`) {
999+
Snapper.trackPhylum($phylum`dude`);
1000+
}
9981001
setChoice(1387, 3);
9991002
if (
10001003
have($skill`Comprehensive Cartography`) &&

src/tasks/dailyFamiliars.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ import {
1818
$familiars,
1919
$item,
2020
$items,
21+
$phylum,
2122
CrimboShrub,
2223
get,
2324
have,
2425
Robortender,
2526
set,
27+
Snapper,
2628
sum,
2729
withProperty,
2830
} from "libram";
@@ -227,6 +229,12 @@ const DailyFamiliarTasks: GarboTask[] = [
227229
!!get("garbo_felizValue", 0) || today - get("garbo_felizValueDate", 0) < 24 * 60 * 60 * 1000,
228230
do: () => felizValue,
229231
},
232+
{
233+
name: "Snapper Hunts Dudes",
234+
ready: () => Snapper.have(),
235+
completed: () => Snapper.getTrackedPhylum() === $phylum`dude`,
236+
do: () => Snapper.trackPhylum($phylum`dude`),
237+
},
230238
];
231239

232240
export const DailyFamiliarsQuest: Quest<GarboTask> = {

0 commit comments

Comments
 (0)