libram 0.4.1 → 0.4.5

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 (91) hide show
  1. package/dist/Clan.js +271 -485
  2. package/dist/Copier.js +15 -48
  3. package/dist/Dungeon.js +77 -157
  4. package/dist/Kmail.d.ts +3 -1
  5. package/dist/Kmail.js +99 -244
  6. package/dist/Path.js +77 -120
  7. package/dist/ascend.js +153 -172
  8. package/dist/combat.d.ts +98 -3
  9. package/dist/combat.js +349 -387
  10. package/dist/console.js +13 -36
  11. package/dist/diet/index.d.ts +32 -8
  12. package/dist/diet/index.js +420 -426
  13. package/dist/diet/knapsack.d.ts +1 -1
  14. package/dist/diet/knapsack.js +104 -100
  15. package/dist/dungeons/Dreadsylvania.d.ts +4 -0
  16. package/dist/dungeons/Dreadsylvania.js +14 -0
  17. package/dist/dungeons/Dungeon.d.ts +28 -0
  18. package/dist/dungeons/Dungeon.js +99 -0
  19. package/dist/dungeons/Hobopolis.d.ts +4 -0
  20. package/dist/dungeons/Hobopolis.js +14 -0
  21. package/dist/dungeons/SlimeTube.d.ts +4 -0
  22. package/dist/dungeons/SlimeTube.js +14 -0
  23. package/dist/freerun.d.ts +16 -4
  24. package/dist/freerun.js +92 -99
  25. package/dist/index.d.ts +5 -1
  26. package/dist/index.js +22 -300
  27. package/dist/lib.d.ts +4 -0
  28. package/dist/lib.js +284 -515
  29. package/dist/logger.js +21 -63
  30. package/dist/maximize.js +289 -562
  31. package/dist/modifier.js +35 -46
  32. package/dist/modifierTypes.js +8 -22
  33. package/dist/mood.d.ts +5 -0
  34. package/dist/mood.js +268 -551
  35. package/dist/property.d.ts +2 -0
  36. package/dist/property.js +100 -242
  37. package/dist/propertyTypes.d.ts +5 -4
  38. package/dist/propertyTypes.js +1 -0
  39. package/dist/propertyTyping.d.ts +4 -3
  40. package/dist/propertyTyping.js +52 -59
  41. package/dist/resources/2007/CandyHearts.d.ts +9 -0
  42. package/dist/resources/2007/CandyHearts.js +24 -0
  43. package/dist/resources/2008/DivineFavors.d.ts +9 -0
  44. package/dist/resources/2008/DivineFavors.js +27 -0
  45. package/dist/resources/2009/Bandersnatch.js +37 -112
  46. package/dist/resources/2009/LoveSongs.d.ts +9 -0
  47. package/dist/resources/2009/LoveSongs.js +24 -0
  48. package/dist/resources/2009/SpookyPutty.js +20 -46
  49. package/dist/resources/2010/Brickos.d.ts +9 -0
  50. package/dist/resources/2010/Brickos.js +21 -0
  51. package/dist/resources/2010/CrownOfThrones.d.ts +9 -0
  52. package/dist/resources/2010/CrownOfThrones.js +550 -374
  53. package/dist/resources/2011/Gygaxian.d.ts +9 -0
  54. package/dist/resources/2011/Gygaxian.js +24 -0
  55. package/dist/resources/2011/ObtuseAngel.js +21 -63
  56. package/dist/resources/2012/RainDoh.js +14 -40
  57. package/dist/resources/2012/Resolutions.d.ts +9 -0
  58. package/dist/resources/2012/Resolutions.js +28 -0
  59. package/dist/resources/2013/Florist.d.ts +1 -0
  60. package/dist/resources/2013/Florist.js +142 -207
  61. package/dist/resources/2013/PulledTaffy.d.ts +9 -0
  62. package/dist/resources/2013/PulledTaffy.js +33 -0
  63. package/dist/resources/2014/DNALab.d.ts +47 -0
  64. package/dist/resources/2014/DNALab.js +154 -0
  65. package/dist/resources/2014/WinterGarden.js +15 -43
  66. package/dist/resources/2015/ChateauMantegna.js +52 -86
  67. package/dist/resources/2015/MayoClinic.d.ts +3 -0
  68. package/dist/resources/2015/MayoClinic.js +36 -65
  69. package/dist/resources/2016/SourceTerminal.d.ts +1 -0
  70. package/dist/resources/2016/SourceTerminal.js +114 -237
  71. package/dist/resources/2016/Witchess.js +33 -59
  72. package/dist/resources/2017/AsdonMartin.d.ts +27 -0
  73. package/dist/resources/2017/AsdonMartin.js +80 -0
  74. package/dist/resources/2017/TunnelOfLove.js +62 -111
  75. package/dist/resources/2018/SongBoom.js +32 -68
  76. package/dist/resources/2019/BeachComb.js +26 -44
  77. package/dist/resources/2019/Snapper.d.ts +28 -0
  78. package/dist/resources/2019/Snapper.js +69 -0
  79. package/dist/resources/2020/Guzzlr.d.ts +3 -0
  80. package/dist/resources/2020/Guzzlr.js +92 -163
  81. package/dist/resources/LibramSummon.d.ts +12 -0
  82. package/dist/resources/LibramSummon.js +66 -0
  83. package/dist/resources/index.d.ts +5 -1
  84. package/dist/resources/index.js +21 -105
  85. package/dist/resources/putty-likes.js +15 -30
  86. package/dist/since.d.ts +1 -0
  87. package/dist/since.js +56 -112
  88. package/dist/template-string.js +40 -132
  89. package/dist/utils.d.ts +5 -0
  90. package/dist/utils.js +47 -134
  91. package/package.json +15 -9
