libram 0.7.11 → 0.7.14

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 (147) hide show
  1. package/dist/Clan.d.ts +34 -6
  2. package/dist/Clan.js +33 -6
  3. package/dist/Copier.d.ts +5 -5
  4. package/dist/Dungeon.d.ts +45 -0
  5. package/dist/Dungeon.js +115 -0
  6. package/dist/Kmail.d.ts +8 -5
  7. package/dist/Kmail.js +8 -5
  8. package/dist/actions/ActionSource.d.ts +5 -0
  9. package/dist/actions/ActionSource.js +20 -2
  10. package/dist/actions/FreeKill.d.ts +2 -0
  11. package/dist/actions/FreeKill.js +2 -0
  12. package/dist/actions/FreeRun.d.ts +2 -0
  13. package/dist/actions/FreeRun.js +2 -0
  14. package/dist/ascend.d.ts +20 -4
  15. package/dist/ascend.js +32 -4
  16. package/dist/challengePaths/2015/CommunityService.d.ts +7 -0
  17. package/dist/challengePaths/2015/CommunityService.js +12 -1
  18. package/dist/combat.d.ts +55 -0
  19. package/dist/combat.js +85 -0
  20. package/dist/counter.d.ts +3 -0
  21. package/dist/counter.js +3 -0
  22. package/dist/diet/index.d.ts +2 -0
  23. package/dist/diet/index.js +27 -8
  24. package/dist/diet/knapsack.d.ts +1 -0
  25. package/dist/diet/knapsack.js +11 -3
  26. package/dist/index.d.ts +3 -7
  27. package/dist/index.js +1 -3
  28. package/dist/lib.d.ts +101 -33
  29. package/dist/lib.js +132 -42
  30. package/dist/logger.d.ts +24 -11
  31. package/dist/logger.js +38 -12
  32. package/dist/maximize.d.ts +20 -1
  33. package/dist/maximize.js +30 -3
  34. package/dist/modifier.d.ts +13 -1
  35. package/dist/modifier.js +87 -3
  36. package/dist/mood.d.ts +15 -1
  37. package/dist/mood.js +15 -1
  38. package/dist/property.d.ts +52 -17
  39. package/dist/property.js +64 -7
  40. package/dist/propertyTypes.d.ts +5 -5
  41. package/dist/propertyTypes.js +5 -5
  42. package/dist/propertyTyping.d.ts +54 -0
  43. package/dist/propertyTyping.js +54 -0
  44. package/dist/resources/2008/Stickers.d.ts +28 -0
  45. package/dist/resources/2008/Stickers.js +28 -0
  46. package/dist/resources/2009/Bandersnatch.d.ts +17 -7
  47. package/dist/resources/2009/Bandersnatch.js +17 -7
  48. package/dist/resources/2009/SpookyPutty.d.ts +25 -0
  49. package/dist/resources/2009/SpookyPutty.js +25 -0
  50. package/dist/resources/2010/CrownOfThrones.d.ts +23 -0
  51. package/dist/resources/2010/CrownOfThrones.js +31 -15
  52. package/dist/resources/2010/LookingGlass.d.ts +4 -0
  53. package/dist/resources/2010/LookingGlass.js +5 -0
  54. package/dist/resources/2011/ObtuseAngel.d.ts +8 -6
  55. package/dist/resources/2011/ObtuseAngel.js +8 -6
  56. package/dist/resources/2011/StompingBoots.d.ts +9 -15
  57. package/dist/resources/2011/StompingBoots.js +9 -15
  58. package/dist/resources/2012/RainDoh.d.ts +20 -0
  59. package/dist/resources/2012/RainDoh.js +20 -0
  60. package/dist/resources/2012/ReagnimatedGnome.d.ts +18 -0
  61. package/dist/resources/2012/ReagnimatedGnome.js +18 -0
  62. package/dist/resources/2012/Resolutions.d.ts +2 -2
  63. package/dist/resources/2012/Resolutions.js +2 -2
  64. package/dist/resources/2013/Florist.d.ts +15 -0
  65. package/dist/resources/2013/Florist.js +21 -0
  66. package/dist/resources/2014/CrimboShrub.d.ts +12 -0
  67. package/dist/resources/2014/CrimboShrub.js +22 -1
  68. package/dist/resources/2014/DNALab.d.ts +10 -2
  69. package/dist/resources/2014/DNALab.js +10 -2
  70. package/dist/resources/2014/WinterGarden.d.ts +15 -0
  71. package/dist/resources/2014/WinterGarden.js +15 -0
  72. package/dist/resources/2015/BarrelShrine.d.ts +6 -0
  73. package/dist/resources/2015/BarrelShrine.js +8 -1
  74. package/dist/resources/2015/ChateauMantegna.d.ts +35 -0
  75. package/dist/resources/2015/ChateauMantegna.js +35 -0
  76. package/dist/resources/2015/DeckOfEveryCard.d.ts +23 -1
  77. package/dist/resources/2015/DeckOfEveryCard.js +24 -0
  78. package/dist/resources/2015/Dinseylandfill.d.ts +1 -0
  79. package/dist/resources/2015/Dinseylandfill.js +2 -0
  80. package/dist/resources/2015/MayoClinic.d.ts +8 -1
  81. package/dist/resources/2015/MayoClinic.js +8 -1
  82. package/dist/resources/2016/SourceTerminal.d.ts +42 -21
  83. package/dist/resources/2016/SourceTerminal.js +42 -21
  84. package/dist/resources/2016/Witchess.d.ts +12 -0
  85. package/dist/resources/2016/Witchess.js +12 -0
  86. package/dist/resources/2017/AsdonMartin.d.ts +11 -3
  87. package/dist/resources/2017/AsdonMartin.js +44 -7
  88. package/dist/resources/2017/MummingTrunk.d.ts +1 -0
  89. package/dist/resources/2017/MummingTrunk.js +8 -1
  90. package/dist/resources/2017/Pantogram.d.ts +9 -0
  91. package/dist/resources/2017/Pantogram.js +33 -0
  92. package/dist/resources/2017/Robortender.d.ts +1 -0
  93. package/dist/resources/2017/Robortender.js +1 -0
  94. package/dist/resources/2017/Spacegate.js +1 -0
  95. package/dist/resources/2017/TunnelOfLove.d.ts +19 -0
  96. package/dist/resources/2017/TunnelOfLove.js +37 -0
  97. package/dist/resources/2018/LatteLoversMembersMug.d.ts +388 -0
  98. package/dist/resources/2018/LatteLoversMembersMug.js +294 -4
  99. package/dist/resources/2018/SongBoom.d.ts +9 -4
  100. package/dist/resources/2018/SongBoom.js +9 -4
  101. package/dist/resources/2019/BeachComb.d.ts +38 -1
  102. package/dist/resources/2019/BeachComb.js +39 -2
  103. package/dist/resources/2019/Snapper.d.ts +4 -0
  104. package/dist/resources/2019/Snapper.js +4 -0
  105. package/dist/resources/2020/Cartography.d.ts +13 -0
  106. package/dist/resources/2020/Cartography.js +13 -0
  107. package/dist/resources/2020/Guzzlr.d.ts +89 -23
  108. package/dist/resources/2020/Guzzlr.js +100 -29
  109. package/dist/resources/2020/RetroCape.d.ts +4 -0
  110. package/dist/resources/2020/RetroCape.js +4 -0
  111. package/dist/resources/2021/CrystalBall.d.ts +6 -0
  112. package/dist/resources/2021/CrystalBall.js +13 -1
  113. package/dist/resources/2021/DaylightShavings.d.ts +6 -0
  114. package/dist/resources/2021/DaylightShavings.js +6 -0
  115. package/dist/resources/2022/AutumnAton.d.ts +15 -0
  116. package/dist/resources/2022/AutumnAton.js +21 -0
  117. package/dist/resources/2022/CombatLoversLocket.d.ts +9 -0
  118. package/dist/resources/2022/CombatLoversLocket.js +10 -2
  119. package/dist/resources/2022/GreyGoose.d.ts +46 -0
  120. package/dist/resources/2022/GreyGoose.js +47 -1
  121. package/dist/resources/2022/JuneCleaver.d.ts +20 -0
  122. package/dist/resources/2022/JuneCleaver.js +20 -0
  123. package/dist/resources/2022/TrainSet.d.ts +48 -0
  124. package/dist/resources/2022/TrainSet.js +54 -0
  125. package/dist/resources/2023/ClosedCircuitPayphone.d.ts +75 -0
  126. package/dist/resources/2023/ClosedCircuitPayphone.js +117 -0
  127. package/dist/resources/LibramSummon.d.ts +5 -0
  128. package/dist/resources/LibramSummon.js +5 -0
  129. package/dist/resources/index.d.ts +2 -1
  130. package/dist/resources/index.js +2 -1
  131. package/dist/resources/putty-likes.d.ts +15 -0
  132. package/dist/resources/putty-likes.js +15 -0
  133. package/dist/session.d.ts +12 -0
  134. package/dist/session.js +20 -17
  135. package/dist/since.d.ts +3 -2
  136. package/dist/since.js +4 -2
  137. package/dist/utils.d.ts +90 -6
  138. package/dist/utils.js +108 -0
  139. package/package.json +4 -8
  140. package/dist/dungeons/Dreadsylvania.d.ts +0 -5
  141. package/dist/dungeons/Dreadsylvania.js +0 -14
  142. package/dist/dungeons/Dungeon.d.ts +0 -29
  143. package/dist/dungeons/Dungeon.js +0 -99
  144. package/dist/dungeons/Hobopolis.d.ts +0 -5
  145. package/dist/dungeons/Hobopolis.js +0 -14
  146. package/dist/dungeons/SlimeTube.d.ts +0 -5
  147. package/dist/dungeons/SlimeTube.js +0 -14
