libram 0.8.27 → 0.8.28

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/package.json +9 -8
  2. package/dist/Clan.d.ts +0 -128
  3. package/dist/Clan.js +0 -300
  4. package/dist/Copier.d.ts +0 -9
  5. package/dist/Copier.js +0 -15
  6. package/dist/Dungeon.d.ts +0 -45
  7. package/dist/Dungeon.js +0 -115
  8. package/dist/Kmail.d.ts +0 -104
  9. package/dist/Kmail.js +0 -182
  10. package/dist/actions/ActionSource.d.ts +0 -131
  11. package/dist/actions/ActionSource.js +0 -177
  12. package/dist/actions/Banish.d.ts +0 -16
  13. package/dist/actions/Banish.js +0 -121
  14. package/dist/actions/FreeKill.d.ts +0 -16
  15. package/dist/actions/FreeKill.js +0 -94
  16. package/dist/actions/FreeRun.d.ts +0 -16
  17. package/dist/actions/FreeRun.js +0 -77
  18. package/dist/actions/index.d.ts +0 -4
  19. package/dist/actions/index.js +0 -4
  20. package/dist/ascend.d.ts +0 -83
  21. package/dist/ascend.js +0 -268
  22. package/dist/challengePaths/2014/HeavyRains.d.ts +0 -22
  23. package/dist/challengePaths/2014/HeavyRains.js +0 -75
  24. package/dist/challengePaths/2015/CommunityService.d.ts +0 -125
  25. package/dist/challengePaths/2015/CommunityService.js +0 -334
  26. package/dist/challengePaths/2016/NuclearAutumn.d.ts +0 -13
  27. package/dist/challengePaths/2016/NuclearAutumn.js +0 -21
  28. package/dist/challengePaths/index.d.ts +0 -4
  29. package/dist/challengePaths/index.js +0 -4
  30. package/dist/combat.d.ts +0 -414
  31. package/dist/combat.js +0 -711
  32. package/dist/console.d.ts +0 -12
  33. package/dist/console.js +0 -14
  34. package/dist/counter.d.ts +0 -22
  35. package/dist/counter.js +0 -37
  36. package/dist/diet/index.d.ts +0 -80
  37. package/dist/diet/index.js +0 -662
  38. package/dist/diet/knapsack.d.ts +0 -8
  39. package/dist/diet/knapsack.js +0 -128
  40. package/dist/index.d.ts +0 -29
  41. package/dist/index.js +0 -26
  42. package/dist/lib.d.ts +0 -497
  43. package/dist/lib.js +0 -958
  44. package/dist/logger.d.ts +0 -35
  45. package/dist/logger.js +0 -62
  46. package/dist/maximize.d.ts +0 -121
  47. package/dist/maximize.js +0 -525
  48. package/dist/modifier.d.ts +0 -41
  49. package/dist/modifier.js +0 -160
  50. package/dist/modifierTypes.d.ts +0 -16
  51. package/dist/modifierTypes.js +0 -9
  52. package/dist/mood.d.ts +0 -105
  53. package/dist/mood.js +0 -349
  54. package/dist/moonSign.d.ts +0 -13
  55. package/dist/moonSign.js +0 -25
  56. package/dist/overlappingNames.d.ts +0 -3
  57. package/dist/overlappingNames.js +0 -42
  58. package/dist/property.d.ts +0 -222
  59. package/dist/property.js +0 -385
  60. package/dist/propertyTypes.d.ts +0 -19
  61. package/dist/propertyTypes.js +0 -10
  62. package/dist/propertyTyping.d.ts +0 -65
  63. package/dist/propertyTyping.js +0 -91
  64. package/dist/resources/2007/CandyHearts.d.ts +0 -9
  65. package/dist/resources/2007/CandyHearts.js +0 -24
  66. package/dist/resources/2008/DivineFavors.d.ts +0 -9
  67. package/dist/resources/2008/DivineFavors.js +0 -27
  68. package/dist/resources/2008/Stickers.d.ts +0 -49
  69. package/dist/resources/2008/Stickers.js +0 -84
  70. package/dist/resources/2009/Bandersnatch.d.ts +0 -56
  71. package/dist/resources/2009/Bandersnatch.js +0 -93
  72. package/dist/resources/2009/LoveSongs.d.ts +0 -9
  73. package/dist/resources/2009/LoveSongs.js +0 -24
  74. package/dist/resources/2009/SpookyPutty.d.ts +0 -31
  75. package/dist/resources/2009/SpookyPutty.js +0 -49
  76. package/dist/resources/2010/Brickos.d.ts +0 -9
  77. package/dist/resources/2010/Brickos.js +0 -21
  78. package/dist/resources/2010/CrownOfThrones.d.ts +0 -68
  79. package/dist/resources/2010/CrownOfThrones.js +0 -418
  80. package/dist/resources/2010/LookingGlass.d.ts +0 -29
  81. package/dist/resources/2010/LookingGlass.js +0 -89
  82. package/dist/resources/2011/Gygaxian.d.ts +0 -9
  83. package/dist/resources/2011/Gygaxian.js +0 -24
  84. package/dist/resources/2011/ObtuseAngel.d.ts +0 -33
  85. package/dist/resources/2011/ObtuseAngel.js +0 -51
  86. package/dist/resources/2011/StompingBoots.d.ts +0 -37
  87. package/dist/resources/2011/StompingBoots.js +0 -57
  88. package/dist/resources/2012/RainDoh.d.ts +0 -25
  89. package/dist/resources/2012/RainDoh.js +0 -37
  90. package/dist/resources/2012/ReagnimatedGnome.d.ts +0 -31
  91. package/dist/resources/2012/ReagnimatedGnome.js +0 -46
  92. package/dist/resources/2012/Resolutions.d.ts +0 -9
  93. package/dist/resources/2012/Resolutions.js +0 -28
  94. package/dist/resources/2013/Florist.d.ts +0 -81
  95. package/dist/resources/2013/Florist.js +0 -245
  96. package/dist/resources/2013/JungMan.d.ts +0 -33
  97. package/dist/resources/2013/JungMan.js +0 -69
  98. package/dist/resources/2013/PulledTaffy.d.ts +0 -9
  99. package/dist/resources/2013/PulledTaffy.js +0 -33
  100. package/dist/resources/2014/CrimboShrub.d.ts +0 -42
  101. package/dist/resources/2014/CrimboShrub.js +0 -89
  102. package/dist/resources/2014/DNALab.d.ts +0 -56
  103. package/dist/resources/2014/DNALab.js +0 -162
  104. package/dist/resources/2014/WinterGarden.d.ts +0 -23
  105. package/dist/resources/2014/WinterGarden.js +0 -35
  106. package/dist/resources/2015/BarrelShrine.d.ts +0 -8
  107. package/dist/resources/2015/BarrelShrine.js +0 -25
  108. package/dist/resources/2015/ChateauMantegna.d.ts +0 -52
  109. package/dist/resources/2015/ChateauMantegna.js +0 -99
  110. package/dist/resources/2015/DeckOfEveryCard.d.ts +0 -29
  111. package/dist/resources/2015/DeckOfEveryCard.js +0 -122
  112. package/dist/resources/2015/Dinseylandfill.d.ts +0 -89
  113. package/dist/resources/2015/Dinseylandfill.js +0 -205
  114. package/dist/resources/2015/MayoClinic.d.ts +0 -23
  115. package/dist/resources/2015/MayoClinic.js +0 -49
  116. package/dist/resources/2016/GingerBread.d.ts +0 -32
  117. package/dist/resources/2016/GingerBread.js +0 -73
  118. package/dist/resources/2016/SourceTerminal.d.ts +0 -181
  119. package/dist/resources/2016/SourceTerminal.js +0 -275
  120. package/dist/resources/2016/Witchess.d.ts +0 -17
  121. package/dist/resources/2016/Witchess.js +0 -47
  122. package/dist/resources/2017/AsdonMartin.d.ts +0 -59
  123. package/dist/resources/2017/AsdonMartin.js +0 -238
  124. package/dist/resources/2017/Horsery.d.ts +0 -19
  125. package/dist/resources/2017/Horsery.js +0 -42
  126. package/dist/resources/2017/MummingTrunk.d.ts +0 -8
  127. package/dist/resources/2017/MummingTrunk.js +0 -33
  128. package/dist/resources/2017/Pantogram.d.ts +0 -92
  129. package/dist/resources/2017/Pantogram.js +0 -174
  130. package/dist/resources/2017/Robortender.d.ts +0 -30
  131. package/dist/resources/2017/Robortender.js +0 -90
  132. package/dist/resources/2017/Spacegate.d.ts +0 -86
  133. package/dist/resources/2017/Spacegate.js +0 -178
  134. package/dist/resources/2017/TunnelOfLove.d.ts +0 -39
  135. package/dist/resources/2017/TunnelOfLove.js +0 -120
  136. package/dist/resources/2018/LatteLoversMembersMug.d.ts +0 -392
  137. package/dist/resources/2018/LatteLoversMembersMug.js +0 -303
  138. package/dist/resources/2018/SongBoom.d.ts +0 -33
  139. package/dist/resources/2018/SongBoom.js +0 -55
  140. package/dist/resources/2019/BeachComb.d.ts +0 -72
  141. package/dist/resources/2019/BeachComb.js +0 -118
  142. package/dist/resources/2019/CampAway.d.ts +0 -39
  143. package/dist/resources/2019/CampAway.js +0 -72
  144. package/dist/resources/2019/Snapper.d.ts +0 -33
  145. package/dist/resources/2019/Snapper.js +0 -73
  146. package/dist/resources/2020/Cartography.d.ts +0 -16
  147. package/dist/resources/2020/Cartography.js +0 -48
  148. package/dist/resources/2020/Guzzlr.d.ts +0 -160
  149. package/dist/resources/2020/Guzzlr.js +0 -275
  150. package/dist/resources/2020/RetroCape.d.ts +0 -51
  151. package/dist/resources/2020/RetroCape.js +0 -115
  152. package/dist/resources/2021/CrystalBall.d.ts +0 -14
  153. package/dist/resources/2021/CrystalBall.js +0 -39
  154. package/dist/resources/2021/DaylightShavings.d.ts +0 -40
  155. package/dist/resources/2021/DaylightShavings.js +0 -74
  156. package/dist/resources/2022/AutumnAton.d.ts +0 -78
  157. package/dist/resources/2022/AutumnAton.js +0 -182
  158. package/dist/resources/2022/CombatLoversLocket.d.ts +0 -44
  159. package/dist/resources/2022/CombatLoversLocket.js +0 -82
  160. package/dist/resources/2022/GreyGoose.d.ts +0 -59
  161. package/dist/resources/2022/GreyGoose.js +0 -90
  162. package/dist/resources/2022/JuneCleaver.d.ts +0 -47
  163. package/dist/resources/2022/JuneCleaver.js +0 -69
  164. package/dist/resources/2022/TrainSet.d.ts +0 -146
  165. package/dist/resources/2022/TrainSet.js +0 -228
  166. package/dist/resources/2023/AugustScepter.d.ts +0 -25
  167. package/dist/resources/2023/AugustScepter.js +0 -40
  168. package/dist/resources/2023/BurningLeaves.d.ts +0 -25
  169. package/dist/resources/2023/BurningLeaves.js +0 -74
  170. package/dist/resources/2023/CinchoDeMayo.d.ts +0 -25
  171. package/dist/resources/2023/CinchoDeMayo.js +0 -45
  172. package/dist/resources/2023/ClosedCircuitPayphone.d.ts +0 -80
  173. package/dist/resources/2023/ClosedCircuitPayphone.js +0 -129
  174. package/dist/resources/2023/CursedMonkeyPaw.d.ts +0 -46
  175. package/dist/resources/2023/CursedMonkeyPaw.js +0 -113
  176. package/dist/resources/2024/AprilingBandHelmet.d.ts +0 -57
  177. package/dist/resources/2024/AprilingBandHelmet.js +0 -118
  178. package/dist/resources/2024/ChestMimic.d.ts +0 -35
  179. package/dist/resources/2024/ChestMimic.js +0 -108
  180. package/dist/resources/LibramSummon.d.ts +0 -18
  181. package/dist/resources/LibramSummon.js +0 -74
  182. package/dist/resources/index.d.ts +0 -54
  183. package/dist/resources/index.js +0 -54
  184. package/dist/resources/putty-likes.d.ts +0 -21
  185. package/dist/resources/putty-likes.js +0 -33
  186. package/dist/session.d.ts +0 -169
  187. package/dist/session.js +0 -284
  188. package/dist/since.d.ts +0 -51
  189. package/dist/since.js +0 -108
  190. package/dist/template-string.d.ts +0 -324
  191. package/dist/template-string.js +0 -265
  192. package/dist/url.d.ts +0 -35
  193. package/dist/url.js +0 -67
  194. package/dist/utils.d.ts +0 -178
  195. package/dist/utils.js +0 -255