@@ -1,250 +1,179 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.array.slice.js");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.have = have;
9
- exports.isQuestActive = isQuestActive;
10
- exports.getPlatinum = getPlatinum;
11
- exports.getPlatinumToday = getPlatinumToday;
12
- exports.canPlatinum = canPlatinum;
13
- exports.haveFullPlatinumBonus = haveFullPlatinumBonus;
14
- exports.acceptPlatinum = acceptPlatinum;
15
- exports.getGold = getGold;
16
- exports.getGoldToday = getGoldToday;
17
- exports.canGold = canGold;
18
- exports.haveFullGoldBonus = haveFullGoldBonus;
19
- exports.acceptGold = acceptGold;
20
- exports.getBronze = getBronze;
21
- exports.acceptBronze = acceptBronze;
22
- exports.haveFullBronzeBonus = haveFullBronzeBonus;
23
- exports.canAbandon = canAbandon;
24
- exports.abandon = abandon;
25
- exports.getLocation = getLocation;
26
- exports.getTier = getTier;
27
- exports.getBooze = getBooze;
28
- exports.havePlatinumBooze = havePlatinumBooze;
29
- exports.haveBooze = haveBooze;
30
- exports.Cocktails = exports.item = void 0;
31
-
32
- var _kolmafia = require("kolmafia");
33
-
34
- var _lib = require("../../lib");
35
-
36
- var _property = require("../../property");
37
-
38
- var _templateString = require("../../template-string");
39
-
40
- var _templateObject, _templateObject2, _templateObject3;
41
-
42
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
43
-
44
- var item = (0, _templateString.$item)(_templateObject || (_templateObject = _taggedTemplateLiteral(["Guzzlr tablet"])));
45
- exports.item = item;
46
-
47
- function have() {
48
- return (0, _lib.have)(item);
49
- }
50
-
1
+ import { mallPrice, runChoice, use, visitUrl } from "kolmafia";
2
+ import { maxBy } from "lodash";
3
+ import { have as haveItem } from "../../lib";
4
+ import { get, withChoice } from "../../property";
5
+ import { $item, $items } from "../../template-string";
6
+ import { invertMap } from "../../utils";
7
+ export const item = $item `Guzzlr tablet`;
8
+ export function have() {
9
+ return haveItem(item);
10
+ }
51
11
  function useTabletWithChoice(option) {
52
- (0, _property.withChoice)(1412, option, () => (0, _kolmafia.use)(1, item));
12
+ withChoice(1412, option, () => use(1, item));
53
13
  }
