libram 0.8.28 → 0.8.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/dist/Clan.d.ts +128 -0
  2. package/dist/Clan.js +300 -0
  3. package/dist/Copier.d.ts +9 -0
  4. package/dist/Copier.js +15 -0
  5. package/dist/Dungeon.d.ts +45 -0
  6. package/dist/Dungeon.js +115 -0
  7. package/dist/Kmail.d.ts +133 -0
  8. package/dist/Kmail.js +259 -0
  9. package/dist/actions/ActionSource.d.ts +131 -0
  10. package/dist/actions/ActionSource.js +178 -0
  11. package/dist/actions/Banish.d.ts +16 -0
  12. package/dist/actions/Banish.js +121 -0
  13. package/dist/actions/FreeKill.d.ts +16 -0
  14. package/dist/actions/FreeKill.js +94 -0
  15. package/dist/actions/FreeRun.d.ts +16 -0
  16. package/dist/actions/FreeRun.js +81 -0
  17. package/dist/actions/index.d.ts +4 -0
  18. package/dist/actions/index.js +4 -0
  19. package/dist/ascend.d.ts +83 -0
  20. package/dist/ascend.js +268 -0
  21. package/dist/challengePaths/2014/HeavyRains.d.ts +22 -0
  22. package/dist/challengePaths/2014/HeavyRains.js +75 -0
  23. package/dist/challengePaths/2015/CommunityService.d.ts +125 -0
  24. package/dist/challengePaths/2015/CommunityService.js +334 -0
  25. package/dist/challengePaths/2016/NuclearAutumn.d.ts +13 -0
  26. package/dist/challengePaths/2016/NuclearAutumn.js +21 -0
  27. package/dist/challengePaths/index.d.ts +4 -0
  28. package/dist/challengePaths/index.js +4 -0
  29. package/dist/combat.d.ts +414 -0
  30. package/dist/combat.js +711 -0
  31. package/dist/console.d.ts +12 -0
  32. package/dist/console.js +14 -0
  33. package/dist/counter.d.ts +22 -0
  34. package/dist/counter.js +37 -0
  35. package/dist/diet/index.d.ts +80 -0
  36. package/dist/diet/index.js +680 -0
  37. package/dist/diet/knapsack.d.ts +8 -0
  38. package/dist/diet/knapsack.js +128 -0
  39. package/dist/index.d.ts +29 -0
  40. package/dist/index.js +26 -0
  41. package/dist/lib.d.ts +507 -0
  42. package/dist/lib.js +970 -0
  43. package/dist/logger.d.ts +35 -0
  44. package/dist/logger.js +62 -0
  45. package/dist/maximize.d.ts +122 -0
  46. package/dist/maximize.js +531 -0
  47. package/dist/modifier.d.ts +41 -0
  48. package/dist/modifier.js +160 -0
  49. package/dist/modifierTypes.d.ts +16 -0
  50. package/dist/modifierTypes.js +9 -0
  51. package/dist/mood.d.ts +105 -0
  52. package/dist/mood.js +349 -0
  53. package/dist/moonSign.d.ts +13 -0
  54. package/dist/moonSign.js +25 -0
  55. package/dist/overlappingNames.d.ts +3 -0
  56. package/dist/overlappingNames.js +42 -0
  57. package/dist/property.d.ts +222 -0
  58. package/dist/property.js +385 -0
  59. package/dist/propertyTypes.d.ts +19 -0
  60. package/dist/propertyTypes.js +10 -0
  61. package/dist/propertyTyping.d.ts +65 -0
  62. package/dist/propertyTyping.js +91 -0
  63. package/dist/resources/2007/CandyHearts.d.ts +9 -0
  64. package/dist/resources/2007/CandyHearts.js +24 -0
  65. package/dist/resources/2008/DivineFavors.d.ts +9 -0
  66. package/dist/resources/2008/DivineFavors.js +27 -0
  67. package/dist/resources/2008/Stickers.d.ts +49 -0
  68. package/dist/resources/2008/Stickers.js +84 -0
  69. package/dist/resources/2009/Bandersnatch.d.ts +56 -0
  70. package/dist/resources/2009/Bandersnatch.js +93 -0
  71. package/dist/resources/2009/LoveSongs.d.ts +9 -0
  72. package/dist/resources/2009/LoveSongs.js +24 -0
  73. package/dist/resources/2009/SpookyPutty.d.ts +31 -0
  74. package/dist/resources/2009/SpookyPutty.js +49 -0
  75. package/dist/resources/2010/Brickos.d.ts +9 -0
  76. package/dist/resources/2010/Brickos.js +21 -0
  77. package/dist/resources/2010/CrownOfThrones.d.ts +68 -0
  78. package/dist/resources/2010/CrownOfThrones.js +418 -0
  79. package/dist/resources/2010/LookingGlass.d.ts +29 -0
  80. package/dist/resources/2010/LookingGlass.js +89 -0
  81. package/dist/resources/2011/Gygaxian.d.ts +9 -0
  82. package/dist/resources/2011/Gygaxian.js +24 -0
  83. package/dist/resources/2011/ObtuseAngel.d.ts +33 -0
  84. package/dist/resources/2011/ObtuseAngel.js +51 -0
  85. package/dist/resources/2011/StompingBoots.d.ts +37 -0
  86. package/dist/resources/2011/StompingBoots.js +57 -0
  87. package/dist/resources/2012/RainDoh.d.ts +25 -0
  88. package/dist/resources/2012/RainDoh.js +37 -0
  89. package/dist/resources/2012/ReagnimatedGnome.d.ts +31 -0
  90. package/dist/resources/2012/ReagnimatedGnome.js +46 -0
  91. package/dist/resources/2012/Resolutions.d.ts +9 -0
  92. package/dist/resources/2012/Resolutions.js +28 -0
  93. package/dist/resources/2013/Florist.d.ts +81 -0
  94. package/dist/resources/2013/Florist.js +245 -0
  95. package/dist/resources/2013/JungMan.d.ts +33 -0
  96. package/dist/resources/2013/JungMan.js +69 -0
  97. package/dist/resources/2013/PulledTaffy.d.ts +9 -0
  98. package/dist/resources/2013/PulledTaffy.js +33 -0
  99. package/dist/resources/2014/CrimboShrub.d.ts +42 -0
  100. package/dist/resources/2014/CrimboShrub.js +89 -0
  101. package/dist/resources/2014/DNALab.d.ts +56 -0
  102. package/dist/resources/2014/DNALab.js +162 -0
  103. package/dist/resources/2014/WinterGarden.d.ts +23 -0
  104. package/dist/resources/2014/WinterGarden.js +35 -0
  105. package/dist/resources/2015/BarrelShrine.d.ts +8 -0
  106. package/dist/resources/2015/BarrelShrine.js +25 -0
  107. package/dist/resources/2015/ChateauMantegna.d.ts +52 -0
  108. package/dist/resources/2015/ChateauMantegna.js +99 -0
  109. package/dist/resources/2015/DeckOfEveryCard.d.ts +29 -0
  110. package/dist/resources/2015/DeckOfEveryCard.js +122 -0
  111. package/dist/resources/2015/Dinseylandfill.d.ts +89 -0
  112. package/dist/resources/2015/Dinseylandfill.js +205 -0
  113. package/dist/resources/2015/MayoClinic.d.ts +23 -0
  114. package/dist/resources/2015/MayoClinic.js +49 -0
  115. package/dist/resources/2016/GingerBread.d.ts +32 -0
  116. package/dist/resources/2016/GingerBread.js +73 -0
  117. package/dist/resources/2016/SourceTerminal.d.ts +181 -0
  118. package/dist/resources/2016/SourceTerminal.js +275 -0
  119. package/dist/resources/2016/Witchess.d.ts +17 -0
  120. package/dist/resources/2016/Witchess.js +47 -0
  121. package/dist/resources/2017/AsdonMartin.d.ts +59 -0
  122. package/dist/resources/2017/AsdonMartin.js +238 -0
  123. package/dist/resources/2017/Horsery.d.ts +19 -0
  124. package/dist/resources/2017/Horsery.js +42 -0
  125. package/dist/resources/2017/MummingTrunk.d.ts +8 -0
  126. package/dist/resources/2017/MummingTrunk.js +33 -0
  127. package/dist/resources/2017/Pantogram.d.ts +92 -0
  128. package/dist/resources/2017/Pantogram.js +174 -0
  129. package/dist/resources/2017/Robortender.d.ts +30 -0
  130. package/dist/resources/2017/Robortender.js +90 -0
  131. package/dist/resources/2017/Spacegate.d.ts +86 -0
  132. package/dist/resources/2017/Spacegate.js +178 -0
  133. package/dist/resources/2017/TunnelOfLove.d.ts +39 -0
  134. package/dist/resources/2017/TunnelOfLove.js +120 -0
  135. package/dist/resources/2018/LatteLoversMembersMug.d.ts +392 -0
  136. package/dist/resources/2018/LatteLoversMembersMug.js +303 -0
  137. package/dist/resources/2018/SongBoom.d.ts +33 -0
  138. package/dist/resources/2018/SongBoom.js +55 -0
  139. package/dist/resources/2019/BeachComb.d.ts +72 -0
  140. package/dist/resources/2019/BeachComb.js +118 -0
  141. package/dist/resources/2019/CampAway.d.ts +39 -0
  142. package/dist/resources/2019/CampAway.js +72 -0
  143. package/dist/resources/2019/Snapper.d.ts +33 -0
  144. package/dist/resources/2019/Snapper.js +73 -0
  145. package/dist/resources/2020/Cartography.d.ts +16 -0
  146. package/dist/resources/2020/Cartography.js +48 -0
  147. package/dist/resources/2020/Guzzlr.d.ts +160 -0
  148. package/dist/resources/2020/Guzzlr.js +275 -0
  149. package/dist/resources/2020/RetroCape.d.ts +51 -0
  150. package/dist/resources/2020/RetroCape.js +115 -0
  151. package/dist/resources/2021/CrystalBall.d.ts +14 -0
  152. package/dist/resources/2021/CrystalBall.js +41 -0
  153. package/dist/resources/2021/DaylightShavings.d.ts +40 -0
  154. package/dist/resources/2021/DaylightShavings.js +74 -0
  155. package/dist/resources/2022/AutumnAton.d.ts +78 -0
  156. package/dist/resources/2022/AutumnAton.js +182 -0
  157. package/dist/resources/2022/CombatLoversLocket.d.ts +44 -0
  158. package/dist/resources/2022/CombatLoversLocket.js +82 -0
  159. package/dist/resources/2022/GreyGoose.d.ts +59 -0
  160. package/dist/resources/2022/GreyGoose.js +90 -0
  161. package/dist/resources/2022/JuneCleaver.d.ts +47 -0
  162. package/dist/resources/2022/JuneCleaver.js +69 -0
  163. package/dist/resources/2022/TrainSet.d.ts +146 -0
  164. package/dist/resources/2022/TrainSet.js +228 -0
  165. package/dist/resources/2023/AugustScepter.d.ts +25 -0
  166. package/dist/resources/2023/AugustScepter.js +40 -0
  167. package/dist/resources/2023/BurningLeaves.d.ts +25 -0
  168. package/dist/resources/2023/BurningLeaves.js +74 -0
  169. package/dist/resources/2023/CinchoDeMayo.d.ts +25 -0
  170. package/dist/resources/2023/CinchoDeMayo.js +45 -0
  171. package/dist/resources/2023/ClosedCircuitPayphone.d.ts +80 -0
  172. package/dist/resources/2023/ClosedCircuitPayphone.js +129 -0
  173. package/dist/resources/2023/CursedMonkeyPaw.d.ts +46 -0
  174. package/dist/resources/2023/CursedMonkeyPaw.js +113 -0
  175. package/dist/resources/2024/AprilingBandHelmet.d.ts +57 -0
  176. package/dist/resources/2024/AprilingBandHelmet.js +118 -0
  177. package/dist/resources/2024/ChestMimic.d.ts +42 -0
  178. package/dist/resources/2024/ChestMimic.js +125 -0
  179. package/dist/resources/LibramSummon.d.ts +18 -0
  180. package/dist/resources/LibramSummon.js +74 -0
  181. package/dist/resources/index.d.ts +54 -0
  182. package/dist/resources/index.js +54 -0
  183. package/dist/resources/putty-likes.d.ts +21 -0
  184. package/dist/resources/putty-likes.js +33 -0
  185. package/dist/session.d.ts +169 -0
  186. package/dist/session.js +284 -0
  187. package/dist/since.d.ts +51 -0
  188. package/dist/since.js +108 -0
  189. package/dist/template-string.d.ts +324 -0
  190. package/dist/template-string.js +265 -0
  191. package/dist/url.d.ts +35 -0
  192. package/dist/url.js +67 -0
  193. package/dist/utils.d.ts +178 -0
  194. package/dist/utils.js +255 -0
  195. package/package.json +2 -2
