libram 0.8.28 → 0.8.30

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 (195) hide show
  1. package/dist/Clan.d.ts +128 -0
  2. package/dist/Clan.js +300 -0
  3. package/dist/Copier.d.ts +9 -0
  4. package/dist/Copier.js +15 -0
  5. package/dist/Dungeon.d.ts +45 -0
  6. package/dist/Dungeon.js +115 -0
  7. package/dist/Kmail.d.ts +133 -0
  8. package/dist/Kmail.js +259 -0
  9. package/dist/actions/ActionSource.d.ts +131 -0
  10. package/dist/actions/ActionSource.js +178 -0
  11. package/dist/actions/Banish.d.ts +16 -0
  12. package/dist/actions/Banish.js +121 -0
  13. package/dist/actions/FreeKill.d.ts +16 -0
  14. package/dist/actions/FreeKill.js +94 -0
  15. package/dist/actions/FreeRun.d.ts +16 -0
  16. package/dist/actions/FreeRun.js +81 -0
  17. package/dist/actions/index.d.ts +4 -0
  18. package/dist/actions/index.js +4 -0
  19. package/dist/ascend.d.ts +83 -0
  20. package/dist/ascend.js +268 -0
  21. package/dist/challengePaths/2014/HeavyRains.d.ts +22 -0
  22. package/dist/challengePaths/2014/HeavyRains.js +75 -0
  23. package/dist/challengePaths/2015/CommunityService.d.ts +125 -0
  24. package/dist/challengePaths/2015/CommunityService.js +334 -0
  25. package/dist/challengePaths/2016/NuclearAutumn.d.ts +13 -0
  26. package/dist/challengePaths/2016/NuclearAutumn.js +21 -0
  27. package/dist/challengePaths/index.d.ts +4 -0
  28. package/dist/challengePaths/index.js +4 -0
  29. package/dist/combat.d.ts +414 -0
  30. package/dist/combat.js +711 -0
  31. package/dist/console.d.ts +12 -0
  32. package/dist/console.js +14 -0
  33. package/dist/counter.d.ts +22 -0
  34. package/dist/counter.js +37 -0
  35. package/dist/diet/index.d.ts +80 -0
  36. package/dist/diet/index.js +682 -0
  37. package/dist/diet/knapsack.d.ts +8 -0
  38. package/dist/diet/knapsack.js +128 -0
  39. package/dist/index.d.ts +29 -0
  40. package/dist/index.js +26 -0
  41. package/dist/lib.d.ts +508 -0
  42. package/dist/lib.js +970 -0
  43. package/dist/logger.d.ts +35 -0
  44. package/dist/logger.js +62 -0
  45. package/dist/maximize.d.ts +122 -0
  46. package/dist/maximize.js +531 -0
  47. package/dist/modifier.d.ts +41 -0
  48. package/dist/modifier.js +160 -0
  49. package/dist/modifierTypes.d.ts +16 -0
  50. package/dist/modifierTypes.js +9 -0
  51. package/dist/mood.d.ts +105 -0
  52. package/dist/mood.js +349 -0
  53. package/dist/moonSign.d.ts +13 -0
  54. package/dist/moonSign.js +25 -0
  55. package/dist/overlappingNames.d.ts +3 -0
  56. package/dist/overlappingNames.js +42 -0
  57. package/dist/property.d.ts +222 -0
  58. package/dist/property.js +385 -0
  59. package/dist/propertyTypes.d.ts +19 -0
  60. package/dist/propertyTypes.js +10 -0
  61. package/dist/propertyTyping.d.ts +65 -0
  62. package/dist/propertyTyping.js +91 -0
  63. package/dist/resources/2007/CandyHearts.d.ts +9 -0
  64. package/dist/resources/2007/CandyHearts.js +24 -0
  65. package/dist/resources/2008/DivineFavors.d.ts +9 -0
  66. package/dist/resources/2008/DivineFavors.js +27 -0
  67. package/dist/resources/2008/Stickers.d.ts +49 -0
  68. package/dist/resources/2008/Stickers.js +84 -0
  69. package/dist/resources/2009/Bandersnatch.d.ts +56 -0
  70. package/dist/resources/2009/Bandersnatch.js +93 -0
  71. package/dist/resources/2009/LoveSongs.d.ts +9 -0
  72. package/dist/resources/2009/LoveSongs.js +24 -0
  73. package/dist/resources/2009/SpookyPutty.d.ts +31 -0
  74. package/dist/resources/2009/SpookyPutty.js +49 -0
  75. package/dist/resources/2010/Brickos.d.ts +9 -0
  76. package/dist/resources/2010/Brickos.js +21 -0
  77. package/dist/resources/2010/CrownOfThrones.d.ts +68 -0
  78. package/dist/resources/2010/CrownOfThrones.js +418 -0
  79. package/dist/resources/2010/LookingGlass.d.ts +29 -0
  80. package/dist/resources/2010/LookingGlass.js +89 -0
  81. package/dist/resources/2011/Gygaxian.d.ts +9 -0
  82. package/dist/resources/2011/Gygaxian.js +24 -0
  83. package/dist/resources/2011/ObtuseAngel.d.ts +33 -0
  84. package/dist/resources/2011/ObtuseAngel.js +51 -0
  85. package/dist/resources/2011/StompingBoots.d.ts +37 -0
  86. package/dist/resources/2011/StompingBoots.js +57 -0
  87. package/dist/resources/2012/RainDoh.d.ts +25 -0
  88. package/dist/resources/2012/RainDoh.js +37 -0
  89. package/dist/resources/2012/ReagnimatedGnome.d.ts +31 -0
  90. package/dist/resources/2012/ReagnimatedGnome.js +46 -0
  91. package/dist/resources/2012/Resolutions.d.ts +9 -0
  92. package/dist/resources/2012/Resolutions.js +28 -0
  93. package/dist/resources/2013/Florist.d.ts +81 -0
  94. package/dist/resources/2013/Florist.js +245 -0
  95. package/dist/resources/2013/JungMan.d.ts +33 -0
  96. package/dist/resources/2013/JungMan.js +69 -0
  97. package/dist/resources/2013/PulledTaffy.d.ts +9 -0
  98. package/dist/resources/2013/PulledTaffy.js +33 -0
  99. package/dist/resources/2014/CrimboShrub.d.ts +42 -0
  100. package/dist/resources/2014/CrimboShrub.js +89 -0
  101. package/dist/resources/2014/DNALab.d.ts +56 -0
  102. package/dist/resources/2014/DNALab.js +162 -0
  103. package/dist/resources/2014/WinterGarden.d.ts +23 -0
  104. package/dist/resources/2014/WinterGarden.js +35 -0
  105. package/dist/resources/2015/BarrelShrine.d.ts +8 -0
  106. package/dist/resources/2015/BarrelShrine.js +25 -0
  107. package/dist/resources/2015/ChateauMantegna.d.ts +54 -0
  108. package/dist/resources/2015/ChateauMantegna.js +100 -0
  109. package/dist/resources/2015/DeckOfEveryCard.d.ts +29 -0
  110. package/dist/resources/2015/DeckOfEveryCard.js +122 -0
  111. package/dist/resources/2015/Dinseylandfill.d.ts +89 -0
  112. package/dist/resources/2015/Dinseylandfill.js +205 -0
  113. package/dist/resources/2015/MayoClinic.d.ts +23 -0
  114. package/dist/resources/2015/MayoClinic.js +49 -0
  115. package/dist/resources/2016/GingerBread.d.ts +32 -0
  116. package/dist/resources/2016/GingerBread.js +73 -0
  117. package/dist/resources/2016/SourceTerminal.d.ts +181 -0
  118. package/dist/resources/2016/SourceTerminal.js +275 -0
  119. package/dist/resources/2016/Witchess.d.ts +19 -0
  120. package/dist/resources/2016/Witchess.js +48 -0
  121. package/dist/resources/2017/AsdonMartin.d.ts +59 -0
  122. package/dist/resources/2017/AsdonMartin.js +238 -0
  123. package/dist/resources/2017/Horsery.d.ts +19 -0
  124. package/dist/resources/2017/Horsery.js +42 -0
  125. package/dist/resources/2017/MummingTrunk.d.ts +8 -0
  126. package/dist/resources/2017/MummingTrunk.js +33 -0
  127. package/dist/resources/2017/Pantogram.d.ts +92 -0
  128. package/dist/resources/2017/Pantogram.js +174 -0
  129. package/dist/resources/2017/Robortender.d.ts +30 -0
  130. package/dist/resources/2017/Robortender.js +90 -0
  131. package/dist/resources/2017/Spacegate.d.ts +86 -0
  132. package/dist/resources/2017/Spacegate.js +178 -0
  133. package/dist/resources/2017/TunnelOfLove.d.ts +39 -0
  134. package/dist/resources/2017/TunnelOfLove.js +120 -0
  135. package/dist/resources/2018/LatteLoversMembersMug.d.ts +392 -0
  136. package/dist/resources/2018/LatteLoversMembersMug.js +303 -0
  137. package/dist/resources/2018/SongBoom.d.ts +33 -0
  138. package/dist/resources/2018/SongBoom.js +55 -0
  139. package/dist/resources/2019/BeachComb.d.ts +72 -0
  140. package/dist/resources/2019/BeachComb.js +118 -0
  141. package/dist/resources/2019/CampAway.d.ts +39 -0
  142. package/dist/resources/2019/CampAway.js +72 -0
  143. package/dist/resources/2019/Snapper.d.ts +33 -0
  144. package/dist/resources/2019/Snapper.js +73 -0
  145. package/dist/resources/2020/Cartography.d.ts +16 -0
  146. package/dist/resources/2020/Cartography.js +48 -0
  147. package/dist/resources/2020/Guzzlr.d.ts +160 -0
  148. package/dist/resources/2020/Guzzlr.js +275 -0
  149. package/dist/resources/2020/RetroCape.d.ts +51 -0
  150. package/dist/resources/2020/RetroCape.js +115 -0
  151. package/dist/resources/2021/CrystalBall.d.ts +14 -0
  152. package/dist/resources/2021/CrystalBall.js +41 -0
  153. package/dist/resources/2021/DaylightShavings.d.ts +40 -0
  154. package/dist/resources/2021/DaylightShavings.js +74 -0
  155. package/dist/resources/2022/AutumnAton.d.ts +78 -0
  156. package/dist/resources/2022/AutumnAton.js +182 -0
  157. package/dist/resources/2022/CombatLoversLocket.d.ts +46 -0
  158. package/dist/resources/2022/CombatLoversLocket.js +83 -0
  159. package/dist/resources/2022/GreyGoose.d.ts +59 -0
  160. package/dist/resources/2022/GreyGoose.js +90 -0
  161. package/dist/resources/2022/JuneCleaver.d.ts +47 -0
  162. package/dist/resources/2022/JuneCleaver.js +69 -0
  163. package/dist/resources/2022/TrainSet.d.ts +146 -0
  164. package/dist/resources/2022/TrainSet.js +228 -0
  165. package/dist/resources/2023/AugustScepter.d.ts +25 -0
  166. package/dist/resources/2023/AugustScepter.js +40 -0
  167. package/dist/resources/2023/BurningLeaves.d.ts +25 -0
  168. package/dist/resources/2023/BurningLeaves.js +74 -0
  169. package/dist/resources/2023/CinchoDeMayo.d.ts +25 -0
  170. package/dist/resources/2023/CinchoDeMayo.js +45 -0
  171. package/dist/resources/2023/ClosedCircuitPayphone.d.ts +80 -0
  172. package/dist/resources/2023/ClosedCircuitPayphone.js +129 -0
  173. package/dist/resources/2023/CursedMonkeyPaw.d.ts +46 -0
  174. package/dist/resources/2023/CursedMonkeyPaw.js +113 -0
  175. package/dist/resources/2024/AprilingBandHelmet.d.ts +57 -0
  176. package/dist/resources/2024/AprilingBandHelmet.js +118 -0
  177. package/dist/resources/2024/ChestMimic.d.ts +43 -0
  178. package/dist/resources/2024/ChestMimic.js +125 -0
  179. package/dist/resources/LibramSummon.d.ts +18 -0
  180. package/dist/resources/LibramSummon.js +74 -0
  181. package/dist/resources/index.d.ts +54 -0
  182. package/dist/resources/index.js +54 -0
  183. package/dist/resources/putty-likes.d.ts +21 -0
  184. package/dist/resources/putty-likes.js +33 -0
  185. package/dist/session.d.ts +169 -0
  186. package/dist/session.js +284 -0
  187. package/dist/since.d.ts +51 -0
  188. package/dist/since.js +108 -0
  189. package/dist/template-string.d.ts +324 -0
  190. package/dist/template-string.js +265 -0
  191. package/dist/url.d.ts +35 -0
  192. package/dist/url.js +67 -0
  193. package/dist/utils.d.ts +185 -0
  194. package/dist/utils.js +264 -0
  195. package/package.json +2 -2
