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,33 +0,0 @@
1
- import { have as _have } from "../../lib";
2
- import { get } from "../../property";
3
- import { $item, $skill } from "../../template-string";
4
- const summonSkill = $skill `Summon Taffy`;
5
- /**
6
- * @returns true if the player can Summon Taffy
7
- */
8
- export function have() {
9
- return _have(summonSkill);
10
- }
11
- /**
12
- * @returns map containing the chance of an item to be summoned
13
- */
14
- export function expected() {
15
- const rareSummons = get("_taffyRareSummons");
16
- const yellowSummons = get("_taffyYellowSummons");
17
- const onlyYellow = yellowSummons === 0 && rareSummons === 3;
18
- const totalRareChance = rareSummons < 4 ? 1.0 / 2 ** (rareSummons + 1) : 0.0;
19
- const commonChance = (1.0 - totalRareChance) / 4;
20
- const rareChance = onlyYellow
21
- ? 0.0
22
- : totalRareChance / (3 - get("_taffyYellowSummons"));
23
- const yellowChance = yellowSummons === 1 ? 0.0 : onlyYellow ? totalRareChance : rareChance;
24
- return new Map([
25
- [$item `pulled blue taffy`, commonChance],
26
- [$item `pulled orange taffy`, commonChance],
27
- [$item `pulled violet taffy`, commonChance],
28
- [$item `pulled red taffy`, commonChance],
29
- [$item `pulled indigo taffy`, rareChance],
30
- [$item `pulled green taffy`, rareChance],
31
- [$item `pulled yellow taffy`, yellowChance],
32
- ]);
33
- }
@@ -1,42 +0,0 @@
1
- /**
2
- * @returns Whether we `have` the Crimbo Shrub in our terrarium
3
- */
4
- export declare function have(): boolean;
5
- declare const Toppers: {
6
- readonly Muscle: 1;
7
- readonly Mysticality: 2;
8
- readonly Moxie: 3;
9
- };
10
- declare type ShrubTopper = keyof typeof Toppers;
11
- declare const Lights: {
12
- readonly "Prismatic Damage": 1;
13
- readonly "Hot Damage": 2;
14
- readonly "Cold Damage": 3;
15
- readonly "Stench Damage": 4;
16
- readonly "Spooky Damage": 5;
17
- readonly "Sleaze Damage": 6;
18
- };
19
- declare type ShrubLights = keyof typeof Lights;
20
- declare const Garland: {
21
- readonly "HP Regen": 1;
22
- readonly "PvP Fights": 2;
23
- readonly Blocking: 3;
24
- };
25
- declare type ShrubGarland = keyof typeof Garland;
26
- declare const Gifts: {
27
- readonly "Yellow Ray": 1;
28
- readonly "Red Ray": 2;
29
- readonly Gifts: 3;
30
- };
31
- declare type ShrubGifts = keyof typeof Gifts;
32
- /**
33
- * Decorates our Crimbo Shrub with the chosen decour, if able
34
- *
35
- * @param topper The shrub Topper to select
36
- * @param lights The shrub Lights to select
37
- * @param garland The shrub Garland to select
38
- * @param gifts The shrub Gifts to select
39
- * @returns Whether the shrub's decour perfectly matches the given decour
40
- */
41
- export declare function decorate(topper: ShrubTopper, lights: ShrubLights, garland: ShrubGarland, gifts: ShrubGifts): boolean;
42
- export {};
@@ -1,89 +0,0 @@
1
- import { useFamiliar, visitUrl } from "kolmafia";
2
- import { directlyUse, have as have_ } from "../../lib";
3
- import { get } from "../../property";
4
- import { $familiar, $item } from "../../template-string";
5
- /**
6
- * @returns Whether we `have` the Crimbo Shrub in our terrarium
7
- */
8
- export function have() {
9
- return have_($familiar `Crimbo Shrub`);
10
- }
11
- const Toppers = {
12
- Muscle: 1,
13
- Mysticality: 2,
14
- Moxie: 3,
15
- };
16
- const Lights = {
17
- "Prismatic Damage": 1,
18
- "Hot Damage": 2,
19
- "Cold Damage": 3,
20
- "Stench Damage": 4,
21
- "Spooky Damage": 5,
22
- "Sleaze Damage": 6,
23
- };
24
- const Garland = {
25
- "HP Regen": 1,
26
- "PvP Fights": 2,
27
- Blocking: 3,
28
- };
29
- const Gifts = {
30
- "Yellow Ray": 1,
31
- "Red Ray": 2,
32
- Gifts: 3,
33
- };
34
- const Prefs = {
35
- Muscle: "Muscle",
36
- Mysticality: "Mysticality",
37
- Moxie: "Moxie",
38
- Prismatic: "Prismatic Damage",
39
- Hot: "Hot Damage",
40
- Cold: "Cold Damage",
41
- Stench: "Stench Damage",
42
- Spooky: "Spooky Damage",
43
- Sleaze: "Sleaze Damage",
44
- HP: "HP Regen",
45
- PvP: "PvP Fights",
46
- blocking: "Blocking",
47
- yellow: "Yellow Ray",
48
- meat: "Red Ray",
49
- gifts: "Gifts",
50
- };
51
- /**
52
- * Internal function used to check whether decour perfectly matches what we want
53
- *
54
- * @param topper Topper to check for
55
- * @param lights Lights to check for
56
- * @param garland Garland to check for
57
- * @param gifts Gifts to check for
58
- * @returns Whether every single decour matches what we expect
59
- */
60
- function isDecoratedWith(topper, lights, garland, gifts) {
61
- const decorations = [
62
- get("shrubTopper"),
63
- get("shrubLights"),
64
- get("shrubGarland"),
65
- get("shrubGifts"),
66
- ].map((x) => Prefs[x]);
67
- return [topper, lights, garland, gifts].every((x, i) => x === decorations[i]);
68
- }
69
- /**
70
- * Decorates our Crimbo Shrub with the chosen decour, if able
71
- *
72
- * @param topper The shrub Topper to select
73
- * @param lights The shrub Lights to select
74
- * @param garland The shrub Garland to select
75
- * @param gifts The shrub Gifts to select
76
- * @returns Whether the shrub's decour perfectly matches the given decour
77
- */
78
- export function decorate(topper, lights, garland, gifts) {
79
- if (!have())
80
- return false;
81
- if (get("_shrubDecorated"))
82
- return isDecoratedWith(topper, lights, garland, gifts);
83
- if (!have_($item `box of old Crimbo decorations`)) {
84
- useFamiliar($familiar `Crimbo Shrub`);
85
- }
86
- directlyUse($item `box of old Crimbo decorations`);
87
- visitUrl(`choice.php?whichchoice=999&pwd=&option=1&topper=${Toppers[topper]}&lights=${Lights[lights]}&garland=${Garland[garland]}&gift=${Gifts[gifts]}`);
88
- return isDecoratedWith(topper, lights, garland, gifts);
89
- }
@@ -1,56 +0,0 @@
1
- import { Effect, Item, Phylum } from "kolmafia";
2
- /**
3
- * @returns Whether or not you `have` DNA lab or it's installed
4
- */
5
- export declare function have(): boolean;
6
- /**
7
- * @returns Whether the DNA Lab is your currently active workshed
8
- */
9
- export declare function installed(): boolean;
10
- /**
11
- * Tells you whether you are currently hybridized. When passed with an input of any sort, tells you whether you are currently hybridized with that effect.
12
- *
13
- * @param tonic Optional input. When passed, the function returns whether that specific effect is hybridized.
14
- * @returns Whether the given tonic is currently hybridized
15
- */
16
- export declare function isHybridized(tonic?: Effect | Phylum | Item): boolean;
17
- /**
18
- * Returns the tonic item associated with a particular phylum.
19
- *
20
- * @param phylum The phylum in question.
21
- * @returns The tonic item associated with that phylum; returns $item.none for $phylum.none.
22
- */
23
- export declare function getTonic(phylum: Phylum): Item;
24
- /**
25
- * Returns the tonic effect associated with a particular phylum.
26
- *
27
- * @param phylum The phylum in question.
28
- * @returns The tonic effect associated with that phylum; returns $effect.none for $phylum.none.
29
- */
30
- export declare function getEffect(phylum: Phylum): Effect;
31
- /**
32
- * Tells you which phylum to hunt down for a given effect or item.
33
- *
34
- * @param dnatype The tonic effect or item in question
35
- * @returns The Phylum associated with that effect or item; null if an invalid choice
36
- */
37
- export declare function phylumFor(dnatype: Effect | Item): Phylum | null;
38
- /**
39
- * Hybridize yourself with the current contents of your syringe, if possible.
40
- *
41
- * @returns Whether or not we succeeded
42
- */
43
- export declare function hybridize(): boolean;
44
- /**
45
- * Makes tonics with whatever phylum is currently in your syringe
46
- *
47
- * @param {number} [amount=1] the number of tonics to make
48
- * @returns Whether we successfully made tonics; returns true if we made as many as we could, regardless of whether that was the number requested
49
- */
50
- export declare function makeTonic(amount?: 1 | 2 | 3): boolean;
51
- /**
52
- * Tells you how many tonics you can make the rest of the day.
53
- *
54
- * @returns The remaining tonics you can make
55
- */
56
- export declare function tonicsLeft(): number;
@@ -1,162 +0,0 @@
1
- import { cliExecute, Effect, getWorkshed, haveEffect, itemAmount, Phylum, } from "kolmafia";
2
- import { have as haveItem } from "../../lib";
3
- import { get as getModifier } from "../../modifier";
4
- import { get } from "../../property";
5
- import { $effect, $item, $phylum } from "../../template-string";
6
- import { clamp } from "../../utils";
7
- const lab = $item `Little Geneticist DNA-Splicing Lab`;
8
- /**
9
- * @returns Whether or not you `have` DNA lab or it's installed
10
- */
11
- export function have() {
12
- return haveItem(lab) || getWorkshed() === lab;
13
- }
14
- /**
15
- * @returns Whether the DNA Lab is your currently active workshed
16
- */
17
- export function installed() {
18
- return getWorkshed() === lab;
19
- }
20
- const phylaEffects = new Map([
21
- [$phylum `beast`, $effect `Human-Beast Hybrid`],
22
- [$phylum `bug`, $effect `Human-Insect Hybrid`],
23
- [$phylum `constellation`, $effect `Human-Constellation Hybrid`],
24
- [$phylum `construct`, $effect `Human-Machine Hybrid`],
25
- [$phylum `demon`, $effect `Human-Demon Hybrid`],
26
- [$phylum `dude`, $effect `Human-Human Hybrid`],
27
- [$phylum `elemental`, $effect `Human-Elemental Hybrid`],
28
- [$phylum `elf`, $effect `Human-Elf Hybrid`],
29
- [$phylum `fish`, $effect `Human-Fish Hybrid`],
30
- [$phylum `goblin`, $effect `Human-Goblin Hybrid`],
31
- [$phylum `hippy`, $effect `Human-Hobo Hybrid`],
32
- [$phylum `horror`, $effect `Human-Horror Hybrid`],
33
- [$phylum `humanoid`, $effect `Human-Humanoid Hybrid`],
34
- [$phylum `mer-kin`, $effect `Human-Mer-kin Hybrid`],
35
- [$phylum `orc`, $effect `Human-Orc Hybrid`],
36
- [$phylum `penguin`, $effect `Human-Penguin Hybrid`],
37
- [$phylum `pirate`, $effect `Human-Pirate Hybrid`],
38
- [$phylum `plant`, $effect `Human-Plant Hybrid`],
39
- [$phylum `slime`, $effect `Human-Slime Hybrid`],
40
- [$phylum `undead`, $effect `Human-Undead Hybrid`],
41
- [$phylum `weird`, $effect `Human-Weird Thing Hybrid`],
42
- ]);
43
- const phylaTonics = new Map([
44
- [$phylum `beast`, $item `Gene Tonic: Beast`],
45
- [$phylum `bug`, $item `Gene Tonic: Insect`],
46
- [$phylum `constellation`, $item `Gene Tonic: Constellation`],
47
- [$phylum `construct`, $item `Gene Tonic: Construct`],
48
- [$phylum `demon`, $item `Gene Tonic: Demon`],
49
- [$phylum `dude`, $item `Gene Tonic: Humanoid`],
50
- [$phylum `elemental`, $item `Gene Tonic: Elemental`],
51
- [$phylum `elf`, $item `Gene Tonic: Elf`],
52
- [$phylum `fish`, $item `Gene Tonic: Fish`],
53
- [$phylum `goblin`, $item `Gene Tonic: Goblin`],
54
- [$phylum `hippy`, $item `Gene Tonic: Hobo`],
55
- [$phylum `horror`, $item `Gene Tonic: Horror`],
56
- [$phylum `humanoid`, $item `Gene Tonic: Humanoid`],
57
- [$phylum `mer-kin`, $item `Gene Tonic: Mer-kin`],
58
- [$phylum `orc`, $item `Gene Tonic: Orc`],
59
- [$phylum `penguin`, $item `Gene Tonic: Penguin`],
60
- [$phylum `pirate`, $item `Gene Tonic: Pirate`],
61
- [$phylum `plant`, $item `Gene Tonic: Plant`],
62
- [$phylum `slime`, $item `Gene Tonic: Slime`],
63
- [$phylum `undead`, $item `Gene Tonic: Undead`],
64
- [$phylum `weird`, $item `Gene Tonic: Weird`],
65
- ]);
66
- const tonicEffects = Array.from(phylaEffects.values());
67
- /**
68
- * Tells you whether you are currently hybridized. When passed with an input of any sort, tells you whether you are currently hybridized with that effect.
69
- *
70
- * @param tonic Optional input. When passed, the function returns whether that specific effect is hybridized.
71
- * @returns Whether the given tonic is currently hybridized
72
- */
73
- export function isHybridized(tonic) {
74
- if (!tonic)
75
- return installed() && get("_dnaHybrid");
76
- const tonicEffect = tonic instanceof Effect
77
- ? tonic
78
- : tonic instanceof Phylum
79
- ? getEffect(tonic)
80
- : getModifier("Effect", tonic);
81
- return (tonicEffects.includes(tonicEffect) && haveEffect(tonicEffect) === 2147483647);
82
- }
83
- /**
84
- * Returns the tonic item associated with a particular phylum.
85
- *
86
- * @param phylum The phylum in question.
87
- * @returns The tonic item associated with that phylum; returns $item.none for $phylum.none.
88
- */
89
- export function getTonic(phylum) {
90
- return phylaTonics.get(phylum) ?? $item.none;
91
- //return $item.none rather than null because it should never happen.
92
- }
93
- /**
94
- * Returns the tonic effect associated with a particular phylum.
95
- *
96
- * @param phylum The phylum in question.
97
- * @returns The tonic effect associated with that phylum; returns $effect.none for $phylum.none.
98
- */
99
- export function getEffect(phylum) {
100
- return phylaEffects.get(phylum) ?? $effect.none;
101
- //return $effect.none rather than null because it should never happen
102
- }
103
- /**
104
- * Tells you which phylum to hunt down for a given effect or item.
105
- *
106
- * @param dnatype The tonic effect or item in question
107
- * @returns The Phylum associated with that effect or item; null if an invalid choice
108
- */
109
- export function phylumFor(dnatype) {
110
- if (dnatype instanceof Effect) {
111
- const phylumPair = Array.from(phylaEffects.entries()).find(([, effect]) => effect === dnatype);
112
- return phylumPair ? phylumPair[0] : null;
113
- }
114
- else {
115
- const phylumPair = Array.from(phylaTonics.entries()).find(([, tonic]) => tonic === dnatype);
116
- return phylumPair ? phylumPair[0] : null;
117
- }
118
- }
119
- /**
120
- * Hybridize yourself with the current contents of your syringe, if possible.
121
- *
122
- * @returns Whether or not we succeeded
123
- */
124
- export function hybridize() {
125
- if (get("_dnaHybrid"))
126
- return false;
127
- if (!installed())
128
- return false;
129
- const currentSyringe = get("dnaSyringe");
130
- if (!currentSyringe)
131
- return false;
132
- const tonicPotion = getTonic(currentSyringe);
133
- const expectedEffect = getModifier("Effect", tonicPotion);
134
- cliExecute("camp dnainject");
135
- return isHybridized(expectedEffect);
136
- }
137
- /**
138
- * Makes tonics with whatever phylum is currently in your syringe
139
- *
140
- * @param {number} [amount=1] the number of tonics to make
141
- * @returns Whether we successfully made tonics; returns true if we made as many as we could, regardless of whether that was the number requested
142
- */
143
- export function makeTonic(amount = 1) {
144
- if (!installed())
145
- return false;
146
- const currentSyringe = get("dnaSyringe");
147
- if (!currentSyringe)
148
- return false;
149
- const tonicPotion = getTonic(currentSyringe);
150
- const amountToMake = clamp(amount, 0, tonicsLeft());
151
- const startingAmount = itemAmount(tonicPotion);
152
- cliExecute(`camp dnapotion ${amountToMake}`);
153
- return itemAmount(tonicPotion) - startingAmount === amountToMake;
154
- }
155
- /**
156
- * Tells you how many tonics you can make the rest of the day.
157
- *
158
- * @returns The remaining tonics you can make
159
- */
160
- export function tonicsLeft() {
161
- return clamp(3 - get("_dnaPotionsMade"), 0, 3);
162
- }
@@ -1,23 +0,0 @@
1
- import { Monster } from "kolmafia";
2
- import { Copier } from "../../Copier";
3
- /**
4
- * @returns Whether the Winter Garden is our currently installed garden
5
- */
6
- export declare function have(): boolean;
7
- /**
8
- * @returns Whether we have an unfinished ice sculpture hanging around
9
- */
10
- export declare function haveUnfinishedIceSculpture(): boolean;
11
- /**
12
- * @returns Whether or not we've used an unfinished ice sculpture today
13
- */
14
- export declare function isUnfinishedIceSculptureUsed(): boolean;
15
- /**
16
- * @returns Whether we're able to use an unfinished ice sculpture in combat right now
17
- */
18
- export declare function couldUseUnfinishedIceSculpture(): boolean;
19
- /**
20
- * @returns Our current ice sculpture monster; `null` if none
21
- */
22
- export declare function getUnfinishedIceSculptureMonster(): Monster | null;
23
- export declare const UnfinishedIceSculpture: Copier;
@@ -1,35 +0,0 @@
1
- import { Copier } from "../../Copier";
2
- import { haveInCampground, have as haveItem } from "../../lib";
3
- import { get } from "../../property";
4
- import { $item } from "../../template-string";
5
- /**
6
- * @returns Whether the Winter Garden is our currently installed garden
7
- */
8
- export function have() {
9
- return haveInCampground($item `packet of winter seeds`);
10
- }
11
- /**
12
- * @returns Whether we have an unfinished ice sculpture hanging around
13
- */
14
- export function haveUnfinishedIceSculpture() {
15
- return haveItem($item `unfinished ice sculpture`);
16
- }
17
- /**
18
- * @returns Whether or not we've used an unfinished ice sculpture today
19
- */
20
- export function isUnfinishedIceSculptureUsed() {
21
- return get("_iceSculptureUsed");
22
- }
23
- /**
24
- * @returns Whether we're able to use an unfinished ice sculpture in combat right now
25
- */
26
- export function couldUseUnfinishedIceSculpture() {
27
- return (haveItem($item `unfinished ice sculpture`) && !haveItem($item `ice sculpture`));
28
- }
29
- /**
30
- * @returns Our current ice sculpture monster; `null` if none
31
- */
32
- export function getUnfinishedIceSculptureMonster() {
33
- return get("iceSculptureMonster");
34
- }
35
- export const UnfinishedIceSculpture = new Copier(() => couldUseUnfinishedIceSculpture(), null, () => couldUseUnfinishedIceSculpture(), () => getUnfinishedIceSculptureMonster());
@@ -1,8 +0,0 @@
1
- /**
2
- * @returns Whether we have the barrel shrine
3
- */
4
- export declare function have(): boolean;
5
- /**
6
- * Smashes all barrels in our inventory
7
- */
8
- export declare function smashParty(): void;
@@ -1,25 +0,0 @@
1
- import { availableAmount, runChoice, visitUrl } from "kolmafia";
2
- import { get } from "../../property";
3
- import { $items } from "../../template-string";
4
- import { sum } from "../../utils";
5
- const BARRELS = $items `little firkin, normal barrel, big tun, weathered barrel, dusty barrel, disintegrating barrel, moist barrel, rotting barrel, mouldering barrel, barnacled barrel`;
6
- /**
7
- * @returns Whether we have the barrel shrine
8
- */
9
- export function have() {
10
- return get("barrelShrineUnlocked");
11
- }
12
- /**
13
- * Smashes all barrels in our inventory
14
- */
15
- export function smashParty() {
16
- if (!have())
17
- return;
18
- const total = sum(BARRELS, availableAmount);
19
- if (total <= 0)
20
- return;
21
- visitUrl("inv_use.php?pwd&whichitem=8568&choice=1");
22
- for (let i = 0; i < total / 100; i++) {
23
- runChoice(2);
24
- }
25
- }
@@ -1,52 +0,0 @@
1
- import { Monster } from "kolmafia";
2
- /**
3
- * @returns Whether we own the Chateau Mantegna
4
- */
5
- export declare function have(): boolean;
6
- /**
7
- * @returns `null` for an empty painting; otherwise, the monster trapped in our painting
8
- */
9
- export declare function paintingMonster(): Monster | null;
10
- /**
11
- * @returns Whether or not we've fought our painted monster today
12
- */
13
- export declare function paintingFought(): boolean;
14
- /**
15
- * Fights your currently installed painting monster if able
16
- *
17
- * @returns The result of `runCombat`, which is the page html of the final round of combat
18
- */
19
- export declare function fightPainting(): string;
20
- export declare const desks: readonly ["fancy stationery set", "Swiss piggy bank", "continental juice bar"];
21
- export declare const ceilings: readonly ["antler chandelier", "ceiling fan", "artificial skylight"];
22
- export declare const nightstands: readonly ["foreign language tapes", "bowl of potpourri", "electric muscle stimulator"];
23
- export declare type Desk = typeof desks[number];
24
- export declare type Ceiling = typeof ceilings[number];
25
- export declare type Nightstand = typeof nightstands[number];
26
- /**
27
- * @returns The currently installed desk in your chateau; `null` for none
28
- */
29
- export declare function getDesk(): Desk | null;
30
- /**
31
- * @returns The currently installed ceiling in your chateau; `null` for none
32
- */
33
- export declare function getCeiling(): Ceiling | null;
34
- /**
35
- * @returns The currently installed nightstand in your chateau; `null` for none
36
- */
37
- export declare function getNightstand(): Nightstand | null;
38
- /**
39
- * @param desk The desk to change to
40
- * @returns Whether our desk currently matches the one requested
41
- */
42
- export declare function changeDesk(desk: Desk): boolean;
43
- /**
44
- * @param ceiling The ceiling to change to
45
- * @returns Whether our ceiling currently matches the one requested
46
- */
47
- export declare function changeCeiling(ceiling: Ceiling): boolean;
48
- /**
49
- * @param nightstand The nightstand to change to
50
- * @returns Whether our nightstand currently matches the one requested
51
- */
52
- export declare function changeNightstand(nightstand: Nightstand): boolean;
@@ -1,99 +0,0 @@
1
- import { buy, getChateau, Item, runCombat, visitUrl } from "kolmafia";
2
- import { get } from "../../property";
3
- /**
4
- * @returns Whether we own the Chateau Mantegna
5
- */
6
- export function have() {
7
- return get("chateauAvailable");
8
- }
9
- /**
10
- * @returns `null` for an empty painting; otherwise, the monster trapped in our painting
11
- */
12
- export function paintingMonster() {
13
- return get("chateauMonster");
14
- }
15
- /**
16
- * @returns Whether or not we've fought our painted monster today
17
- */
18
- export function paintingFought() {
19
- return get("_chateauMonsterFought");
20
- }
21
- /**
22
- * Fights your currently installed painting monster if able
23
- *
24
- * @returns The result of `runCombat`, which is the page html of the final round of combat
25
- */
26
- export function fightPainting() {
27
- visitUrl("place.php?whichplace=chateau&action=chateau_painting", false);
28
- return runCombat();
29
- }
30
- export const desks = [
31
- "fancy stationery set",
32
- "Swiss piggy bank",
33
- "continental juice bar",
34
- ];
35
- export const ceilings = [
36
- "antler chandelier",
37
- "ceiling fan",
38
- "artificial skylight",
39
- ];
40
- export const nightstands = [
41
- "foreign language tapes",
42
- "bowl of potpourri",
43
- "electric muscle stimulator",
44
- ];
45
- /**
46
- * @returns The currently installed desk in your chateau; `null` for none
47
- */
48
- export function getDesk() {
49
- return desks.find((desk) => Object.keys(getChateau()).includes(desk)) ?? null;
50
- }
51
- /**
52
- * @returns The currently installed ceiling in your chateau; `null` for none
53
- */
54
- export function getCeiling() {
55
- return (ceilings.find((ceiling) => Object.keys(getChateau()).includes(ceiling)) ??
56
- null);
57
- }
58
- /**
59
- * @returns The currently installed nightstand in your chateau; `null` for none
60
- */
61
- export function getNightstand() {
62
- return (nightstands.find((nightstand) => Object.keys(getChateau()).includes(nightstand)) ?? null);
63
- }
64
- /**
65
- * @param desk The desk to change to
66
- * @returns Whether our desk currently matches the one requested
67
- */
68
- export function changeDesk(desk) {
69
- if (getDesk() === desk)
70
- return true;
71
- if (!desks.includes(desk))
72
- return false;
73
- buy(Item.get(desk));
74
- return getDesk() === desk;
75
- }
76
- /**
77
- * @param ceiling The ceiling to change to
78
- * @returns Whether our ceiling currently matches the one requested
79
- */
80
- export function changeCeiling(ceiling) {
81
- if (getCeiling() === ceiling)
82
- return true;
83
- if (!ceilings.includes(ceiling))
84
- return false;
85
- buy(Item.get(ceiling));
86
- return getCeiling() === ceiling;
87
- }
88
- /**
89
- * @param nightstand The nightstand to change to
90
- * @returns Whether our nightstand currently matches the one requested
91
- */
92
- export function changeNightstand(nightstand) {
93
- if (getNightstand() === nightstand)
94
- return true;
95
- if (!nightstands.includes(nightstand))
96
- return false;
97
- buy(Item.get(nightstand));
98
- return getNightstand() === nightstand;
99
- }
@@ -1,29 +0,0 @@
1
- /**
2
- * @returns Do we `have` the Deck of Every Card?
3
- */
4
- export declare function have(): boolean;
5
- export declare const cards: readonly ["X of Clubs", "X of Diamonds", "X of Hearts", "X of Spades", "X of Papayas", "X of Kumquats", "X of Salads", "X of Cups", "X of Coins", "X of Swords", "X of Wands", "XVI - The Tower", "Professor Plum", "Spare Tire", "Extra Tank", "Sheep", "Year of Plenty", "Mine", "Laboratory", "Plains", "Swamp", "Mountain", "Forest", "Island", "Lead Pipe", "Rope", "Wrench", "Candlestick", "Knife", "Revolver", "Gift Card", "1952 Mickey Mantle", "XXI - The World", "III - The Empress", "VI - The Lovers", "Healing Salve", "Dark Ritual", "Lightning Bolt", "Giant Growth", "Ancestral Recall", "XI - Strength", "I - The Magician", "0 - The Fool", "X - The Wheel of Fortune", "The Race Card", "Green Card", "IV - The Emperor", "IX - The Hermit", "Werewolf", "The Hive", "XVII - The Star", "VII - The Chariot", "XV - The Devil", "V - The Hierophant", "Fire Elemental", "Christmas Card", "Go Fish", "Goblin Sapper", "II - The High Priestess", "XIV - Temperance", "XVIII - The Moon", "Hunky Fireman Card", "Aquarius Horoscope", "XII - The Hanged Man", "Suit Warehouse Discount Card", "Pirate Birthday Card", "Plantable Greeting Card", "Slimer Trading Card", "XIII - Death", "Unstable Portal"];
6
- export declare type Card = typeof cards[number];
7
- /**
8
- * @returns The number of cards we've drawn so far today--remember, cheating counts as 5
9
- */
10
- export declare function getCardsDrawn(): number;
11
- /**
12
- * @returns The number of draws we have remaining today--remember, cheating counts as 5
13
- */
14
- export declare function getRemainingDraws(): number;
15
- /**
16
- * @returns The number of additional cards we can cheat today
17
- */
18
- export declare function getRemainingCheats(): number;
19
- /**
20
- * @returns An array of the Cards we've seen today
21
- */
22
- export declare function getCardsSeen(): Card[];
23
- /**
24
- * Cheat a card of your choice from the Deck
25
- *
26
- * @param card The card in question
27
- * @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.
28
- */
29
- export declare function cheatCard(card: Card): boolean;