libram 0.8.15 → 0.8.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ascend.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Skill, Class, Item, Path, MafiaClass } from "kolmafia";
2
+ import { MoonSign } from "./moonSign";
2
3
  import { ChateauMantegna } from "./resources";
3
4
  export declare enum Lifestyle {
4
5
  casual = 1,
@@ -30,19 +31,7 @@ export declare class AscensionPrepError extends Error {
30
31
  cause: string;
31
32
  constructor(cause: string, original?: MafiaClass | string);
32
33
  }
33
- declare const MoonSigns: readonly ["Mongoose", "Wallaby", "Vole", "Platypus", "Opossum", "Marmot", "Wombat", "Blender", "Packrat"];
34
- declare type MoonSign = typeof MoonSigns[number];
35
34
  declare type InputMoonSign = number | Lowercase<MoonSign> | "degrassi" | "degrassi knoll" | "friendly degrassi knoll" | "knoll" | "canada" | "canadia" | "little canadia" | "gnomads" | "gnomish" | "gnomish gnomads camp";
36
- /**
37
- * @param moon Moon sign name
38
- * @returns Moon sign id else 0
39
- */
40
- export declare function signNameToId(moon: MoonSign): number;
41
- /**
42
- * @param id Moon sign id
43
- * @returns Name of moon sign else "None"
44
- */
45
- export declare function signIdToName(id: number): MoonSign | "None";
46
35
  /**
47
36
  * Hops the gash, perming no skills by default
48
37
  *
package/dist/ascend.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Skill, Class, eudoraItem, getCampground, Item, Path, use, visitUrl, xpath, haveSkill, getPermedSkills, toSkill, } from "kolmafia";
2
+ import { signNameToId } from "./moonSign";
2
3
  import { get } from "./property";
3
4
  import { ChateauMantegna } from "./resources";
4
5
  import { $item, $items, $stat } from "./template-string";
@@ -102,31 +103,6 @@ export class AscensionPrepError extends Error {
102
103
  this.cause = cause;
103
104
  }
104
105
  }
105
- const MoonSigns = [
106
- "Mongoose",
107
- "Wallaby",
108
- "Vole",
109
- "Platypus",
110
- "Opossum",
111
- "Marmot",
112
- "Wombat",
113
- "Blender",
114
- "Packrat",
115
- ];
116
- /**
117
- * @param moon Moon sign name
118
- * @returns Moon sign id else 0
119
- */
120
- export function signNameToId(moon) {
121
- return MoonSigns.indexOf(moon) + 1;
122
- }
123
- /**
124
- * @param id Moon sign id
125
- * @returns Name of moon sign else "None"
126
- */
127
- export function signIdToName(id) {
128
- return MoonSigns[id - 1] || "None";
129
- }
130
106
  /**
131
107
  * Determine the id of the appropriate moon sign.
132
108
  *
@@ -55,6 +55,8 @@ function expectedAdventures(item, modifiers) {
55
55
  adventures++;
56
56
  if (itemType(item) === "food" && modifiers.seasoning)
57
57
  adventures += seasoningAdventures;
58
+ if (itemType(item) === "food" && modifiers.whetStone)
59
+ adventures++;
58
60
  return adventures;
59
61
  }) / interpolated.length);
60
62
  }
@@ -197,12 +199,14 @@ class DietPlanner {
197
199
  fork;
198
200
  mug;
199
201
  seasoning;
202
+ whetStone;
200
203
  spleenValue = 0;
201
204
  constructor(mpa, menu) {
202
205
  this.mpa = mpa;
203
206
  this.fork = menu.find((item) => item.item === $item `Ol' Scratch's salad fork`);
204
207
  this.mug = menu.find((item) => item.item === $item `Frosty's frosty mug`);
205
208
  this.seasoning = menu.find((item) => item.item === $item `Special Seasoning`);
209
+ this.whetStone = menu.find((item) => item.item === $item `whet stone`);
206
210
  this.mayoLookup = new Map();
207
211
  if (mayoInstalled()) {
208
212
  for (const mayo of [Mayo.flex, Mayo.zapine]) {
@@ -258,6 +262,7 @@ class DietPlanner {
258
262
  const defaultModifiers = {
259
263
  forkMug: false,
260
264
  seasoning: this.seasoning ? helpers.includes(this.seasoning) : false,
265
+ whetStone: this.whetStone ? helpers.includes(this.whetStone) : false,
261
266
  mayoflex: this.mayoLookup.size
262
267
  ? helpers.some((item) => item.item === Mayo.flex)
263
268
  : false,
@@ -282,6 +287,11 @@ class DietPlanner {
282
287
  mallPrice($item `Special Seasoning`)) {
283
288
  helpers.push(this.seasoning);
284
289
  }
290
+ if (this.whetStone &&
291
+ itemType(menuItem.item) === "food" &&
292
+ this.mpa > mallPrice($item `whet stone`)) {
293
+ helpers.push(this.whetStone);
294
+ }
285
295
  const forkMug = itemType(menuItem.item) === "food"
286
296
  ? this.fork
287
297
  : itemType(menuItem.item) === "booze"
@@ -537,6 +547,7 @@ class DietEntry {
537
547
  expectedAdventures(this.menuItems[this.menuItems.length - 1].item, {
538
548
  forkMug: fork || mug,
539
549
  seasoning: items.includes($item `Special Seasoning`),
550
+ whetStone: items.includes($item `whet stone`),
540
551
  mayoflex: items.includes(Mayo.flex),
541
552
  refinedPalate: diet.refinedPalate,
542
553
  garish: diet.garish,
package/dist/index.d.ts CHANGED
@@ -10,6 +10,7 @@ export * from "./lib";
10
10
  export * from "./maximize";
11
11
  export { numericModifiers, statModifiers, booleanModifiers, classModifiers, monsterModifiers, effectModifiers, skillModifiers, } from "./modifierTypes";
12
12
  export * from "./mood";
13
+ export * from "./moonSign";
13
14
  export * from "./propertyTyping";
14
15
  export * from "./resources";
15
16
  export * from "./since";
package/dist/index.js CHANGED
@@ -10,6 +10,7 @@ export * from "./lib";
10
10
  export * from "./maximize";
11
11
  export { numericModifiers, statModifiers, booleanModifiers, classModifiers, monsterModifiers, effectModifiers, skillModifiers, } from "./modifierTypes";
12
12
  export * from "./mood";
13
+ export * from "./moonSign";
13
14
  export * from "./propertyTyping";
14
15
  export * from "./resources";
15
16
  export * from "./since";
@@ -29,7 +29,7 @@ export declare function mergeMaximizeOptions(defaultOptions: MaximizeOptions, ad
29
29
  * @param options.bonusEquip Equipment to apply a bonus to ("200 bonus X").
30
30
  */
31
31
  export declare function setDefaultMaximizeOptions(options: Partial<MaximizeOptions>): void;
32
- declare const modeableCommands: readonly ["backupcamera", "umbrella", "snowsuit", "edpiece", "retrocape", "parka"];
32
+ declare const modeableCommands: readonly ["backupcamera", "umbrella", "snowsuit", "edpiece", "retrocape", "parka", "jillcandle"];
33
33
  export declare type Mode = typeof modeableCommands[number];
34
34
  export declare type Modes = Partial<{
35
35
  [x in Mode]: string;
@@ -41,6 +41,7 @@ export declare const modeableItems: {
41
41
  readonly edpiece: Item;
42
42
  readonly retrocape: Item;
43
43
  readonly parka: Item;
44
+ readonly jillcandle: Item;
44
45
  };
45
46
  export declare const modeableState: {
46
47
  readonly backupcamera: () => string;
@@ -49,6 +50,7 @@ export declare const modeableState: {
49
50
  readonly edpiece: () => string;
50
51
  readonly retrocape: () => string;
51
52
  readonly parka: () => string;
53
+ readonly jillcandle: () => string;
52
54
  };
53
55
  /**
54
56
  * Get set of current modes for modeables
package/dist/maximize.js CHANGED
@@ -69,6 +69,7 @@ const modeableCommands = [
69
69
  "edpiece",
70
70
  "retrocape",
71
71
  "parka",
72
+ "jillcandle",
72
73
  ];
73
74
  export const modeableItems = {
74
75
  backupcamera: $item `backup camera`,
@@ -77,6 +78,7 @@ export const modeableItems = {
77
78
  edpiece: $item `The Crown of Ed the Undying`,
78
79
  retrocape: $item `unwrapped knock-off retro superhero cape`,
79
80
  parka: $item `Jurassic Parka`,
81
+ jillcandle: $item `LED candle`,
80
82
  };
81
83
  export const modeableState = {
82
84
  backupcamera: () => getProperty("backupCameraMode"),
@@ -87,6 +89,7 @@ export const modeableState = {
87
89
  " " +
88
90
  getProperty("retroCapeWashingInstructions"),
89
91
  parka: () => getProperty("parkaMode"),
92
+ jillcandle: () => getProperty("ledCandleMode"),
90
93
  };
91
94
  /**
92
95
  * Get set of current modes for modeables
@@ -0,0 +1,13 @@
1
+ declare const MoonSigns: readonly ["Mongoose", "Wallaby", "Vole", "Platypus", "Opossum", "Marmot", "Wombat", "Blender", "Packrat"];
2
+ export declare type MoonSign = typeof MoonSigns[number];
3
+ /**
4
+ * @param moon Moon sign name
5
+ * @returns Moon sign id else 0
6
+ */
7
+ export declare function signNameToId(moon: MoonSign): number;
8
+ /**
9
+ * @param id Moon sign id
10
+ * @returns Name of moon sign else "None"
11
+ */
12
+ export declare function signIdToName(id: number): MoonSign | "None";
13
+ export {};
@@ -0,0 +1,25 @@
1
+ const MoonSigns = [
2
+ "Mongoose",
3
+ "Wallaby",
4
+ "Vole",
5
+ "Platypus",
6
+ "Opossum",
7
+ "Marmot",
8
+ "Wombat",
9
+ "Blender",
10
+ "Packrat",
11
+ ];
12
+ /**
13
+ * @param moon Moon sign name
14
+ * @returns Moon sign id else 0
15
+ */
16
+ export function signNameToId(moon) {
17
+ return MoonSigns.indexOf(moon) + 1;
18
+ }
19
+ /**
20
+ * @param id Moon sign id
21
+ * @returns Name of moon sign else "None"
22
+ */
23
+ export function signIdToName(id) {
24
+ return MoonSigns[id - 1] || "None";
25
+ }