Skip to content
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

feat: pickpocket except against multidrop monsters #8

Merged
merged 3 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 src/macro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ export default class Macro extends StrictMacro {
}

standardCombat(): this {
return this.tryHaveSkill($skill`Curse of Weaksauce`)
return this.if_("!monstername Crimbuccaneer mudlark && !monstername Elf Guard engineer", "pickpocket")
.tryHaveSkill($skill`Curse of Weaksauce`)
.familiarActions()
.externalIf(
SongBoom.song() === "Total Eclipse of Your Meat",
Expand Down
55 changes: 54 additions & 1 deletion src/outfit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ import {
Item,
itemAmount,
Location,
myClass,
toSlot,
totalTurnsPlayed,
} from "kolmafia";
import {
$classes,
$familiar,
$familiars,
$item,
$location,
CrystalBall,
get,
getRemainingStomach,
Expand All @@ -21,7 +24,7 @@ import {
} from "libram";

import { freeFightFamiliar, MenuOptions } from "./familiar";
import { garboValue } from "./garboValue";
import { garboAverageValue, garboValue } from "./garboValue";
import { args, chosenAffiliation, getOrbTarget, realmAvailable, sober } from "./lib";
import * as OrbManager from "./orbmanager";

Expand Down Expand Up @@ -211,6 +214,56 @@ const accessories: { item: Item; valueFunction: (options: AccessoryOptions) => n
valueFunction: ({ location }) =>
location.zone === "Crimbo23" && chosenAffiliation() === "elves" ? 10000 : 0,
},
{
item: $item`mime army infiltration glove`,
valueFunction: ({ location }) => {
// if we can already pickpocket or can't even with this, it's worthless
if ($classes`Disco Bandit, Accordion Thief`.includes(myClass()) || !sober()) {
return 0;
}
// about 5% of a common drop
const aff = chosenAffiliation();
/* eslint-disable libram/verify-constants */
if (location === $location`Abuela's Cottage (Contested)`) {
if (aff === "pirates") {
return 0.05 * garboAverageValue($item`Elf Guard officer's sidearm`, $item`Elf Guard commandeering gloves`, $item`Elf Guard eyedrops`);
}
if (aff === "elves") {
return 0.05 * garboAverageValue($item`Crimbuccaneer shirt`, $item`Crimbuccaneer captain's purse`);
}
} else if (location === $location`The Embattled Factory`) {
if (aff === "pirates") {
return 0.05 * garboAverageValue($item`military-grade peppermint oil`, $item`Elf Guard tinsel grenade`);
}
if (aff === "elves") {
return 0.05 * garboAverageValue($item`Crimbuccaneer mologrog cocktail`, $item`Crimbuccaneer whale oil`, $item`Crimbuccaneer rigging lasso`);
}
} else if (location === $location`The Bar At War`) {
if (aff === "pirates") {
return 0.05 * garboAverageValue($item`bottle of whiskey`, $item`peppermint bomb`, $item`officer's nog`);
}
if (aff === "elves") {
return 0.05 * garboAverageValue($item`grog nuts`, $item`sawed-off blunderbuss`, $item`old-school pirate grog`);
}
} else if (location === $location`A Cafe Divided`) {
if (aff === "pirates") {
return 0.05 * garboAverageValue($item`sundae ration`, $item`peppermint tack`, $item`Elf Guard payroll bag`);
}
if (aff === "elves") {
return 0.05 * garboAverageValue($item`orange`, $item`pegfinger`, $item`whalesteak`);
}
} else if (location === $location`The Armory Up In Arms`) {
if (aff === "pirates") {
return 0.05 * garboAverageValue($item`Elf Guard mouthknife`, $item`Kelflar vest`, $item`red and white claret`);
}
if (aff === "elves") {
return 0.05 * garboAverageValue($item`shipwright's hammer`, $item`cannonbomb`, $item`whale cerebrospinal fluid`);
}
/* eslint-enable libram/verify-constants */
}
return 0;
},
},
];

function getBestAccessories(location: Location, isFree?: boolean) {
Expand Down