@@ -1,74 +0,0 @@
1
- import { myClass, toEffect } from "kolmafia";
2
- import { have as haveItem } from "../../lib";
3
- import { get } from "../../property";
4
- import { $effects, $item } from "../../template-string";
5
- const helmet = $item `Daylight Shavings Helmet`;
6
- /**
7
- * 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.
8
- *
9
- * @returns whether we have the Daylight Shavings Helmet.
10
- */
11
- export function have() {
12
- return haveItem(helmet);
13
- }
14
- export const buffs = $effects `Spectacle Moustache, Toiletbrush Moustache, Barbell Moustache, Grizzly Beard, Surrealist's Moustache, Musician's Musician's Moustache, Gull-Wing Moustache, Space Warlord's Beard, Pointy Wizard Beard, Cowboy Stache, Friendly Chops`;
15
- /**
16
- * Tells you whether you currently have a beardbuff active. Warning: because of spaghetti, this does not determine buff eligibility.
17
- *
18
- * @returns Whether you currently have a beardbuff active
19
- */
20
- export function hasBuff() {
21
- return buffs.some((buff) => haveItem(buff));
22
- }
23
- /**
24
- * 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.
25
- *
26
- * @returns Whether you current are able to get a buff from the Daylight Shaving Helmet.
27
- */
28
- export function buffAvailable() {
29
- return !buffs.some((buff) => haveItem(buff, 2));
30
- }
31
- /**
32
- * Calculates and returns the cycle of buffs that the hat should cycle through.
33
- *
34
- * @param playerclass The class to generate a cycle for
35
- * @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.
36
- */
37
- export function buffCycle(playerclass = myClass()) {
38
- if (playerclass.id <= 0)
39
- return [];
40
- const returnValue = [];
41
- const id = playerclass.id;
42
- const seed = id > 6 ? (id % 6) + 1 : id;
43
- for (let i = 1; i < 12; i++) {
44
- const index = (i * seed) % 11;
45
- returnValue.push(buffs[index]);
46
- }
47
- return returnValue;
48
- }
49
- /**
50
- * Returns the next buff we expect to get from the shaving hat.
51
- *
52
- * @returns The next buff we expect to get from the shaving hat.
53
- */
54
- export function nextBuff() {
55
- const currentBuff = toEffect(get("lastBeardBuff").toFixed(0));
56
- const cycle = buffCycle();
57
- const index = cycle.indexOf(currentBuff);
58
- const newIndex = (1 + index) % 11;
59
- return cycle[newIndex];
60
- }
61
- /**
62
- * 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.
63
- *
64
- * @param buff The shaving buff in question
65
- * @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.
66
- */
67
- export function buffsUntil(buff) {
68
- if (!buffs.includes(buff))
69
- return null;
70
- const currentIndex = buffs.indexOf(nextBuff()) - 1;
71
- const newIndex = buffs.indexOf(buff);
72
- const diff = (newIndex - currentIndex) % 11;
73
- return diff === 0 ? 11 : diff;
74
- }
@@ -1,78 +0,0 @@
1
- import { Item, Location } from "kolmafia";
2
- /**
3
- * Is the autumn-aton currently in your inventory, available to deploy?
4
- *
5
- * @returns The whether the autumn-aton is currently available for deployment
6
- */
7
- export declare function available(): boolean;
8
- /**
9
- * Do you own the autumn-aton?
10
- *
11
- * @returns Whether you are an autumn-aton `have`r
12
- */
13
- export declare function have(): boolean;
14
- /**
15
- * @returns The current location the autumn-aton is questing in; null if it is not on a quest.
16
- */
17
- export declare function currentlyIn(): Location | null;
18
- /**
19
- * Deploy the autumn-aton to a location of your choosing.
20
- *
21
- * @param target A location to send the autumn-aton to, or a prioritized list of locations to send it to, or a function to pick which location to send it to.
22
- * @param upgrade Should we apply any upgrades we see available?
23
- * @returns Where we ended up sending the autumn-aton; null if we didn't send it off.
24
- */
25
- export declare function sendTo(target: Location | Location[] | ((locations: Location[]) => Location), upgrade?: boolean): Location | null;
26
- /**
27
- * Install any available upgrades for the autumn-aton.
28
- *
29
- * @returns Whether there were any upgrades to install.
30
- */
31
- export declare function upgrade(): boolean;
32
- /**
33
- * @returns A list of all locations you can send your autumn-aton to right now. Empty if you are unable to send it anywhere.
34
- */
35
- export declare function availableLocations(): Location[];
36
- /**
37
- * The mafia names for the autumn-aton upgrades
38
- */
39
- export declare const possibleUpgrades: readonly ["leftarm1", "leftleg1", "rightarm1", "rightleg1", "base_blackhat", "cowcatcher", "periscope", "radardish", "dualexhaust"];
40
- export declare type Upgrade = typeof possibleUpgrades[number];
41
- /**
42
- * @returns An array containing the upgrades that you currently have on your autumn-aton.
43
- */
44
- export declare function currentUpgrades(): Upgrade[];
45
- /**
46
- * @returns The number of turns remaining in your current autumn-aton quest. This number may be negative for any number of reasons.
47
- */
48
- export declare function turnsLeft(): number;
49
- /**
50
- * @returns The number of leg-upgrades your autumn-aton has installed
51
- */
52
- export declare function legs(): number;
53
- /**
54
- * @returns The number of turns we expect your next autumn-aton quest to take.
55
- */
56
- export declare function turnsForQuest(): number;
57
- /**
58
- * @returns The current visual acuity level of your autumn-aton as determined by the current upgrade-state.
59
- */
60
- export declare function visualAcuity(): 1 | 2 | 3;
61
- /**
62
- * @returns The number of items from a zone we expect the autumn-aton to steal based on the current upgrade-state. It may not succeed in stealing every item it can.
63
- */
64
- export declare function zoneItems(): 3 | 4 | 5;
65
- /**
66
- * @returns The number of seasonal items we expect the autumn-aton to return with given its current upgrade-state.
67
- */
68
- export declare function seasonalItems(): 1 | 2;
69
- /**
70
- * Determines and returns the upgrade and item drop associated with the given location
71
- *
72
- * @param location The location to check the expected autumn-aton-unique drops of
73
- * @returns `null` if the location has no upgrade or drop; otherwise, the upgrade and the autumn-aton item associated with that item
74
- */
75
- export declare function getUniques(location: Location): {
76
- upgrade: Upgrade;
77
- item: Item;
78
- } | null;
@@ -1,182 +0,0 @@
1
- import { availableAmount, availableChoiceOptions, handlingChoice, Item, Location, runChoice, toLocation, totalTurnsPlayed, visitUrl, xpath, } from "kolmafia";
2
- import { directlyUse } from "../../lib";
3
- import { get } from "../../property";
4
- import { $item } from "../../template-string";
5
- import { arrayContains } from "../../utils";
6
- const item = Item.get("autumn-aton");
7
- /**
8
- * Is the autumn-aton currently in your inventory, available to deploy?
9
- *
10
- * @returns The whether the autumn-aton is currently available for deployment
11
- */
12
- export function available() {
13
- return availableAmount(item) > 0;
14
- }
15
- /**
16
- * Do you own the autumn-aton?
17
- *
18
- * @returns Whether you are an autumn-aton `have`r
19
- */
20
- export function have() {
21
- return get("hasAutumnaton") || available();
22
- }
23
- /**
24
- * Internal function used to parse the fallbot's choice adventure to determine which zones are currently available
25
- *
26
- * @param html The pagetext of the fallbot's choice adventure
27
- * @returns The locations currently available to send the fallbot to
28
- */
29
- function checkLocations(html) {
30
- return xpath(html, '//select[@name="heythereprogrammer"]//option[position()>1]/text()').map((name) => toLocation(name));
31
- }
32
- /**
33
- * @returns The current location the autumn-aton is questing in; null if it is not on a quest.
34
- */
35
- export function currentlyIn() {
36
- return get("autumnatonQuestLocation");
37
- }
38
- /**
39
- * Deploy the autumn-aton to a location of your choosing.
40
- *
41
- * @param target A location to send the autumn-aton to, or a prioritized list of locations to send it to, or a function to pick which location to send it to.
42
- * @param upgrade Should we apply any upgrades we see available?
43
- * @returns Where we ended up sending the autumn-aton; null if we didn't send it off.
44
- */
45
- export function sendTo(target, upgrade = true) {
46
- if (!available())
47
- return null;
48
- const pageHtml = directlyUse(item);
49
- if (upgrade && availableChoiceOptions()[1])
50
- runChoice(1);
51
- const locationsAvailable = checkLocations(pageHtml);
52
- const location = target instanceof Location
53
- ? target
54
- : Array.isArray(target)
55
- ? target.find((l) => locationsAvailable.includes(l))
56
- : target(locationsAvailable);
57
- if (!location)
58
- return null;
59
- if (!locationsAvailable.includes(location))
60
- return null;
61
- if (!handlingChoice())
62
- directlyUse(item);
63
- runChoice(2, `heythereprogrammer=${location.id}`);
64
- if (handlingChoice())
65
- visitUrl("main.php");
66
- return location;
67
- }
68
- /**
69
- * Install any available upgrades for the autumn-aton.
70
- *
71
- * @returns Whether there were any upgrades to install.
72
- */
73
- export function upgrade() {
74
- directlyUse(item);
75
- const canUpgrade = availableChoiceOptions()[1] !== undefined;
76
- if (canUpgrade)
77
- runChoice(1);
78
- visitUrl("main.php");
79
- return canUpgrade;
80
- }
81
- /**
82
- * @returns A list of all locations you can send your autumn-aton to right now. Empty if you are unable to send it anywhere.
83
- */
84
- export function availableLocations() {
85
- if (!available())
86
- return [];
87
- const pageHtml = directlyUse(item);
88
- visitUrl("main.php");
89
- return checkLocations(pageHtml);
90
- }
91
- /**
92
- * The mafia names for the autumn-aton upgrades
93
- */
94
- export const possibleUpgrades = [
95
- "leftarm1",
96
- "leftleg1",
97
- "rightarm1",
98
- "rightleg1",
99
- "base_blackhat",
100
- "cowcatcher",
101
- "periscope",
102
- "radardish",
103
- "dualexhaust",
104
- ];
105
- /**
106
- * @returns An array containing the upgrades that you currently have on your autumn-aton.
107
- */
108
- export function currentUpgrades() {
109
- return get("autumnatonUpgrades").split(",");
110
- }
111
- /**
112
- * @returns The number of turns remaining in your current autumn-aton quest. This number may be negative for any number of reasons.
113
- */
114
- export function turnsLeft() {
115
- return get("autumnatonQuestTurn") - totalTurnsPlayed();
116
- }
117
- /**
118
- * @returns The number of leg-upgrades your autumn-aton has installed
119
- */
120
- export function legs() {
121
- return currentUpgrades().filter((u) => u.includes("leg")).length;
122
- }
123
- /**
124
- * @returns The number of turns we expect your next autumn-aton quest to take.
125
- */
126
- export function turnsForQuest() {
127
- return 11 * Math.max(1, get("_autumnatonQuests") - legs());
128
- }
129
- /**
130
- * @returns The current visual acuity level of your autumn-aton as determined by the current upgrade-state.
131
- */
132
- export function visualAcuity() {
133
- const visualUpgrades = ["periscope", "radardish"];
134
- return (1 +
135
- currentUpgrades().filter((u) => visualUpgrades.includes(u)).length);
136
- }
137
- /**
138
- * @returns The number of items from a zone we expect the autumn-aton to steal based on the current upgrade-state. It may not succeed in stealing every item it can.
139
- */
140
- export function zoneItems() {
141
- return (3 + currentUpgrades().filter((u) => u.includes("arm")).length);
142
- }
143
- /**
144
- * @returns The number of seasonal items we expect the autumn-aton to return with given its current upgrade-state.
145
- */
146
- export function seasonalItems() {
147
- return currentUpgrades().includes("cowcatcher") ? 2 : 1;
148
- }
149
- const difficulties = ["low", "mid", "high"];
150
- const UNIQUES = {
151
- outdoor: {
152
- low: { index: 4, item: $item `autumn leaf` },
153
- mid: { index: 2, item: $item `autumn debris shield` },
154
- high: { index: 6, item: $item `autumn leaf pendant` },
155
- },
156
- indoor: {
157
- low: { index: 0, item: $item `AutumnFest ale` },
158
- mid: { index: 3, item: $item `autumn-spice donut` },
159
- high: { index: 7, item: $item `autumn breeze` },
160
- },
161
- underground: {
162
- low: { index: 1, item: $item `autumn sweater-weather sweater` },
163
- mid: { index: 5, item: $item `autumn dollar` },
164
- high: { index: 8, item: $item `autumn years wisdom` },
165
- },
166
- };
167
- /**
168
- * Determines and returns the upgrade and item drop associated with the given location
169
- *
170
- * @param location The location to check the expected autumn-aton-unique drops of
171
- * @returns `null` if the location has no upgrade or drop; otherwise, the upgrade and the autumn-aton item associated with that item
172
- */
173
- export function getUniques(location) {
174
- const env = location.environment;
175
- const difficulty = location.difficultyLevel;
176
- if (arrayContains(env, ["outdoor", "indoor", "underground"]) &&
177
- arrayContains(difficulty, difficulties)) {
178
- const { index, item } = UNIQUES[env][difficulty];
179
- return { upgrade: possibleUpgrades[index], item };
180
- }
181
- return null;
182
- }
@@ -1,44 +0,0 @@
1
- import { Monster } from "kolmafia";
2
- /**
3
- * @returns Whether you `have` the Combat Lover's Locket
4
- */
5
- export declare function have(): boolean;
6
- /**
7
- * Filters the set of all unlocked locket monsters to only the ones available to be locketed right now.
8
- *
9
- * @returns An array consisting of all Monsters you can fight with your locket right now.
10
- */
11
- export declare function availableLocketMonsters(): Monster[];
12
- /**
13
- * Parses getLocketMonsters and returns the collection of all Monsters as an Array.
14
- *
15
- * @returns An array consisting of all Monsters you can hypothetically fight, regardless of whether they've been fought today.
16
- */
17
- export declare function unlockedLocketMonsters(): Monster[];
18
- /**
19
- * Determines how many reminisces remain by parsing the _locketMonstersFought property.
20
- *
21
- * @returns The number of reminisces a player has available; 0 if they lack the Locket.
22
- */
23
- export declare function reminiscesLeft(): number;
24
- /**
25
- * Determines which monsters were reminisced today by parsing the _locketMonstersFought property.
26
- *
27
- * @returns An array consisting of the Monsters reminisced today.
28
- */
29
- export declare function monstersReminisced(): Monster[];
30
- /**
31
- * Fight a Monster using the Combat Lover's Locket
32
- *
33
- * @param monster The Monster to fight
34
- * @returns false if we are unable to reminisce about this monster. Else, returns whether, at the end of all things, we have reminisced about this monster.
35
- */
36
- export declare function reminisce(monster: Monster): boolean;
37
- /**
38
- * This function efficiently evaluates all of an adventurer's possibly reminiscable monsters, placing them through a filtering criteria and evaluating them based on a passed function.
39
- *
40
- * @param criteria A filtering function for delineating which monsters are "fair game" for the search, such as "is this monster free".
41
- * @param value A function for deciding which monsters are "better" than others.
42
- * @returns A singular monster that fulfills the criteria function and maximizes the value function.
43
- */
44
- export declare function findMonster(criteria: (monster: Monster) => boolean, value?: (monster: Monster) => number): Monster | null;
@@ -1,82 +0,0 @@
1
- import { cliExecute, getLocketMonsters, runCombat, toMonster, } from "kolmafia";
2
- import { have as haveItem } from "../../lib";
3
- import { get } from "../../property";
4
- import { $item } from "../../template-string";
5
- import { clamp } from "../../utils";
6
- const locket = $item `combat lover's locket`;
7
- /**
8
- * @returns Whether you `have` the Combat Lover's Locket
9
- */
10
- export function have() {
11
- return haveItem(locket);
12
- }
13
- /**
14
- * Filters the set of all unlocked locket monsters to only the ones available to be locketed right now.
15
- *
16
- * @returns An array consisting of all Monsters you can fight with your locket right now.
17
- */
18
- export function availableLocketMonsters() {
19
- if (reminiscesLeft() === 0)
20
- return [];
21
- return Object.entries(getLocketMonsters())
22
- .filter(([, unused]) => unused)
23
- .map(([name]) => toMonster(name));
24
- }
25
- /**
26
- * Parses getLocketMonsters and returns the collection of all Monsters as an Array.
27
- *
28
- * @returns An array consisting of all Monsters you can hypothetically fight, regardless of whether they've been fought today.
29
- */
30
- export function unlockedLocketMonsters() {
31
- return Object.entries(getLocketMonsters()).map(([name]) => toMonster(name));
32
- }
33
- function parseLocketProperty() {
34
- return get("_locketMonstersFought")
35
- .split(",")
36
- .filter((id) => id.trim().length > 0);
37
- }
38
- /**
39
- * Determines how many reminisces remain by parsing the _locketMonstersFought property.
40
- *
41
- * @returns The number of reminisces a player has available; 0 if they lack the Locket.
42
- */
43
- export function reminiscesLeft() {
44
- return have() ? clamp(3 - parseLocketProperty().length, 0, 3) : 0;
45
- }
46
- /**
47
- * Determines which monsters were reminisced today by parsing the _locketMonstersFought property.
48
- *
49
- * @returns An array consisting of the Monsters reminisced today.
50
- */
51
- export function monstersReminisced() {
52
- return parseLocketProperty().map((id) => toMonster(id));
53
- }
54
- /**
55
- * Fight a Monster using the Combat Lover's Locket
56
- *
57
- * @param monster The Monster to fight
58
- * @returns false if we are unable to reminisce about this monster. Else, returns whether, at the end of all things, we have reminisced about this monster.
59
- */
60
- export function reminisce(monster) {
61
- if (!have() || reminiscesLeft() === 0 || !getLocketMonsters()[monster.name]) {
62
- return false;
63
- }
64
- cliExecute(`reminisce ${monster}`);
65
- runCombat();
66
- return monstersReminisced().includes(monster);
67
- }
68
- /**
69
- * This function efficiently evaluates all of an adventurer's possibly reminiscable monsters, placing them through a filtering criteria and evaluating them based on a passed function.
70
- *
71
- * @param criteria A filtering function for delineating which monsters are "fair game" for the search, such as "is this monster free".
72
- * @param value A function for deciding which monsters are "better" than others.
73
- * @returns A singular monster that fulfills the criteria function and maximizes the value function.
74
- */
75
- export function findMonster(criteria, value = () => 1) {
76
- if (!have() || reminiscesLeft() === 0)
77
- return null;
78
- const options = availableLocketMonsters().filter(criteria);
79
- if (!options.length)
80
- return null;
81
- return options.reduce((a, b) => (value(a) > value(b) ? a : b));
82
- }
@@ -1,59 +0,0 @@
1
- /**
2
- * Determines whether you `have` the Grey Goose
3
- *
4
- * @returns Whether you `have` the Grey Goose
5
- */
6
- export declare function have(): boolean;
7
- /**
8
- * Determines your expected Grey Goose experience, were you to make it your active familiar
9
- *
10
- * @returns Your current expected Grey Goose experience, paying attention to potential experience from the Shorter-Order Cook
11
- */
12
- export declare function currentExperience(): number;
13
- /**
14
- * Determines the current expected weight of your goose, were you to make it your active familiar
15
- *
16
- * @returns Your current expected Grey Goose weight, paying attention to potential experience from the Shorter-Order Cook
17
- */
18
- export declare function currentWeight(): number;
19
- /**
20
- * Determines the number of drones emitted for a given weight
21
- *
22
- * @param weight The weight to test; defaults to current weight
23
- * @returns The nubmer of drones expected to be emitted for the weight in question
24
- */
25
- export declare function expectedDrones(weight?: number): number;
26
- /**
27
- * Determines the experience (or, in Grey You, fullstats) you'd get from using the appropriate Grey Goose skill for a given weight
28
- *
29
- * @param weight The goose weight you care about; defaults to current weight
30
- * @returns In Grey You, returns the fullstats you'll gain from goose levelling; outside Grey You, returns substats
31
- */
32
- export declare function expectedExperience(weight?: number): number;
33
- /**
34
- * Determines the meat you'd expect to get from using Meatify Matter at the given weight
35
- *
36
- * @param weight The weight in question (defaults to current)
37
- * @returns The expected meat from Meatify Matter
38
- */
39
- export declare function expectedMeat(weight?: number): number;
40
- /**
41
- * Determines whether you've used Meatify Matter today
42
- *
43
- * @returns Whether you've used Meatify Matter today
44
- */
45
- export declare function hasMeatified(): boolean;
46
- /**
47
- * Calculates the number of fights you need to reach a particular weight
48
- *
49
- * @param target The weight you want to reach
50
- * @param bonusExperience The amount of bonus exdperience you'll be running--defaults to the current value
51
- * @returns Number of fights needed
52
- */
53
- export declare function fightsUntil(target: number, bonusExperience?: number): number;
54
- /**
55
- * Determines how many matter-duplicating drones are currently hovering around you
56
- *
57
- * @returns The number of matter-duplicating drones currently hovering around you
58
- */
59
- export declare function currentDrones(): number;
@@ -1,90 +0,0 @@
1
- import { myClass } from "kolmafia";
2
- import { have as have_ } from "../../lib";
3
- import { get as getModifier } from "../../modifier";
4
- import { get } from "../../property";
5
- import { $familiar, $item, $skill } from "../../template-string";
6
- const goose = $familiar `Grey Goose`;
7
- /**
8
- * Determines whether you `have` the Grey Goose
9
- *
10
- * @returns Whether you `have` the Grey Goose
11
- */
12
- export function have() {
13
- return have_(goose);
14
- }
15
- /**
16
- * Determines your expected Grey Goose experience, were you to make it your active familiar
17
- *
18
- * @returns Your current expected Grey Goose experience, paying attention to potential experience from the Shorter-Order Cook
19
- */
20
- export function currentExperience() {
21
- const postAscensionBaseExperience = have_($familiar `Shorter-Order Cook`) && !get("gooseReprocessed")
22
- ? 81 + (have_($item `blue plate`) ? 19 : 0)
23
- : 0;
24
- return goose.experience || postAscensionBaseExperience;
25
- }
26
- /**
27
- * Determines the current expected weight of your goose, were you to make it your active familiar
28
- *
29
- * @returns Your current expected Grey Goose weight, paying attention to potential experience from the Shorter-Order Cook
30
- */
31
- export function currentWeight() {
32
- return Math.min(Math.floor(Math.sqrt(currentExperience())), 20);
33
- }
34
- /**
35
- * Determines the number of drones emitted for a given weight
36
- *
37
- * @param weight The weight to test; defaults to current weight
38
- * @returns The nubmer of drones expected to be emitted for the weight in question
39
- */
40
- export function expectedDrones(weight = currentWeight()) {
41
- return Math.max(0, weight - 5);
42
- }
43
- /**
44
- * Determines the experience (or, in Grey You, fullstats) you'd get from using the appropriate Grey Goose skill for a given weight
45
- *
46
- * @param weight The goose weight you care about; defaults to current weight
47
- * @returns In Grey You, returns the fullstats you'll gain from goose levelling; outside Grey You, returns substats
48
- */
49
- export function expectedExperience(weight = currentWeight()) {
50
- return Math.pow(Math.max(weight - 5, 0), myClass().id === 27 ? 2 : 3);
51
- }
52
- /**
53
- * Determines the meat you'd expect to get from using Meatify Matter at the given weight
54
- *
55
- * @param weight The weight in question (defaults to current)
56
- * @returns The expected meat from Meatify Matter
57
- */
58
- export function expectedMeat(weight = currentWeight()) {
59
- return Math.pow(Math.max(weight - 5, 0), 4);
60
- }
61
- /**
62
- * Determines whether you've used Meatify Matter today
63
- *
64
- * @returns Whether you've used Meatify Matter today
65
- */
66
- export function hasMeatified() {
67
- return get("_meatifyMatterUsed");
68
- }
69
- /**
70
- * Calculates the number of fights you need to reach a particular weight
71
- *
72
- * @param target The weight you want to reach
73
- * @param bonusExperience The amount of bonus exdperience you'll be running--defaults to the current value
74
- * @returns Number of fights needed
75
- */
76
- export function fightsUntil(target, bonusExperience = getModifier("Familiar Experience")) {
77
- const diff = Math.pow(target, 2) - currentExperience();
78
- if (diff <= 0)
79
- return 0;
80
- return Math.ceil(diff /
81
- (1 + bonusExperience + (have_($skill `Testudinal Teachings`) ? 1 / 6 : 0)));
82
- }
83
- /**
84
- * Determines how many matter-duplicating drones are currently hovering around you
85
- *
86
- * @returns The number of matter-duplicating drones currently hovering around you
87
- */
88
- export function currentDrones() {
89
- return get("gooseDronesRemaining");
90
- }
@@ -1,47 +0,0 @@
1
- export declare const cleaver: import("kolmafia").Item;
2
- /**
3
- * Determines whether you currently `have` the June cleaver
4
- *
5
- * @returns Whether you currently `have` the June cleaver
6
- */
7
- export declare function have(): boolean;
8
- /**
9
- * Determines the number of cleaver-combats it takes to get a particular encounter number.
10
- *
11
- * @param encounters The ordinal value of the June cleaver encounter you're asking about
12
- * @returns The number of cleaver-combats it takes to get a particular encounter number--this is agnostic of your current fights.
13
- */
14
- export declare function getInterval(encounters?: number): number;
15
- /**
16
- * Determines the number of cleaver-combats it takes to get a particular encounter number, when a skip is in the mix
17
- *
18
- * @param encounters The ordinal value of the June cleaver encounter you're asking about, assuming you've skipped
19
- * @returns The number of cleaver-combats it would take to get a particular encounter after skipping.
20
- */
21
- export declare function getSkippedInterval(encounters?: number): number;
22
- /**
23
- * Determines the amount of bonus elemental damage your cleaver currently grants
24
- *
25
- * @param element The element in question
26
- * @returns The bonus damage your cleaver currently gives for a given element.
27
- */
28
- export declare function damage(element: "Hot" | "Stench" | "Sleaze" | "Spooky" | "Cold"): number;
29
- /**
30
- * Determines the number of times today you can skip a june cleaver choice
31
- *
32
- * @returns The number of additional times you can select option 4 in a cleaver choice today.
33
- */
34
- export declare function skipsRemaining(): number;
35
- export declare const choices: readonly [1467, 1468, 1469, 1470, 1471, 1472, 1473, 1474, 1475];
36
- /**
37
- * Returns the current June cleaver queue; you are not currently able to encounter any June cleaver choice adventure in this list
38
- *
39
- * @returns An array consisting of the cleaver choice adventures currently in the queue.
40
- */
41
- export declare function queue(): typeof choices[number][];
42
- /**
43
- * Determines which choices are currently eligible to be encountered with your June cleaver
44
- *
45
- * @returns An array consisting of the cleaver choice adventures not currently in the queue.
46
- */
47
- export declare function choicesAvailable(): typeof choices[number][];