libram 0.7.11 → 0.7.13

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.
Files changed (147) hide show
  1. package/dist/Clan.d.ts +34 -6
  2. package/dist/Clan.js +33 -6
  3. package/dist/Copier.d.ts +5 -5
  4. package/dist/Dungeon.d.ts +45 -0
  5. package/dist/Dungeon.js +115 -0
  6. package/dist/Kmail.d.ts +8 -5
  7. package/dist/Kmail.js +8 -5
  8. package/dist/actions/ActionSource.d.ts +5 -0
  9. package/dist/actions/ActionSource.js +20 -1
  10. package/dist/actions/FreeKill.d.ts +2 -0
  11. package/dist/actions/FreeKill.js +2 -0
  12. package/dist/actions/FreeRun.d.ts +2 -0
  13. package/dist/actions/FreeRun.js +2 -0
  14. package/dist/ascend.d.ts +20 -4
  15. package/dist/ascend.js +32 -4
  16. package/dist/challengePaths/2015/CommunityService.d.ts +7 -0
  17. package/dist/challengePaths/2015/CommunityService.js +12 -1
  18. package/dist/combat.d.ts +55 -0
  19. package/dist/combat.js +85 -0
  20. package/dist/counter.d.ts +3 -0
  21. package/dist/counter.js +3 -0
  22. package/dist/diet/index.d.ts +2 -0
  23. package/dist/diet/index.js +27 -8
  24. package/dist/diet/knapsack.d.ts +1 -0
  25. package/dist/diet/knapsack.js +11 -3
  26. package/dist/index.d.ts +2 -4
  27. package/dist/index.js +1 -3
  28. package/dist/lib.d.ts +101 -34
  29. package/dist/lib.js +133 -42
  30. package/dist/logger.d.ts +24 -11
  31. package/dist/logger.js +38 -12
  32. package/dist/maximize.d.ts +20 -1
  33. package/dist/maximize.js +30 -3
  34. package/dist/modifier.d.ts +1 -1
  35. package/dist/modifier.js +9 -1
  36. package/dist/mood.d.ts +15 -1
  37. package/dist/mood.js +15 -1
  38. package/dist/property.d.ts +52 -17
  39. package/dist/property.js +64 -7
  40. package/dist/propertyTypes.d.ts +5 -5
  41. package/dist/propertyTypes.js +5 -5
  42. package/dist/propertyTyping.d.ts +54 -0
  43. package/dist/propertyTyping.js +54 -0
  44. package/dist/resources/2008/Stickers.d.ts +28 -0
  45. package/dist/resources/2008/Stickers.js +28 -0
  46. package/dist/resources/2009/Bandersnatch.d.ts +17 -7
  47. package/dist/resources/2009/Bandersnatch.js +17 -7
  48. package/dist/resources/2009/SpookyPutty.d.ts +25 -0
  49. package/dist/resources/2009/SpookyPutty.js +25 -0
  50. package/dist/resources/2010/CrownOfThrones.d.ts +23 -0
  51. package/dist/resources/2010/CrownOfThrones.js +31 -15
  52. package/dist/resources/2010/LookingGlass.d.ts +4 -0
  53. package/dist/resources/2010/LookingGlass.js +5 -0
  54. package/dist/resources/2011/ObtuseAngel.d.ts +8 -6
  55. package/dist/resources/2011/ObtuseAngel.js +8 -6
  56. package/dist/resources/2011/StompingBoots.d.ts +9 -15
  57. package/dist/resources/2011/StompingBoots.js +9 -15
  58. package/dist/resources/2012/RainDoh.d.ts +20 -0
  59. package/dist/resources/2012/RainDoh.js +20 -0
  60. package/dist/resources/2012/ReagnimatedGnome.d.ts +18 -0
  61. package/dist/resources/2012/ReagnimatedGnome.js +18 -0
  62. package/dist/resources/2012/Resolutions.d.ts +2 -2
  63. package/dist/resources/2012/Resolutions.js +2 -2
  64. package/dist/resources/2013/Florist.d.ts +15 -0
  65. package/dist/resources/2013/Florist.js +21 -0
  66. package/dist/resources/2014/CrimboShrub.d.ts +12 -0
  67. package/dist/resources/2014/CrimboShrub.js +22 -1
  68. package/dist/resources/2014/DNALab.d.ts +10 -2
  69. package/dist/resources/2014/DNALab.js +10 -2
  70. package/dist/resources/2014/WinterGarden.d.ts +15 -0
  71. package/dist/resources/2014/WinterGarden.js +15 -0
  72. package/dist/resources/2015/BarrelShrine.d.ts +6 -0
  73. package/dist/resources/2015/BarrelShrine.js +6 -0
  74. package/dist/resources/2015/ChateauMantegna.d.ts +35 -0
  75. package/dist/resources/2015/ChateauMantegna.js +35 -0
  76. package/dist/resources/2015/DeckOfEveryCard.d.ts +23 -1
  77. package/dist/resources/2015/DeckOfEveryCard.js +24 -0
  78. package/dist/resources/2015/Dinseylandfill.d.ts +1 -0
  79. package/dist/resources/2015/Dinseylandfill.js +2 -0
  80. package/dist/resources/2015/MayoClinic.d.ts +8 -1
  81. package/dist/resources/2015/MayoClinic.js +8 -1
  82. package/dist/resources/2016/SourceTerminal.d.ts +42 -21
  83. package/dist/resources/2016/SourceTerminal.js +42 -21
  84. package/dist/resources/2016/Witchess.d.ts +12 -0
  85. package/dist/resources/2016/Witchess.js +12 -0
  86. package/dist/resources/2017/AsdonMartin.d.ts +11 -3
  87. package/dist/resources/2017/AsdonMartin.js +44 -7
  88. package/dist/resources/2017/MummingTrunk.d.ts +1 -0
  89. package/dist/resources/2017/MummingTrunk.js +8 -1
  90. package/dist/resources/2017/Pantogram.d.ts +9 -0
  91. package/dist/resources/2017/Pantogram.js +33 -0
  92. package/dist/resources/2017/Robortender.d.ts +1 -0
  93. package/dist/resources/2017/Robortender.js +1 -0
  94. package/dist/resources/2017/Spacegate.js +1 -0
  95. package/dist/resources/2017/TunnelOfLove.d.ts +19 -0
  96. package/dist/resources/2017/TunnelOfLove.js +37 -0
  97. package/dist/resources/2018/LatteLoversMembersMug.d.ts +9 -0
  98. package/dist/resources/2018/LatteLoversMembersMug.js +9 -0
  99. package/dist/resources/2018/SongBoom.d.ts +9 -4
  100. package/dist/resources/2018/SongBoom.js +9 -4
  101. package/dist/resources/2019/BeachComb.d.ts +38 -1
  102. package/dist/resources/2019/BeachComb.js +39 -2
  103. package/dist/resources/2019/Snapper.d.ts +4 -0
  104. package/dist/resources/2019/Snapper.js +4 -0
  105. package/dist/resources/2020/Cartography.d.ts +13 -0
  106. package/dist/resources/2020/Cartography.js +13 -0
  107. package/dist/resources/2020/Guzzlr.d.ts +89 -23
  108. package/dist/resources/2020/Guzzlr.js +100 -29
  109. package/dist/resources/2020/RetroCape.d.ts +4 -0
  110. package/dist/resources/2020/RetroCape.js +4 -0
  111. package/dist/resources/2021/CrystalBall.d.ts +6 -0
  112. package/dist/resources/2021/CrystalBall.js +13 -1
  113. package/dist/resources/2021/DaylightShavings.d.ts +6 -0
  114. package/dist/resources/2021/DaylightShavings.js +6 -0
  115. package/dist/resources/2022/AutumnAton.d.ts +15 -0
  116. package/dist/resources/2022/AutumnAton.js +21 -0
  117. package/dist/resources/2022/CombatLoversLocket.d.ts +9 -0
  118. package/dist/resources/2022/CombatLoversLocket.js +10 -2
  119. package/dist/resources/2022/GreyGoose.d.ts +46 -0
  120. package/dist/resources/2022/GreyGoose.js +47 -1
  121. package/dist/resources/2022/JuneCleaver.d.ts +20 -0
  122. package/dist/resources/2022/JuneCleaver.js +20 -0
  123. package/dist/resources/2022/TrainSet.d.ts +48 -0
  124. package/dist/resources/2022/TrainSet.js +54 -0
  125. package/dist/resources/2023/ClosedCircuitPayphone.d.ts +75 -0
  126. package/dist/resources/2023/ClosedCircuitPayphone.js +117 -0
  127. package/dist/resources/LibramSummon.d.ts +5 -0
  128. package/dist/resources/LibramSummon.js +5 -0
  129. package/dist/resources/index.d.ts +2 -1
  130. package/dist/resources/index.js +2 -1
  131. package/dist/resources/putty-likes.d.ts +15 -0
  132. package/dist/resources/putty-likes.js +15 -0
  133. package/dist/session.d.ts +12 -0
  134. package/dist/session.js +20 -17
  135. package/dist/since.d.ts +3 -2
  136. package/dist/since.js +4 -2
  137. package/dist/utils.d.ts +82 -6
  138. package/dist/utils.js +88 -0
  139. package/package.json +6 -4
  140. package/dist/dungeons/Dreadsylvania.d.ts +0 -5
  141. package/dist/dungeons/Dreadsylvania.js +0 -14
  142. package/dist/dungeons/Dungeon.d.ts +0 -29
  143. package/dist/dungeons/Dungeon.js +0 -99
  144. package/dist/dungeons/Hobopolis.d.ts +0 -5
  145. package/dist/dungeons/Hobopolis.js +0 -14
  146. package/dist/dungeons/SlimeTube.d.ts +0 -5
  147. package/dist/dungeons/SlimeTube.js +0 -14
