libram 0.3.2 → 0.4.2
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.
- package/dist/Clan.js +268 -485
- package/dist/Copier.js +11 -48
- package/dist/Dungeon.js +77 -157
- package/dist/Kmail.d.ts +13 -7
- package/dist/Kmail.js +92 -233
- package/dist/Path.js +68 -120
- package/dist/ascend.js +153 -172
- package/dist/combat.d.ts +86 -1
- package/dist/combat.js +295 -387
- package/dist/console.js +13 -36
- package/dist/diet/index.d.ts +31 -0
- package/dist/diet/index.js +333 -0
- package/dist/diet/knapsack.d.ts +7 -0
- package/dist/diet/knapsack.js +106 -0
- package/dist/dungeons/Dreadsylvania.d.ts +4 -0
- package/dist/dungeons/Dreadsylvania.js +14 -0
- package/dist/dungeons/Dungeon.d.ts +28 -0
- package/dist/dungeons/Dungeon.js +99 -0
- package/dist/dungeons/Hobopolis.d.ts +4 -0
- package/dist/dungeons/Hobopolis.js +14 -0
- package/dist/dungeons/SlimeTube.d.ts +4 -0
- package/dist/dungeons/SlimeTube.js +14 -0
- package/dist/freerun.d.ts +23 -0
- package/dist/freerun.js +92 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +21 -263
- package/dist/lib.d.ts +43 -0
- package/dist/lib.js +296 -405
- package/dist/logger.js +23 -63
- package/dist/maximize.d.ts +29 -12
- package/dist/maximize.js +318 -421
- package/dist/modifier.d.ts +13 -0
- package/dist/modifier.js +35 -0
- package/dist/modifierTypes.d.ts +16 -0
- package/dist/modifierTypes.js +9 -0
- package/dist/mood.js +220 -531
- package/dist/property.d.ts +2 -0
- package/dist/property.js +96 -242
- package/dist/propertyTypes.d.ts +9 -0
- package/dist/propertyTypes.js +1 -0
- package/dist/propertyTyping.d.ts +2 -9
- package/dist/propertyTyping.js +42 -53
- package/dist/resources/2007/CandyHearts.d.ts +9 -0
- package/dist/resources/2007/CandyHearts.js +24 -0
- package/dist/resources/2008/DivineFavors.d.ts +9 -0
- package/dist/resources/2008/DivineFavors.js +27 -0
- package/dist/resources/2009/Bandersnatch.js +37 -112
- package/dist/resources/2009/LoveSongs.d.ts +9 -0
- package/dist/resources/2009/LoveSongs.js +24 -0
- package/dist/resources/2009/SpookyPutty.js +20 -46
- package/dist/resources/2010/Brickos.d.ts +9 -0
- package/dist/resources/2010/Brickos.js +21 -0
- package/dist/resources/2010/CrownOfThrones.d.ts +18 -0
- package/dist/resources/2010/CrownOfThrones.js +550 -0
- package/dist/resources/2011/Gygaxian.d.ts +9 -0
- package/dist/resources/2011/Gygaxian.js +24 -0
- package/dist/resources/2011/ObtuseAngel.js +21 -63
- package/dist/resources/2012/RainDoh.js +14 -40
- package/dist/resources/2012/Resolutions.d.ts +9 -0
- package/dist/resources/2012/Resolutions.js +28 -0
- package/dist/resources/2013/Florist.d.ts +61 -0
- package/dist/resources/2013/Florist.js +149 -0
- package/dist/resources/2013/PulledTaffy.d.ts +9 -0
- package/dist/resources/2013/PulledTaffy.js +33 -0
- package/dist/resources/2014/WinterGarden.js +15 -43
- package/dist/resources/2015/ChateauMantegna.js +52 -86
- package/dist/resources/2015/MayoClinic.d.ts +13 -0
- package/dist/resources/2015/MayoClinic.js +36 -0
- package/dist/resources/2016/SourceTerminal.d.ts +1 -0
- package/dist/resources/2016/SourceTerminal.js +114 -237
- package/dist/resources/2016/Witchess.js +33 -59
- package/dist/resources/2017/TunnelOfLove.js +62 -111
- package/dist/resources/2018/SongBoom.js +32 -68
- package/dist/resources/2019/BeachComb.d.ts +2 -0
- package/dist/resources/2019/BeachComb.js +26 -0
- package/dist/resources/2019/Snapper.d.ts +28 -0
- package/dist/resources/2019/Snapper.js +70 -0
- package/dist/resources/2020/Guzzlr.js +79 -163
- package/dist/resources/LibramSummon.d.ts +12 -0
- package/dist/resources/LibramSummon.js +66 -0
- package/dist/resources/index.d.ts +18 -11
- package/dist/resources/index.js +19 -85
- package/dist/resources/putty-likes.js +15 -30
- package/dist/ring-buffer.d.ts +24 -0
- package/dist/ring-buffer.js +135 -0
- package/dist/since.d.ts +1 -0
- package/dist/since.js +56 -112
- package/dist/template-string.js +40 -132
- package/dist/utils.d.ts +14 -0
- package/dist/utils.js +50 -114
- package/package.json +5 -3
- package/dist/libram-example-briefcase.js +0 -16073
- package/dist/libram-example-clan.js +0 -8898
- package/dist/libram-example-consult.js +0 -6179
- package/dist/libram-example-item.js +0 -3248
- package/dist/libram-example-kmail.js +0 -2065
- package/dist/libram-example-lib.js +0 -7608
- package/dist/libram-example-props.js +0 -4770
- package/dist/libram-example-resources.js +0 -12226
package/dist/Copier.js
CHANGED
|
@@ -1,48 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var Copier = function Copier(couldCopy, prepare, canCopy, copiedMonster, fightCopy) {
|
|
13
|
-
_classCallCheck(this, Copier);
|
|
14
|
-
|
|
15
|
-
_defineProperty(this, "couldCopy", void 0);
|
|
16
|
-
|
|
17
|
-
_defineProperty(this, "prepare", void 0);
|
|
18
|
-
|
|
19
|
-
_defineProperty(this, "canCopy", void 0);
|
|
20
|
-
|
|
21
|
-
_defineProperty(this, "copiedMonster", void 0);
|
|
22
|
-
|
|
23
|
-
_defineProperty(this, "fightCopy", null);
|
|
24
|
-
|
|
25
|
-
this.couldCopy = couldCopy;
|
|
26
|
-
this.prepare = prepare;
|
|
27
|
-
this.canCopy = canCopy;
|
|
28
|
-
this.copiedMonster = copiedMonster;
|
|
29
|
-
if (fightCopy) this.fightCopy = fightCopy;
|
|
30
|
-
} // static PrintScreenButton = new Copier(
|
|
31
|
-
// $item`print screen button`,
|
|
32
|
-
// null,
|
|
33
|
-
// $item`screencapped monster`,
|
|
34
|
-
// () => property.getMonster(`screencappedMonster`),
|
|
35
|
-
// () => 1,
|
|
36
|
-
// () => use($item`screencapped monster`)
|
|
37
|
-
// );
|
|
38
|
-
// static PulledGreenTaffy = new Copier(
|
|
39
|
-
// $item`pulled green taffy`,
|
|
40
|
-
// null,
|
|
41
|
-
// $item`envyfish egg`,
|
|
42
|
-
// () => property.getMonster(`screencappedMonster`),
|
|
43
|
-
// () => (property.getBoolean("_envyfishEggUsed") ? 0 : 1),
|
|
44
|
-
// () => use($item`envyfish egg`)
|
|
45
|
-
// );
|
|
46
|
-
;
|
|
47
|
-
|
|
48
|
-
exports.Copier = Copier;
|
|
1
|
+
export class Copier {
|
|
2
|
+
constructor(couldCopy, prepare, canCopy, copiedMonster, fightCopy) {
|
|
3
|
+
this.fightCopy = null;
|
|
4
|
+
this.couldCopy = couldCopy;
|
|
5
|
+
this.prepare = prepare;
|
|
6
|
+
this.canCopy = canCopy;
|
|
7
|
+
this.copiedMonster = copiedMonster;
|
|
8
|
+
if (fightCopy)
|
|
9
|
+
this.fightCopy = fightCopy;
|
|
10
|
+
}
|
|
11
|
+
}
|
package/dist/Dungeon.js
CHANGED
|
@@ -1,167 +1,87 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
var Dungeon = /*#__PURE__*/function () {
|
|
43
|
-
/**
|
|
44
|
-
* Creates dungeon object for managing clan dungeons
|
|
45
|
-
* @param name Name of the dungeon in question
|
|
46
|
-
* @param loot Distributable loot dropped by bosses in dungeon
|
|
47
|
-
* @param openAction String action used in form submission to open dungeon
|
|
48
|
-
* @param closeAction String action used in form submission to close dungeon
|
|
49
|
-
* @param openCost Meat cost of opening dungeon
|
|
50
|
-
* @param openImage Image text to search clan_basement.php for to check if dungeon is open
|
|
51
|
-
* @param closedImage Image text to search clan_basement.php for to check if dungeon is closed
|
|
52
|
-
*/
|
|
53
|
-
function Dungeon(name, loot, openAction, closeAction, openCost, openImage, closedImage) {
|
|
54
|
-
_classCallCheck(this, Dungeon);
|
|
55
|
-
|
|
56
|
-
_defineProperty(this, "name", void 0);
|
|
57
|
-
|
|
58
|
-
_defineProperty(this, "loot", void 0);
|
|
59
|
-
|
|
60
|
-
_defineProperty(this, "openAction", void 0);
|
|
61
|
-
|
|
62
|
-
_defineProperty(this, "closeAction", void 0);
|
|
63
|
-
|
|
64
|
-
_defineProperty(this, "openCost", void 0);
|
|
65
|
-
|
|
66
|
-
_defineProperty(this, "openImage", void 0);
|
|
67
|
-
|
|
68
|
-
_defineProperty(this, "closedImage", void 0);
|
|
69
|
-
|
|
70
|
-
this.name = name;
|
|
71
|
-
this.loot = loot;
|
|
72
|
-
this.openAction = openAction;
|
|
73
|
-
this.closeAction = closeAction;
|
|
74
|
-
this.openCost = openCost;
|
|
75
|
-
this.openImage = openImage;
|
|
76
|
-
this.closedImage = closedImage;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Distributes loot from given dungeon
|
|
80
|
-
* @param idOrName The player you're trying to distribute to, either as a username or a player ID. Defaults to self.
|
|
81
|
-
* @param loot The loot you're looking to distribute, specific to this dungeon
|
|
82
|
-
* @param distributeAllOfAGivenItem For items that you can get multiple of in a dungeon. When true, this will give everything of that ilk to your chosen player.
|
|
83
|
-
*/
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
_createClass(Dungeon, [{
|
|
87
|
-
key: "distribute",
|
|
88
|
-
value: function distribute() {
|
|
89
|
-
var idOrName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (0, _kolmafia.myId)();
|
|
90
|
-
var loot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.loot;
|
|
91
|
-
var distributeAllOfAGivenItem = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
92
|
-
var player = (0, _lib.getPlayerFromIdOrName)(idOrName);
|
|
93
|
-
var lootList = Array.isArray(loot) ? loot : [loot];
|
|
94
|
-
var badLoot = lootList.find(lootItem => !this.loot.includes(lootItem));
|
|
95
|
-
|
|
96
|
-
if (badLoot) {
|
|
97
|
-
throw new Error("".concat(badLoot, " is not a valid piece of dungeon loot"));
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
var pageText = (0, _kolmafia.visitUrl)("clan_basement.php");
|
|
101
|
-
|
|
102
|
-
if (!pageText.match(player.name)) {
|
|
103
|
-
throw new Error("".concat(player.name, " cannot be distributed loot from ").concat((0, _kolmafia.getClanName)()));
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
var itemNames = (0, _kolmafia.xpath)(pageText, "//tr/td[2]/b/text()");
|
|
107
|
-
var whichLoots = (0, _kolmafia.xpath)(pageText, '//form[@action="clan_basement.php"]//input[@type="hidden"][@name="whichloot"]/@value');
|
|
108
|
-
itemNames.forEach((itemName, index) => {
|
|
109
|
-
if (lootList.includes((0, _kolmafia.toItem)(itemName))) {
|
|
110
|
-
(0, _kolmafia.visitUrl)("clan_basement.php?whichloot=".concat(whichLoots[index], "&recipient=").concat(player.id));
|
|
111
|
-
if (!distributeAllOfAGivenItem) lootList.slice(lootList.indexOf((0, _kolmafia.toItem)(itemName)));
|
|
1
|
+
import { getClanName, myId, toItem, visitUrl, xpath } from "kolmafia";
|
|
2
|
+
import { Clan } from "./Clan";
|
|
3
|
+
import { getPlayerFromIdOrName } from "./lib";
|
|
4
|
+
import { $items } from "./template-string";
|
|
5
|
+
export default class Dungeon {
|
|
6
|
+
/**
|
|
7
|
+
* Creates dungeon object for managing clan dungeons
|
|
8
|
+
* @param name Name of the dungeon in question
|
|
9
|
+
* @param loot Distributable loot dropped by bosses in dungeon
|
|
10
|
+
* @param openAction String action used in form submission to open dungeon
|
|
11
|
+
* @param closeAction String action used in form submission to close dungeon
|
|
12
|
+
* @param openCost Meat cost of opening dungeon
|
|
13
|
+
* @param openImage Image text to search clan_basement.php for to check if dungeon is open
|
|
14
|
+
* @param closedImage Image text to search clan_basement.php for to check if dungeon is closed
|
|
15
|
+
*/
|
|
16
|
+
constructor(name, loot, openAction, closeAction, openCost, openImage, closedImage) {
|
|
17
|
+
this.name = name;
|
|
18
|
+
this.loot = loot;
|
|
19
|
+
this.openAction = openAction;
|
|
20
|
+
this.closeAction = closeAction;
|
|
21
|
+
this.openCost = openCost;
|
|
22
|
+
this.openImage = openImage;
|
|
23
|
+
this.closedImage = closedImage;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Distributes loot from given dungeon
|
|
27
|
+
* @param idOrName The player you're trying to distribute to, either as a username or a player ID. Defaults to self.
|
|
28
|
+
* @param loot The loot you're looking to distribute, specific to this dungeon
|
|
29
|
+
* @param distributeAllOfAGivenItem For items that you can get multiple of in a dungeon. When true, this will give everything of that ilk to your chosen player.
|
|
30
|
+
*/
|
|
31
|
+
distribute(idOrName = myId(), loot = this.loot, distributeAllOfAGivenItem = true) {
|
|
32
|
+
const player = getPlayerFromIdOrName(idOrName);
|
|
33
|
+
const lootList = Array.isArray(loot) ? loot : [loot];
|
|
34
|
+
const badLoot = lootList.find((lootItem) => !this.loot.includes(lootItem));
|
|
35
|
+
if (badLoot) {
|
|
36
|
+
throw new Error(`${badLoot} is not a valid piece of dungeon loot`);
|
|
37
|
+
}
|
|
38
|
+
const pageText = visitUrl("clan_basement.php");
|
|
39
|
+
if (!pageText.match(player.name)) {
|
|
40
|
+
throw new Error(`${player.name} cannot be distributed loot from ${getClanName()}`);
|
|
112
41
|
}
|
|
113
|
-
|
|
42
|
+
const itemNames = xpath(pageText, "//tr/td[2]/b/text()");
|
|
43
|
+
const whichLoots = xpath(pageText, '//form[@action="clan_basement.php"]//input[@type="hidden"][@name="whichloot"]/@value');
|
|
44
|
+
itemNames.forEach((itemName, index) => {
|
|
45
|
+
if (lootList.includes(toItem(itemName))) {
|
|
46
|
+
visitUrl(`clan_basement.php?whichloot=${whichLoots[index]}&recipient=${player.id}`);
|
|
47
|
+
if (!distributeAllOfAGivenItem)
|
|
48
|
+
lootList.slice(lootList.indexOf(toItem(itemName)));
|
|
49
|
+
}
|
|
50
|
+
});
|
|
114
51
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
var pageText = (0, _kolmafia.visitUrl)("clan_basement.php");
|
|
120
|
-
return pageText.includes(this.closedImage);
|
|
52
|
+
close() {
|
|
53
|
+
visitUrl(`clan_basement.php?action=${this.closeAction}&confirm=true`, true);
|
|
54
|
+
const pageText = visitUrl("clan_basement.php");
|
|
55
|
+
return pageText.includes(this.closedImage);
|
|
121
56
|
}
|
|
122
57
|
/**
|
|
123
58
|
* Opens clan dungeon and, if relevant, pays meat to do so
|
|
124
59
|
* @param paymentPolicy "None", "All", or "Difference". Difference pays into the stash the exact amount needed to open the dungeon.
|
|
125
60
|
*/
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
if (payDifference > 0) {
|
|
143
|
-
if (paymentPolicy === "None") return false;
|
|
144
|
-
clan.putMeatInCoffer(payDifference);
|
|
61
|
+
open(paymentPolicy = "Difference") {
|
|
62
|
+
const pageText = visitUrl("clan_basement.php");
|
|
63
|
+
if (pageText.includes(this.openImage))
|
|
64
|
+
return true;
|
|
65
|
+
const clan = Clan.get();
|
|
66
|
+
if (paymentPolicy === "All") {
|
|
67
|
+
clan.putMeatInCoffer(this.openCost);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
const stashMeat = clan.getMeatInCoffer();
|
|
71
|
+
const payDifference = this.openCost - stashMeat;
|
|
72
|
+
if (payDifference > 0) {
|
|
73
|
+
if (paymentPolicy === "None")
|
|
74
|
+
return false;
|
|
75
|
+
clan.putMeatInCoffer(payDifference);
|
|
76
|
+
}
|
|
145
77
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
(0, _kolmafia.visitUrl)("clan_basement.php?action=".concat(this.openAction), true);
|
|
149
|
-
return (0, _kolmafia.visitUrl)("clan_basement.php").includes(this.openImage);
|
|
78
|
+
visitUrl(`clan_basement.php?action=${this.openAction}`, true);
|
|
79
|
+
return visitUrl("clan_basement.php").includes(this.openImage);
|
|
150
80
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
value: function all() {
|
|
154
|
-
return [Hobopolis, SlimeTube, Dreadsylvania];
|
|
81
|
+
static all() {
|
|
82
|
+
return [Hobopolis, SlimeTube, Dreadsylvania];
|
|
155
83
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
exports.default = Dungeon;
|
|
162
|
-
var Hobopolis = new Dungeon("Hobopolis", (0, _templateString.$items)(_templateObject || (_templateObject = _taggedTemplateLiteral(["Ol' Scratch's ash can, Ol' Scratch's ol' britches, Ol' Scratch's stovepipe hat, Ol' Scratch's infernal pitchfork, Ol' Scratch's manacles, Ol' Scratch's stove door, Frosty's carrot, Frosty's nailbat, Frosty's old silk hat, Frosty's arm, Frosty's iceball, Frosty's snowball sack, Oscus's dumpster waders, Oscus's pelt, Wand of Oscus, Oscus's flypaper pants, Oscus's garbage can lid, Oscus's neverending soda, Zombo's grievous greaves, Zombo's shield, Zombo's skullcap, Zombo's empty eye, Zombo's shoulder blade, Zombo's skull ring, Chester's bag of candy, Chester's cutoffs, Chester's moustache, Chester's Aquarius medallion, Chester's muscle shirt, Chester's sunglasses, Hodgman's bow tie, Hodgman's porkpie hat, Hodgman's lobsterskin pants, Hodgman's almanac, Hodgman's lucky sock, Hodgman's metal detector, Hodgman's varcolac paw, Hodgman's harmonica, Hodgman's garbage sticker, Hodgman's cane, Hodgman's whackin' stick, Hodgman's disgusting technicolor overcoat, Hodgman's imaginary hamster"]))), "cleansewer", "floodsewer", 1000000, "opengrate.gif", "sewergrate.gif");
|
|
163
|
-
exports.Hobopolis = Hobopolis;
|
|
164
|
-
var SlimeTube = new Dungeon("The Slime Tube", (0, _templateString.$items)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["slime-soaked brain, slime-soaked hypophysis, slime-soaked sweat gland, squirming Slime larva, caustic slime nodule, caustic slime nodule, hardened slime belt, hardened slime hat, hardened slime pants"]))), "cleanspot", "sealtube", 250000, "slimehole.gif", "greasespot.gif");
|
|
165
|
-
exports.SlimeTube = SlimeTube;
|
|
166
|
-
var Dreadsylvania = new Dungeon("Dreadsylvania", (0, _templateString.$items)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["Great Wolf's headband, Great Wolf's right paw, Great Wolf's left paw, Great Wolf's lice, Great Wolf's rocket launcher, Great Wolf's beastly trousers, Drapes-You-Regally, Warms-Your-Tush, Covers-Your-Head, Protects-Your-Junk, Quiets-Your-Steps, Helps-You-Sleep, Mayor Ghost's khakis, Mayor Ghost's cloak, Mayor Ghost's toupee, Mayor Ghost's scissors, Mayor Ghost's sash, Mayor Ghost's gavel, zombie mariachi hat, zombie accordion, zombie mariachi pants, HOA regulation book, HOA zombie eyes, HOA citation pad, Unkillable Skeleton's skullcap, Unkillable Skeleton's shinguards, Unkillable Skeleton's breastplate, Unkillable Skeleton's shield, Unkillable Skeleton's sawsword, Unkillable Skeleton's restless leg, skull capacitor, Thunkula's drinking cap, Drunkula's silky pants, Drunkula's cape, Drunkula's ring of haze, Drunkula's wineglass, Drunkula's bell, bottle of Bloodweiser, bottle of Bloodweiser, bottle of Bloodweiser, bottle of Bloodweiser, electric Kool-Aid, electric Kool-Aid, electric Kool-Aid, electric Kool-Aid, ghost pepper, ghost pepper, ghost pepper, ghost pepper, Gets-You-Drunk, Gets-You-Drunk, Gets-You-Drunk, Gets-You-Drunk, wriggling severed nose, wriggling severed nose, wriggling severed nose, wriggling severed nose, Hunger\u2122 Sauce, Hunger\u2122 Sauce, Hunger\u2122 Sauce, Hunger\u2122 Sauce"]))), "translatemap", "foldmap", 1000000, "dvmap.gif", "foldmap.gif");
|
|
167
|
-
exports.Dreadsylvania = Dreadsylvania;
|
|
84
|
+
}
|
|
85
|
+
export const Hobopolis = new Dungeon("Hobopolis", $items `Ol' Scratch's ash can, Ol' Scratch's ol' britches, Ol' Scratch's stovepipe hat, Ol' Scratch's infernal pitchfork, Ol' Scratch's manacles, Ol' Scratch's stove door, Frosty's carrot, Frosty's nailbat, Frosty's old silk hat, Frosty's arm, Frosty's iceball, Frosty's snowball sack, Oscus's dumpster waders, Oscus's pelt, Wand of Oscus, Oscus's flypaper pants, Oscus's garbage can lid, Oscus's neverending soda, Zombo's grievous greaves, Zombo's shield, Zombo's skullcap, Zombo's empty eye, Zombo's shoulder blade, Zombo's skull ring, Chester's bag of candy, Chester's cutoffs, Chester's moustache, Chester's Aquarius medallion, Chester's muscle shirt, Chester's sunglasses, Hodgman's bow tie, Hodgman's porkpie hat, Hodgman's lobsterskin pants, Hodgman's almanac, Hodgman's lucky sock, Hodgman's metal detector, Hodgman's varcolac paw, Hodgman's harmonica, Hodgman's garbage sticker, Hodgman's cane, Hodgman's whackin' stick, Hodgman's disgusting technicolor overcoat, Hodgman's imaginary hamster`, "cleansewer", "floodsewer", 1000000, "opengrate.gif", "sewergrate.gif");
|
|
86
|
+
export const SlimeTube = new Dungeon("The Slime Tube", $items `slime-soaked brain, slime-soaked hypophysis, slime-soaked sweat gland, squirming Slime larva, caustic slime nodule, caustic slime nodule, hardened slime belt, hardened slime hat, hardened slime pants`, "cleanspot", "sealtube", 250000, "slimehole.gif", "greasespot.gif");
|
|
87
|
+
export const Dreadsylvania = new Dungeon("Dreadsylvania", $items `Great Wolf's headband, Great Wolf's right paw, Great Wolf's left paw, Great Wolf's lice, Great Wolf's rocket launcher, Great Wolf's beastly trousers, Drapes-You-Regally, Warms-Your-Tush, Covers-Your-Head, Protects-Your-Junk, Quiets-Your-Steps, Helps-You-Sleep, Mayor Ghost's khakis, Mayor Ghost's cloak, Mayor Ghost's toupee, Mayor Ghost's scissors, Mayor Ghost's sash, Mayor Ghost's gavel, zombie mariachi hat, zombie accordion, zombie mariachi pants, HOA regulation book, HOA zombie eyes, HOA citation pad, Unkillable Skeleton's skullcap, Unkillable Skeleton's shinguards, Unkillable Skeleton's breastplate, Unkillable Skeleton's shield, Unkillable Skeleton's sawsword, Unkillable Skeleton's restless leg, skull capacitor, Thunkula's drinking cap, Drunkula's silky pants, Drunkula's cape, Drunkula's ring of haze, Drunkula's wineglass, Drunkula's bell, bottle of Bloodweiser, bottle of Bloodweiser, bottle of Bloodweiser, bottle of Bloodweiser, electric Kool-Aid, electric Kool-Aid, electric Kool-Aid, electric Kool-Aid, ghost pepper, ghost pepper, ghost pepper, ghost pepper, Gets-You-Drunk, Gets-You-Drunk, Gets-You-Drunk, Gets-You-Drunk, wriggling severed nose, wriggling severed nose, wriggling severed nose, wriggling severed nose, Hunger™ Sauce, Hunger™ Sauce, Hunger™ Sauce, Hunger™ Sauce`, "translatemap", "foldmap", 1000000, "dvmap.gif", "foldmap.gif");
|
package/dist/Kmail.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "core-js/modules/es.object.entries";
|
|
1
2
|
declare type RawKmail = {
|
|
2
3
|
id: string;
|
|
3
4
|
type: string;
|
|
@@ -8,12 +9,12 @@ declare type RawKmail = {
|
|
|
8
9
|
localtime: string;
|
|
9
10
|
};
|
|
10
11
|
export default class Kmail {
|
|
11
|
-
id: number;
|
|
12
|
-
date: Date;
|
|
13
|
-
type: "normal";
|
|
14
|
-
senderId: number;
|
|
15
|
-
senderName: string;
|
|
16
|
-
|
|
12
|
+
readonly id: number;
|
|
13
|
+
readonly date: Date;
|
|
14
|
+
readonly type: "normal";
|
|
15
|
+
readonly senderId: number;
|
|
16
|
+
readonly senderName: string;
|
|
17
|
+
readonly rawMessage: string;
|
|
17
18
|
/**
|
|
18
19
|
* Parses a kmail from KoL's native format
|
|
19
20
|
*
|
|
@@ -24,9 +25,10 @@ export default class Kmail {
|
|
|
24
25
|
/**
|
|
25
26
|
* Returns all of the player's kmails
|
|
26
27
|
*
|
|
28
|
+
* @param count Number of kmails to fetch
|
|
27
29
|
* @returns Parsed kmails
|
|
28
30
|
*/
|
|
29
|
-
static inbox(): Kmail[];
|
|
31
|
+
static inbox(count?: number): Kmail[];
|
|
30
32
|
/**
|
|
31
33
|
* Bulk delete kmails
|
|
32
34
|
*
|
|
@@ -70,6 +72,10 @@ export default class Kmail {
|
|
|
70
72
|
* @returns Whether the kmail was deleted
|
|
71
73
|
*/
|
|
72
74
|
delete(): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Message contents without any HTML from items or meat
|
|
77
|
+
*/
|
|
78
|
+
get message(): string;
|
|
73
79
|
/**
|
|
74
80
|
* Get items attached to the kmail
|
|
75
81
|
*
|