Skip to content

Commit

Permalink
bindlestocking spading (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinn committed Jun 18, 2024
1 parent a843de8 commit 84ac917
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/excavator-projects/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { AUTUMNATON } from "./projects/autumnaton";
import { BIRD_A_DAY } from "./projects/birdADay";
import { COAT_OF_PAINT } from "./projects/coatOfPaint";
import { DESIGNER_SWEATPANTS } from "./projects/designerSweatpants";
import { DROP_BINDLESTOCKING } from "./projects/dropBindlestocking";
import { DROP_CON_SNOWGLOBE } from "./projects/dropConSnowglobe";
import { DROP_MIXED_EVERYTHING } from "./projects/dropMixedEverything";
import { DROP_MR_CHEENGS } from "./projects/dropMrCheengs";
Expand All @@ -24,6 +25,7 @@ export const projects: ExcavatorProject[] = [
GENIE,
HOOKAH,
JUICE_BAR,
DROP_BINDLESTOCKING,
DROP_CON_SNOWGLOBE,
DROP_MIXED_EVERYTHING,
DROP_MR_CHEENGS,
Expand Down
24 changes: 24 additions & 0 deletions packages/excavator-projects/projects/dropBindlestocking.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { equippedAmount, Item } from "kolmafia";

import { ExcavatorProject } from "../type";
import { toNormalisedString } from "../utils";

export const DROP_BINDLESTOCKING: ExcavatorProject = {
name: "Bindlestocking",
description: "Track critical drops from the bindlestocking.",
author: "Rinn",
hooks: {
COMBAT_ROUND: (_: string, page: string) => {
// Must be wielding a bindlestocking
if (equippedAmount(Item.get("bindlestocking")) < 1) return null;
const result = page.match(
/Something gets knocked loose from your bindlestocking!.*?You acquire an item: <b>(.*?)<\/b>/,
);
if (!result) return null;
const item = Item.get(result[1]);
return {
item: item !== Item.none ? toNormalisedString(item) : result[1],
};
},
},
};

0 comments on commit 84ac917

Please sign in to comment.