@@ -1,15 +1,20 @@
1
- import "core-js/modules/es.object.values";
2
1
  import { Effect, Item } from "kolmafia";
3
2
  /**
4
- * Returns whether or not we have the Asdon installed in the workshed at present.
3
+ * @returns Whether the Asdon is our current active workshed
5
4
  */
6
5
  export declare function installed(): boolean;
7
6
  /**
8
- * Returns true if we have the Asdon or if it's installed.
7
+ * @returns `true` if we `have` the Asdon or if it's installed
9
8
  */
10
9
  export declare function have(): boolean;
10
+ /**
11
+ * @param it the item in question
12
+ * @returns Can `it` be used as Asdon fuel?
13
+ */
14
+ export declare function isFuelItem(it: Item): boolean;
11
15
  /**
12
16
  * Fuel your Asdon Martin with a given quantity of a given item
17
+ *
13
18
  * @param it Item to fuel with.
14
19
  * @param quantity Number of items to fuel with.
15
20
  * @returns Whether we succeeded at fueling with the given items.
@@ -17,12 +22,14 @@ export declare function have(): boolean;
17
22
  export declare function insertFuel(it: Item, quantity?: number): boolean;
18
23
  /**
19
24
  * Fill your Asdon Martin to the given fuel level in the cheapest way possible
25
+ *
20
26
  * @param targetUnits Fuel level to attempt to reach.
21
27
  * @returns Whether we succeeded at filling to the target fuel level.
22
28
  */