@@ -0,0 +1,12 @@
1
+ export declare const log: (...args: {
2
+ toString(): string;
3
+ }[]) => void;
4
+ export declare const info: (...args: {
5
+ toString(): string;
6
+ }[]) => void;
7
+ export declare const warn: (...args: {
8
+ toString(): string;
9
+ }[]) => void;
10
+ export declare const error: (...args: {
11
+ toString(): string;
12
+ }[]) => void;
@@ -0,0 +1,14 @@
1
+ import { print } from "kolmafia";
2
+ const logColor = (color) => (...args) => {
3
+ const output = args.map((x) => x.toString()).join(" ");
4
+ if (color) {
5
+ print(output, color);
6
+ }
7
+ else {
8
+ print(output);
9
+ }
10
+ };
11
+ export const log = logColor();
12
+ export const info = logColor("blue");
13
+ export const warn = logColor("red");
14
+ export const error = logColor("red");
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Returns Infinity for counters that do not exist, and otherwise returns the duration of the counter
3
+ *
4
+ * @param counter The name of the counter in question
5
+ * @returns Infinity if the counter does not exist; otherwise returns the duration of the counter
6
+ */
7
+ export declare function get(counter: string): number;
8
+ /**
9
+ * The world is everything that is the case. This determines which counters are the case.
10
+ *
11
+ * @param counter The name of the counter in question
12
+ * @returns True for counters which currently exist; false for those which do not
13
+ */
14
+ export declare function exists(counter: string): boolean;
15
+ /**
16
+ * Creates a manual counter with specified name and duration
17
+ *
18
+ * @param counter Name of the counter to manually create
19
+ * @param duration Duration of counter to manually set
20
+ * @returns Whether the counter was successfully set
21
+ */
22
+ export declare function set(counter: string, duration: number): boolean;
@@ -0,0 +1,37 @@
1
+ import { cliExecute, getCounter, getCounters } from "kolmafia";
2
+ /**
3
+ * Returns Infinity for counters that do not exist, and otherwise returns the duration of the counter
4
+ *
5
+ * @param counter The name of the counter in question
6
+ * @returns Infinity if the counter does not exist; otherwise returns the duration of the counter
7
+ */
8
+ export function get(counter) {
9
+ const value = getCounter(counter);
10
+ // getCounter returns -1 for counters that don't exist, but it also returns -1 for counters whose value is -1
11
+ if (value === -1) {
12
+ // if we have a counter with value -1, we check to see if that counter exists via getCounters()
13
+ // We return null if it doesn't exist
14
+ return getCounters(counter, -1, -1).trim() === "" ? Infinity : -1;
15
+ }
16
+ return value;
17
+ }
18
+ /**
19
+ * The world is everything that is the case. This determines which counters are the case.
20
+ *
21
+ * @param counter The name of the counter in question
22
+ * @returns True for counters which currently exist; false for those which do not
23
+ */
24
+ export function exists(counter) {
25
+ return (getCounter(counter) !== -1 || getCounters(counter, -1, -1).trim() !== "");
26
+ }
27
+ /**
28
+ * Creates a manual counter with specified name and duration
29
+ *
30
+ * @param counter Name of the counter to manually create
31
+ * @param duration Duration of counter to manually set
32
+ * @returns Whether the counter was successfully set
33
+ */
34
+ export function set(counter, duration) {
35
+ cliExecute(`counters add ${duration} ${counter}`);
36
+ return get(counter) !== null;
37
+ }
@@ -0,0 +1,80 @@
1
+ import { Effect, Item } from "kolmafia";
2
+ declare type RawDietEntry<T> = [MenuItem<T>[], number];
3
+ declare type RawDiet<T> = RawDietEntry<T>[];
4
+ declare type MenuItemOptions<T> = Partial<{
5
+ organ: Organ;
6
+ size: number;
7
+ maximum: number | "auto";
8
+ additionalValue: number;
9
+ effect: Effect;
10
+ priceOverride: number;
11
+ mayo: Item;
12
+ data: T;
13
+ useRetrievePrice: boolean;
14
+ }>;
15
+ export declare class MenuItem<T> {
16
+ item: Item;
17
+ organ?: Organ;
18
+ size: number;
19
+ maximum?: number;
20
+ additionalValue?: number;
21
+ effect?: Effect;
22
+ priceOverride?: number;
23
+ mayo?: Item;
24
+ data?: T;
25
+ static defaultPriceFunction: (item: Item) => number;
26
+ static defaultOptions<T>(): Map<Item, MenuItemOptions<T>>;
27
+ /**
28
+ * Construct a new menu item, possibly with extra properties. Items in MenuItem.defaultOptions have intelligent defaults.
29
+ *
30
+ * @param item Item to add to menu.
31
+ * @param options Options for this menu item
32
+ * @param options.organ Designate item as belonging to a specific organ.
33
+ * @param options.size Override item organ size. Necessary for any non-food/booze/spleen item.
34
+ * @param options.maximum Maximum uses remaining today, or "auto" to check dailyusesleft Mafia property.
35
+ * @param options.additionalValue Additional value (positive) or cost (negative) to consider with item, e.g. from buffs.
36
+ * @param options.effect Effect associated with this menu item (pocket wish effect, sweet synthesis effect, pill keeper potion extension)
37
+ * @param options.mayo Which mayo to use before item (ignored if mayo clinic is not installed or item is not a food)
38
+ * @param options.note Any note to track information about item, to be used later
39
+ */
40
+ constructor(item: Item, options?: MenuItemOptions<T>);
41
+ equals(other: MenuItem<T>): boolean;
42
+ toString(): string;
43
+ price(): number;
44
+ }
45
+ declare const organs: readonly ["food", "booze", "spleen item"];
46
+ declare type Organ = typeof organs[number];
47
+ declare class DietEntry<T> {
48
+ readonly menuItems: MenuItem<T>[];
49
+ quantity: number;
50
+ constructor(menuItems: MenuItem<T>[], quantity: number);
51
+ target(): MenuItem<T>;
52
+ helpers(): MenuItem<T>[];
53
+ expectedAdventures(diet: Diet<T>): number;
54
+ expectedValue(mpa: number, diet: Diet<T>, method?: "gross" | "net"): number;
55
+ expectedPrice(): number;
56
+ }
57
+ interface OrganCapacity {
58
+ food?: number | "auto";
59
+ booze?: number | "auto";
60
+ spleen?: number | "auto";
61
+ }
62
+ /**
63
+ * A representation of a potential diet
64
+ */
65
+ export declare class Diet<T> {
66
+ entries: DietEntry<T>[];
67
+ constructor(entries?: DietEntry<T>[]);
68
+ get refinedPalate(): boolean;
69
+ get garish(): boolean;
70
+ get saucemaven(): boolean;
71
+ get tuxedoShirt(): boolean;
72
+ get pinkyRing(): boolean;
73
+ expectedAdventures(): number;
74
+ expectedValue(mpa: number, method?: "gross" | "net"): number;
75
+ expectedPrice(): number;
76
+ copy(): Diet<T>;
77
+ static from<T>(rawDiet: RawDiet<T>): Diet<T>;
78
+ static plan<T>(mpa: number, menu: MenuItem<T>[], organCapacities?: OrganCapacity): Diet<T>;
79
+ }
80
+ export {};