package/dist/ascend.d.ts CHANGED
@@ -6,6 +6,13 @@ export declare enum Lifestyle {
6
6
  normal = 2,
7
7
  hardcore = 3
8
8
  }
9
+ /**
10
+ * Get a mapping of permed skills to the extent to which they're permed.
11
+ *
12
+ * If a skill is not permed at all, it will not appear in the mapping.
13
+ *
14
+ * @returns Permed skills mapping
15
+ */
9
16
  export declare function permedSkills(): Map<Skill, Lifestyle>;
10
17
  export declare class AscendError extends Error {
11
18
  cause?: Skill | Item | Class | Path | string;
@@ -22,13 +29,16 @@ export declare class AscensionPrepError extends Error {
22
29
  declare type MoonSign = number | "mongoose" | "wallaby" | "vole" | "platypus" | "opossum" | "marmot" | "wombat" | "blender" | "packrat" | "degrassi" | "degrassi knoll" | "friendly degrassi knoll" | "knoll" | "canada" | "canadia" | "little canadia" | "gnomads" | "gnomish" | "gnomish gnomads camp";
23
30
  /**
24
31
  * Hops the gash, perming no skills
32
+ *
25
33
  * @param path path of choice, as a Path object--these exist as properties of Paths
26
34
  * @param playerClass Your class of choice for this ascension
27
35
  * @param lifestyle 1 for casual, 2 for softcore, 3 for hardcore. Alternately, use the Lifestyle enum
28
36
  * @param moon Your moon sign as a string, or the zone you're looking for as a string
29
37
  * @param consumable From the astral deli. Pick the container item, not the product.
30
38
  * @param pet From the astral pet store.
31
- * @param permSkills A Map<Skill, Lifestyle> of skills you'd like to perm, ordered by priority.
39
+ * @param permOptions Options for perming during a player's stay in Valhalla
40
+ * @param permOptions.permSkills A Map<Skill, Lifestyle> of skills you'd like to perm, ordered by priority.
41
+ * @param permOptions.neverAbort Whether the ascension shouold abort on failure
32
42
  */
33
43
  export declare function ascend(path: Path, playerClass: Class, lifestyle: Lifestyle, moon: MoonSign, consumable?: Item | undefined, pet?: Item | undefined, permOptions?: {
34
44
  permSkills: Map<Skill, Lifestyle>;
@@ -36,9 +46,15 @@ export declare function ascend(path: Path, playerClass: Class, lifestyle: Lifest
36
46
  }): void;
37
47
  /**
38
48
  * Sets up various iotms you may want to use in the coming ascension
39
- * @param ascensionItems.garden Garden to switch to.
40
- * @param ascensionItems An object potentially containing your workshed, garden, chateau, and eudora, all as strings
41
- * @param throwOnFail If true, this will throw an error when it fails to switch something
49
+ *
50
+ * @param ascensionPrep Configuration for various ascension prep settings. Any ommitted key will be kept as-is
51
+ * @param ascensionPrep.garden Garden to which to switch
52
+ * @param ascensionPrep.eudora Eudora to which to switch
53
+ * @param ascensionPrep.chateau Chateau configuration
54
+ * @param ascensionPrep.chateau.desk Chateau desk configuration
55
+ * @param ascensionPrep.chateau.ceiling Chateau ceiling configuration
56
+ * @param ascensionPrep.chateau.nightstand Chateau nightstand configuration
57
+ * @param ascensionPrep.throwOnFail If true, this will throw an error when it fails to switch something
42
58
  */
43
59
  export declare function prepareAscension({ garden, eudora, chateau, throwOnFail, }?: {
44
60
  garden?: Garden;
package/dist/ascend.js CHANGED
@@ -10,6 +10,13 @@ export var Lifestyle;
10
10
  Lifestyle[Lifestyle["normal"] = 2] = "normal";
11
11
  Lifestyle[Lifestyle["hardcore"] = 3] = "hardcore";
12
12
  })(Lifestyle || (Lifestyle = {}));
13
+ /**
14
+ * Get a mapping of permed skills to the extent to which they're permed.
15
+ *
16
+ * If a skill is not permed at all, it will not appear in the mapping.
17
+ *
18
+ * @returns Permed skills mapping
19
+ */
13
20
  export function permedSkills() {
14
21
  return new Map(Array.from(Object.entries(getPermedSkills())).map(([skillName, isHardcore]) => [
15
22
  toSkill(skillName),
@@ -89,6 +96,13 @@ export class AscensionPrepError extends Error {
89
96
  this.cause = cause;
90
97
  }
91
98
  }
99
+ /**
100
+ * Determine the id of the appropriate moon sign.
101
+ *
102
+ * @param moon Either a moon sign or the desired unlocked zone name
103
+ * @param playerClass Class, required for working out a moon sign based on the desired zone
104
+ * @returns Moon sign id
105
+ */
92
106
  function toMoonId(moon, playerClass) {
93
107
  if (typeof moon === "number")
94
108
  return moon;
@@ -140,6 +154,11 @@ function toMoonId(moon, playerClass) {
140
154
  throw new AscendError("Invalid moon sign!");
141
155
  }
142
156
  }
157
+ /**
158
+ * Determine if player is currently in Valhalla
159
+ *
160
+ * @returns Whether player is in Valhalla
161
+ */
143
162
  function isInValhalla() {
144
163
  const charPaneText = visitUrl("charpane.php");
145
164
  // Match the infinity images (inf_small.gif, inf_large.gif)
@@ -150,13 +169,16 @@ function isInValhalla() {
150
169
  }
151
170
  /**
152
171
  * Hops the gash, perming no skills
172
+ *
153
173
  * @param path path of choice, as a Path object--these exist as properties of Paths
154
174
  * @param playerClass Your class of choice for this ascension
155
175
  * @param lifestyle 1 for casual, 2 for softcore, 3 for hardcore. Alternately, use the Lifestyle enum
156
176
  * @param moon Your moon sign as a string, or the zone you're looking for as a string
157
177
  * @param consumable From the astral deli. Pick the container item, not the product.
158
178
  * @param pet From the astral pet store.
159
- * @param permSkills A Map<Skill, Lifestyle> of skills you'd like to perm, ordered by priority.
179
+ * @param permOptions Options for perming during a player's stay in Valhalla
180
+ * @param permOptions.permSkills A Map<Skill, Lifestyle> of skills you'd like to perm, ordered by priority.
181
+ * @param permOptions.neverAbort Whether the ascension shouold abort on failure
160
182
  */
161
183
  export function ascend(path, playerClass, lifestyle, moon, consumable = $item `astral six-pack`, pet = undefined, permOptions) {
162
184
  if (playerClass.path !== (path.avatar ? path : Path.none)) {
@@ -215,9 +237,15 @@ export function ascend(path, playerClass, lifestyle, moon, consumable = $item `a
215
237
  }
216
238
  /**
217
239
  * Sets up various iotms you may want to use in the coming ascension
218
- * @param ascensionItems.garden Garden to switch to.
219
- * @param ascensionItems An object potentially containing your workshed, garden, chateau, and eudora, all as strings
220
- * @param throwOnFail If true, this will throw an error when it fails to switch something
240
+ *
241
+ * @param ascensionPrep Configuration for various ascension prep settings. Any ommitted key will be kept as-is
242
+ * @param ascensionPrep.garden Garden to which to switch
243
+ * @param ascensionPrep.eudora Eudora to which to switch
244
+ * @param ascensionPrep.chateau Chateau configuration
245
+ * @param ascensionPrep.chateau.desk Chateau desk configuration
246
+ * @param ascensionPrep.chateau.ceiling Chateau ceiling configuration
247
+ * @param ascensionPrep.chateau.nightstand Chateau nightstand configuration
248
+ * @param ascensionPrep.throwOnFail If true, this will throw an error when it fails to switch something
221
249
  */
222
250
  export function prepareAscension({ garden, eudora, chateau, throwOnFail, } = {}) {
223
251
  throwOnFail = throwOnFail ?? true;
@@ -7,6 +7,7 @@ export default class CommunityService {
7
7
  private maximizeRequirements;
8
8
  /**
9
9
  * Class to store properties of various CS tests.
10
+ *
10
11
  * @param id The id the game HTML uses to identify the test; this is used primarily in runChoice.
11
12
  * @param stat The principle stat the test measures, often used as more easily memorable shorthand for the specific tests
12
13
  * @param property The name of the test as a string, often used as part of the string property "csServicesPerformed".
@@ -37,6 +38,7 @@ export default class CommunityService {
37
38
  static logTask(name: string, action: () => number | void): void;
38
39
  /**
39
40
  * Checks the "csServicesPerformed" property to see whether mafia currently believes this test is complete.
41
+ *
40
42
  * @returns Whether mafia currently believes this test is complete.
41
43
  */
42
44
  isDone(): boolean;
@@ -46,11 +48,13 @@ export default class CommunityService {
46
48
  maximize(): void;
47
49
  /**
48
50
  * Attempts to turn in the test to the Council of Loathing.
51
+ *
49
52
  * @returns Whether mafia believes the test is complete at the end of this function.
50
53
  */
51
54
  do(): boolean;
52
55
  /**
53
56
  * Wrapper function that prepares for a test and then completes it, adding time and turn details to the log.
57
+ *
54
58
  * @param prepare A function that does all necessary preparations for this CS test, including choosing your outfit. Optionally returns the number of turns you expect to spend preparing for the test.
55
59
  * @param maxTurns We will run the test iff the predicted/actual turns is less than or equal to this parameter.
56
60
  * @returns "completed", "failed", or "already completed".
@@ -59,12 +63,14 @@ export default class CommunityService {
59
63
  private _verifyIsDone;
60
64
  /**
61
65
  * Checks council.php to verify that a test is complete; more reliable than isDone, but requires an additional pagehit.
66
+ *
62
67
  * @returns Whether council.php suggests that the test is complete.
63
68
  */
64
69
  verifyIsDone(): boolean;
65
70
  private _actualCost;
66
71
  /**
67
72
  * Checks council.php for the number of turns this test will take; more reliable than prediction, but requires an additional pagehit.
73
+ *
68
74
  * @returns The number of turns to complete this test according to council.php.
69
75
  */
70
76
  actualCost(): number;
@@ -81,6 +87,7 @@ export default class CommunityService {
81
87
  };
82
88
  /**
83
89
  * Prints turncount and time details of the test in question.
90
+ *
84
91
  * @param colour The colour (or color) you'd like the log to be printed in.
85
92
  */
86
93
  static printLog(colour?: string): void;
@@ -28,6 +28,7 @@ export default class CommunityService {
28
28
  maximizeRequirements;
29
29
  /**
30
30
  * Class to store properties of various CS tests.
31
+ *
31
32
  * @param id The id the game HTML uses to identify the test; this is used primarily in runChoice.
32
33
  * @param stat The principle stat the test measures, often used as more easily memorable shorthand for the specific tests
33
34
  * @param property The name of the test as a string, often used as part of the string property "csServicesPerformed".
@@ -84,6 +85,7 @@ export default class CommunityService {
84
85
  }
85
86
  /**
86
87
  * Checks the "csServicesPerformed" property to see whether mafia currently believes this test is complete.
88
+ *
87
89
  * @returns Whether mafia currently believes this test is complete.
88
90
  */
89
91
  isDone() {
@@ -98,6 +100,7 @@ export default class CommunityService {
98
100
  }
99
101
  /**
100
102
  * Attempts to turn in the test to the Council of Loathing.
103
+ *
101
104
  * @returns Whether mafia believes the test is complete at the end of this function.
102
105
  */
103
106
  do() {
@@ -109,6 +112,7 @@ export default class CommunityService {
109
112
  }
110
113
  /**
111
114
  * Wrapper function that prepares for a test and then completes it, adding time and turn details to the log.
115
+ *
112
116
  * @param prepare A function that does all necessary preparations for this CS test, including choosing your outfit. Optionally returns the number of turns you expect to spend preparing for the test.
113
117
  * @param maxTurns We will run the test iff the predicted/actual turns is less than or equal to this parameter.
114
118
  * @returns "completed", "failed", or "already completed".
@@ -149,6 +153,7 @@ export default class CommunityService {
149
153
  }
150
154
  /**
151
155
  * Checks council.php to verify that a test is complete; more reliable than isDone, but requires an additional pagehit.
156
+ *
152
157
  * @returns Whether council.php suggests that the test is complete.
153
158
  */
154
159
  verifyIsDone() {
@@ -160,6 +165,7 @@ export default class CommunityService {
160
165
  }
161
166
  /**
162
167
  * Checks council.php for the number of turns this test will take; more reliable than prediction, but requires an additional pagehit.
168
+ *
163
169
  * @returns The number of turns to complete this test according to council.php.
164
170
  */
165
171
  actualCost() {
@@ -171,6 +177,7 @@ export default class CommunityService {
171
177
  static log = {};
172
178
  /**
173
179
  * Prints turncount and time details of the test in question.
180
+ *
174
181
  * @param colour The colour (or color) you'd like the log to be printed in.
175
182
  */
176
183
  static printLog(colour = "blue") {
@@ -246,7 +253,11 @@ export default class CommunityService {
246
253
  : 1;
247
254
  // We add 0.001 because the floor function sometimes introduces weird rounding errors
248
255
  return (60 -
249
- Math.floor((multiplier * (getModifier("Item Drop") - familiarItemDrop)) / 30 +
256
+ Math.floor((multiplier *
257
+ (getModifier("Item Drop") -
258
+ familiarItemDrop -
259
+ numericModifier(myThrall(), "Item Drop"))) /
260
+ 30 +
250
261
  0.001) -
251
262
  Math.floor((getModifier("Booze Drop") - familiarBoozeDrop) / 15 + 0.001));
252
263
  }, new Requirement(["Item Drop", "2 Booze Drop"], {
package/dist/combat.d.ts CHANGED
@@ -2,6 +2,7 @@ import { Class, Effect, Item, Location, Monster, Skill, Stat } from "kolmafia";
2
2
  /**
3
3
  * Get the KoL native ID of the macro with name name.
4
4
  *
5
+ * @param name Name of the macro
5
6
  * @category Combat
6
7
  * @returns {number} The macro ID.
7
8
  */
@@ -29,16 +30,20 @@ export declare class Macro {
29
30
  name: string;
30
31
  /**
31
32
  * Convert macro to string.
33
+ *
34
+ * @returns BALLS macro
32
35
  */
33
36
  toString(): string;
34
37
  /**
35
38
  * Gives your macro a new name to be used when saving an autoattack.
39
+ *
36
40
  * @param name The name to be used when saving as an autoattack.
37
41
  * @returns The macro in question
38
42
  */
39
43
  rename(name: string): this;
40
44
  /**
41
45
  * Creates a new Macro with a name other than the default name.
46
+ *
42
47
  * @param name The name to assign this macro.
43
48
  * @returns A new Macro with the assigned name.
44
49
  */
@@ -49,6 +54,8 @@ export declare class Macro {
49
54
  save(): void;
50
55
  /**
51
56
  * Load a saved macro from the Mafia property.
57
+ *
58
+ * @returns Loaded macro text
52
59
  */
53
60
  static load<T extends Macro>(this: Constructor<T>): T;
54
61
  /**
@@ -57,18 +64,22 @@ export declare class Macro {
57
64
  static clearSaved(): void;
58
65
  /**
59
66
  * Statefully add one or several steps to a macro.
67
+ *
60
68
  * @param nextSteps The steps to add to the macro.
61
69
  * @returns {Macro} This object itself.
62
70
  */
63
71
  step(...nextSteps: (string | Macro)[]): this;
64
72
  /**
65
73
  * Statefully add one or several steps to a macro.
74
+ *
66
75
  * @param nextSteps The steps to add to the macro.
67
76
  * @returns {Macro} This object itself.
68
77
  */
69
78
  static step<T extends Macro>(this: Constructor<T>, ...nextSteps: (string | Macro)[]): T;
70
79
  /**
71
80
  * Submit the built macro to KoL. Only works inside combat.
81
+ *
82
+ * @returns Contents of the fight page after macro submission
72
83
  */
73
84
  submit(): string;
74
85
  /**
@@ -77,6 +88,7 @@ export declare class Macro {
77
88
  setAutoAttack(): void;
78
89
  /**
79
90
  * Renames the macro, then sets it as an autoattack.
91
+ *
80
92
  * @param name The name to save the macro under as an autoattack.
81
93
  */
82
94
  setAutoAttackAs(name: string): void;
@@ -86,27 +98,32 @@ export declare class Macro {
86
98
  static clearAutoAttackMacros(): void;
87
99
  /**
88
100
  * Add an "abort" step to this macro.
101
+ *
89
102
  * @returns {Macro} This object itself.
90
103
  */
91
104
  abort(): this;
92
105
  /**
93
106
  * Create a new macro with an "abort" step.
107
+ *
94
108
  * @returns {Macro} This object itself.
95
109
  */
96
110
  static abort<T extends Macro>(this: Constructor<T>): T;
97
111
  /**
98
112
  * Add a "runaway" step to this macro.
113
+ *
99
114
  * @returns {Macro} This object itself.
100
115
  */
101
116
  runaway(): this;
102
117
  /**
103
118
  * Create a new macro with an "runaway" step.
119
+ *
104
120
  * @returns {Macro} This object itself.
105
121
  */
106
122
  static runaway<T extends Macro>(this: Constructor<T>): T;
107
123
  private static makeBALLSPredicate;
108
124
  /**
109
125
  * Add an "if" statement to this macro.
126
+ *
110
127
  * @param condition The BALLS condition for the if statement.
111
128
  * @param ifTrue Continuation if the condition is true.
112
129
  * @returns {Macro} This object itself.
@@ -114,6 +131,7 @@ export declare class Macro {
114
131
  if_(condition: PreBALLSPredicate, ifTrue: string | Macro): this;
115
132
  /**
116
133
  * Create a new macro with an "if" statement.
134
+ *
117
135
  * @param condition The BALLS condition for the if statement.
118
136
  * @param ifTrue Continuation if the condition is true.
119
137
  * @returns {Macro} This object itself.
@@ -121,6 +139,7 @@ export declare class Macro {
121
139
  static if_<T extends Macro>(this: Constructor<T>, condition: PreBALLSPredicate, ifTrue: string | Macro): T;
122
140
  /**
123
141
  * Add an "if" statement to this macro, inverting the condition.
142
+ *
124
143
  * @param condition The BALLS condition for the if statement.
125
144
  * @param ifTrue Continuation if the condition is true.
126
145
  * @returns {Macro} This object itself.
@@ -128,6 +147,7 @@ export declare class Macro {
128
147
  ifNot(condition: PreBALLSPredicate, ifTrue: string | Macro): this;
129
148
  /**
130
149
  * Create a new macro with an "if" statement, inverting the condition.
150
+ *
131
151
  * @param condition The BALLS condition for the if statement.
132
152
  * @param ifTrue Continuation if the condition is true.
133
153
  * @returns {Macro} This object itself.
@@ -135,6 +155,7 @@ export declare class Macro {
135
155
  static ifNot<T extends Macro>(this: Constructor<T>, condition: PreBALLSPredicate, ifTrue: string | Macro): T;
136
156
  /**
137
157
  * Add a "while" statement to this macro.
158
+ *
138
159
  * @param condition The BALLS condition for the if statement.
139
160
  * @param contents Loop to repeat while the condition is true.
140
161
  * @returns {Macro} This object itself.
@@ -142,6 +163,7 @@ export declare class Macro {
142
163
  while_(condition: string, contents: string | Macro): this;
143
164
  /**
144
165
  * Create a new macro with a "while" statement.
166
+ *
145
167
  * @param condition The BALLS condition for the if statement.
146
168
  * @param contents Loop to repeat while the condition is true.
147
169
  * @returns {Macro} This object itself.
@@ -149,6 +171,7 @@ export declare class Macro {
149
171
  static while_<T extends Macro>(this: Constructor<T>, condition: string, contents: string | Macro): T;
150
172
  /**
151
173
  * Conditionally add a step to a macro based on a condition evaluated at the time of building the macro.
174
+ *
152
175
  * @param condition The JS condition.
153
176
  * @param ifTrue Continuation to add if the condition is true.
154
177
  * @param ifFalse Optional input to turn this into an if...else statement.
@@ -157,6 +180,7 @@ export declare class Macro {
157
180
  externalIf(condition: boolean, ifTrue: string | Macro, ifFalse?: string | Macro): this;
158
181
  /**
159
182
  * Create a new macro with a condition evaluated at the time of building the macro.
183
+ *
160
184
  * @param condition The JS condition.
161
185
  * @param ifTrue Continuation to add if the condition is true.
162
186
  * @param ifFalse Optional input to turn this into an if...else statement.
@@ -165,97 +189,118 @@ export declare class Macro {
165
189
  static externalIf<T extends Macro>(this: Constructor<T>, condition: boolean, ifTrue: string | Macro, ifFalse?: string | Macro): T;
166
190
  /**
167
191
  * Add a repeat step to the macro.
192
+ *
168
193
  * @returns {Macro} This object itself.
169
194
  */
170
195
  repeat(): this;
171
196
  /**
172
197
  * Add one or more skill cast steps to the macro.
198
+ *
173
199
  * @param skills Skills to cast.
174
200
  * @returns {Macro} This object itself.
175
201
  */
176
202
  skill(...skills: SkillOrName[]): this;
177
203
  /**
178
204
  * Create a new macro with one or more skill cast steps.
205
+ *
179
206
  * @param skills Skills to cast.
180
207
  * @returns {Macro} This object itself.
181
208
  */
182
209
  static skill<T extends Macro>(this: Constructor<T>, ...skills: SkillOrName[]): T;
183
210
  /**
184
211
  * Add one or more skill cast steps to the macro, where each step checks if you have the skill first.
212
+ *
185
213
  * @param skills Skills to try casting.
186
214
  * @returns {Macro} This object itself.
187
215
  */
188
216
  trySkill(...skills: SkillOrName[]): this;
189
217
  /**
190
218
  * Create a new macro with one or more skill cast steps, where each step checks if you have the skill first.
219
+ *
191
220
  * @param skills Skills to try casting.
192
221
  * @returns {Macro} This object itself.
193
222
  */
194
223
  static trySkill<T extends Macro>(this: Constructor<T>, ...skills: SkillOrName[]): T;
195
224
  /**
196
225
  * Add one or more skill-cast-and-repeat steps to the macro, where each step checks if you have the skill first.
226
+ *
197
227
  * @param skills Skills to try repeatedly casting.
198
228
  * @returns {Macro} This object itself.
199
229
  */
200
230
  trySkillRepeat(...skills: SkillOrName[]): this;
201
231
  /**
202
232
  * Create a new macro with one or more skill-cast-and-repeat steps, where each step checks if you have the skill first.
233
+ *
203
234
  * @param skills Skills to try repeatedly casting.
204
235
  * @returns {Macro} This object itself.
205
236
  */
206
237
  static trySkillRepeat<T extends Macro>(this: Constructor<T>, ...skills: SkillOrName[]): T;
207
238
  /**
208
239
  * Add one or more item steps to the macro.
240
+ *
209
241
  * @param items Items to use. Pass a tuple [item1, item2] to funksling.
210
242
  * @returns {Macro} This object itself.
211
243
  */
212
244
  item(...items: (ItemOrName | [ItemOrName, ItemOrName])[]): this;
213
245
  /**
214
246
  * Create a new macro with one or more item steps.
247
+ *
215
248
  * @param items Items to use. Pass a tuple [item1, item2] to funksling.
216
249
  * @returns {Macro} This object itself.
217
250
  */
218
251
  static item<T extends Macro>(this: Constructor<T>, ...items: (ItemOrName | [ItemOrName, ItemOrName])[]): T;
219
252
  /**
220
253
  * Add one or more item steps to the macro, where each step checks to see if you have the item first.
254
+ *
221
255
  * @param items Items to try using. Pass a tuple [item1, item2] to funksling.
222
256
  * @returns {Macro} This object itself.
223
257
  */
224
258
  tryItem(...items: (ItemOrName | [ItemOrName, ItemOrName])[]): this;
225
259
  /**
226
260
  * Create a new macro with one or more item steps, where each step checks to see if you have the item first.
261
+ *
227
262
  * @param items Items to try using. Pass a tuple [item1, item2] to funksling.
228
263
  * @returns {Macro} This object itself.
229
264
  */
230
265
  static tryItem<T extends Macro>(this: Constructor<T>, ...items: (ItemOrName | [ItemOrName, ItemOrName])[]): T;
231
266
  /**
232
267
  * Add an attack step to the macro.
268
+ *
233
269
  * @returns {Macro} This object itself.
234
270
  */
235
271
  attack(): this;
236
272
  /**
237
273
  * Create a new macro with an attack step.
274
+ *
238
275
  * @returns {Macro} This object itself.
239
276
  */
240
277
  static attack<T extends Macro>(this: Constructor<T>): T;
241
278
  /**
242
279
  * Create an if_ statement based on what holiday of loathing it currently is. On non-holidays, returns the original macro, unmutated.
280
+ *
243
281
  * @param macro The macro to place in the if_ statement
282
+ * @returns This macro with supplied macro wapped in if statement matching holiday wanderers
244
283
  */
245
284
  ifHolidayWanderer(macro: Macro): this;
246
285
  /**
247
286
  * Create a new macro starting with an ifHolidayWanderer step.
287
+ *
248
288
  * @param macro The macro to place inside the if_ statement
289
+ * @returns New macro with supplied macro wrapped in if statement matching holiday wanderers
249
290
  */
250
291
  static ifHolidayWanderer<T extends Macro>(this: Constructor<T>, macro: Macro): T;
251
292
  /**
252
293
  * Create an if_ statement based on what holiday of loathing it currently is. On non-holidays, returns the original macro, with the input macro appended.
294
+ *
253
295
  * @param macro The macro to place in the if_ statement.
296
+ * @returns This macro with supplied macro wrapped in if statement matching monsters that are not holiday wanderers
254
297
  */
255
298
  ifNotHolidayWanderer(macro: Macro): this;
256
299
  /**
257
300
  * Create a new macro starting with an ifNotHolidayWanderer step.
301
+ *
258
302
  * @param macro The macro to place inside the if_ statement
303
+ * @returns New macro with supplied macro wrapped in if statement matching monsters that are not holiday wanderers
259
304
  */
260
305
  static ifNotHolidayWanderer<T extends Macro>(this: Constructor<T>, macro: Macro): T;
261
306
  }
@@ -283,60 +328,70 @@ export declare function adventureMacroAuto(loc: Location, autoMacro: Macro, next
283
328
  export declare class StrictMacro extends Macro {
284
329
  /**
285
330
  * Add one or more skill cast steps to the macro.
331
+ *
286
332
  * @param skills Skills to cast.
287
333
  * @returns {StrictMacro} This object itself.
288
334
  */
289
335
  skill(...skills: Skill[]): this;
290
336
  /**
291
337
  * Create a new macro with one or more skill cast steps.
338
+ *
292
339
  * @param skills Skills to cast.
293
340
  * @returns {StrictMacro} This object itself.
294
341
  */
295
342
  static skill<T extends StrictMacro>(this: Constructor<T>, ...skills: Skill[]): T;
296
343
  /**
297
344
  * Add one or more item steps to the macro.
345
+ *
298
346
  * @param items Items to use. Pass a tuple [item1, item2] to funksling.
299
347
  * @returns {StrictMacro} This object itself.
300
348
  */
301
349
  item(...items: (Item | [Item, Item])[]): this;
302
350
  /**
303
351
  * Create a new macro with one or more item steps.
352
+ *
304
353
  * @param items Items to use. Pass a tuple [item1, item2] to funksling.
305
354
  * @returns {StrictMacro} This object itself.
306
355
  */
307
356
  static item<T extends StrictMacro>(this: Constructor<T>, ...items: (Item | [Item, Item])[]): T;
308
357
  /**
309
358
  * Add one or more skill cast steps to the macro, where each step checks if you have the skill first.
359
+ *
310
360
  * @param skills Skills to try casting.
311
361
  * @returns {StrictMacro} This object itself.
312
362
  */
313
363
  trySkill(...skills: Skill[]): this;
314
364
  /**
315
365
  * Create a new macro with one or more skill cast steps, where each step checks if you have the skill first.
366
+ *
316
367
  * @param skills Skills to try casting.
317
368
  * @returns {StrictMacro} This object itself.
318
369
  */
319
370
  static trySkill<T extends StrictMacro>(this: Constructor<T>, ...skills: Skill[]): T;
320
371
  /**
321
372
  * Add one or more item steps to the macro, where each step checks to see if you have the item first.
373
+ *
322
374
  * @param items Items to try using. Pass a tuple [item1, item2] to funksling.
323
375
  * @returns {StrictMacro} This object itself.
324
376
  */
325
377
  tryItem(...items: (Item | [Item, Item])[]): this;
326
378
  /**
327
379
  * Create a new macro with one or more item steps, where each step checks to see if you have the item first.
380
+ *
328
381
  * @param items Items to try using. Pass a tuple [item1, item2] to funksling.
329
382
  * @returns {StrictMacro} This object itself.
330
383
  */
331
384
  static tryItem<T extends StrictMacro>(this: Constructor<T>, ...items: (Item | [Item, Item])[]): T;
332
385
  /**
333
386
  * Add one or more skill-cast-and-repeat steps to the macro, where each step checks if you have the skill first.
387
+ *
334
388
  * @param skills Skills to try repeatedly casting.
335
389
  * @returns {StrictMacro} This object itself.
336
390
  */
337
391
  trySkillRepeat(...skills: Skill[]): this;
338
392
  /**
339
393
  * Create a new macro with one or more skill-cast-and-repeat steps, where each step checks if you have the skill first.
394
+ *
340
395
  * @param skills Skills to try repeatedly casting.
341
396
  * @returns {StrictMacro} This object itself.
342
397
  */