54
-
55
- function isQuestActive() {
56
- return (0, _property.get)("questGuzzlr") !== "unstarted";
14
+ export function isQuestActive() {
15
+ return get("questGuzzlr") !== "unstarted";
57
16
  }
58
17
  /**
59
18
  * Platinum deliveries completed overall
60
19
  */
61
-
62
-
63
- function getPlatinum() {
64
- return (0, _property.get)("guzzlrPlatinumDeliveries");
20
+ export function getPlatinum() {
21
+ return get("guzzlrPlatinumDeliveries");
65
22
  }
66
23
  /**
67
24
  * Platinum deliveries completed today
68
25
  */
69
-
70
-
71
- function getPlatinumToday() {
72
- return (0, _property.get)("_guzzlrPlatinumDeliveries");
26
+ export function getPlatinumToday() {
27
+ return get("_guzzlrPlatinumDeliveries");
73
28
  }
74
29
  /**
75
30
  * Can do a platinum delivery (haven't done one today)
76
31
  */
77
-
78
-
79
- function canPlatinum() {
80
- return !isQuestActive() && getGold() >= 5 && getPlatinumToday() < 1;
32
+ export function canPlatinum() {
33
+ return !isQuestActive() && getGold() >= 5 && getPlatinumToday() < 1;
81
34
  }
82
35
  /**
83
36
  * Have fully unlocked the platinum delivery bonuses (done >= 30)
84
37
  */
85
-
86
-
87
- function haveFullPlatinumBonus() {
88
- return getPlatinum() >= 30;
38
+ export function haveFullPlatinumBonus() {
39
+ return getPlatinum() >= 30;
89
40
  }
90
41
  /**
91
42
  * Accept platinum delivery
92
43
  */
93
-
94
-
95
- function acceptPlatinum() {
96
- if (!canPlatinum()) return false;
97
- useTabletWithChoice(4);
98
- return true;
44
+ export function acceptPlatinum() {
45
+ if (!canPlatinum())
46
+ return false;
47
+ useTabletWithChoice(4);
48
+ return true;
99
49
  }
100
50
  /**
101
51
  * Gold deliveries completed overall
102
52
  */
103
-
104
-
105
- function getGold() {
106
- return (0, _property.get)("guzzlrGoldDeliveries");
53
+ export function getGold() {
54
+ return get("guzzlrGoldDeliveries");
107
55
  }
108
56
  /**
109
57
  * Gold deliveries completed today
110
58
  */
111
-
112
-
113
- function getGoldToday() {
114
- return (0, _property.get)("_guzzlrGoldDeliveries");
59
+ export function getGoldToday() {
60
+ return get("_guzzlrGoldDeliveries");
115
61
  }
116
62
  /**
117
63
  * Can do a gold delivery (have done fewer than 3 today)
118
64
  */
119
-
120
-
121
- function canGold() {
122
- return !isQuestActive() && getBronze() >= 5 && getGoldToday() < 3;
65
+ export function canGold() {
66
+ return !isQuestActive() && getBronze() >= 5 && getGoldToday() < 3;
123
67
  }
124
68
  /**
125
69
  * Have fully unlocked the platinum delivery bonuses (done >= 30)
126
70
  */
127
-
128
-
129
- function haveFullGoldBonus() {
130
- return getGold() >= 150;
71
+ export function haveFullGoldBonus() {
72
+ return getGold() >= 150;
131
73
  }
132
74
  /**
133
75
  * Accept gold delivery
134
76
  */
135
-
136
-
137
- function acceptGold() {
138
- if (!canGold()) return false;
139
- useTabletWithChoice(3);
140
- return true;
77
+ export function acceptGold() {
78
+ if (!canGold())
79
+ return false;
80
+ useTabletWithChoice(3);
81
+ return true;
141
82
  }
142
83
  /**
143
84
  * Bronze deliveries completed overall
144
85
  */
145
-
146
-
147
- function getBronze() {
148
- return (0, _property.get)("guzzlrBronzeDeliveries");
86
+ export function getBronze() {
87
+ return get("guzzlrBronzeDeliveries");
149
88
  }
150
89
  /**
151
90
  * Accept bronze delivery
152
91
  */
153
-
154
-
155
- function acceptBronze() {
156
- if (isQuestActive()) return false;
157
- useTabletWithChoice(2);
158
- return true;
92
+ export function acceptBronze() {
93
+ if (isQuestActive())
94
+ return false;
95
+ useTabletWithChoice(2);
96
+ return true;
159
97
  }
160
98
  /**
161
99
  * Have fully unlocked the platinum delivery bonuses (done >= 30)
162
100
  */
163
-
164
-
165
- function haveFullBronzeBonus() {
166
- return getBronze() >= 196;
101
+ export function haveFullBronzeBonus() {
102
+ return getBronze() >= 196;
167
103
  }
168
104
  /**
169
105
  * Can abandon the current Guzzlr quest
170
106
  */
171
-
172
-
173
- function canAbandon() {
174
- return isQuestActive() && !(0, _property.get)("_guzzlrQuestAbandoned");
107
+ export function canAbandon() {
108
+ return isQuestActive() && !get("_guzzlrQuestAbandoned");
175
109
  }
176
110
  /**
177
111
  * Abandon Guzzlr quest
178
112
  */
179
-
180
-
181
- function abandon() {
182
- if (!canAbandon()) return false;
183
- (0, _kolmafia.visitUrl)("inventory.php?tap=guzzlr", false);
184
- (0, _kolmafia.runChoice)(1);
185
- (0, _kolmafia.runChoice)(5);
186
- return true;
113
+ export function abandon() {
114
+ if (!canAbandon())
115
+ return false;
116
+ visitUrl("inventory.php?tap=guzzlr", false);
117
+ runChoice(1);
118
+ runChoice(5);
119
+ return true;
187
120
  }
188
121
  /**
189
122
  * Get current Guzzlr quest location
190
123
  */
191
-
192
-
193
- function getLocation() {
194
- return (0, _property.get)("guzzlrQuestLocation");
124
+ export function getLocation() {
125
+ return get("guzzlrQuestLocation");
195
126
  }
196
127
  /**
197
128
  * Get current Guzzlr quest tier
198
129
  */
199
-
200
-
201
- function getTier() {
202
- var tier = (0, _property.get)("guzzlrQuestTier");
203
- return tier === "" ? null : tier;
130
+ export function getTier() {
131
+ const tier = get("guzzlrQuestTier");
132
+ return tier === "" ? null : tier;
204
133
  }
205
134
  /**
206
135
  * Get current Guzzlr quest booze
207
136
  */
208
-
209
-
210
- function getBooze() {
211
- var booze = (0, _property.get)("guzzlrQuestBooze");
212
- if (booze === "") return null;
213
- return Item.get(booze);
137
+ export function getBooze() {
138
+ const booze = get("guzzlrQuestBooze");
139
+ if (booze === "")
140
+ return null;
141
+ return Item.get(booze);
214
142
  }
215
143
  /**
216
144
  * List of the platinum cocktails
217
145
  */
218
-
219
-
220
- var Cocktails = (0, _templateString.$items)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["Buttery Boy, Steamboat, Ghiaccio Colada, Nog-on-the-Cob, Sourfinger"])));
146
+ export const Cocktails = $items `Buttery Boy, Steamboat, Ghiaccio Colada, Nog-on-the-Cob, Sourfinger`;
221
147
  /**
222
148
  * Returns true if the user has a platinum cocktail in their inventory
223
149
  */
224
-
225
- exports.Cocktails = Cocktails;
226
-
227
- function havePlatinumBooze() {
228
- return Cocktails.some(cock => (0, _lib.have)(cock));
150
+ export function havePlatinumBooze() {
151
+ return Cocktails.some((cock) => haveItem(cock));
229
152
  }
230
153
  /**
231
154
  * Returns true if the user has the cocktail that they need for their current quest
232
155
  *
233
156
  * If they have no quest, returns false
234
157
  */
235
-
236
-
237
- function haveBooze() {
238
- var booze = getBooze();
239
-
240
- switch (booze) {
241
- case null:
242
- return false;
243
-
244
- case (0, _templateString.$item)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["Guzzlr cocktail set"]))):
245
- return havePlatinumBooze();
246
-
247
- default:
248
- return (0, _lib.have)(booze);
249
- }
250
- }
158
+ export function haveBooze() {
159
+ const booze = getBooze();
160
+ switch (booze) {
161
+ case null:
162
+ return false;
163
+ case $item `Guzzlr cocktail set`:
164
+ return havePlatinumBooze();
165
+ default:
166
+ return haveItem(booze);
167
+ }
168
+ }
169
+ export const ingredientToPlatinumCocktail = new Map([
170
+ [$item `miniature boiler`, $item `Steamboat`],
171
+ [$item `cold wad`, $item `Ghiaccio Colada`],
172
+ [$item `robin's egg`, $item `Nog-on-the-Cob`],
173
+ [$item `mangled finger`, $item `Sourfinger`],
174
+ [$item `Dish of Clarified Butter`, $item `Buttery Boy`],
175
+ ]);
176
+ export const platinumCocktailToIngredient = invertMap(ingredientToPlatinumCocktail);
177
+ export function getCheapestPlatinumCocktail() {
178
+ return (maxBy(Array.from(ingredientToPlatinumCocktail), (ingredientAndCocktail) => mallPrice(ingredientAndCocktail[0])) ?? [$item `Dish of Clarified Butter`, $item `Buttery Boy`])[1];
179
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ *
3
+ * @param summonSkill The libram summoning skill
4
+ * @returns map containing the chance of an item to be summoned
5
+ */
6
+ export declare function expectedLibramSummon(summonSkill: Skill): Map<Item, number>;
7
+ /**
8
+ *
9
+ * @returns map containing the chance of items to be summoned for each libram summoning skill available
10
+ */
11
+ export declare function possibleLibramSummons(): Map<Skill, Map<Item, number>>;
12
+ export declare function bestLibramToCast(): Skill | null;
@@ -0,0 +1,66 @@
1
+ import maxBy from "lodash/maxBy";
2
+ import { getSaleValue } from "../lib";
3
+ import { sumNumbers } from "../utils";
4
+ import { expected as candyHeartsExpected, have as candyHeartsHave, summonSkill as candyHeartsSkill, } from "./2007/CandyHearts";
5
+ import { expected as divineFavorsExpected, have as divineFavorsHave, summonSkill as divineFavorsSkill, } from "./2008/DivineFavors";
6
+ import { expected as loveSongsExpected, have as loveSongsHave, summonSkill as loveSongsSkill, } from "./2009/LoveSongs";
7
+ import { expected as brickosExpected, have as brickosHave, summonSkill as brickosSkill, } from "./2010/Brickos";
8
+ import { expected as diceExpected, have as diceHave, summonSkill as diceSkill, } from "./2011/Gygaxian";
9
+ import { expected as resolutionsExpected, have as resolutionsHave, summonSkill as resolutionsSkill, } from "./2012/Resolutions";
10
+ import { expected as taffyExpected, have as taffyHave, summonSkill as taffySkill, } from "./2013/PulledTaffy";
11
+ /**
12
+ *
13
+ * @param summonSkill The libram summoning skill
14
+ * @returns map containing the chance of an item to be summoned
15
+ */
16
+ export function expectedLibramSummon(summonSkill) {
17
+ switch (summonSkill) {
18
+ case candyHeartsSkill:
19
+ return candyHeartsExpected();
20
+ case divineFavorsSkill:
21
+ return divineFavorsExpected();
22
+ case loveSongsSkill:
23
+ return loveSongsExpected();
24
+ case brickosSkill:
25
+ return brickosExpected();
26
+ case diceSkill:
27
+ return diceExpected();
28
+ case resolutionsSkill:
29
+ return resolutionsExpected();
30
+ case taffySkill:
31
+ return taffyExpected();
32
+ }
33
+ return new Map();
34
+ }
35
+ /**
36
+ *
37
+ * @returns map containing the chance of items to be summoned for each libram summoning skill available
38
+ */
39
+ export function possibleLibramSummons() {
40
+ const results = new Map();
41
+ if (candyHeartsHave()) {
42
+ results.set(candyHeartsSkill, candyHeartsExpected());
43
+ }
44
+ if (divineFavorsHave()) {
45
+ results.set(divineFavorsSkill, divineFavorsExpected());
46
+ }
47
+ if (loveSongsHave()) {
48
+ results.set(loveSongsSkill, loveSongsExpected());
49
+ }
50
+ if (brickosHave()) {
51
+ results.set(brickosSkill, brickosExpected());
52
+ }
53
+ if (diceHave()) {
54
+ results.set(diceSkill, diceExpected());
55
+ }
56
+ if (resolutionsHave()) {
57
+ results.set(resolutionsSkill, resolutionsExpected());
58
+ }
59
+ if (taffyHave()) {
60
+ results.set(taffySkill, taffyExpected());
61
+ }
62
+ return results;
63
+ }
64
+ export function bestLibramToCast() {
65
+ return (maxBy(Array.from(possibleLibramSummons().entries()), ([, itemMap]) => sumNumbers(Array.from(itemMap.entries()).map(([item, weight]) => weight * getSaleValue(item)))) ?? [null])[0];
66
+ }
@@ -1,17 +1,21 @@
1
+ import * as AsdonMartin from "./2017/AsdonMartin";
1
2
  import * as Bandersnatch from "./2009/Bandersnatch";
2
3
  import * as BeachComb from "./2019/BeachComb";
3
4
  import * as ChateauMantegna from "./2015/ChateauMantegna";
4
5
  import * as CrownOfThrones from "./2010/CrownOfThrones";
6
+ import * as DNALab from "./2014/DNALab";
5
7
  import * as FloristFriar from "./2013/Florist";
6
8
  import * as Guzzlr from "./2020/Guzzlr";
7
9
  import * as MayoClinic from "./2015/MayoClinic";
8
10
  import * as ObtuseAngel from "./2011/ObtuseAngel";
9
11
  import * as RainDoh from "./2012/RainDoh";
12
+ import * as Snapper from "./2019/Snapper";
10
13
  import * as SongBoom from "./2018/SongBoom";
11
14
  import * as SourceTerminal from "./2016/SourceTerminal";
12
15
  import * as SpookyPutty from "./2009/SpookyPutty";
13
16
  import * as TunnelOfLove from "./2017/TunnelOfLove";
14
17
  import * as WinterGarden from "./2014/WinterGarden";
15
18
  import * as Witchess from "./2016/Witchess";
16
- export { Bandersnatch, BeachComb, ChateauMantegna, CrownOfThrones, FloristFriar, Guzzlr, MayoClinic, ObtuseAngel, RainDoh, SongBoom, SourceTerminal, SpookyPutty, TunnelOfLove, WinterGarden, Witchess, };
19
+ export { AsdonMartin, Bandersnatch, BeachComb, ChateauMantegna, CrownOfThrones, DNALab, FloristFriar, Guzzlr, MayoClinic, ObtuseAngel, RainDoh, SongBoom, SourceTerminal, Snapper, SpookyPutty, TunnelOfLove, WinterGarden, Witchess, };
17
20
  export * from "./putty-likes";
21
+ export * from "./LibramSummon";
@@ -1,105 +1,21 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.array.iterator.js");
4
-
5
- require("core-js/modules/es.object.to-string.js");
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- var _exportNames = {
11
- Bandersnatch: true,
12
- BeachComb: true,
13
- ChateauMantegna: true,
14
- CrownOfThrones: true,
15
- FloristFriar: true,
16
- Guzzlr: true,
17
- MayoClinic: true,
18
- ObtuseAngel: true,
19
- RainDoh: true,
20
- SongBoom: true,
21
- SourceTerminal: true,
22
- SpookyPutty: true,
23
- TunnelOfLove: true,
24
- WinterGarden: true,
25
- Witchess: true
26
- };
27
- exports.Witchess = exports.WinterGarden = exports.TunnelOfLove = exports.SpookyPutty = exports.SourceTerminal = exports.SongBoom = exports.RainDoh = exports.ObtuseAngel = exports.MayoClinic = exports.Guzzlr = exports.FloristFriar = exports.CrownOfThrones = exports.ChateauMantegna = exports.BeachComb = exports.Bandersnatch = void 0;
28
-
29
- var Bandersnatch = _interopRequireWildcard(require("./2009/Bandersnatch"));
30
-
31
- exports.Bandersnatch = Bandersnatch;
32
-
33
- var BeachComb = _interopRequireWildcard(require("./2019/BeachComb"));
34
-
35
- exports.BeachComb = BeachComb;
36
-
37
- var ChateauMantegna = _interopRequireWildcard(require("./2015/ChateauMantegna"));
38
-
39
- exports.ChateauMantegna = ChateauMantegna;
40
-
41
- var CrownOfThrones = _interopRequireWildcard(require("./2010/CrownOfThrones"));
42
-
43
- exports.CrownOfThrones = CrownOfThrones;
44
-
45
- var FloristFriar = _interopRequireWildcard(require("./2013/Florist"));
46
-
47
- exports.FloristFriar = FloristFriar;
48
-
49
- var Guzzlr = _interopRequireWildcard(require("./2020/Guzzlr"));
50
-
51
- exports.Guzzlr = Guzzlr;
52
-
53
- var MayoClinic = _interopRequireWildcard(require("./2015/MayoClinic"));
54
-
55
- exports.MayoClinic = MayoClinic;
56
-
57
- var ObtuseAngel = _interopRequireWildcard(require("./2011/ObtuseAngel"));
58
-
59
- exports.ObtuseAngel = ObtuseAngel;
60
-
61
- var RainDoh = _interopRequireWildcard(require("./2012/RainDoh"));
62
-
63
- exports.RainDoh = RainDoh;
64
-
65
- var SongBoom = _interopRequireWildcard(require("./2018/SongBoom"));
66
-
67
- exports.SongBoom = SongBoom;
68
-
69
- var SourceTerminal = _interopRequireWildcard(require("./2016/SourceTerminal"));
70
-
71
- exports.SourceTerminal = SourceTerminal;
72
-
73
- var SpookyPutty = _interopRequireWildcard(require("./2009/SpookyPutty"));
74
-
75
- exports.SpookyPutty = SpookyPutty;
76
-
77
- var TunnelOfLove = _interopRequireWildcard(require("./2017/TunnelOfLove"));
78
-
79
- exports.TunnelOfLove = TunnelOfLove;
80
-
81
- var WinterGarden = _interopRequireWildcard(require("./2014/WinterGarden"));
82
-
83
- exports.WinterGarden = WinterGarden;
84
-
85
- var Witchess = _interopRequireWildcard(require("./2016/Witchess"));
86
-
87
- exports.Witchess = Witchess;
88
-
89
- var _puttyLikes = require("./putty-likes");
90
-
91
- Object.keys(_puttyLikes).forEach(function (key) {
92
- if (key === "default" || key === "__esModule") return;
93
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
94
- if (key in exports && exports[key] === _puttyLikes[key]) return;
95
- Object.defineProperty(exports, key, {
96
- enumerable: true,
97
- get: function get() {
98
- return _puttyLikes[key];
99
- }
100
- });
101
- });
102
-
103
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
104
-
105
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
1
+ import * as AsdonMartin from "./2017/AsdonMartin";
2
+ import * as Bandersnatch from "./2009/Bandersnatch";
3
+ import * as BeachComb from "./2019/BeachComb";
4
+ import * as ChateauMantegna from "./2015/ChateauMantegna";
5
+ import * as CrownOfThrones from "./2010/CrownOfThrones";
6
+ import * as DNALab from "./2014/DNALab";
7
+ import * as FloristFriar from "./2013/Florist";
8
+ import * as Guzzlr from "./2020/Guzzlr";
9
+ import * as MayoClinic from "./2015/MayoClinic";
10
+ import * as ObtuseAngel from "./2011/ObtuseAngel";
11
+ import * as RainDoh from "./2012/RainDoh";
12
+ import * as Snapper from "./2019/Snapper";
13
+ import * as SongBoom from "./2018/SongBoom";
14
+ import * as SourceTerminal from "./2016/SourceTerminal";
15
+ import * as SpookyPutty from "./2009/SpookyPutty";
16
+ import * as TunnelOfLove from "./2017/TunnelOfLove";
17
+ import * as WinterGarden from "./2014/WinterGarden";
18
+ import * as Witchess from "./2016/Witchess";
19
+ export { AsdonMartin, Bandersnatch, BeachComb, ChateauMantegna, CrownOfThrones, DNALab, FloristFriar, Guzzlr, MayoClinic, ObtuseAngel, RainDoh, SongBoom, SourceTerminal, Snapper, SpookyPutty, TunnelOfLove, WinterGarden, Witchess, };
20
+ export * from "./putty-likes";
21
+ export * from "./LibramSummon";
@@ -1,33 +1,18 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getTotalPuttyLikeCopiesMade = getTotalPuttyLikeCopiesMade;
7
- exports.couldUseRainDohBlackBox = couldUseRainDohBlackBox;
8
- exports.couldUseSpookyPuttySheet = couldUseSpookyPuttySheet;
9
- exports.SpookyPuttySheet = exports.RainDohBlackBox = void 0;
10
-
11
- var _Copier = require("../Copier");
12
-
13
- var _SpookyPutty = require("./2009/SpookyPutty");
14
-
15
- var _RainDoh = require("./2012/RainDoh");
16
-
17
- function getTotalPuttyLikeCopiesMade() {
18
- return (0, _SpookyPutty.getSpookyPuttySheetCopiesMade)() + (0, _RainDoh.getRainDohBlackBoxCopiesMade)();
1
+ import { Copier } from "../Copier";
2
+ import { getSpookyPuttySheetCopiesMade, getSpookyPuttySheetMonster, have as haveSpookyPutty, prepareSpookyPuttySheet, useSpookyPuttySheet, } from "./2009/SpookyPutty";
3
+ import { getRainDohBlackBoxCopiesMade, getRainDohBlackBoxMonster, have as haveRainDoh, useRainDohBlackBox, } from "./2012/RainDoh";
4
+ export function getTotalPuttyLikeCopiesMade() {
5
+ return getSpookyPuttySheetCopiesMade() + getRainDohBlackBoxCopiesMade();
19
6
  }
20
-
21
- function couldUseRainDohBlackBox() {
22
- return (0, _RainDoh.have)() && (0, _RainDoh.getRainDohBlackBoxCopiesMade)() < 5 && getTotalPuttyLikeCopiesMade() < 6;
7
+ export function couldUseRainDohBlackBox() {
8
+ return (haveRainDoh() &&
9
+ getRainDohBlackBoxCopiesMade() < 5 &&
10
+ getTotalPuttyLikeCopiesMade() < 6);
23
11
  }
24
-
25
- var RainDohBlackBox = new _Copier.Copier(() => couldUseRainDohBlackBox(), null, () => couldUseRainDohBlackBox(), () => (0, _RainDoh.getRainDohBlackBoxMonster)(), () => (0, _RainDoh.useRainDohBlackBox)());
26
- exports.RainDohBlackBox = RainDohBlackBox;
27
-
28
- function couldUseSpookyPuttySheet() {
29
- return (0, _SpookyPutty.have)() && (0, _SpookyPutty.getSpookyPuttySheetCopiesMade)() < 5 && getTotalPuttyLikeCopiesMade() < 6;
12
+ export const RainDohBlackBox = new Copier(() => couldUseRainDohBlackBox(), null, () => couldUseRainDohBlackBox(), () => getRainDohBlackBoxMonster(), () => useRainDohBlackBox());
13
+ export function couldUseSpookyPuttySheet() {
14
+ return (haveSpookyPutty() &&
15
+ getSpookyPuttySheetCopiesMade() < 5 &&
16
+ getTotalPuttyLikeCopiesMade() < 6);
30
17
  }
31
-
32
- var SpookyPuttySheet = new _Copier.Copier(() => couldUseSpookyPuttySheet(), () => (0, _SpookyPutty.prepareSpookyPuttySheet)(), () => couldUseSpookyPuttySheet(), () => (0, _SpookyPutty.getSpookyPuttySheetMonster)(), () => (0, _SpookyPutty.useSpookyPuttySheet)());
33
- exports.SpookyPuttySheet = SpookyPuttySheet;
18
+ export const SpookyPuttySheet = new Copier(() => couldUseSpookyPuttySheet(), () => prepareSpookyPuttySheet(), () => couldUseSpookyPuttySheet(), () => getSpookyPuttySheetMonster(), () => useSpookyPuttySheet());
package/dist/since.d.ts CHANGED
@@ -34,6 +34,7 @@ export declare function sinceKolmafiaRevision(revision: number): void;
34
34
  * This behaves like the `since X.Y;` statement in ASH.
35
35
  * @param majorVersion Major version number
36
36
  * @param minorVersion Minor version number
37
+ * @deprecated Point versions are no longer released by KoLmafia
37
38
  * @throws {KolmafiaVersionError}
38
39
  * If KoLmafia's major version is less than `majorVersion`, or if the major
39
40
  * versions are equal but the minor version is less than `minorVersion`