23
29
  export declare function fillTo(targetUnits: number): boolean;
24
30
  /**
25
31
  * Fill your Asdon Martin by prioritizing mallmin items in your inventory. Default to the behavior of fillTo.
32
+ *
26
33
  * @param targetUnits Fuel level to attempt to reach.
27
34
  * @returns Whether we succeeded at filling to the target fuel level.
28
35
  */
@@ -43,6 +50,7 @@ export declare const Driving: {
43
50
  };
44
51
  /**
45
52
  * Attempt to drive with a particular style for a particular number of turns.
53
+ *
46
54
  * @param style The driving style to use.
47
55
  * @param turns The number of turns to attempt to get.
48
56
  * @param preferInventory Whether we should preferentially value items currently in our inventory.
@@ -1,4 +1,3 @@
1
- import "core-js/modules/es.object.values";
2
1
  import { autosellPrice, buy, canInteract, cliExecute, getFuel, getWorkshed, haveEffect, historicalAge, historicalPrice, isNpcItem, Item, itemAmount, mallPrice, mallPrices, retrieveItem, toInt, visitUrl, } from "kolmafia";
3
2
  import { getAverageAdventures, have as haveItem } from "../../lib";
4
3
  import { $effect, $item, $items } from "../../template-string";
@@ -10,31 +9,50 @@ var PriceAge;
10
9
  PriceAge[PriceAge["TODAY"] = 2] = "TODAY";
11
10
  })(PriceAge || (PriceAge = {}));
12
11
  /**
13
- * Returns whether or not we have the Asdon installed in the workshed at present.
12
+ * @returns Whether the Asdon is our current active workshed
14
13
  */
15
14
  export function installed() {
16
15
  return getWorkshed() === $item `Asdon Martin keyfob`;
17
16
  }
18
17
  /**
19
- * Returns true if we have the Asdon or if it's installed.
18
+ * @returns `true` if we `have` the Asdon or if it's installed
20
19
  */
21
20
  export function have() {
22
21
  return installed() || haveItem($item `Asdon Martin keyfob`);
23
22
  }
24
23
  const fuelSkiplist = $items `cup of "tea", thermos of "whiskey", Lucky Lindy, Bee's Knees, Sockdollager, Ish Kabibble, Hot Socks, Phonus Balonus, Flivver, Sloppy Jalopy, glass of "milk"`;
24
+ /**
25
+ * Internal function used to determine whether a historical price is recent enough
26
+ *
27
+ * @param item The item to check
28
+ * @returns Whether a price is too old to trust
29
+ */
25
30
  function priceTooOld(item) {
26
31
  return historicalPrice(item) === 0 || historicalAge(item) >= 7;
27
32
  }
28
- // Return mall max if historicalPrice returns -1.
33
+ /**
34
+ * @param item The item in question
35
+ * @returns Mall max if historicalPrice is -1; otherwise, the historical price
36
+ */
29
37
  function historicalPriceOrMax(item) {
30
38
  const historical = historicalPrice(item);
31
39
  return historical < 0 ? 999999999 : historical;
32
40
  }
33
- // Return mall max if mallPrice returns -1.
41
+ /**
42
+ * @param item The item in question
43
+ * @returns Mall max if historicalPrice is -1; otherwise, the mall price
44
+ */
34
45
  function mallPriceOrMax(item) {
35
46
  const mall = mallPrice(item);
36
47
  return mall < 0 ? 999999999 : mall;
37
48
  }
