libram 0.8.26 → 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 -50
  177. package/dist/resources/2024/AprilingBandHelmet.js +0 -103
  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,122 +0,0 @@
1
- import { cliExecute } 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
- /**
7
- * @returns Do we `have` the Deck of Every Card?
8
- */
9
- export function have() {
10
- return have_($item `Deck of Every Card`);
11
- }
12
- export const cards = Object.freeze([
13
- "X of Clubs",
14
- "X of Diamonds",
15
- "X of Hearts",
16
- "X of Spades",
17
- "X of Papayas",
18
- "X of Kumquats",
19
- "X of Salads",
20
- "X of Cups",
21
- "X of Coins",
22
- "X of Swords",
23
- "X of Wands",
24
- "XVI - The Tower",
25
- "Professor Plum",
26
- "Spare Tire",
27
- "Extra Tank",
28
- "Sheep",
29
- "Year of Plenty",
30
- "Mine",
31
- "Laboratory",
32
- "Plains",
33
- "Swamp",
34
- "Mountain",
35
- "Forest",
36
- "Island",
37
- "Lead Pipe",
38
- "Rope",
39
- "Wrench",
40
- "Candlestick",
41
- "Knife",
42
- "Revolver",
43
- "Gift Card",
44
- "1952 Mickey Mantle",
45
- "XXI - The World",
46
- "III - The Empress",
47
- "VI - The Lovers",
48
- "Healing Salve",
49
- "Dark Ritual",
50
- "Lightning Bolt",
51
- "Giant Growth",
52
- "Ancestral Recall",
53
- "XI - Strength",
54
- "I - The Magician",
55
- "0 - The Fool",
56
- "X - The Wheel of Fortune",
57
- "The Race Card",
58
- "Green Card",
59
- "IV - The Emperor",
60
- "IX - The Hermit",
61
- "Werewolf",
62
- "The Hive",
63
- "XVII - The Star",
64
- "VII - The Chariot",
65
- "XV - The Devil",
66
- "V - The Hierophant",
67
- "Fire Elemental",
68
- "Christmas Card",
69
- "Go Fish",
70
- "Goblin Sapper",
71
- "II - The High Priestess",
72
- "XIV - Temperance",
73
- "XVIII - The Moon",
74
- "Hunky Fireman Card",
75
- "Aquarius Horoscope",
76
- "XII - The Hanged Man",
77
- "Suit Warehouse Discount Card",
78
- "Pirate Birthday Card",
79
- "Plantable Greeting Card",
80
- "Slimer Trading Card",
81
- "XIII - Death",
82
- "Unstable Portal",
83
- ]);
84
- /**
85
- * @returns The number of cards we've drawn so far today--remember, cheating counts as 5
86
- */
87
- export function getCardsDrawn() {
88
- return clamp(get("_deckCardsDrawn"), 0, 15);
89
- }
90
- /**
91
- * @returns The number of draws we have remaining today--remember, cheating counts as 5
92
- */
93
- export function getRemainingDraws() {
94
- return 15 - getCardsDrawn();
95
- }
96
- /**
97
- * @returns The number of additional cards we can cheat today
98
- */
99
- export function getRemainingCheats() {
100
- return Math.floor(getRemainingDraws() / 5);
101
- }
102
- /**
103
- * @returns An array of the Cards we've seen today
104
- */
105
- export function getCardsSeen() {
106
- return get("_deckCardsSeen")
107
- ? get("_deckCardsSeen").split("|")
108
- : [];
109
- }
110
- /**
111
- * Cheat a card of your choice from the Deck
112
- *
113
- * @param card The card in question
114
- * @returns `true` if we succeed or if we've already cheated that card today; `false` if we fail or are out of draws/cheats for the day.
115
- */
116
- export function cheatCard(card) {
117
- if (getCardsSeen().includes(card))
118
- return true;
119
- if (getRemainingDraws() < 5)
120
- return false;
121
- return cliExecute(`cheat ${card}`);
122
- }
@@ -1,89 +0,0 @@
1
- import { Item, Location } from "kolmafia";
2
- /**
3
- * @returns Whether you permanently own Dinseylandfill
4
- */
5
- export declare function have(): boolean;
6
- /**
7
- * @returns Whether you have access to Dinseylandfill currently
8
- */
9
- export declare function available(): boolean;
10
- declare class QuestData {
11
- name: string;
12
- priority: number;
13
- questNameKiosk: string;
14
- questNameQuestLog: string;
15
- questStateProperty: string;
16
- questProgressProperty: string;
17
- questProgressLimit: number;
18
- canUseWanderers: boolean;
19
- requiredItem: Item;
20
- questLocation: Location;
21
- /**
22
- * Process for determining where to put a wanderer to extract additional value from it
23
- *
24
- * @param name easy to refer to name of the quest
25
- * @param priority ranked preference of quests
26
- * @param questNameKiosk returns the name of the quest as found at the dinseylandfill Job Kiosk
27
- * @param questNameQuestLog returns the name of the quest as found in the quest log
28
- * @param questStateProperty name of the mafia property tracing the current state of the quest (e.g. unstarted, step[x], finished)
29
- * @param questProgressProperty name of the mafia property that tracks progress of the current quest state
30
- * @param questProgressLimit Maximum questProgressProperty can reach
31
- * @param canUseWanderers whether wandering monsters can be used to progress the quest
32
- * @param requiredItem the required item (if any) needed to be equipped to progress the quest
33
- * @param questLocation where to adventure to progress the quest
34
- */
35
- constructor(name: string, priority: number, questNameKiosk: string, questNameQuestLog: string, questStateProperty: string, questProgressProperty: string, questProgressLimit: number, canUseWanderers: boolean, requiredItem: Item, questLocation: Location);
36
- currentQuest(): boolean;
37
- }
38
- export declare const quests: QuestData[];
39
- /**
40
- * Disposes of a Bag of park garbage in the Maintenance Tunnels for daily funfunds
41
- *
42
- * @returns Whether you successfully deposited a bag for funfunds
43
- */
44
- export declare function disposeGarbage(): boolean;
45
- /**
46
- * @returns Whether you have a current Dinsey quest
47
- */
48
- export declare function hasQuest(): boolean;
49
- /**
50
- * @returns The QuestData for your current active quest
51
- */
52
- export declare function activeQuest(): QuestData;
53
- /**
54
- * @returns Whether your quest is ready to hand in
55
- */
56
- export declare function questComplete(): boolean;
57
- /**
58
- * @returns Whether your quest still has actions needing completion
59
- */
60
- export declare function hasActiveQuest(): boolean;
61
- /**
62
- * Determines the probability of getting a robortender drop based on number of drops received
63
- *
64
- * @param priority The name or ranked preference of the lowest priority quest you want to accept.
65
- * @returns Whether you accepted a quest or not
66
- */
67
- export declare function acceptQuest(priority: number | string): boolean;
68
- /**
69
- * Turns in a completed quest
70
- */
71
- export declare function turnInQuest(): void;
72
- export declare const keyCardsLocations: Map<Item, Location>;
73
- /**
74
- * @returns Whether you currently have access to fighting Wart Dinsey
75
- */
76
- export declare function canFightWartDinsey(): boolean;
77
- /**
78
- * @returns Whether you permanently own Dinseylandfill
79
- */
80
- export declare function coasterNextTurn(): boolean;
81
- /**
82
- * @returns Whether you permanently own Dinseylandfill
83
- */
84
- export declare function foughtWartDinseyThisLife(): boolean;
85
- /**
86
- * @returns Whether you have disposed of garbage for funfunds today
87
- */
88
- export declare function hasDisposedGarbage(): boolean;
89
- export {};
@@ -1,205 +0,0 @@
1
- import { indexOf, myAdventures, myAscensions, runChoice, visitUrl, } from "kolmafia";
2
- import { getRemainingLiver, have as haveItem } from "../../lib";
3
- import { get, set } from "../../property";
4
- import { $item, $location } from "../../template-string";
5
- /**
6
- * @returns Whether you permanently own Dinseylandfill
7
- */
8
- export function have() {
9
- return get("stenchAirportAlways");
10
- }
11
- /**
12
- * @returns Whether you have access to Dinseylandfill currently
13
- */
14
- export function available() {
15
- return have() || get("_stenchAirportToday");
16
- }
17
- class QuestData {
18
- name;
19
- priority;
20
- questNameKiosk;
21
- questNameQuestLog;
22
- questStateProperty;
23
- questProgressProperty;
24
- questProgressLimit;
25
- canUseWanderers;
26
- requiredItem;
27
- questLocation;
28
- /**
29
- * Process for determining where to put a wanderer to extract additional value from it
30
- *
31
- * @param name easy to refer to name of the quest
32
- * @param priority ranked preference of quests
33
- * @param questNameKiosk returns the name of the quest as found at the dinseylandfill Job Kiosk
34
- * @param questNameQuestLog returns the name of the quest as found in the quest log
35
- * @param questStateProperty name of the mafia property tracing the current state of the quest (e.g. unstarted, step[x], finished)
36
- * @param questProgressProperty name of the mafia property that tracks progress of the current quest state
37
- * @param questProgressLimit Maximum questProgressProperty can reach
38
- * @param canUseWanderers whether wandering monsters can be used to progress the quest
39
- * @param requiredItem the required item (if any) needed to be equipped to progress the quest
40
- * @param questLocation where to adventure to progress the quest
41
- */
42
- constructor(name, priority, questNameKiosk, questNameQuestLog, questStateProperty, questProgressProperty, questProgressLimit, canUseWanderers, requiredItem, questLocation) {
43
- this.name = name;
44
- this.priority = priority;
45
- this.questNameKiosk = questNameKiosk;
46
- this.questNameQuestLog = questNameQuestLog;
47
- this.questStateProperty = questStateProperty;
48
- this.questProgressProperty = questProgressProperty;
49
- this.questProgressLimit = questProgressLimit;
50
- this.canUseWanderers = canUseWanderers;
51
- this.requiredItem = requiredItem;
52
- this.questLocation = questLocation;
53
- }
54
- currentQuest() {
55
- return get(this.questStateProperty) !== "unstarted";
56
- }
57
- }
58
- const kioskUrl = "place.php?whichplace=airport_stench&action=airport3_kiosk";
59
- const maintUrl = "place.php?whichplace=airport_stench&action=airport3_tunnels";
60
- export const quests = [
61
- new QuestData("lube", 1, "Track Maintenance", "Super Luber", "questEStSuperLuber", "", 0, false, $item `lube-shoes`, $location `Barf Mountain`),
62
- new QuestData("fuel", 0, "Electrical Maintenance", "Give Me Fuel", "questEStGiveMeFuel", "", 0, false, $item `none`, $location `The Toxic Teacups`),
63
- new QuestData("sexism", 2, "Sexism Reduction", "Social Justice Adventurer I", "questEStSocialJusticeI", "dinseySocialJusticeIProgress", 15, true, $item `none`, $location `Pirates of the Garbage Barges`),
64
- new QuestData("racism", 3, "Racism Reduction", "Social Justice Adventurer II", "questEStSocialJusticeII", "dinseySocialJusticeIIProgress", 15, true, $item `none`, $location `Uncle Gator's Country Fun-Time Liquid Waste Sluice`),
65
- new QuestData("fun", 4, "Compulsory Fun", "Whistling Zippity-Doo-Dah", "questEStZippityDooDah", "dinseyFunProgress", 15, true, $item `Dinsey mascot mask`, $location `The Toxic Teacups`),
66
- new QuestData("trash", 6, "Waterway Debris Removal", "Teach a Man to Fish Trash", "questEStFishTrash", "dinseyFilthLevel", 0, true, $item `trash net`, $location `Pirates of the Garbage Barges`),
67
- new QuestData("bear", 5, "Bear Removal", "Nasty, Nasty Bears", "questEStNastyBears", "dinseyNastyBearsDefeated", 8, false, $item `none`, $location `Uncle Gator's Country Fun-Time Liquid Waste Sluice`),
68
- new QuestData("food", 7, "Guest Sustenance Assurance", "Will Work With Food", "questEStWorkWithFood", "dinseyTouristsFed", 30, false, $item `none`, $location `Barf Mountain`),
69
- ];
70
- /**
71
- * Disposes of a Bag of park garbage in the Maintenance Tunnels for daily funfunds
72
- *
73
- * @returns Whether you successfully deposited a bag for funfunds
74
- */
75
- export function disposeGarbage() {
76
- if (hasDisposedGarbage()) {
77
- return false;
78
- }
79
- if (!hasDisposedGarbage() && haveItem($item `bag of park garbage`)) {
80
- visitUrl(maintUrl);
81
- runChoice(6);
82
- }
83
- return hasDisposedGarbage();
84
- }
85
- /**
86
- * @returns Whether you have a current Dinsey quest
87
- */
88
- export function hasQuest() {
89
- return quests.some((q) => q.currentQuest());
90
- }
91
- const BLANK_QUEST = new QuestData("", -1, "", "", "", "", -1, false, $item `none`, $location `none`);
92
- /**
93
- * @returns The QuestData for your current active quest
94
- */
95
- export function activeQuest() {
96
- return quests.find((q) => q.currentQuest()) || BLANK_QUEST;
97
- }
98
- /**
99
- * @returns Whether your quest is ready to hand in
100
- */
101
- export function questComplete() {
102
- const quest = activeQuest();
103
- return quest !== BLANK_QUEST && get(quest.questStateProperty) === "finished";
104
- }
105
- /**
106
- * @returns Whether your quest still has actions needing completion
107
- */
108
- export function hasActiveQuest() {
109
- return hasQuest() && !questComplete();
110
- }
111
- /**
112
- * Determines the probability of getting a robortender drop based on number of drops received
113
- *
114
- * @param priority The name or ranked preference of the lowest priority quest you want to accept.
115
- * @returns Whether you accepted a quest or not
116
- */
117
- export function acceptQuest(priority) {
118
- if (hasQuest()) {
119
- return false;
120
- }
121
- const page = visitUrl(kioskUrl);
122
- let choice = 6;
123
- const at = indexOf(page, "Available Assignments");
124
- if (at == -1) {
125
- return false;
126
- }
127
- const jobs = [];
128
- quests.forEach((quest) => {
129
- jobs.push(quest.name);
130
- });
131
- const priorityNum = typeof priority === "string"
132
- ? quests.find((q) => q.name === priority)?.priority ?? 7
133
- : priority;
134
- const availableJobs = [];
135
- const jobChoices = [["none", 999]];
136
- for (const quest of quests) {
137
- const job = quest.name;
138
- const jobAt = indexOf(page, job, at);
139
- if (jobAt != -1) {
140
- availableJobs.push(quest);
141
- jobChoices.push([job, jobAt]);
142
- break;
143
- }
144
- }
145
- const bestJob = availableJobs.sort((a, b) => a.priority - b.priority)[0];
146
- const sortedChoices = jobChoices.sort((a, b) => a[1] - b[1]);
147
- if (bestJob.priority <= priorityNum) {
148
- for (const index in sortedChoices) {
149
- const jobName = sortedChoices[index][0];
150
- if (jobName === bestJob.name) {
151
- choice = parseInt(index) + 1;
152
- break;
153
- }
154
- }
155
- }
156
- runChoice(choice);
157
- return hasQuest();
158
- }
159
- /**
160
- * Turns in a completed quest
161
- */
162
- export function turnInQuest() {
163
- if (questComplete()) {
164
- if (activeQuest().name === "racism")
165
- set("questEStSocialJusticeI", "unstarted");
166
- visitUrl(kioskUrl);
167
- runChoice(3);
168
- }
169
- }
170
- export const keyCardsLocations = new Map([
171
- [$item `keycard α`, $location `Barf Mountain`],
172
- [$item `keycard β`, $location `Pirates of the Garbage Barges`],
173
- [$item `keycard γ`, $location `The Toxic Teacups`],
174
- [
175
- $item `keycard δ`,
176
- $location `Uncle Gator's Country Fun-Time Liquid Waste Sluice`,
177
- ],
178
- ]);
179
- /**
180
- * @returns Whether you currently have access to fighting Wart Dinsey
181
- */
182
- export function canFightWartDinsey() {
183
- return (Array.from(keyCardsLocations.keys()).every((keycard) => haveItem(keycard)) &&
184
- !foughtWartDinseyThisLife() &&
185
- getRemainingLiver() >= 0 &&
186
- myAdventures() > 0);
187
- }
188
- /**
189
- * @returns Whether you permanently own Dinseylandfill
190
- */
191
- export function coasterNextTurn() {
192
- return get("dinseyRollercoasterNext");
193
- }
194
- /**
195
- * @returns Whether you permanently own Dinseylandfill
196
- */
197
- export function foughtWartDinseyThisLife() {
198
- return get("lastWartDinseyDefeated") === myAscensions();
199
- }
200
- /**
201
- * @returns Whether you have disposed of garbage for funfunds today
202
- */
203
- export function hasDisposedGarbage() {
204
- return get("_dinseyGarbageDisposed");
205
- }
@@ -1,23 +0,0 @@
1
- import { Item } from "kolmafia";
2
- export declare const Mayo: {
3
- nex: Item;
4
- diol: Item;
5
- zapine: Item;
6
- flex: Item;
7
- };
8
- /**
9
- * @returns Whether the Mayo Clinic is our current active workshed
10
- */
11
- export declare function installed(): boolean;
12
- /**
13
- * @returns Whether we `have` the Mayo Clinic, or it's installed
14
- */
15
- export declare function have(): boolean;
16
- /**
17
- * Sets mayo minder to a particular mayo, and ensures you have enough of it.
18
- *
19
- * @param mayo Mayo to use
20
- * @param quantity Quantity to ensure
21
- * @returns Whether we succeeded in this endeavor; a trivial `false` for people without the clinic `installed`
22
- */
23
- export declare function setMayoMinder(mayo: Item, quantity?: number): boolean;
@@ -1,49 +0,0 @@
1
- import { buy, getWorkshed, retrieveItem, use } from "kolmafia";
2
- import { have as haveItem } from "../../lib";
3
- import logger from "../../logger";
4
- import { get, withChoice } from "../../property";
5
- import { $item } from "../../template-string";
6
- export const Mayo = {
7
- nex: $item `Mayonex`,
8
- diol: $item `Mayodiol`,
9
- zapine: $item `Mayozapine`,
10
- flex: $item `Mayoflex`,
11
- };
12
- /**
13
- * @returns Whether the Mayo Clinic is our current active workshed
14
- */
15
- export function installed() {
16
- return getWorkshed() === $item `portable Mayo Clinic`;
17
- }
18
- /**
19
- * @returns Whether we `have` the Mayo Clinic, or it's installed
20
- */
21
- export function have() {
22
- return haveItem($item `portable Mayo Clinic`) || installed();
23
- }
24
- /**
25
- * Sets mayo minder to a particular mayo, and ensures you have enough of it.
26
- *
27
- * @param mayo Mayo to use
28
- * @param quantity Quantity to ensure
29
- * @returns Whether we succeeded in this endeavor; a trivial `false` for people without the clinic `installed`
30
- */
31
- export function setMayoMinder(mayo, quantity = 1) {
32
- if (getWorkshed() !== $item `portable Mayo Clinic`)
33
- return false;
34
- if (!Object.values(Mayo).includes(mayo)) {
35
- logger.error("Invalid mayo selected");
36
- return false;
37
- }
38
- if (get("mayoInMouth") && get("mayoInMouth") !== mayo.name) {
39
- logger.error("Currently have incorrect mayo in mouth");
40
- return false;
41
- }
42
- retrieveItem(quantity, mayo);
43
- if (!haveItem($item `Mayo Minder™`))
44
- buy($item `Mayo Minder™`);
45
- if (get("mayoMinderSetting") !== mayo.name) {
46
- withChoice(1076, mayo.id - 8260, () => use($item `Mayo Minder™`));
47
- }
48
- return get("mayoMinderSetting") === mayo.name;
49
- }
@@ -1,32 +0,0 @@
1
- import { Location } from "kolmafia";
2
- /**
3
- * @returns Whether or not you can currently access Gingerbread City
4
- */
5
- export declare function available(): boolean;
6
- /**
7
- * @returns The number of Gingerbread encounters until it's Midnight in the city; this may be negative if the time has passed
8
- */
9
- export declare function minutesToMidnight(): number;
10
- /**
11
- * @returns The number of Gingerbread encounters until it's Noon in the city; this may be negative if the time has passed
12
- */
13
- export declare function minutesToNoon(): number;
14
- export declare const LOCATIONS: readonly Location[];
15
- /**
16
- * @returns A list of all Gingerbread locations at which you can currently adventure
17
- */
18
- export declare function availableLocations(): Location[];
19
- /**
20
- * @param location The location in question
21
- * @returns The id of the Noon choice adventure at that location; 0 if inapplicable
22
- */
23
- export declare function getNoonChoiceId(location: Location): number;
24
- /**
25
- * @param location The location in question
26
- * @returns The id of the Midnight choice adventure at that location; 0 if inapplicable
27
- */
28
- export declare function getMidnightChoiceId(location: Location): number;
29
- /**
30
- * @returns Whether or not it is possible for you to fight Judge Fudge today
31
- */
32
- export declare function canJudgeFudge(): boolean;
@@ -1,73 +0,0 @@
1
- import { canAdventure } from "kolmafia";
2
- import { get } from "../../property";
3
- import { $location, $locations } from "../../template-string";
4
- /**
5
- * @returns Whether or not you can currently access Gingerbread City
6
- */
7
- export function available() {
8
- return ((get("gingerbreadCityAvailable") || get("_gingerbreadCityToday")) &&
9
- turns() < availableTurns());
10
- }
11
- function turns() {
12
- return (get("_gingerbreadCityTurns") + (get("_gingerbreadClockAdvanced") ? 5 : 0));
13
- }
14
- function availableTurns() {
15
- return 20 + (get("gingerExtraAdventures") ? 10 : 0);
16
- }
17
- /**
18
- * @returns The number of Gingerbread encounters until it's Midnight in the city; this may be negative if the time has passed
19
- */
20
- export function minutesToMidnight() {
21
- return 19 - turns();
22
- }
23
- /**
24
- * @returns The number of Gingerbread encounters until it's Noon in the city; this may be negative if the time has passed
25
- */
26
- export function minutesToNoon() {
27
- return 9 - turns();
28
- }
29
- export const LOCATIONS = Object.freeze($locations `Gingerbread Civic Center, Gingerbread Train Station, Gingerbread Industrial Zone, Gingerbread Upscale Retail District, Gingerbread Sewers`);
30
- /**
31
- * @returns A list of all Gingerbread locations at which you can currently adventure
32
- */
33
- export function availableLocations() {
34
- return LOCATIONS.filter((l) => canAdventure(l));
35
- }
36
- const NOONS = new Map([
37
- [$location `Gingerbread Train Station`, 1204],
38
- [$location `Gingerbread Civic Center`, 1202],
39
- [$location `Gingerbread Industrial Zone`, 1206],
40
- [$location `Gingerbread Upscale Retail District`, 1208],
41
- ]);
42
- const MIDNIGHTS = new Map([
43
- [$location `Gingerbread Train Station`, 1205],
44
- [$location `Gingerbread Civic Center`, 1203],
45
- [$location `Gingerbread Industrial Zone`, 1207],
46
- [$location `Gingerbread Upscale Retail District`, 1209],
47
- ]);
48
- /**
49
- * @param location The location in question
50
- * @returns The id of the Noon choice adventure at that location; 0 if inapplicable
51
- */
52
- export function getNoonChoiceId(location) {
53
- return NOONS.get(location) ?? 0;
54
- }
55
- /**
56
- * @param location The location in question
57
- * @returns The id of the Midnight choice adventure at that location; 0 if inapplicable
58
- */
59
- export function getMidnightChoiceId(location) {
60
- return MIDNIGHTS.get(location) ?? 0;
61
- }
62
- /**
63
- * @returns Whether or not it is possible for you to fight Judge Fudge today
64
- */
65
- export function canJudgeFudge() {
66
- if (minutesToNoon() >= 0) {
67
- return true;
68
- }
69
- if (minutesToMidnight() >= 0 && get("_gingerbreadColumnDestroyed")) {
70
- return true;
71
- }
72
- return false;
73
- }