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,418 @@
1
+ import { Familiar, myFamiliar, numericModifier } from "kolmafia";
2
+ import { have } from "../../lib";
3
+ import { get } from "../../property";
4
+ import { $familiar, $item, $items } from "../../template-string";
5
+ import { sum } from "../../utils";
6
+ export const ridingFamiliars = [
7
+ {
8
+ familiar: $familiar `Puck Man`,
9
+ drops: $items `yellow pixel`,
10
+ probability: 0.25,
11
+ dropPredicate: () => get("_yellowPixelDropsCrown") < 25,
12
+ },
13
+ {
14
+ familiar: $familiar `Ms. Puck Man`,
15
+ drops: $items `yellow pixel`,
16
+ probability: 0.25,
17
+ dropPredicate: () => get("_yellowPixelDropsCrown") < 25,
18
+ },
19
+ {
20
+ familiar: $familiar `Grimstone Golem`,
21
+ drops: $items `grimstone mask`,
22
+ probability: 0.5,
23
+ dropPredicate: () => get("_grimstoneMaskDropsCrown") < 1,
24
+ },
25
+ {
26
+ familiar: $familiar `Knob Goblin Organ Grinder`,
27
+ drops: 30,
28
+ probability: 1,
29
+ },
30
+ {
31
+ familiar: $familiar `Happy Medium`,
32
+ drops: 30,
33
+ probability: 1,
34
+ },
35
+ {
36
+ familiar: $familiar `Garbage Fire`,
37
+ drops: $items `burning newspaper`,
38
+ probability: 0.5,
39
+ dropPredicate: () => get("_garbageFireDropsCrown") < 3,
40
+ },
41
+ {
42
+ familiar: $familiar `Machine Elf`,
43
+ drops: $items `abstraction: sensation, abstraction: thought, abstraction: action, abstraction: category, abstraction: perception, abstraction: purpose`,
44
+ probability: 0.2,
45
+ dropPredicate: () => get("_abstractionDropsCrown") < 25,
46
+ },
47
+ {
48
+ familiar: $familiar `Trick-or-Treating Tot`,
49
+ drops: $items `hoarded candy wad`,
50
+ probability: 0.5,
51
+ dropPredicate: () => get("_hoardedCandyDropsCrown") < 3,
52
+ },
53
+ {
54
+ familiar: $familiar `Warbear Drone`,
55
+ drops: $items `warbear whosit`,
56
+ probability: 1 / 4.5,
57
+ },
58
+ {
59
+ familiar: $familiar `Li'l Xenomorph`,
60
+ drops: $items `lunar isotope`,
61
+ probability: 0.05,
62
+ },
63
+ {
64
+ familiar: $familiar `Pottery Barn Owl`,
65
+ drops: $items `volcanic ash`,
66
+ probability: 0.1,
67
+ },
68
+ {
69
+ familiar: $familiar `Grim Brother`,
70
+ drops: $items `grim fairy tale`,
71
+ probability: 1,
72
+ dropPredicate: () => get("_grimFairyTaleDropsCrown") < 2,
73
+ },
74
+ {
75
+ familiar: $familiar `Optimistic Candle`,
76
+ drops: $items `glob of melted wax`,
77
+ probability: 1,
78
+ dropPredicate: () => get("_optimisticCandleDropsCrown") < 3,
79
+ },
80
+ {
81
+ familiar: $familiar `Adventurous Spelunker`,
82
+ drops: $items `teflon ore, velcro ore, vinyl ore, cardboard ore, styrofoam ore, bubblewrap ore`,
83
+ probability: 1,
84
+ dropPredicate: () => get("_oreDropsCrown") < 6,
85
+ },
86
+ {
87
+ familiar: $familiar `Twitching Space Critter`,
88
+ drops: $items `space beast fur`,
89
+ probability: 1,
90
+ dropPredicate: () => get("_spaceFurDropsCrown") < 1,
91
+ },
92
+ {
93
+ familiar: $familiar `Party Mouse`,
94
+ drops: 50,
95
+ probability: 0.05,
96
+ },
97
+ {
98
+ familiar: $familiar `Yule Hound`,
99
+ drops: $items `candy cane`,
100
+ probability: 1,
101
+ },
102
+ {
103
+ familiar: $familiar `Gluttonous Green Ghost`,
104
+ drops: $items `bean burrito, enchanted bean burrito, jumping bean burrito`,
105
+ probability: 1,
106
+ },
107
+ {
108
+ familiar: $familiar `Reassembled Blackbird`,
109
+ drops: $items `blackberry`,
110
+ probability: 1,
111
+ },
112
+ {
113
+ familiar: $familiar `Reconstituted Crow`,
114
+ drops: $items `blackberry`,
115
+ probability: 1,
116
+ },
117
+ {
118
+ familiar: $familiar `Hunchbacked Minion`,
119
+ drops: new Map([
120
+ [$item `disembodied brain`, 0.02],
121
+ [$item `skeleton bone`, 0.98],
122
+ ]),
123
+ probability: 1,
124
+ },
125
+ {
126
+ familiar: $familiar `Reanimated Reanimator`,
127
+ drops: $items `hot wing, broken skull`,
128
+ probability: 1,
129
+ },
130
+ {
131
+ familiar: $familiar `Attention-Deficit Demon`,
132
+ drops: $items `chorizo brownies, white chocolate and tomato pizza, carob chunk noodles`,
133
+ probability: 1,
134
+ },
135
+ {
136
+ familiar: $familiar `Piano Cat`,
137
+ drops: $items `beertini, papaya slung, salty slug, tomato daiquiri`,
138
+ probability: 1,
139
+ },
140
+ {
141
+ familiar: $familiar `Golden Monkey`,
142
+ drops: $items `gold nuggets`,
143
+ probability: 0.5,
144
+ },
145
+ {
146
+ familiar: $familiar `Robot Reindeer`,
147
+ drops: $items `candy cane, eggnog, fruitcake, gingerbread bugbear`,
148
+ probability: 0.3,
149
+ },
150
+ {
151
+ familiar: $familiar `Stocking Mimic`,
152
+ drops: $items `Angry Farmer candy, Cold Hots candy, Rock Pops, Tasty Fun Good rice candy, Wint-O-Fresh mint`,
153
+ probability: 0.3,
154
+ },
155
+ {
156
+ familiar: $familiar `BRICKO chick`,
157
+ drops: $items `BRICKO brick`,
158
+ probability: 1,
159
+ },
160
+ {
161
+ familiar: $familiar `Cotton Candy Carnie`,
162
+ drops: $items `cotton candy pinch`,
163
+ probability: 1,
164
+ },
165
+ {
166
+ familiar: $familiar `Untamed Turtle`,
167
+ drops: $items `snailmail bits, turtlemail bits, turtle wax`,
168
+ probability: 0.35,
169
+ },
170
+ {
171
+ familiar: $familiar `Astral Badger`,
172
+ drops: $items `spooky mushroom, Knob mushroom, Knoll mushroom`,
173
+ probability: 1,
174
+ },
175
+ {
176
+ familiar: $familiar `Green Pixie`,
177
+ drops: $items `bottle of tequila`,
178
+ probability: 0.2,
179
+ },
180
+ {
181
+ familiar: $familiar `Angry Goat`,
182
+ drops: $items `goat cheese pizza`,
183
+ probability: 1,
184
+ },
185
+ {
186
+ familiar: $familiar `Adorable Seal Larva`,
187
+ drops: $items `stench nuggets, spooky nuggets, hot nuggets, cold nuggets, sleaze nuggets`,
188
+ probability: 0.35,
189
+ },
190
+ {
191
+ familiar: $familiar `Ancient Yuletide Troll`,
192
+ drops: $items `candy cane, eggnog, fruitcake, gingerbread bugbear`,
193
+ probability: 0.3,
194
+ },
195
+ {
196
+ familiar: $familiar `Sweet Nutcracker`,
197
+ drops: $items `candy cane, eggnog, fruitcake, gingerbread bugbear`,
198
+ probability: 0.3,
199
+ },
200
+ {
201
+ familiar: $familiar `Casagnova Gnome`,
202
+ drops: 0,
203
+ probability: 0,
204
+ },
205
+ {
206
+ familiar: $familiar `Coffee Pixie`,
207
+ drops: 0,
208
+ probability: 0,
209
+ },
210
+ {
211
+ familiar: $familiar `Dancing Frog`,
212
+ drops: 0,
213
+ probability: 0,
214
+ },
215
+ {
216
+ familiar: $familiar `Grouper Groupie`,
217
+ drops: 0,
218
+ probability: 0,
219
+ },
220
+ {
221
+ familiar: $familiar `Hand Turkey`,
222
+ drops: 30,
223
+ probability: 1,
224
+ },
225
+ {
226
+ familiar: $familiar `Hippo Ballerina`,
227
+ drops: 0,
228
+ probability: 0,
229
+ },
230
+ {
231
+ familiar: $familiar `Jitterbug`,
232
+ drops: 0,
233
+ probability: 0,
234
+ },
235
+ {
236
+ familiar: $familiar `Leprechaun`,
237
+ drops: 30,
238
+ probability: 1,
239
+ },
240
+ {
241
+ familiar: $familiar `Obtuse Angel`,
242
+ drops: 0,
243
+ probability: 0,
244
+ },
245
+ {
246
+ familiar: $familiar `Psychedelic Bear`,
247
+ drops: 0,
248
+ probability: 0,
249
+ },
250
+ {
251
+ familiar: $familiar `Robortender`,
252
+ drops: 0,
253
+ probability: 0,
254
+ },
255
+ {
256
+ familiar: $familiar `Ghost of Crimbo Commerce`,
257
+ drops: 30,
258
+ probability: 1,
259
+ },
260
+ {
261
+ familiar: $familiar `Hobo Monkey`,
262
+ drops: 0,
263
+ probability: 0,
264
+ },
265
+ {
266
+ familiar: $familiar `Rockin' Robin`,
267
+ drops: 60,
268
+ probability: 1,
269
+ },
270
+ {
271
+ familiar: $familiar `Feral Kobold`,
272
+ drops: 30,
273
+ probability: 1,
274
+ },
275
+ {
276
+ familiar: $familiar `Oily Woim`,
277
+ drops: 30,
278
+ probability: 1,
279
+ },
280
+ {
281
+ familiar: $familiar `Cat Burglar`,
282
+ drops: 0,
283
+ probability: 0,
284
+ },
285
+ {
286
+ familiar: $familiar `Misshapen Animal Skeleton`,
287
+ drops: 30,
288
+ probability: 1,
289
+ },
290
+ {
291
+ familiar: $familiar `Gelatinous Cubeling`,
292
+ drops: 0,
293
+ probability: 0,
294
+ },
295
+ {
296
+ familiar: $familiar `Frozen Gravy Fairy`,
297
+ drops: $items `cold nuggets`,
298
+ probability: 1,
299
+ },
300
+ {
301
+ familiar: $familiar `Stinky Gravy Fairy`,
302
+ drops: $items `stench nuggets`,
303
+ probability: 1,
304
+ },
305
+ {
306
+ familiar: $familiar `Sleazy Gravy Fairy`,
307
+ drops: $items `sleaze nuggets`,
308
+ probability: 1,
309
+ },
310
+ {
311
+ familiar: $familiar `Spooky Gravy Fairy`,
312
+ drops: $items `spooky nuggets`,
313
+ probability: 1,
314
+ },
315
+ {
316
+ familiar: $familiar `Flaming Gravy Fairy`,
317
+ // drops a hot nugget every combat, 5 of which can be used to make a hot wad
318
+ drops: $items `hot nuggets`,
319
+ probability: 1,
320
+ },
321
+ ];
322
+ const FULL_RIDING_LIST = [
323
+ ...ridingFamiliars,
324
+ ...Familiar.all()
325
+ .filter((f) => !ridingFamiliars.some(({ familiar }) => familiar === f))
326
+ .map((familiar) => ({ familiar, drops: 0, probability: 1 })),
327
+ ];
328
+ /**
329
+ * Value a specified familiar Crown rider
330
+ *
331
+ * @param rider Familiar to value
332
+ * @param modifierValueFunction Value of the extra modifiers the familiar provides,
333
+ * @param dropsValueFunction Value to assign the drops of the familiar gives
334
+ * @param ignoreLimitedDrops Whether to ignore drops that are daily or otherwise limited
335
+ * @returns Rider value (in meat)
336
+ */
337
+ export function valueRider(rider, modifierValueFunction, dropsValueFunction, ignoreLimitedDrops = false) {
338
+ const dropValue = !rider.dropPredicate || (rider.dropPredicate() && !ignoreLimitedDrops)
339
+ ? rider.probability *
340
+ (typeof rider.drops === "number"
341
+ ? rider.drops
342
+ : dropsValueFunction(rider.drops))
343
+ : 0;
344
+ const modifierValue = modifierValueFunction(rider.familiar);
345
+ return dropValue + modifierValue;
346
+ }
347
+ const riderModes = new Map();
348
+ const DEFAULTS = {
349
+ modifierValueFunction: () => 0,
350
+ dropsValueFunction: () => 0,
351
+ ignoreLimitedDrops: false,
352
+ excludeCurrentFamiliar: true,
353
+ };
354
+ /**
355
+ * Creates a rider mode for this session
356
+ *
357
+ * @param name Rider mode name
358
+ * @param details An object consisting of various settings for the RiderMode:
359
+ * @param details.modifierValueFunction Function to value a familiar itself, often using modifiers,
360
+ * @param details.dropsValueFunction Function to value the drops of a familiar, which are stored as an `Item[]` or `Map<Item, number>`
361
+ * @param details.ignoreLimitedDrops Whether to ignore daily or otherwise limited drops
362
+ * @param details.excludeCurrentFamiliar Whether to exclude the player's current familiar
363
+ * @returns Map of all rider modes created this session, including the one that was just made
364
+ */
365
+ export function createRiderMode(name, details) {
366
+ return riderModes.set(name, { ...DEFAULTS, ...details });
367
+ }
368
+ /**
369
+ * @param name The name of the `RiderMode` to check
370
+ * @returns Whether or not said `RiderMode` exists
371
+ */
372
+ export function hasRiderMode(name) {
373
+ return riderModes.has(name);
374
+ }
375
+ const riderLists = new Map();
376
+ /**
377
+ * Pick a rider
378
+ *
379
+ * @param mode Mode by which to select possible riders
380
+ * @returns Picked faimiliar rider or null if no rider could be selected
381
+ */
382
+ export function pickRider(mode) {
383
+ const modeData = riderModes.get(mode);
384
+ if (!modeData)
385
+ return null;
386
+ const { modifierValueFunction, dropsValueFunction, ignoreLimitedDrops, excludeCurrentFamiliar, } = modeData;
387
+ if (!riderLists.has(mode)) {
388
+ riderLists.set(mode, FULL_RIDING_LIST.filter(({ familiar }) => have(familiar)).sort((a, b) => valueRider(b, modifierValueFunction, dropsValueFunction, ignoreLimitedDrops) -
389
+ valueRider(a, modifierValueFunction, dropsValueFunction, ignoreLimitedDrops)));
390
+ }
391
+ const list = riderLists.get(mode);
392
+ if (list) {
393
+ const riderToReturn = list.find(({ dropPredicate, familiar }) => (dropPredicate?.() ?? true) &&
394
+ (!excludeCurrentFamiliar || myFamiliar() !== familiar));
395
+ return riderToReturn ?? null;
396
+ }
397
+ return null;
398
+ }
399
+ /**
400
+ * Find the associated NumericModifier for a given familiar when enthroned or bjornified
401
+ *
402
+ * @param modifier The NumericModifier in question
403
+ * @param familiar The Familiar in question
404
+ * @returns The value of the given numeric modifier for the Crown of Thrones (or buddy bjorn) when the given familiar is encromulated
405
+ */
406
+ export function getModifier(modifier, familiar) {
407
+ return numericModifier(`Throne:${familiar}`, modifier);
408
+ }
409
+ /**
410
+ * Create a `modifierValueFunction` for a familiar.
411
+ *
412
+ * @param modifiers An array consisting of the `NumericModifier`s relevant to your valuation
413
+ * @param functions An object keyed by `NumericModifier`s whose values are functions that map the the result of a modifier to its corresponding valuation
414
+ * @returns A function that maps a familiar to the value of its modifiers in the crown of thrones or buddy bjorn.
415
+ */
416
+ export function createModifierValueFunction(modifiers, functions) {
417
+ return (familiar) => sum(modifiers, (modifier) => functions[modifier](getModifier(modifier, familiar)));
418
+ }
@@ -0,0 +1,29 @@
1
+ import { Effect, Item } from "kolmafia";
2
+ /**
3
+ * Find the name length required to get an effect from The Mad Tea Party
4
+ *
5
+ * @param effect The effect to check
6
+ * @returns The number of characters required to get an effect
7
+ */
8
+ export declare function findTeaPartyHatLength(effect: Effect): number;
9
+ /**
10
+ * Find all hats that will get an effect from The Mad Tea Party
11
+ *
12
+ * @param effect The effect to check
13
+ * @returns An array of equippable hats
14
+ */
15
+ export declare function findTeaPartyHats(effect: Effect): Item[];
16
+ /**
17
+ * Check if a hat is available to get an effect from The Mad Tea Party
18
+ *
19
+ * @param effect The effect to check
20
+ * @returns If any valid hat is in inventory
21
+ */
22
+ export declare function haveTeaPartyHat(effect: Effect): boolean;
23
+ /**
24
+ * Try to get an effect from The Mad Tea Party
25
+ *
26
+ * @param effect The effect to get
27
+ * @returns If the request was successful
28
+ */
29
+ export declare function tryTeaPartyBuff(effect: Effect): boolean;
@@ -0,0 +1,89 @@
1
+ import { canEquip, cliExecute, haveEffect, Item, toSlot, } from "kolmafia";
2
+ import { ensureEffect, have } from "../../lib";
3
+ import { get } from "../../property";
4
+ import { $effect, $slot } from "../../template-string";
5
+ const firstTeaPartyEffect = $effect `Assaulted with Pepper`;
6
+ const lastTeaPartyEffect = $effect `Oleaginous Soles`;
7
+ /**
8
+ * Checks if an item is a valid hat for The Mad Tea Party
9
+ *
10
+ * @param item The item to check
11
+ * @param characters The desired nameLength for The Mad Tea Party effect
12
+ * @returns If this item is a valid hat for The Mad Tea Party
13
+ */
14
+ function validTeaPartyHat(item, characters) {
15
+ if (toSlot(item) !== $slot `hat` || !canEquip(item)) {
16
+ return false;
17
+ }
18
+ else if (characters <= 5) {
19
+ return item.nameLength <= 5;
20
+ }
21
+ else if (characters >= 30) {
22
+ return item.nameLength >= 30;
23
+ }
24
+ return characters === item.nameLength;
25
+ }
26
+ /**
27
+ * Find the name length required to get an effect from The Mad Tea Party
28
+ *
29
+ * @param effect The effect to check
30
+ * @returns The number of characters required to get an effect
31
+ */
32
+ export function findTeaPartyHatLength(effect) {
33
+ const effectId = effect.id;
34
+ if (effectId < firstTeaPartyEffect.id || effectId > lastTeaPartyEffect.id) {
35
+ throw new Error(`Invalid Mad Tea Party effect ${effect}`);
36
+ }
37
+ return Math.floor(effectId - firstTeaPartyEffect.id + 5);
38
+ }
39
+ /**
40
+ * Find all hats that will get an effect from The Mad Tea Party
41
+ *
42
+ * @param effect The effect to check
43
+ * @returns An array of equippable hats
44
+ */
45
+ export function findTeaPartyHats(effect) {
46
+ const characters = findTeaPartyHatLength(effect);
47
+ if (!characters) {
48
+ throw new Error(`Invalid Mad Tea Party effect ${effect}`);
49
+ }
50
+ return Item.all().filter((item) => validTeaPartyHat(item, characters));
51
+ }
52
+ /**
53
+ * Check if a hat is available to get an effect from The Mad Tea Party
54
+ *
55
+ * @param effect The effect to check
56
+ * @returns If any valid hat is in inventory
57
+ */
58
+ export function haveTeaPartyHat(effect) {
59
+ const characters = findTeaPartyHatLength(effect);
60
+ if (!characters) {
61
+ throw new Error(`Invalid Mad Tea Party effect ${effect}`);
62
+ }
63
+ return (Item.all().find((item) => validTeaPartyHat(item, characters) && have(item)) !== undefined);
64
+ }
65
+ /**
66
+ * Try to get an effect from The Mad Tea Party
67
+ *
68
+ * @param effect The effect to get
69
+ * @returns If the request was successful
70
+ */
71
+ export function tryTeaPartyBuff(effect) {
72
+ if (get("_madTeaParty")) {
73
+ return false;
74
+ }
75
+ const characters = findTeaPartyHatLength(effect);
76
+ if (!characters) {
77
+ throw new Error(`Invalid Mad Tea Party effect ${effect}`);
78
+ }
79
+ if (!haveTeaPartyHat(effect)) {
80
+ return false;
81
+ }
82
+ ensureEffect($effect `Down the Rabbit Hole`);
83
+ if (!have($effect `Down the Rabbit Hole`)) {
84
+ return false;
85
+ }
86
+ const turns = haveEffect(effect);
87
+ cliExecute(`hatter ${characters}`);
88
+ return have(effect) && haveEffect(effect) > turns;
89
+ }
@@ -0,0 +1,9 @@
1
+ import { Item } from "kolmafia";
2
+ /**
3
+ * @returns true if the player can Summon Dice
4
+ */
5
+ export declare function have(): boolean;
6
+ /**
7
+ * @returns map containing the chance of an item to be summoned
8
+ */
9
+ export declare function expected(): Map<Item, number>;
@@ -0,0 +1,24 @@
1
+ import { have as _have } from "../../lib";
2
+ import { $item, $skill } from "../../template-string";
3
+ const summonSkill = $skill `Summon Dice`;
4
+ const libramChance = 1.0 / 6;
5
+ const libramExpected = new Map([
6
+ [$item `d4`, libramChance],
7
+ [$item `d6`, libramChance],
8
+ [$item `d8`, libramChance],
9
+ [$item `d10`, libramChance],
10
+ [$item `d12`, libramChance],
11
+ [$item `d20`, libramChance],
12
+ ]);
13
+ /**
14
+ * @returns true if the player can Summon Dice
15
+ */
16
+ export function have() {
17
+ return _have(summonSkill);
18
+ }
19
+ /**
20
+ * @returns map containing the chance of an item to be summoned
21
+ */
22
+ export function expected() {
23
+ return libramExpected;
24
+ }
@@ -0,0 +1,33 @@
1
+ import { Monster } from "kolmafia";
2
+ import { Copier } from "../../Copier";
3
+ /**
4
+ * @returns whether the player has an Obtuse Angel
5
+ */
6
+ export declare function have(): boolean;
7
+ /**
8
+ * @returns number of badly romantic arrows used today
9
+ */
10
+ export declare function getBadlyRomanticArrowUses(): number;
11
+ /**
12
+ * @returns whether badly romantic arrow can still be used
13
+ */
14
+ export declare function haveBadlyRomanticArrowUsesRemaining(): boolean;
15
+ /**
16
+ * @returns whether the player could use badly romantic arrow in theory
17
+ */
18
+ export declare function couldUseBadlyRomanticArrow(): boolean;
19
+ /**
20
+ * Prepares badly romantic arrow for use
21
+ *
22
+ * @returns success
23
+ */
24
+ export declare function prepareBadlyRomanticArrow(): boolean;
25
+ /**
26
+ * @returns whether the player can use badly romantic arrow right now
27
+ */
28
+ export declare function canUseBadlyRomanticArrow(): boolean;
29
+ /**
30
+ * @returns current badly romantic arrow monster target
31
+ */
32
+ export declare function getBadlyRomanticArrowMonster(): Monster | null;
33
+ export declare const BadlyRomanticArrow: Copier;
@@ -0,0 +1,51 @@
1
+ import { useFamiliar } from "kolmafia";
2
+ import { Copier } from "../../Copier";
3
+ import { have as _have, isCurrentFamiliar } from "../../lib";
4
+ import { get } from "../../property";
5
+ import { $familiar } from "../../template-string";
6
+ const familiar = $familiar `Obtuse Angel`;
7
+ /**
8
+ * @returns whether the player has an Obtuse Angel
9
+ */
10
+ export function have() {
11
+ return _have(familiar);
12
+ }
13
+ /**
14
+ * @returns number of badly romantic arrows used today
15
+ */
16
+ export function getBadlyRomanticArrowUses() {
17
+ return Math.max(0, get("_badlyRomanticArrows"));
18
+ }
19
+ /**
20
+ * @returns whether badly romantic arrow can still be used
21
+ */
22
+ export function haveBadlyRomanticArrowUsesRemaining() {
23
+ return getBadlyRomanticArrowUses() === 0;
24
+ }
25
+ /**
26
+ * @returns whether the player could use badly romantic arrow in theory
27
+ */
28
+ export function couldUseBadlyRomanticArrow() {
29
+ return have() && haveBadlyRomanticArrowUsesRemaining();
30
+ }
31
+ /**
32
+ * Prepares badly romantic arrow for use
33
+ *
34
+ * @returns success
35
+ */
36
+ export function prepareBadlyRomanticArrow() {
37
+ return useFamiliar(familiar);
38
+ }
39
+ /**
40
+ * @returns whether the player can use badly romantic arrow right now
41
+ */
42
+ export function canUseBadlyRomanticArrow() {
43
+ return isCurrentFamiliar(familiar) && haveBadlyRomanticArrowUsesRemaining();
44
+ }
45
+ /**
46
+ * @returns current badly romantic arrow monster target
47
+ */
48
+ export function getBadlyRomanticArrowMonster() {
49
+ return get("romanticTarget");
50
+ }
51
+ export const BadlyRomanticArrow = new Copier(() => couldUseBadlyRomanticArrow(), () => prepareBadlyRomanticArrow(), () => canUseBadlyRomanticArrow(), () => getBadlyRomanticArrowMonster());
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @returns whether the player has the Pair of Stomping Boots in their terrarium
3
+ */
4
+ export declare function have(): boolean;
5
+ /**
6
+ * @returns number of free runaways that have already been used today
7
+ * @see Bandersnatch with which the Stomping Boots shares a counter
8
+ */
9
+ export declare function getRunaways(): number;
10
+ /**
11
+ * @param considerWeightAdjustment Include familiar weight modifiers
12
+ * @returns total number of free runaways that the player can get from their Stomping Boots
13
+ */
14
+ export declare function getMaxRunaways(considerWeightAdjustment?: boolean): number;
15
+ /**
16
+ * @param considerWeightAdjustment Whether to consider weight adjustment in free run calculation
17
+ * @returns the number of remaining free runaways the player can get from their Stomping Boots
18
+ */
19
+ export declare function getRemainingRunaways(considerWeightAdjustment?: boolean): number;
20
+ /**
21
+ * @param considerWeightAdjustment Include familiar weight modifiers
22
+ * @returns whether the player could use their Stomping Boots to get a free run in theory
23
+ */
24
+ export declare function couldRunaway(considerWeightAdjustment?: boolean): boolean;
25
+ /**
26
+ * @returns whether the player can use their Stomping Boots to get a free run right now
27
+ */
28
+ export declare function canRunaway(): boolean;
29
+ /**
30
+ * Prepare a Stomping Boots runaway.
31
+ *
32
+ * This will take your Stomping Boots with you.
33
+ * If any of those steps fail, it will return false.
34
+ *
35
+ * @returns Success
36
+ */
37
+ export declare function prepareRunaway(): boolean;