49
+ /**
50
+ * Combined internal function to determine the price of an item
51
+ *
52
+ * @param item The item in question
53
+ * @param priceAge How do we decide when to use historical vs real mall prices?
54
+ * @returns The price of the item in question
55
+ */
38
56
  function price(item, priceAge) {
39
57
  switch (priceAge) {
40
58
  case PriceAge.HISTORICAL: {
@@ -55,12 +73,20 @@ function inventoryItems() {
55
73
  .filter((item) => haveItem(item) &&
56
74
  [100, autosellPrice(item)].includes(price(item, PriceAge.RECENT)));
57
75
  }
58
- // Efficiency in meat per fuel.
76
+ /**
77
+ * @param it The item in question
78
+ * @param priceAge The PriceAge option to apply
79
+ * @returns Meat per fuel of an item
80
+ */
59
81
  function calculateFuelUnitCost(it, priceAge = PriceAge.RECENT) {
60
82
  const units = getAverageAdventures(it);
61
83
  return price(it, priceAge) / units;
62
84
  }
63
- function isFuelItem(it) {
85
+ /**
86
+ * @param it the item in question
87
+ * @returns Can `it` be used as Asdon fuel?
88
+ */
89
+ export function isFuelItem(it) {
64
90
  return (!isNpcItem(it) &&
65
91
  it.fullness + it.inebriety > 0 &&
66
92
  getAverageAdventures(it) > 0 &&
@@ -68,6 +94,9 @@ function isFuelItem(it) {
68
94
  it.discardable &&
69
95
  !fuelSkiplist.includes(it));
70
96
  }
97
+ /**
98
+ * @returns The best fuel options available to us at this time
99
+ */
71
100
  function getBestFuels() {
72
101
  // Three stages.
73
102
  // 1. Filter to reasonable items using historical cost (within 5x of historical best).
@@ -102,6 +131,7 @@ function getBestFuels() {
102
131
  }
103
132
  /**
104
133
  * Fuel your Asdon Martin with a given quantity of a given item
134
+ *
105
135
  * @param it Item to fuel with.
106
136
  * @param quantity Number of items to fuel with.
107
137
  * @returns Whether we succeeded at fueling with the given items.
@@ -112,6 +142,7 @@ export function insertFuel(it, quantity = 1) {
112
142
  }
113
143
  /**
114
144
  * Fill your Asdon Martin to the given fuel level in the cheapest way possible
145
+ *
115
146
  * @param targetUnits Fuel level to attempt to reach.
116
147
  * @returns Whether we succeeded at filling to the target fuel level.
117
148
  */
@@ -139,6 +170,10 @@ export function fillTo(targetUnits) {
139
170
  }
140
171
  return getFuel() >= targetUnits;
141
172
  }
173
+ /**
174
+ * @param targetUnits The fuel level we aim to achieve
175
+ * @returns Whether we successfully filled our Asdon's tank
176
+ */
142
177
  function fillWithBestInventoryItem(targetUnits) {
143
178
  const options = inventoryItems().sort((a, b) => getAverageAdventures(b) / autosellPrice(b) -
144
179
  getAverageAdventures(a) / autosellPrice(a));
@@ -152,6 +187,7 @@ function fillWithBestInventoryItem(targetUnits) {
152
187
  }
153
188
  /**
154
189
  * Fill your Asdon Martin by prioritizing mallmin items in your inventory. Default to the behavior of fillTo.
190
+ *
155
191
  * @param targetUnits Fuel level to attempt to reach.
156
192
  * @returns Whether we succeeded at filling to the target fuel level.
157
193
  */
@@ -180,6 +216,7 @@ export const Driving = {
180
216
  };
181
217
  /**
182
218
  * Attempt to drive with a particular style for a particular number of turns.
219
+ *
183
220
  * @param style The driving style to use.
184
221
  * @param turns The number of turns to attempt to get.
185
222
  * @param preferInventory Whether we should preferentially value items currently in our inventory.
@@ -2,6 +2,7 @@ import { Familiar } from "kolmafia";
2
2
  import { NumericModifier } from "../../modifierTypes";
3
3
  /**
4
4
  * Parses the _mummeryMods preference into a Map for easier use.
5
+ *
5
6
  * @returns A map, mapping Familiars to a Tuple consisting of the NumericModifier attached to the familiar, and the value thereof.
6
7
  */
7
8
  export declare function currentCostumes(): Map<Familiar, [NumericModifier, number]>;
@@ -1,5 +1,11 @@
1
1
  import { toFamiliar } from "kolmafia";
2
2
  import { get } from "../../property";
3
+ /**
4
+ * Internal function used to parse mods
5
+ *
6
+ * @param input The modstring used in your mummery pref
7
+ * @returns a NumericModifier matching that string
8
+ */
3
9
  function toModifier(input) {
4
10
  const regExp = new RegExp(/Experience \((.*?)\)/);
5
11
  const matcher = input.match(regExp);
@@ -7,12 +13,13 @@ function toModifier(input) {
7
13
  }
8
14
  /**
9
15
  * Parses the _mummeryMods preference into a Map for easier use.
16
+ *
10
17
  * @returns A map, mapping Familiars to a Tuple consisting of the NumericModifier attached to the familiar, and the value thereof.
11
18
  */
12
19
  export function currentCostumes() {
13
20
  const entries = get("_mummeryMods").split(",");
14
21
  const returnValue = new Map();
15
- const regExp = new RegExp(/([^:]+): \[(d+)\*fam\(([^)]+)\)\]/);
22
+ const regExp = new RegExp(/([^:]+): \[(\d+)\*fam\(([^)]+)\)\]/);
16
23
  for (const entry of entries) {
17
24
  const matcher = entry.match(regExp);
18
25
  if (matcher) {
@@ -1,5 +1,11 @@
1
1
  import { Item } from "kolmafia";
2
+ /**
3
+ * @returns Do we `have` the Pantogram itself?
4
+ */
2
5
  export declare function have(): boolean;
6
+ /**
7
+ * @returns Do we `have` pantogram pants?
8
+ */
3
9
  export declare function havePants(): boolean;
4
10
  declare type PantogramAlignment = "Muscle" | "Moxie" | "Mysticality";
5
11
  declare const Element: {
@@ -60,12 +66,14 @@ declare type Pants = {
60
66
  };
61
67
  /**
62
68
  * Finds the item requirements for a particular pair of pants.
69
+ *
63
70
  * @param modifiers An object consisting of the modifiers you want on your pants. For modifiers repeated across a particular sacrifice, use a tuple of that modifier and its value.
64
71
  * @returns A map of the items you need to make these pants and the quantities needed.
65
72
  */
66
73
  export declare function findRequirements(modifiers: Partial<Pants>): Map<Item, number>;
67
74
  /**
68
75
  * Makes a pair of pants with the given modifiers
76
+ *
69
77
  * @param alignment The stat you'd like your pants to improve. Moxie, Mysticality, or Muscle
70
78
  * @param element The element you'd like your pants to provide resistance for
71
79
  * @param leftSac The modifier you'd like to get from your leftmost sacrifice in Pantagramming.
@@ -76,6 +84,7 @@ export declare function findRequirements(modifiers: Partial<Pants>): Map<Item, n
76
84
  export declare function makePants(alignment: PantogramAlignment, element: PantogramElement, leftSac: PantogramSacrificeL, middleSac: PantogramSacrificeM, rightSac: PantogramSacrificeR): boolean;
77
85
  /**
78
86
  * Creates a pair of pants from a Pants object.
87
+ *
79
88
  * @param pants An object consisting of the modifiers you'd like the pants to give you.
80
89
  * @returns Whether or not you successfully created a pair of pants. False if you don't own the pantogram or if you already have pantogram pants.
81
90
  */
@@ -3,9 +3,15 @@ import { have as haveItem } from "../../lib";
3
3
  import { $item } from "../../template-string";
4
4
  const pantogram = $item `portable pantogram`;
5
5
  const pants = $item `pantogram pants`;
6
+ /**
7
+ * @returns Do we `have` the Pantogram itself?
8
+ */
6
9
  export function have() {
7
10
  return haveItem(pantogram);
8
11
  }
12
+ /**
13
+ * @returns Do we `have` pantogram pants?
14
+ */
9
15
  export function havePants() {
10
16
  return haveItem(pants);
11
17
  }
@@ -32,6 +38,12 @@ const LeftSacrifice = {
32
38
  ["MP Regen Max: 20"]: [$item `glowing New Age crystal`, 1],
33
39
  ["Mana Cost: -3"]: [$item `baconstone`, 1],
34
40
  };
41
+ /**
42
+ * Internal function used for `makePants`
43
+ *
44
+ * @param mod Modifier to get from our Left sacrifice
45
+ * @returns Item-tuple to use in our URL string
46
+ */
35
47
  function getLeftSacPair(mod) {
36
48
  return LeftSacrifice[mod];
37
49
  }
@@ -48,6 +60,12 @@ const MiddleSacrifice = {
48
60
  ["Avatar: Purple"]: [$item `moxie weed`, 99],
49
61
  ["Drops Items: true"]: [$item `ten-leaf clover`, 1],
50
62
  };
63
+ /**
64
+ * Internal function used for `makePants`
65
+ *
66
+ * @param mod Modifier to get from our Middle sacrifice
67
+ * @returns Item-tuple to use in our URL string
68
+ */
51
69
  function getMiddleSacPair(mod) {
52
70
  return MiddleSacrifice[mod];
53
71
  }
@@ -65,11 +83,18 @@ const RightSacrifice = {
65
83
  ["Mysticality Experience Percent: 25"]: [$item `haunted battery`, 5],
66
84
  ["Moxie Experience Percent: 25"]: [$item `the funk`, 5],
67
85
  };
86
+ /**
87
+ * Internal function used for `makePants`
88
+ *
89
+ * @param mod Modifier to get from our Right sacrifice
90
+ * @returns Item-tuple to use in our URL string
91
+ */
68
92
  function getRightSacPair(mod) {
69
93
  return RightSacrifice[mod];
70
94
  }
71
95
  /**
72
96
  * Finds the item requirements for a particular pair of pants.
97
+ *
73
98
  * @param modifiers An object consisting of the modifiers you want on your pants. For modifiers repeated across a particular sacrifice, use a tuple of that modifier and its value.
74
99
  * @returns A map of the items you need to make these pants and the quantities needed.
75
100
  */
@@ -96,6 +121,12 @@ export function findRequirements(modifiers) {
96
121
  }
97
122
  return returnValue;
98
123
  }
124
+ /**
125
+ * Internal function used in `makePants`
126
+ *
127
+ * @param pair Tuple consisting of an item or number and another number
128
+ * @returns URL parameter associated with the tuple
129
+ */
99
130
  function sacrificePairToURL(pair) {
100
131
  const [rawSacrifice, quantity] = pair;
101
132
  const sacrifice = rawSacrifice instanceof Item ? toInt(rawSacrifice) : rawSacrifice;
@@ -103,6 +134,7 @@ function sacrificePairToURL(pair) {
103
134
  }
104
135
  /**
105
136
  * Makes a pair of pants with the given modifiers
137
+ *
106
138
  * @param alignment The stat you'd like your pants to improve. Moxie, Mysticality, or Muscle
107
139
  * @param element The element you'd like your pants to provide resistance for
108
140
  * @param leftSac The modifier you'd like to get from your leftmost sacrifice in Pantagramming.
@@ -133,6 +165,7 @@ export function makePants(alignment, element, leftSac, middleSac, rightSac) {
133
165
  }
134
166
  /**
135
167
  * Creates a pair of pants from a Pants object.
168
+ *
136
169
  * @param pants An object consisting of the modifiers you'd like the pants to give you.
137
170
  * @returns Whether or not you successfully created a pair of pants. False if you don't own the pantogram or if you already have pantogram pants.
138
171
  */
@@ -15,6 +15,7 @@ export declare function have(): boolean;
15
15
  export declare function dropFrom(target: Monster | Phylum): Item;
16
16
  /**
17
17
  * Determines the probability of getting a robortender drop based on number of drops received
18
+ *
18
19
  * @param dropNumber The number of drops to assume you've already received; defaults to mafia's tracked amount
19
20
  * @returns The probability of getting a robort drop
20
21
  */
@@ -44,6 +44,7 @@ export function dropFrom(target) {
44
44
  }
45
45
  /**
46
46
  * Determines the probability of getting a robortender drop based on number of drops received
47
+ *
47
48
  * @param dropNumber The number of drops to assume you've already received; defaults to mafia's tracked amount
48
49
  * @returns The probability of getting a robort drop
49
50
  */
@@ -1,3 +1,4 @@
1
+ /* eslint "jsdoc/require-jsdoc": "warn" */
1
2
  import { cliExecute, toInt, visitUrl } from "kolmafia";
2
3
  import { get } from "../../property";
3
4
  import { $item } from "../../template-string";
@@ -1,10 +1,28 @@
1
1
  import { Monster } from "kolmafia";
2
2
  import { Copier } from "../../Copier";
3
+ /**
4
+ * @returns Is the love tunnel available?
5
+ */
3
6
  export declare function have(): boolean;
7
+ /**
8
+ * @returns Have we visited the love tunnel yet today?
9
+ */
4
10
  export declare function isUsed(): boolean;
11
+ /**
12
+ * @returns Do we `have` an Enamorang?
13
+ */
5
14
  export declare function haveLovEnamorang(): boolean;
15
+ /**
16
+ * @returns How many enamorangs have we used today?
17
+ */
6
18
  export declare function getLovEnamorangUses(): number;
19
+ /**
20
+ * @returns Can we currently use an enamorang?
21
+ */
7
22
  export declare function couldUseLoveEnamorang(): boolean;
23
+ /**
24
+ * @returns The Monster currently in our enamorang; `null` for none
25
+ */
8
26
  export declare function getLovEnamorangMonster(): Monster | null;
9
27
  export declare const LovEnamorang: Copier;
10
28
  declare type LOVEquipment = "LOV Eardigan" | "LOV Epaulettes" | "LOV Earring";
@@ -12,6 +30,7 @@ declare type LOVEffect = "Lovebotamy" | "Open Heart Surgery" | "Wandering Eye Su
12
30
  declare type LOVExtra = "LOV Enamorang" | "LOV Emotionizer" | "LOV Extraterrestrial Chocolate" | "LOV Echinacea Bouquet" | "LOV Elephant" | "toast" | null;
13
31
  /**
14
32
  * Fight all LOV monsters and get buffs/equipment.
33
+ *
15
34
  * @param equipment Equipment to take from LOV.
16
35
  * @param effect Effect to take from LOV.
17
36
  * @param extra Extra item to take from LOV.
@@ -3,27 +3,51 @@ import { Copier } from "../../Copier";
3
3
  import { have as haveItem, haveWandererCounter, Wanderer } from "../../lib";
4
4
  import { get, set } from "../../property";
5
5
  import { $item, $location } from "../../template-string";
6
+ /**
7
+ * @returns Is the love tunnel available?
8
+ */
6
9
  export function have() {
7
10
  return get("loveTunnelAvailable");
8
11
  }
12
+ /**
13
+ * @returns Have we visited the love tunnel yet today?
14
+ */
9
15
  export function isUsed() {
10
16
  return get("_loveTunnelUsed");
11
17
  }
18
+ /**
19
+ * @returns Do we `have` an Enamorang?
20
+ */
12
21
  export function haveLovEnamorang() {
13
22
  return haveItem($item `LOV Enamorang`);
14
23
  }
24
+ /**
25
+ * @returns How many enamorangs have we used today?
26
+ */
15
27
  export function getLovEnamorangUses() {
16
28
  return get("_enamorangs");
17
29
  }
30
+ /**
31
+ * @returns Can we currently use an enamorang?
32
+ */
18
33
  export function couldUseLoveEnamorang() {
19
34
  return (!haveWandererCounter(Wanderer.Enamorang) &&
20
35
  getLovEnamorangUses() < 3 &&
21
36
  haveLovEnamorang());
22
37
  }
38
+ /**
39
+ * @returns The Monster currently in our enamorang; `null` for none
40
+ */
23
41
  export function getLovEnamorangMonster() {
24
42
  return get("enamorangMonster");
25
43
  }
26
44
  export const LovEnamorang = new Copier(() => couldUseLoveEnamorang(), null, () => couldUseLoveEnamorang(), () => getLovEnamorangMonster());
45
+ /**
46
+ * Internal function used for `fightAll`
47
+ *
48
+ * @param equipment The equipment to select from the tunnel
49
+ * @returns The relevant choice option
50
+ */
27
51
  function equipmentChoice(equipment) {
28
52
  switch (equipment) {
29
53
  case "LOV Eardigan":
@@ -34,6 +58,12 @@ function equipmentChoice(equipment) {
34
58
  return 3;
35
59
  }
36
60
  }
61
+ /**
62
+ *Internal function used for `fightAll`
63
+ *
64
+ * @param effect The effect to select from the tunnel
65
+ * @returns The relevant choice option
66
+ */
37
67
  function effectChoice(effect) {
38
68
  switch (effect) {
39
69
  case "Lovebotamy":
@@ -44,6 +74,12 @@ function effectChoice(effect) {
44
74
  return 3;
45
75
  }
46
76
  }
77
+ /**
78
+ * Internal function used for `fightAll`
79
+ *
80
+ * @param extra The extra item to select from the tunnel
81
+ * @returns The relevant choice option
82
+ */
47
83
  function extraChoice(extra) {
48
84
  switch (extra) {
49
85
  case "LOV Enamorang":
@@ -64,6 +100,7 @@ function extraChoice(extra) {
64
100
  }
65
101
  /**
66
102
  * Fight all LOV monsters and get buffs/equipment.
103
+ *
67
104
  * @param equipment Equipment to take from LOV.
68
105
  * @param effect Effect to take from LOV.
69
106
  * @param extra Extra item to take from LOV.
@@ -1,4 +1,13 @@
1
1
  import { Monster } from "kolmafia";
2
+ /**
3
+ * @returns Whether we `have` the latte lovers member's mug
4
+ */
2
5
  export declare function have(): boolean;
6
+ /**
7
+ * @returns The current target of `Offer Latte`, assuming the effect is active; otherwise, `null`
8
+ */
3
9
  export declare function sniffedMonster(): Monster | null;
10
+ /**
11
+ * @returns The number of latte refills remaining for the day
12
+ */
4
13
  export declare function refillsRemaining(): number;
@@ -2,12 +2,21 @@ import { getCounter } from "kolmafia";
2
2
  import { have as haveItem } from "../../lib";
3
3
  import { get } from "../../property";
4
4
  import { $item } from "../../template-string";
5
+ /**
6
+ * @returns Whether we `have` the latte lovers member's mug
7
+ */
5
8
  export function have() {
6
9
  return haveItem($item `latte lovers member's mug`);
7
10
  }
11
+ /**
12
+ * @returns The current target of `Offer Latte`, assuming the effect is active; otherwise, `null`
13
+ */
8
14
  export function sniffedMonster() {
9
15
  return getCounter("Latte Monster") !== -1 ? get("_latteMonster") : null;
10
16
  }
17
+ /**
18
+ * @returns The number of latte refills remaining for the day
19
+ */
11
20
  export function refillsRemaining() {
12
21
  return 3 - get("_latteRefillsUsed");
13
22
  }
@@ -1,4 +1,7 @@
1
1
  export declare const item: import("kolmafia").Item;
2
+ /**
3
+ * @returns Whether we `have` the SongBoom™ BoomBox
4
+ */
2
5
  export declare function have(): boolean;
3
6
  declare const keywords: {
4
7
  "Eye of the Giger": string;
@@ -10,20 +13,22 @@ declare const keywords: {
10
13
  export declare type SongBoomSong = keyof typeof keywords | null;
11
14
  export declare const songBoomSongs: Set<string>;
12
15
  /**
13
- * Current song.
16
+ * @returns The `SongBoomSong` you currently have active; `null` if none is active at this time
14
17
  */
15
18
  export declare function song(): SongBoomSong;
16
19
  /**
17
- * Song changes left today.
20
+ * @returns Song changes left today.
18
21
  */
19
22
  export declare function songChangesLeft(): number;
20
23
  /**
21
- * Change the song.
24
+ * Change the song. Throws an error if unable.
25
+ *
22
26
  * @param newSong Song to change to.
27
+ * @returns Whether we successfully changed the song; `false` thus means that this was already our current song.
23
28
  */
24
29
  export declare function setSong(newSong: SongBoomSong): boolean;
25
30
  /**
26
- * Progress to next song drop (e.g. gathered meat-clip).
31
+ * @returns Progress to next song drop (e.g. gathered meat-clip).
27
32
  */
28
33
  export declare function dropProgress(): number;
29
34
  export {};
@@ -3,6 +3,9 @@ import { have as haveItem } from "../../lib";
3
3
  import { get } from "../../property";
4
4
  import { $item } from "../../template-string";
5
5
  export const item = $item `SongBoom™ BoomBox`;
6
+ /**
7
+ * @returns Whether we `have` the SongBoom™ BoomBox
8
+ */
6
9
  export function have() {
7
10
  return haveItem(item);
8
11
  }
@@ -15,21 +18,23 @@ const keywords = {
15
18
  };
16
19
  export const songBoomSongs = new Set(Object.keys(keywords));
17
20
  /**
18
- * Current song.
21
+ * @returns The `SongBoomSong` you currently have active; `null` if none is active at this time
19
22
  */
20
23
  export function song() {
21
24
  const stored = get("boomBoxSong");
22
25
  return songBoomSongs.has(stored) ? stored : null;
23
26
  }
24
27
  /**
25
- * Song changes left today.
28
+ * @returns Song changes left today.
26
29
  */
27
30
  export function songChangesLeft() {
28
31
  return get("_boomBoxSongsLeft");
29
32
  }
30
33
  /**
31
- * Change the song.
34
+ * Change the song. Throws an error if unable.
35
+ *
32
36
  * @param newSong Song to change to.
37
+ * @returns Whether we successfully changed the song; `false` thus means that this was already our current song.
33
38
  */
34
39
  export function setSong(newSong) {
35
40
  if (song() !== newSong) {
@@ -43,7 +48,7 @@ export function setSong(newSong) {
43
48
  }
44
49
  }
45
50
  /**
46
- * Progress to next song drop (e.g. gathered meat-clip).
51
+ * @returns Progress to next song drop (e.g. gathered meat-clip).
47
52
  */
48
53
  export function dropProgress() {
49
54
  return get("_boomBoxFights");
@@ -1,4 +1,9 @@
1
1
  import { Effect } from "kolmafia";
2
+ /**
3
+ * Determines whether we `have` the beach comb
4
+ *
5
+ * @returns Whether we `have` the beach comb
6
+ */
2
7
  export declare function have(): boolean;
3
8
  export declare const headBuffs: readonly [Effect, Effect, Effect, Effect, Effect, Effect, Effect, Effect, Effect, Effect, Effect];
4
9
  export declare const head: {
@@ -21,9 +26,41 @@ export declare type BeachTile = {
21
26
  row: number;
22
27
  column: number;
23
28
  };
29
+ /**
30
+ * Calculates the tide level for a given game day
31
+ *
32
+ * @param day The day to check the tide level of; defaults to today
33
+ * @returns The tide level as an integer
34
+ */
24
35
  export declare function tideLevel(day?: number): number;
25
- export declare function canComb({ row }: BeachTile): boolean;
36
+ /**
37
+ * Determines whether a given tile can currently be combed, based on the tide level
38
+ *
39
+ * @param tile The tile to check
40
+ * @returns Whether today's tides permit the combing of this tile
41
+ */
42
+ export declare function canComb(tile: BeachTile): boolean;
43
+ /**
44
+ * @returns The number of free combs we have available for today
45
+ */
26
46
  export declare function freeCombs(): number;
47
+ /**
48
+ * Comb a tile or tiles; skips any presently uncombablle tiles
49
+ *
50
+ * @param tiles The tiles to comb
51
+ */
27
52
  export declare function comb(...tiles: BeachTile[]): void;
53
+ /**
54
+ * Determines whether a given Beach Head can be combed today
55
+ *
56
+ * @param target The head in question, either as the Effect it grants or as its name
57
+ * @returns Whether the given head is combable
58
+ */
28
59
  export declare function headAvailable(target: Effect | keyof typeof head): boolean;
60
+ /**
61
+ * Tries to comb a given Beach Head
62
+ *
63
+ * @param target The Beach Head to comb, given either as its effect or as its name
64
+ * @returns Whether we have the head effect at the end of the whole rigamarole; this means that if you `tryHead` when you already have the effect, it will (presumably) fail to comb but will return `true`
65
+ */
29
66
  export declare function tryHead(target: Effect | keyof typeof head): boolean;