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,69 @@
1
+ import { toItem, availableAmount } from "kolmafia";
2
+ import { get } from "../../property";
3
+ export const cleaver = toItem("June cleaver");
4
+ /**
5
+ * Determines whether you currently `have` the June cleaver
6
+ *
7
+ * @returns Whether you currently `have` the June cleaver
8
+ */
9
+ export function have() {
10
+ return availableAmount(cleaver) > 0;
11
+ }
12
+ /**
13
+ * Determines the number of cleaver-combats it takes to get a particular encounter number.
14
+ *
15
+ * @param encounters The ordinal value of the June cleaver encounter you're asking about
16
+ * @returns The number of cleaver-combats it takes to get a particular encounter number--this is agnostic of your current fights.
17
+ */
18
+ export function getInterval(encounters = get("_juneCleaverEncounters")) {
19
+ return [1, 6, 10, 12, 15, 20][encounters] ?? 30;
20
+ }
21
+ /**
22
+ * Determines the number of cleaver-combats it takes to get a particular encounter number, when a skip is in the mix
23
+ *
24
+ * @param encounters The ordinal value of the June cleaver encounter you're asking about, assuming you've skipped
25
+ * @returns The number of cleaver-combats it would take to get a particular encounter after skipping.
26
+ */
27
+ export function getSkippedInterval(encounters = get("_juneCleaverEncounters")) {
28
+ return [1, 2, 3, 3, 4, 5][encounters] ?? 8;
29
+ }
30
+ /**
31
+ * Determines the amount of bonus elemental damage your cleaver currently grants
32
+ *
33
+ * @param element The element in question
34
+ * @returns The bonus damage your cleaver currently gives for a given element.
35
+ */
36
+ export function damage(element) {
37
+ return get(`_juneCleaver${element}`);
38
+ }
39
+ /**
40
+ * Determines the number of times today you can skip a june cleaver choice
41
+ *
42
+ * @returns The number of additional times you can select option 4 in a cleaver choice today.
43
+ */
44
+ export function skipsRemaining() {
45
+ return 5 - get("_juneCleaverSkips");
46
+ }
47
+ export const choices = [
48
+ 1467, 1468, 1469, 1470, 1471, 1472, 1473, 1474, 1475,
49
+ ];
50
+ /**
51
+ * Returns the current June cleaver queue; you are not currently able to encounter any June cleaver choice adventure in this list
52
+ *
53
+ * @returns An array consisting of the cleaver choice adventures currently in the queue.
54
+ */
55
+ export function queue() {
56
+ return get("juneCleaverQueue")
57
+ .split(",")
58
+ .filter((x) => x.trim().length > 0)
59
+ .map((x) => parseInt(x));
60
+ }
61
+ /**
62
+ * Determines which choices are currently eligible to be encountered with your June cleaver
63
+ *
64
+ * @returns An array consisting of the cleaver choice adventures not currently in the queue.
65
+ */
66
+ export function choicesAvailable() {
67
+ const currentQueue = queue();
68
+ return choices.filter((choice) => !currentQueue.includes(choice));
69
+ }
@@ -0,0 +1,146 @@
1
+ import { Effect } from "kolmafia";
2
+ import { Tuple } from "../../utils";
3
+ /**
4
+ * Determines whether the Model Train Set is your current workshed
5
+ *
6
+ * @returns Whether the Model Train Set is your current workshed
7
+ */
8
+ export declare function installed(): boolean;
9
+ /**
10
+ * Determines whether you `have` the model train set (or if it is installed)
11
+ *
12
+ * @returns Whether you `have` the model train set or it's installed
13
+ */
14
+ export declare function have(): boolean;
15
+ export declare enum Station {
16
+ /**
17
+ * Unknown station
18
+ */
19
+ UNKNOWN = "",
20
+ /**
21
+ * Empty station
22
+ */
23
+ EMPTY = "empty",
24
+ /**
25
+ * Gain 800 meat
26
+ */
27
+ GAIN_MEAT = "meat_mine",
28
+ /**
29
+ * Effect: Regenerate MP
30
+ */
31
+ TOWER_FIZZY = "tower_fizzy",
32
+ /**
33
+ * Gain mus, mys, mox stats
34
+ */
35
+ VIEWING_PLATFORM = "viewing_platform",
36
+ /**
37
+ * Effect: Hot resist, cold damage
38
+ */
39
+ TOWER_FROZEN = "tower_frozen",
40
+ /**
41
+ * Effect: Stench resist, spooky damage
42
+ */
43
+ SPOOKY_GRAVEYARD = "spooky_graveyard",
44
+ /**
45
+ * Get smut bridge part, or stats
46
+ */
47
+ LOGGING_MILL = "logging_mill",
48
+ /**
49
+ * Get some candy
50
+ */
51
+ CANDY_FACTORY = "candy_factory",
52
+ /**
53
+ * Double strength of next station
54
+ */
55
+ COAL_HOPPER = "coal_hopper",
56
+ /**
57
+ * Effect: Cold resist, stench damage
58
+ */
59
+ TOWER_SEWAGE = "tower_sewage",
60
+ /**
61
+ * Effect: Spooky resist, sleaze damage
62
+ */
63
+ OIL_REFINERY = "oil_refinery",
64
+ /**
65
+ * Effect: Sleaze resist, hot damage
66
+ */
67
+ OIL_BRIDGE = "oil_bridge",
68
+ /**
69
+ * Effect: Increased Monster Level
70
+ */
71
+ WATER_BRIDGE = "water_bridge",
72
+ /**
73
+ * Get moxie stats
74
+ */
75
+ GROIN_SILO = "groin_silo",
76
+ /**
77
+ * Get random booze
78
+ */
79
+ GRAIN_SILO = "grain_silo",
80
+ /**
81
+ * Get mys stats
82
+ */
83
+ BRAIN_SILO = "brain_silo",
84
+ /**
85
+ * Get muscle stats
86
+ */
87
+ BRAWN_SILO = "brawn_silo",
88
+ /**
89
+ * Effect: 50% food drop
90
+ */
91
+ PRAWN_SILO = "prawn_silo",
92
+ /**
93
+ * Dupe last food dropped, or gain random food
94
+ */
95
+ TRACKSIDE_DINER = "trackside_diner",
96
+ /**
97
+ * Drop random ore, or trapper ore if known
98
+ */
99
+ ORE_HOPPER = "ore_hopper"
100
+ }
101
+ /**
102
+ * Returns an effect--if one exists--for a given train station
103
+ *
104
+ * @param station The train station to check the effect of
105
+ * @returns The effect associated with the given station
106
+ */
107
+ export declare function effect(station: Station): Effect | null;
108
+ /**
109
+ * Returns an effect--if one exists--for a given train station, assuming it's been primed by the coal station
110
+ *
111
+ * @param station The train station to check the doubled effect of
112
+ * @returns The effect associated with given station, under the influence of coal
113
+ */
114
+ export declare function doubledEffect(station: Station): Effect | null;
115
+ export declare type Cycle = Tuple<Station, 8>;
116
+ /**
117
+ * Determines the current configuration of train stations
118
+ *
119
+ * @returns An 8-tuple consisting of the stations currently installed in your Model Train Set; this functions even if the Model Train Set isn't your active workshed
120
+ */
121
+ export declare function cycle(): Cycle;
122
+ /**
123
+ * Determines how many turns until you can next configure the Model Train Set
124
+ *
125
+ * @returns How many turns until you can next configure the Model Train Set
126
+ */
127
+ export declare function nextConfigurable(): number;
128
+ /**
129
+ * Determines whether you can currently configure your Model Train Set
130
+ *
131
+ * @returns Whether you can currently configure your Model Train Set
132
+ */
133
+ export declare function canConfigure(): boolean;
134
+ /**
135
+ * Sets your model train station to the given configuration, if able
136
+ *
137
+ * @param configuration The cycle to try to set your model train station to
138
+ * @returns Whether your model train station matches the given configuration
139
+ */
140
+ export declare function setConfiguration(configuration: Cycle): boolean;
141
+ /**
142
+ * Determines the next station you expect to encounter when the Model Train Station is active
143
+ *
144
+ * @returns The next station you expect to encounter when the Model Train Station is active
145
+ */
146
+ export declare function next(): Station;
@@ -0,0 +1,228 @@
1
+ import { Effect, getWorkshed, runChoice, visitUrl } from "kolmafia";
2
+ import { have as have_ } from "../../lib";
3
+ import { get } from "../../property";
4
+ import { $item } from "../../template-string";
5
+ import { clamp } from "../../utils";
6
+ const item = $item `model train set`;
7
+ /**
8
+ * Determines whether the Model Train Set is your current workshed
9
+ *
10
+ * @returns Whether the Model Train Set is your current workshed
11
+ */
12
+ export function installed() {
13
+ return getWorkshed() === item;
14
+ }
15
+ /**
16
+ * Determines whether you `have` the model train set (or if it is installed)
17
+ *
18
+ * @returns Whether you `have` the model train set or it's installed
19
+ */
20
+ export function have() {
21
+ return installed() || have_(item);
22
+ }
23
+ export var Station;
24
+ (function (Station) {
25
+ /**
26
+ * Unknown station
27
+ */
28
+ Station["UNKNOWN"] = "";
29
+ /**
30
+ * Empty station
31
+ */
32
+ Station["EMPTY"] = "empty";
33
+ /**
34
+ * Gain 800 meat
35
+ */
36
+ Station["GAIN_MEAT"] = "meat_mine";
37
+ /**
38
+ * Effect: Regenerate MP
39
+ */
40
+ Station["TOWER_FIZZY"] = "tower_fizzy";
41
+ /**
42
+ * Gain mus, mys, mox stats
43
+ */
44
+ Station["VIEWING_PLATFORM"] = "viewing_platform";
45
+ /**
46
+ * Effect: Hot resist, cold damage
47
+ */
48
+ Station["TOWER_FROZEN"] = "tower_frozen";
49
+ /**
50
+ * Effect: Stench resist, spooky damage
51
+ */
52
+ Station["SPOOKY_GRAVEYARD"] = "spooky_graveyard";
53
+ /**
54
+ * Get smut bridge part, or stats
55
+ */
56
+ Station["LOGGING_MILL"] = "logging_mill";
57
+ /**
58
+ * Get some candy
59
+ */
60
+ Station["CANDY_FACTORY"] = "candy_factory";
61
+ /**
62
+ * Double strength of next station
63
+ */
64
+ Station["COAL_HOPPER"] = "coal_hopper";
65
+ /**
66
+ * Effect: Cold resist, stench damage
67
+ */
68
+ Station["TOWER_SEWAGE"] = "tower_sewage";
69
+ /**
70
+ * Effect: Spooky resist, sleaze damage
71
+ */
72
+ Station["OIL_REFINERY"] = "oil_refinery";
73
+ /**
74
+ * Effect: Sleaze resist, hot damage
75
+ */
76
+ Station["OIL_BRIDGE"] = "oil_bridge";
77
+ /**
78
+ * Effect: Increased Monster Level
79
+ */
80
+ Station["WATER_BRIDGE"] = "water_bridge";
81
+ /**
82
+ * Get moxie stats
83
+ */
84
+ Station["GROIN_SILO"] = "groin_silo";
85
+ /**
86
+ * Get random booze
87
+ */
88
+ Station["GRAIN_SILO"] = "grain_silo";
89
+ /**
90
+ * Get mys stats
91
+ */
92
+ Station["BRAIN_SILO"] = "brain_silo";
93
+ /**
94
+ * Get muscle stats
95
+ */
96
+ Station["BRAWN_SILO"] = "brawn_silo";
97
+ /**
98
+ * Effect: 50% food drop
99
+ */
100
+ Station["PRAWN_SILO"] = "prawn_silo";
101
+ /**
102
+ * Dupe last food dropped, or gain random food
103
+ */
104
+ Station["TRACKSIDE_DINER"] = "trackside_diner";
105
+ /**
106
+ * Drop random ore, or trapper ore if known
107
+ */
108
+ Station["ORE_HOPPER"] = "ore_hopper";
109
+ })(Station || (Station = {}));
110
+ const trainsetEffects = new Map([
111
+ [Station.TOWER_FIZZY, Effect.get("Carbonated")],
112
+ [Station.TOWER_FROZEN, Effect.get("Frozen")],
113
+ [Station.SPOOKY_GRAVEYARD, Effect.get("Shivering Spine")],
114
+ [Station.TOWER_SEWAGE, Effect.get("Hot Soupy Garbage")],
115
+ [Station.OIL_BRIDGE, Effect.get("Burningly Oiled")],
116
+ [Station.OIL_REFINERY, Effect.get("Spookily Greasy")],
117
+ [Station.WATER_BRIDGE, Effect.get("Troubled Waters")],
118
+ [Station.PRAWN_SILO, Effect.get("Craving Prawns")],
119
+ ]);
120
+ const trainsetEffectsDoubled = new Map([
121
+ [Station.TOWER_FIZZY, Effect.get("Double Carbonated")],
122
+ [Station.TOWER_FROZEN, Effect.get("Double Frozen")],
123
+ [Station.SPOOKY_GRAVEYARD, Effect.get("Doubly Shivering Spine")],
124
+ [Station.TOWER_SEWAGE, Effect.get("Double Hot Soupy Garbage")],
125
+ [Station.OIL_BRIDGE, Effect.get("Doubly Burningly Oiled")],
126
+ [Station.OIL_REFINERY, Effect.get("Doubly Spookily Greasy")],
127
+ [Station.WATER_BRIDGE, Effect.get("Doubly Troubled Waters")],
128
+ [Station.PRAWN_SILO, Effect.get("Doubly Craving Prawns")],
129
+ ]);
130
+ /**
131
+ * Returns an effect--if one exists--for a given train station
132
+ *
133
+ * @param station The train station to check the effect of
134
+ * @returns The effect associated with the given station
135
+ */
136
+ export function effect(station) {
137
+ return trainsetEffects.get(station) ?? null;
138
+ }
139
+ /**
140
+ * Returns an effect--if one exists--for a given train station, assuming it's been primed by the coal station
141
+ *
142
+ * @param station The train station to check the doubled effect of
143
+ * @returns The effect associated with given station, under the influence of coal
144
+ */
145
+ export function doubledEffect(station) {
146
+ return trainsetEffectsDoubled.get(station) ?? null;
147
+ }
148
+ /**
149
+ * Determines the current configuration of train stations
150
+ *
151
+ * @returns An 8-tuple consisting of the stations currently installed in your Model Train Set; this functions even if the Model Train Set isn't your active workshed
152
+ */
153
+ export function cycle() {
154
+ return get("trainsetConfiguration").split(",");
155
+ }
156
+ /**
157
+ * Determines how many turns until you can next configure the Model Train Set
158
+ *
159
+ * @returns How many turns until you can next configure the Model Train Set
160
+ */
161
+ export function nextConfigurable() {
162
+ return clamp(get("lastTrainsetConfiguration") + 40 - get("trainsetPosition"), 0, 40);
163
+ }
164
+ /**
165
+ * Determines whether you can currently configure your Model Train Set
166
+ *
167
+ * @returns Whether you can currently configure your Model Train Set
168
+ */
169
+ export function canConfigure() {
170
+ return installed() && !nextConfigurable();
171
+ }
172
+ const pieces = [
173
+ Station.EMPTY,
174
+ Station.GAIN_MEAT,
175
+ Station.TOWER_FIZZY,
176
+ Station.VIEWING_PLATFORM,
177
+ Station.TOWER_FROZEN,
178
+ Station.SPOOKY_GRAVEYARD,
179
+ Station.LOGGING_MILL,
180
+ Station.CANDY_FACTORY,
181
+ Station.COAL_HOPPER,
182
+ Station.TOWER_SEWAGE,
183
+ Station.UNKNOWN,
184
+ Station.OIL_REFINERY,
185
+ Station.OIL_BRIDGE,
186
+ Station.WATER_BRIDGE,
187
+ Station.GROIN_SILO,
188
+ Station.GRAIN_SILO,
189
+ Station.BRAIN_SILO,
190
+ Station.BRAWN_SILO,
191
+ Station.PRAWN_SILO,
192
+ Station.TRACKSIDE_DINER,
193
+ Station.ORE_HOPPER,
194
+ ];
195
+ /**
196
+ * Converts a given station to the integer value KoL associates with them
197
+ *
198
+ * @param station The station in question
199
+ * @returns The integer value KoL assigns the train station in question
200
+ */
201
+ function stationToInt(station) {
202
+ return pieces.indexOf(station);
203
+ }
204
+ /**
205
+ * Sets your model train station to the given configuration, if able
206
+ *
207
+ * @param configuration The cycle to try to set your model train station to
208
+ * @returns Whether your model train station matches the given configuration
209
+ */
210
+ export function setConfiguration(configuration) {
211
+ if (!canConfigure())
212
+ return false;
213
+ visitUrl("campground.php?action=workshed");
214
+ runChoice(1, `forceoption=0${configuration
215
+ .map((station, index) => `&slot[${index}]=${stationToInt(station)}`)
216
+ .join("")}`);
217
+ visitUrl("main.php");
218
+ const currentConfiguration = cycle();
219
+ return configuration.every((station, index) => station === currentConfiguration[index]);
220
+ }
221
+ /**
222
+ * Determines the next station you expect to encounter when the Model Train Station is active
223
+ *
224
+ * @returns The next station you expect to encounter when the Model Train Station is active
225
+ */
226
+ export function next() {
227
+ return cycle()[get("trainsetPosition") % 8];
228
+ }
@@ -0,0 +1,25 @@
1
+ import { Skill } from "kolmafia";
2
+ import { Range } from "../../utils";
3
+ /**
4
+ * @returns Whether you `have` the august scepter
5
+ */
6
+ export declare function have(): boolean;
7
+ export declare const SKILLS: readonly Skill[];
8
+ /**
9
+ * @returns Today's august scepter skill
10
+ */
11
+ export declare function todaysSkill(): Skill;
12
+ /**
13
+ * @param skillNum the Day of the skill you wish to check
14
+ * @returns Whether we have cast this skill yet today
15
+ */
16
+ export declare function getAugustCast(skillNum: Range<1, 32>): boolean;
17
+ /**
18
+ * @returns whether you have cast Today's august scepter skill
19
+ */
20
+ export declare function getTodayCast(): boolean;
21
+ /**
22
+ * @param skillNum the Day of the skill you wish to check
23
+ * @returns Whether we can cast this skill
24
+ */
25
+ export declare function canCast(skillNum: Range<1, 32>): boolean;
@@ -0,0 +1,40 @@
1
+ import { toSkill } from "kolmafia";
2
+ import { gameDay, have as have_ } from "../../lib";
3
+ import { get } from "../../property";
4
+ import { $item, $skills } from "../../template-string";
5
+ /**
6
+ * @returns Whether you `have` the august scepter
7
+ */
8
+ export function have() {
9
+ return have_($item `august scepter`);
10
+ }
11
+ export const SKILLS = Object.freeze($skills `Aug. 1st: Mountain Climbing Day!, Aug. 2nd: Find an Eleven-Leaf Clover Day, Aug. 3rd: Watermelon Day!, Aug. 4th: Water Balloon Day!, Aug. 5th: Oyster Day!, Aug. 6th: Fresh Breath Day!, Aug. 7th: Lighthouse Day!, Aug. 8th: Cat Day!, Aug. 9th: Hand Holding Day!, Aug. 10th: World Lion Day!, Aug. 11th: Presidential Joke Day!, Aug. 12th: Elephant Day!, Aug. 13th: Left/Off Hander's Day!, Aug. 14th: Financial Awareness Day!, Aug. 15th: Relaxation Day!, Aug. 16th: Roller Coaster Day!, Aug. 17th: Thriftshop Day!, Aug. 18th: Serendipity Day!, Aug. 19th: Honey Bee Awareness Day!, Aug. 20th: Mosquito Day!, Aug. 21st: Spumoni Day!, Aug. 22nd: Tooth Fairy Day!, Aug. 23rd: Ride the Wind Day!, Aug. 24th: Waffle Day!, Aug. 25th: Banana Split Day!, Aug. 26th: Toilet Paper Day!, Aug. 27th: Just Because Day!, Aug. 28th: Race Your Mouse Day!, Aug. 29th: More Herbs\, Less Salt Day!, Aug. 30th: Beach Day!, Aug. 31st: Cabernet Sauvignon Day!`);
12
+ /**
13
+ * @returns Today's august scepter skill
14
+ */
15
+ export function todaysSkill() {
16
+ return toSkill((gameDay().getDate() + 7451).toFixed(0));
17
+ }
18
+ /**
19
+ * @param skillNum the Day of the skill you wish to check
20
+ * @returns Whether we have cast this skill yet today
21
+ */
22
+ export function getAugustCast(skillNum) {
23
+ return get(`_aug${skillNum}Cast`);
24
+ }
25
+ /**
26
+ * @returns whether you have cast Today's august scepter skill
27
+ */
28
+ export function getTodayCast() {
29
+ return get("_augTodayCast");
30
+ }
31
+ /**
32
+ * @param skillNum the Day of the skill you wish to check
33
+ * @returns Whether we can cast this skill
34
+ */
35
+ export function canCast(skillNum) {
36
+ return (have() &&
37
+ !get(`_aug${skillNum}Cast`) &&
38
+ ((gameDay().getDate() === skillNum && !getTodayCast()) ||
39
+ get(`_augSkillsCast`) < 5));
40
+ }
@@ -0,0 +1,25 @@
1
+ import { Item, Monster } from "kolmafia";
2
+ export declare const burnFor: Map<Item | Monster, number>;
3
+ /**
4
+ * @returns Whether or not we currently `have` the GuidetoBurningLeaves
5
+ */
6
+ export declare function have(): boolean;
7
+ /**
8
+ * @returns The number of leaves we have remaining
9
+ */
10
+ export declare function numberOfLeaves(): number;
11
+ /**
12
+ * @returns Whether or not we can do the requested burn
13
+ * @param leaves determines the number of leaves to burn
14
+ */
15
+ export declare function burnSpecialLeaves(leaves: Item | Monster): boolean;
16
+ /**
17
+ * @returns Whether or not we can do the requested burn
18
+ * @param leaves determines the number of leaves to burn
19
+ */
20
+ export declare function burnLeaves(leaves: number): boolean;
21
+ /**
22
+ * Checks whether you can, then Jumps in the Flames
23
+ * @returns Whether or not you jumped in the flames
24
+ */
25
+ export declare function jumpInFire(): boolean;
@@ -0,0 +1,74 @@
1
+ import { cliExecute, itemAmount, runChoice } from "kolmafia";
2
+ import { haveInCampground } from "../../lib";
3
+ import { get } from "../../property";
4
+ import { $item, $monster } from "../../template-string";
5
+ const item = $item `A Guide to Burning Leaves`;
6
+ export const burnFor = new Map([
7
+ [$monster `flaming leaflet`, 11],
8
+ [$item `autumnic bomb`, 37],
9
+ [$item `impromptu torch`, 42],
10
+ [$item `flaming fig leaf`, 43],
11
+ [$item `smoldering drape`, 44],
12
+ [$item `distilled resin`, 50],
13
+ [$item `autumnal aegis`, 66],
14
+ [$item `lit leaf lasso`, 69],
15
+ [$item `forest canopy bed`, 74],
16
+ [$item `autumnic balm`, 99],
17
+ [$monster `flaming monstera`, 111],
18
+ [$item `day shortener`, 222],
19
+ [$monster `leaviathan`, 666],
20
+ [$item `coping juice`, 1111],
21
+ [$item `smoldering leafcutter ant egg`, 6666],
22
+ [$item `super-heated leaf`, 11111],
23
+ ]);
24
+ /**
25
+ * @returns Whether or not we currently `have` the GuidetoBurningLeaves
26
+ */
27
+ export function have() {
28
+ return haveInCampground(item);
29
+ }
30
+ /**
31
+ * @returns The number of leaves we have remaining
32
+ */
33
+ export function numberOfLeaves() {
34
+ return itemAmount($item `inflammable leaf`);
35
+ }
36
+ /**
37
+ * @returns Whether or not we can do the requested burn
38
+ * @param leaves determines the number of leaves to burn
39
+ */
40
+ export function burnSpecialLeaves(leaves) {
41
+ const lea = burnFor.get(leaves);
42
+ if (lea === undefined || lea > numberOfLeaves()) {
43
+ return false;
44
+ }
45
+ return cliExecute(`leaves ${leaves}`);
46
+ }
47
+ /**
48
+ * @returns Whether or not we can do the requested burn
49
+ * @param leaves determines the number of leaves to burn
50
+ */
51
+ export function burnLeaves(leaves) {
52
+ if (leaves > numberOfLeaves()) {
53
+ return false;
54
+ }
55
+ return cliExecute(`leaves ${leaves}`);
56
+ }
57
+ function visitLeaves() {
58
+ cliExecute("leaves");
59
+ }
60
+ /**
61
+ * Checks whether you can, then Jumps in the Flames
62
+ * @returns Whether or not you jumped in the flames
63
+ */
64
+ export function jumpInFire() {
65
+ if (get("_leavesJumped")) {
66
+ return false;
67
+ }
68
+ if (get("_leavesBurned") === 0) {
69
+ return false;
70
+ }
71
+ visitLeaves();
72
+ runChoice(2);
73
+ return get("_leavesJumped");
74
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @returns Whether you `have` the Cincho de Mayo
3
+ */
4
+ export declare function have(): boolean;
5
+ /**
6
+ * @returns Your current cinch
7
+ */
8
+ export declare function currentCinch(): number;
9
+ /**
10
+ * @param currentRests The rest number to evaluate
11
+ * @returns The amount of cinch restored by the given rest
12
+ */
13
+ export declare function cinchRestoredBy(currentRests?: number): number;
14
+ /**
15
+ * @returns Your current cinch, plus the total amount if cinch that can be generated through free rests
16
+ */
17
+ export declare function totalAvailableCinch(): number;
18
+ export declare const skills: {
19
+ readonly SaltAndLime: import("kolmafia").Skill;
20
+ readonly PartySoundtrack: import("kolmafia").Skill;
21
+ readonly FiestaExit: import("kolmafia").Skill;
22
+ readonly ProjectilePiñata: import("kolmafia").Skill;
23
+ readonly PartyFoul: import("kolmafia").Skill;
24
+ readonly ConfettiExtrava: import("kolmafia").Skill;
25
+ };
@@ -0,0 +1,45 @@
1
+ import { totalFreeRests } from "kolmafia";
2
+ import { have as have_ } from "../../lib";
3
+ import { get } from "../../property";
4
+ import { $item, $skill } from "../../template-string";
5
+ import { clamp, sum } from "../../utils";
6
+ const cincho = $item `Cincho de Mayo`;
7
+ /**
8
+ * @returns Whether you `have` the Cincho de Mayo
9
+ */
10
+ export function have() {
11
+ return have_(cincho);
12
+ }
13
+ /**
14
+ * @returns Your current cinch
15
+ */
16
+ export function currentCinch() {
17
+ return have() ? clamp(100 - get("_cinchUsed"), 0, 100) : 0;
18
+ }
19
+ /**
20
+ * @param currentRests The rest number to evaluate
21
+ * @returns The amount of cinch restored by the given rest
22
+ */
23
+ export function cinchRestoredBy(currentRests = get("_cinchoRests")) {
24
+ return have() ? clamp(50 - currentRests * 5, 5, 30) : 0;
25
+ }
26
+ /**
27
+ * @returns Your current cinch, plus the total amount if cinch that can be generated through free rests
28
+ */
29
+ export function totalAvailableCinch() {
30
+ const remainingRests = Math.max(0, totalFreeRests() - get("timesRested"));
31
+ return have()
32
+ ? currentCinch() +
33
+ sum(new Array(remainingRests)
34
+ .fill(null)
35
+ .map((_, i) => i + get("_cinchoRests")), (restNumber) => cinchRestoredBy(restNumber))
36
+ : 0;
37
+ }
38
+ export const skills = {
39
+ SaltAndLime: $skill `Cincho: Dispense Salt and Lime`,
40
+ PartySoundtrack: $skill `Cincho: Party Soundtrack`,
41
+ FiestaExit: $skill `Cincho: Fiesta Exit`,
42
+ ProjectilePiñata: $skill `Cincho: Projectile Piñata`,
43
+ PartyFoul: $skill `Cincho: Party Foul`,
44
+ ConfettiExtrava: $skill `Cincho: Confetti Extravaganza`,
45
+ };