@@ -0,0 +1,160 @@
1
+ import { Item, Location } from "kolmafia";
2
+ /**
3
+ * Determines whether you `have` Guzzlr
4
+ *
5
+ * @returns Whether you `have` Guzzlr
6
+ */
7
+ export declare function have(): boolean;
8
+ /**
9
+ * Determines whether you currently have an active Guzzlr quest
10
+ *
11
+ * @returns Whether you currently have an active Guzzlr quest
12
+ */
13
+ export declare function isQuestActive(): boolean;
14
+ /**
15
+ * Determines total number of Platinum deliveries completed
16
+ *
17
+ * @returns Platinum deliveries completed overall
18
+ */
19
+ export declare function getPlatinum(): number;
20
+ /**
21
+ * Determines the number of Platinum deliveries completed today
22
+ *
23
+ * @returns Platinum deliveries completed today
24
+ */
25
+ export declare function getPlatinumToday(): number;
26
+ /**
27
+ * Determines whether you are currently eligible to do a Platinum delivery
28
+ *
29
+ * @returns Whether you are currently eligible to do a Platinum delivery
30
+ */
31
+ export declare function canPlatinum(): boolean;
32
+ /**
33
+ * Determines whether you have fully unlocked the Platinum delivery bonuses (done >= 30)
34
+ *
35
+ * @returns Whether you have fully unlocked the Platinum delivery enchantment bonuses
36
+ */
37
+ export declare function haveFullPlatinumBonus(): boolean;
38
+ /**
39
+ * Accepts a Platinum delivery
40
+ *
41
+ * @returns Whether we succeeded in this endeavor
42
+ */
43
+ export declare function acceptPlatinum(): boolean;
44
+ /**
45
+ * Determines total number of Gold deliveries completed
46
+ *
47
+ * @returns Gold deliveries completed overall
48
+ */
49
+ export declare function getGold(): number;
50
+ /**
51
+ * Determines the number of Gold deliveries completed today
52
+ *
53
+ * @returns Gold deliveries completed today
54
+ */
55
+ export declare function getGoldToday(): number;
56
+ /**
57
+ * Determines whether you are currently eligible to do a Gold delivery
58
+ *
59
+ * @returns Whether you are currently eligible to do a Gold delivery
60
+ */
61
+ export declare function canGold(): boolean;
62
+ /**
63
+ * Determines whether you have fully unlocked the Gold delivery bonuses (done >= 150)
64
+ *
65
+ * @returns Whether you have fully unlocked the Gold delivery enchantment bonuses
66
+ */
67
+ export declare function haveFullGoldBonus(): boolean;
68
+ /**
69
+ * Accepts a Gold delivery
70
+ *
71
+ * @returns Whether we succeeded in this endeavor
72
+ */
73
+ export declare function acceptGold(): boolean;
74
+ /**
75
+ * Determines total number of Bronze deliveries completed
76
+ *
77
+ * @returns Bronze deliveries completed overall
78
+ */
79
+ export declare function getBronze(): number;
80
+ /**
81
+ * Determines whether you have fully unlocked the Bronze delivery bonuses (done >= 196)
82
+ *
83
+ * @returns Whether you have fully unlocked the Bronze delivery enchantment bonuses
84
+ */
85
+ export declare function haveFullBronzeBonus(): boolean;
86
+ /**
87
+ * Accepts a Bronze delivery
88
+ *
89
+ * @returns Whether we succeeded in this endeavor
90
+ */
91
+ export declare function acceptBronze(): boolean;
92
+ /**
93
+ * Determines whether we can abandon the current Guzzlr quest
94
+ *
95
+ * @returns Whether we are able to abandon our current Guzzlr quest
96
+ */
97
+ export declare function canAbandon(): boolean;
98
+ /**
99
+ * Abandons Guzzlr quest
100
+ *
101
+ * @returns `false` if we were unable to abandon a quest; `true` otherwise
102
+ */
103
+ export declare function abandon(): boolean;
104
+ /**
105
+ * Determines the target location for your current Guzzlr quest
106
+ *
107
+ * @returns The current target location for your Guzzlr quest, if it exists
108
+ */
109
+ export declare function getLocation(): Location | null;
110
+ /**
111
+ * Determines the tier of your current Guzzlr quest
112
+ *
113
+ * @returns The tier of your current Guzzlr quest; `null` if there is no active quest
114
+ */
115
+ export declare function getTier(): "platinum" | "gold" | "bronze" | null;
116
+ /**
117
+ * Determines the current booze item you need to deliver for your current Guzzlr quest
118
+ *
119
+ * @returns The booze item associated with your Guzzlr quest if it exists; `null` otherwise
120
+ */
121
+ export declare function getBooze(): Item | null;
122
+ /**
123
+ * List of the platinum cocktails
124
+ */
125
+ export declare const Cocktails: Item[];
126
+ /**
127
+ * Determines whether you currently have a Platinum cocktail available
128
+ *
129
+ * @returns `true` if you have at least one Platinum cocktail in your inventory; `false` otherwise
130
+ */
131
+ export declare function havePlatinumBooze(): boolean;
132
+ /**
133
+ * Determines if you currently have in your inventory the booze necessary to progress your Guzzlr quest
134
+ *
135
+ * @returns `true` if you have the booze necessary to progress your Guzzlr quest
136
+ */
137
+ export declare function haveBooze(): boolean;
138
+ export declare const ingredientToPlatinumCocktail: Map<Item, Item>;
139
+ export declare const platinumCocktailToIngredient: Map<Item, Item>;
140
+ /**
141
+ * Determines the cheapest Platinum cocktail to obtain or produce
142
+ *
143
+ * @param freeCraft Defaults to `true`; if set to `false`, will count the price of any turns spent cocktailcrafting
144
+ * @returns The expected price of the cheapest Platinum cocktail to obtain or produce
145
+ */
146
+ export declare function getCheapestPlatinumCocktail(freeCraft?: boolean): Item;
147
+ /**
148
+ * Calculates the number of turns remaining for your Guzzlr quest
149
+ *
150
+ * @param useShoes Whether or not the calculation should assume you are using Guzzlr shoes
151
+ * @returns The expected number of turns needed to finish your current delivery
152
+ */
153
+ export declare function turnsLeftOnQuest(useShoes?: boolean): number;
154
+ /**
155
+ * Calculates the expected Guzzlrbuck reward for completing your current Guzzlr quest
156
+ *
157
+ * @param usePants Whether or not we should account for Guzzlr pants in our calculation
158
+ * @returns The expected Guzzlrbuck reward of our current Guzzlr quest
159
+ */
160
+ export declare function expectedReward(usePants?: boolean): number;
@@ -0,0 +1,275 @@
1
+ import { Item, itemAmount, mallPrice, runChoice, use, visitUrl, } from "kolmafia";
2
+ import { have as haveItem } from "../../lib";
3
+ import { get, withChoice } from "../../property";
4
+ import { $item, $items } from "../../template-string";
5
+ import { invertMap, maxBy } from "../../utils";
6
+ const item = $item `Guzzlr tablet`;
7
+ /**
8
+ * Determines whether you `have` Guzzlr
9
+ *
10
+ * @returns Whether you `have` Guzzlr
11
+ */
12
+ export function have() {
13
+ return haveItem(item);
14
+ }
15
+ /**
16
+ * Internal function used to navigate the Guzzlr interface
17
+ *
18
+ * @param option Choice option to select
19
+ */
20
+ function useTabletWithChoice(option) {
21
+ withChoice(1412, option, () => use(1, item));
22
+ }
23
+ /**
24
+ * Determines whether you currently have an active Guzzlr quest
25
+ *
26
+ * @returns Whether you currently have an active Guzzlr quest
27
+ */
28
+ export function isQuestActive() {
29
+ return get("questGuzzlr") !== "unstarted";
30
+ }
31
+ /**
32
+ * Determines total number of Platinum deliveries completed
33
+ *
34
+ * @returns Platinum deliveries completed overall
35
+ */
36
+ export function getPlatinum() {
37
+ return get("guzzlrPlatinumDeliveries");
38
+ }
39
+ /**
40
+ * Determines the number of Platinum deliveries completed today
41
+ *
42
+ * @returns Platinum deliveries completed today
43
+ */
44
+ export function getPlatinumToday() {
45
+ return get("_guzzlrPlatinumDeliveries");
46
+ }
47
+ /**
48
+ * Determines whether you are currently eligible to do a Platinum delivery
49
+ *
50
+ * @returns Whether you are currently eligible to do a Platinum delivery
51
+ */
52
+ export function canPlatinum() {
53
+ return !isQuestActive() && getGold() >= 5 && getPlatinumToday() < 1;
54
+ }
55
+ /**
56
+ * Determines whether you have fully unlocked the Platinum delivery bonuses (done >= 30)
57
+ *
58
+ * @returns Whether you have fully unlocked the Platinum delivery enchantment bonuses
59
+ */
60
+ export function haveFullPlatinumBonus() {
61
+ return getPlatinum() >= 30;
62
+ }
63
+ /**
64
+ * Accepts a Platinum delivery
65
+ *
66
+ * @returns Whether we succeeded in this endeavor
67
+ */
68
+ export function acceptPlatinum() {
69
+ if (!canPlatinum())
70
+ return false;
71
+ useTabletWithChoice(4);
72
+ return true;
73
+ }
74
+ /**
75
+ * Determines total number of Gold deliveries completed
76
+ *
77
+ * @returns Gold deliveries completed overall
78
+ */
79
+ export function getGold() {
80
+ return get("guzzlrGoldDeliveries");
81
+ }
82
+ /**
83
+ * Determines the number of Gold deliveries completed today
84
+ *
85
+ * @returns Gold deliveries completed today
86
+ */
87
+ export function getGoldToday() {
88
+ return get("_guzzlrGoldDeliveries");
89
+ }
90
+ /**
91
+ * Determines whether you are currently eligible to do a Gold delivery
92
+ *
93
+ * @returns Whether you are currently eligible to do a Gold delivery
94
+ */
95
+ export function canGold() {
96
+ return !isQuestActive() && getBronze() >= 5 && getGoldToday() < 3;
97
+ }
98
+ /**
99
+ * Determines whether you have fully unlocked the Gold delivery bonuses (done >= 150)
100
+ *
101
+ * @returns Whether you have fully unlocked the Gold delivery enchantment bonuses
102
+ */
103
+ export function haveFullGoldBonus() {
104
+ return getGold() >= 150;
105
+ }
106
+ /**
107
+ * Accepts a Gold delivery
108
+ *
109
+ * @returns Whether we succeeded in this endeavor
110
+ */
111
+ export function acceptGold() {
112
+ if (!canGold())
113
+ return false;
114
+ useTabletWithChoice(3);
115
+ return true;
116
+ }
117
+ /**
118
+ * Determines total number of Bronze deliveries completed
119
+ *
120
+ * @returns Bronze deliveries completed overall
121
+ */
122
+ export function getBronze() {
123
+ return get("guzzlrBronzeDeliveries");
124
+ }
125
+ /**
126
+ * Determines whether you have fully unlocked the Bronze delivery bonuses (done >= 196)
127
+ *
128
+ * @returns Whether you have fully unlocked the Bronze delivery enchantment bonuses
129
+ */
130
+ export function haveFullBronzeBonus() {
131
+ return getBronze() >= 196;
132
+ }
133
+ /**
134
+ * Accepts a Bronze delivery
135
+ *
136
+ * @returns Whether we succeeded in this endeavor
137
+ */
138
+ export function acceptBronze() {
139
+ if (isQuestActive())
140
+ return false;
141
+ useTabletWithChoice(2);
142
+ return true;
143
+ }
144
+ /**
145
+ * Determines whether we can abandon the current Guzzlr quest
146
+ *
147
+ * @returns Whether we are able to abandon our current Guzzlr quest
148
+ */
149
+ export function canAbandon() {
150
+ return isQuestActive() && !get("_guzzlrQuestAbandoned");
151
+ }
152
+ /**
153
+ * Abandons Guzzlr quest
154
+ *
155
+ * @returns `false` if we were unable to abandon a quest; `true` otherwise
156
+ */
157
+ export function abandon() {
158
+ if (!canAbandon())
159
+ return false;
160
+ visitUrl("inventory.php?tap=guzzlr", false);
161
+ runChoice(1);
162
+ runChoice(5);
163
+ return true;
164
+ }
165
+ /**
166
+ * Determines the target location for your current Guzzlr quest
167
+ *
168
+ * @returns The current target location for your Guzzlr quest, if it exists
169
+ */
170
+ export function getLocation() {
171
+ return get("guzzlrQuestLocation");
172
+ }
173
+ /**
174
+ * Determines the tier of your current Guzzlr quest
175
+ *
176
+ * @returns The tier of your current Guzzlr quest; `null` if there is no active quest
177
+ */
178
+ export function getTier() {
179
+ const tier = get("guzzlrQuestTier");
180
+ return tier === "" ? null : tier;
181
+ }
182
+ /**
183
+ * Determines the current booze item you need to deliver for your current Guzzlr quest
184
+ *
185
+ * @returns The booze item associated with your Guzzlr quest if it exists; `null` otherwise
186
+ */
187
+ export function getBooze() {
188
+ const booze = get("guzzlrQuestBooze");
189
+ if (booze === "")
190
+ return null;
191
+ return Item.get(booze);
192
+ }
193
+ /**
194
+ * List of the platinum cocktails
195
+ */
196
+ export const Cocktails = $items `Buttery Boy, Steamboat, Ghiaccio Colada, Nog-on-the-Cob, Sourfinger`;
197
+ /**
198
+ * Determines whether you currently have a Platinum cocktail available
199
+ *
200
+ * @returns `true` if you have at least one Platinum cocktail in your inventory; `false` otherwise
201
+ */
202
+ export function havePlatinumBooze() {
203
+ return Cocktails.some((cock) => itemAmount(cock) > 0);
204
+ }
205
+ /**
206
+ * Determines if you currently have in your inventory the booze necessary to progress your Guzzlr quest
207
+ *
208
+ * @returns `true` if you have the booze necessary to progress your Guzzlr quest
209
+ */
210
+ export function haveBooze() {
211
+ const booze = getBooze();
212
+ switch (booze) {
213
+ case null:
214
+ return false;
215
+ case $item `Guzzlr cocktail set`:
216
+ return havePlatinumBooze();
217
+ default:
218
+ return itemAmount(booze) > 0;
219
+ }
220
+ }
221
+ export const ingredientToPlatinumCocktail = new Map([
222
+ [$item `miniature boiler`, $item `Steamboat`],
223
+ [$item `cold wad`, $item `Ghiaccio Colada`],
224
+ [$item `robin's egg`, $item `Nog-on-the-Cob`],
225
+ [$item `mangled finger`, $item `Sourfinger`],
226
+ [$item `Dish of Clarified Butter`, $item `Buttery Boy`],
227
+ ]);
228
+ export const platinumCocktailToIngredient = invertMap(ingredientToPlatinumCocktail);
229
+ /**
230
+ * Determines the cheapest Platinum cocktail to obtain or produce
231
+ *
232
+ * @param freeCraft Defaults to `true`; if set to `false`, will count the price of any turns spent cocktailcrafting
233
+ * @returns The expected price of the cheapest Platinum cocktail to obtain or produce
234
+ */
235
+ export function getCheapestPlatinumCocktail(freeCraft = true) {
236
+ if (freeCraft) {
237
+ return maxBy(Array.from(ingredientToPlatinumCocktail), (ingredientAndCocktail) => Math.min(...ingredientAndCocktail.map((item) => mallPrice(item))), true)[1];
238
+ }
239
+ else {
240
+ return maxBy(Array.from(ingredientToPlatinumCocktail), ([, cocktail]) => mallPrice(cocktail))[1];
241
+ }
242
+ }
243
+ /**
244
+ * Calculates the number of turns remaining for your Guzzlr quest
245
+ *
246
+ * @param useShoes Whether or not the calculation should assume you are using Guzzlr shoes
247
+ * @returns The expected number of turns needed to finish your current delivery
248
+ */
249
+ export function turnsLeftOnQuest(useShoes = false) {
250
+ const progressPerTurn = useShoes
251
+ ? Math.floor((10 - get("_guzzlrDeliveries")) * 1.5)
252
+ : 10 - get("_guzzlrDeliveries");
253
+ return Math.ceil((100 - get("guzzlrDeliveryProgress")) / progressPerTurn);
254
+ }
255
+ /**
256
+ * Calculates the expected Guzzlrbuck reward for completing your current Guzzlr quest
257
+ *
258
+ * @param usePants Whether or not we should account for Guzzlr pants in our calculation
259
+ * @returns The expected Guzzlrbuck reward of our current Guzzlr quest
260
+ */
261
+ export function expectedReward(usePants = false) {
262
+ switch (getTier()) {
263
+ case "platinum":
264
+ // 20-25
265
+ return 22.5 + (usePants ? 5 : 0);
266
+ case "gold":
267
+ // 5-7
268
+ return 6 + (usePants ? 3 : 0);
269
+ case "bronze":
270
+ // 2-4
271
+ return 3 + (usePants ? 3 : 0);
272
+ default:
273
+ return 0;
274
+ }
275
+ }
@@ -0,0 +1,51 @@
1
+ import { Skill } from "kolmafia";
2
+ import { Modifiers } from "../../modifier";
3
+ /**
4
+ * Determines whether you have() the Retro Cape.
5
+ *
6
+ * @returns Whether you have the Retro Cape available.
7
+ */
8
+ export declare function have(): boolean;
9
+ declare const Heroes: {
10
+ vampire: {
11
+ "Muscle Percent": number;
12
+ "Maximum HP": number;
13
+ };
14
+ heck: {
15
+ "Mysticality Percent": number;
16
+ "Maximum MP": number;
17
+ };
18
+ robot: {
19
+ "Moxie Percent": number;
20
+ "Maximum HP": number;
21
+ "Maximum MP": number;
22
+ };
23
+ };
24
+ declare type Hero = keyof typeof Heroes;
25
+ declare type Mode = "hold" | "thrill" | "kiss" | "kill";
26
+ export declare const currentHero: () => "vampire" | "heck" | "robot";
27
+ export declare const currentMode: () => Mode;
28
+ /**
29
+ * Tunes retro cape to a given setting
30
+ *
31
+ * @param hero The Superhero to set it to
32
+ * @param mode The washing instructions to set it to
33
+ * @returns Whether we successfully tuned the Retro Cape.
34
+ */
35
+ export declare function set(hero: Hero, mode: Mode): boolean;
36
+ /**
37
+ * Returns the expected Modifiers of the Retro Cape for a particular setting
38
+ *
39
+ * @param hero The Superhero setting
40
+ * @param mode The washing instructions setting
41
+ * @returns A Modifiers object describing the Retro Cape were it to be tuned to that setting.
42
+ */
43
+ export declare function getModifier(hero?: "vampire" | "heck" | "robot", mode?: Mode): Modifiers;
44
+ /**
45
+ * Tunes the Retro Cape to allow it to grant a particular skill.
46
+ *
47
+ * @param skill The skill to tune the Retro Cape to.
48
+ * @returns Whether we successfully tuned the cape.
49
+ */
50
+ export declare function tuneToSkill(skill: Skill): boolean;
51
+ export {};
@@ -0,0 +1,115 @@
1
+ import { cliExecute } from "kolmafia";
2
+ import { have as haveItem } from "../../lib";
3
+ import { get } from "../../property";
4
+ import { $item, $skill } from "../../template-string";
5
+ const item = $item `unwrapped knock-off retro superhero cape`;
6
+ /**
7
+ * Determines whether you have() the Retro Cape.
8
+ *
9
+ * @returns Whether you have the Retro Cape available.
10
+ */
11
+ export function have() {
12
+ return haveItem(item);
13
+ }
14
+ const Heroes = {
15
+ vampire: {
16
+ "Muscle Percent": 30,
17
+ "Maximum HP": 50,
18
+ },
19
+ heck: {
20
+ "Mysticality Percent": 30,
21
+ "Maximum MP": 50,
22
+ },
23
+ robot: {
24
+ "Moxie Percent": 30,
25
+ "Maximum HP": 25,
26
+ "Maximum MP": 25,
27
+ },
28
+ };
29
+ export const currentHero = () => get("retroCapeSuperhero");
30
+ export const currentMode = () => get("retroCapeWashingInstructions");
31
+ const modeMap = new Map([
32
+ [
33
+ ["vampire", "hold"],
34
+ {
35
+ "Hot Resistance": 3,
36
+ "Cold Resistance": 3,
37
+ "Stench Resistance": 3,
38
+ "Spooky Resistance": 3,
39
+ "Sleaze Resistance": 3,
40
+ },
41
+ ],
42
+ [
43
+ ["vampire", "thrill"],
44
+ {
45
+ "Muscle Experience": 3,
46
+ },
47
+ ],
48
+ [
49
+ ["vampire", "kiss"],
50
+ {
51
+ Skill: $skill `Smooch of the Daywalker`,
52
+ },
53
+ ],
54
+ [
55
+ ["vampire", "kill"],
56
+ {
57
+ Skill: $skill `Slay the Dead`,
58
+ },
59
+ ],
60
+ [["heck", "thrill"], { "Mysticality Experience": 3 }],
61
+ [["heck", "kiss"], { Skill: $skill `Unleash the Devil's Kiss` }],
62
+ [["robot", "hold"], { Skill: $skill `Deploy Robo-Handcuffs` }],
63
+ [["robot", "thrill"], { "Moxie Experience": 3 }],
64
+ [["robot", "kiss"], { Skill: $skill `Blow a Robo-Kiss` }],
65
+ [["robot", "kill"], { Skill: $skill `Precision Shot` }],
66
+ ]);
67
+ /**
68
+ * Tunes retro cape to a given setting
69
+ *
70
+ * @param hero The Superhero to set it to
71
+ * @param mode The washing instructions to set it to
72
+ * @returns Whether we successfully tuned the Retro Cape.
73
+ */
74
+ export function set(hero, mode) {
75
+ if (!have())
76
+ return false;
77
+ if (currentHero() === hero && currentMode() === mode)
78
+ return true;
79
+ cliExecute(`retrocape ${hero} ${mode}`);
80
+ return currentHero() === hero && currentMode() === mode;
81
+ }
82
+ /**
83
+ * Returns the expected Modifiers of the Retro Cape for a particular setting
84
+ *
85
+ * @param hero The Superhero setting
86
+ * @param mode The washing instructions setting
87
+ * @returns A Modifiers object describing the Retro Cape were it to be tuned to that setting.
88
+ */
89
+ export function getModifier(hero = currentHero(), mode = currentMode()) {
90
+ return {
91
+ ...Heroes[hero],
92
+ ...(modeMap.get([hero, mode]) ?? {}),
93
+ };
94
+ }
95
+ const skills = new Map([
96
+ [$skill `Smooch of the Daywalker`, ["vampire", "kiss"]],
97
+ [$skill `Slay the Dead`, ["vampire", "kill"]],
98
+ [$skill `Unleash the Devil's Kiss`, ["heck", "kiss"]],
99
+ [$skill `Deploy Robo-Handcuffs`, ["robot", "hold"]],
100
+ [$skill `Blow a Robo-Kiss`, ["robot", "kiss"]],
101
+ [$skill `Precision Shot`, ["robot", "kill"]],
102
+ ]);
103
+ /**
104
+ * Tunes the Retro Cape to allow it to grant a particular skill.
105
+ *
106
+ * @param skill The skill to tune the Retro Cape to.
107
+ * @returns Whether we successfully tuned the cape.
108
+ */
109
+ export function tuneToSkill(skill) {
110
+ const setting = skills.get(skill);
111
+ if (!setting || !have())
112
+ return false;
113
+ set(...setting);
114
+ return [currentHero(), currentMode()].every((element, index) => element === setting[index]);
115
+ }
@@ -0,0 +1,14 @@
1
+ import { Location, Monster, Item } from "kolmafia";
2
+ export declare const orb: Item;
3
+ /**
4
+ * Determines whether you `have` the Miniature Crystal Ball
5
+ *
6
+ * @returns Whether you `have` the Miniature Crystal Ball
7
+ */
8
+ export declare function have(): boolean;
9
+ /**
10
+ * Ponders your orb (if it is able to do so safely) and then returns a Map keyed by location consisting of extant predictions
11
+ *
12
+ * @returns A map of all predictions currently active in an adventurer's miniature crystal ball, after visiting the "ponder" URL to refresh them.
13
+ */
14
+ export declare function ponder(): Map<Location, Monster>;
@@ -0,0 +1,41 @@
1
+ import { toLocation, toMonster, availableAmount, Item, visitUrl, myTotalTurnsSpent, totalTurnsPlayed, } from "kolmafia";
2
+ import { canVisitUrl } from "../../lib";
3
+ import logger from "../../logger";
4
+ import { get } from "../../property";
5
+ export const orb = Item.get("miniature crystal ball");
6
+ /**
7
+ * Determines whether you `have` the Miniature Crystal Ball
8
+ *
9
+ * @returns Whether you `have` the Miniature Crystal Ball
10
+ */
11
+ export function have() {
12
+ return availableAmount(orb) > 0;
13
+ }
14
+ const parsedProp = () => get("crystalBallPredictions")
15
+ .split("|")
16
+ .filter(Boolean)
17
+ .map((element) => element.split(":"))
18
+ .filter((tuple) => tuple.length === 3)
19
+ .map(([, location, monster]) => [toLocation(location), toMonster(monster)]);
20
+ const getLastPondered = () => `${myTotalTurnsSpent()};${totalTurnsPlayed()};${get("lastAdventure")}`;
21
+ let lastPondered = "";
22
+ /**
23
+ * Ponders your orb (if it is able to do so safely) and then returns a Map keyed by location consisting of extant predictions
24
+ *
25
+ * @returns A map of all predictions currently active in an adventurer's miniature crystal ball, after visiting the "ponder" URL to refresh them.
26
+ */
27
+ export function ponder() {
28
+ if (!have())
29
+ return new Map();
30
+ if (lastPondered !== getLastPondered()) {
31
+ if (canVisitUrl()) {
32
+ logger.debug("Now pondering Crystal Ball.");
33
+ visitUrl("inventory.php?ponder=1", false);
34
+ lastPondered = getLastPondered();
35
+ }
36
+ else {
37
+ logger.debug("Failed to ponder Crystall Ball.");
38
+ }
39
+ }
40
+ return new Map(parsedProp());
41
+ }
@@ -0,0 +1,40 @@
1
+ import { Effect } from "kolmafia";
2
+ /**
3
+ * Returns whether the player owns an unpackaged Daylight Shavings Helmet, and it's available in either the inventory or other zones as determined by autoSatisfy settings.
4
+ *
5
+ * @returns whether we have the Daylight Shavings Helmet.
6
+ */
7
+ export declare function have(): boolean;
8
+ export declare const buffs: Effect[];
9
+ /**
10
+ * Tells you whether you currently have a beardbuff active. Warning: because of spaghetti, this does not determine buff eligibility.
11
+ *
12
+ * @returns Whether you currently have a beardbuff active
13
+ */
14
+ export declare function hasBuff(): boolean;
15
+ /**
16
+ * Checks to see if there are any beardbuffs you have more than 1 turn of, determining whether you are eligible to receive a buff post-combat.
17
+ *
18
+ * @returns Whether you current are able to get a buff from the Daylight Shaving Helmet.
19
+ */
20
+ export declare function buffAvailable(): boolean;
21
+ /**
22
+ * Calculates and returns the cycle of buffs that the hat should cycle through.
23
+ *
24
+ * @param playerclass The class to generate a cycle for
25
+ * @returns An ordered array consisting of the cycle for this class. The first element of the array will be the first buff a player should expect to get in a given ascension.
26
+ */
27
+ export declare function buffCycle(playerclass?: import("kolmafia").Class): Effect[];
28
+ /**
29
+ * Returns the next buff we expect to get from the shaving hat.
30
+ *
31
+ * @returns The next buff we expect to get from the shaving hat.
32
+ */
33
+ export declare function nextBuff(): Effect;
34
+ /**
35
+ * Returns the number of buffs we expect it'll take to get to a given buff. Returns 1 for the next buff, 2 for the one after that, and so on. Returns 11 for the most recent buff.
36
+ *
37
+ * @param buff The shaving buff in question
38
+ * @returns The number of buffs we expect it'll take to get to the inputted buff; null if said buff is not granted by the shaving hat.
39
+ */
40
+ export declare function buffsUntil(buff: Effect): number | null;