libram 0.7.10 → 0.7.13
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.d.ts +34 -6
- package/dist/Clan.js +33 -6
- package/dist/Copier.d.ts +5 -5
- package/dist/Dungeon.d.ts +45 -0
- package/dist/Dungeon.js +115 -0
- package/dist/Kmail.d.ts +8 -5
- package/dist/Kmail.js +8 -5
- package/dist/actions/ActionSource.d.ts +5 -0
- package/dist/actions/ActionSource.js +20 -1
- package/dist/actions/FreeKill.d.ts +2 -0
- package/dist/actions/FreeKill.js +2 -0
- package/dist/actions/FreeRun.d.ts +2 -0
- package/dist/actions/FreeRun.js +2 -0
- package/dist/ascend.d.ts +20 -4
- package/dist/ascend.js +38 -10
- package/dist/challengePaths/2015/CommunityService.d.ts +7 -0
- package/dist/challengePaths/2015/CommunityService.js +17 -5
- package/dist/combat.d.ts +63 -2
- package/dist/combat.js +99 -5
- package/dist/counter.d.ts +3 -0
- package/dist/counter.js +3 -0
- package/dist/diet/index.d.ts +2 -0
- package/dist/diet/index.js +27 -8
- package/dist/diet/knapsack.d.ts +1 -0
- package/dist/diet/knapsack.js +11 -3
- package/dist/index.d.ts +2 -4
- package/dist/index.js +1 -3
- package/dist/lib.d.ts +101 -34
- package/dist/lib.js +133 -42
- package/dist/logger.d.ts +24 -11
- package/dist/logger.js +38 -12
- package/dist/maximize.d.ts +25 -0
- package/dist/maximize.js +31 -4
- package/dist/modifier.d.ts +1 -1
- package/dist/modifier.js +9 -1
- package/dist/mood.d.ts +15 -1
- package/dist/mood.js +15 -1
- package/dist/property.d.ts +52 -17
- package/dist/property.js +64 -7
- package/dist/propertyTypes.d.ts +6 -6
- package/dist/propertyTypes.js +6 -6
- package/dist/propertyTyping.d.ts +54 -0
- package/dist/propertyTyping.js +54 -0
- package/dist/resources/2008/Stickers.d.ts +28 -0
- package/dist/resources/2008/Stickers.js +28 -0
- package/dist/resources/2009/Bandersnatch.d.ts +17 -7
- package/dist/resources/2009/Bandersnatch.js +17 -7
- package/dist/resources/2009/SpookyPutty.d.ts +25 -0
- package/dist/resources/2009/SpookyPutty.js +25 -0
- package/dist/resources/2010/CrownOfThrones.d.ts +23 -0
- package/dist/resources/2010/CrownOfThrones.js +31 -15
- package/dist/resources/2010/LookingGlass.d.ts +4 -0
- package/dist/resources/2010/LookingGlass.js +5 -0
- package/dist/resources/2011/ObtuseAngel.d.ts +8 -6
- package/dist/resources/2011/ObtuseAngel.js +8 -6
- package/dist/resources/2011/StompingBoots.d.ts +9 -15
- package/dist/resources/2011/StompingBoots.js +9 -15
- package/dist/resources/2012/RainDoh.d.ts +20 -0
- package/dist/resources/2012/RainDoh.js +20 -0
- package/dist/resources/2012/ReagnimatedGnome.d.ts +18 -0
- package/dist/resources/2012/ReagnimatedGnome.js +18 -0
- package/dist/resources/2012/Resolutions.d.ts +2 -2
- package/dist/resources/2012/Resolutions.js +2 -2
- package/dist/resources/2013/Florist.d.ts +15 -0
- package/dist/resources/2013/Florist.js +21 -0
- package/dist/resources/2014/CrimboShrub.d.ts +12 -0
- package/dist/resources/2014/CrimboShrub.js +22 -1
- package/dist/resources/2014/DNALab.d.ts +10 -2
- package/dist/resources/2014/DNALab.js +10 -2
- package/dist/resources/2014/WinterGarden.d.ts +15 -0
- package/dist/resources/2014/WinterGarden.js +15 -0
- package/dist/resources/2015/BarrelShrine.d.ts +6 -0
- package/dist/resources/2015/BarrelShrine.js +6 -0
- package/dist/resources/2015/ChateauMantegna.d.ts +35 -0
- package/dist/resources/2015/ChateauMantegna.js +35 -0
- package/dist/resources/2015/DeckOfEveryCard.d.ts +30 -0
- package/dist/resources/2015/DeckOfEveryCard.js +122 -0
- package/dist/resources/2015/Dinseylandfill.d.ts +1 -0
- package/dist/resources/2015/Dinseylandfill.js +2 -0
- package/dist/resources/2015/MayoClinic.d.ts +8 -1
- package/dist/resources/2015/MayoClinic.js +8 -1
- package/dist/resources/2016/SourceTerminal.d.ts +42 -21
- package/dist/resources/2016/SourceTerminal.js +44 -23
- package/dist/resources/2016/Witchess.d.ts +12 -0
- package/dist/resources/2016/Witchess.js +12 -0
- package/dist/resources/2017/AsdonMartin.d.ts +11 -3
- package/dist/resources/2017/AsdonMartin.js +44 -7
- package/dist/resources/2017/MummingTrunk.d.ts +1 -0
- package/dist/resources/2017/MummingTrunk.js +8 -1
- package/dist/resources/2017/Pantogram.d.ts +9 -0
- package/dist/resources/2017/Pantogram.js +33 -0
- package/dist/resources/2017/Robortender.d.ts +1 -0
- package/dist/resources/2017/Robortender.js +1 -0
- package/dist/resources/2017/Spacegate.js +1 -0
- package/dist/resources/2017/TunnelOfLove.d.ts +19 -0
- package/dist/resources/2017/TunnelOfLove.js +37 -0
- package/dist/resources/2018/LatteLoversMembersMug.d.ts +9 -0
- package/dist/resources/2018/LatteLoversMembersMug.js +9 -0
- package/dist/resources/2018/SongBoom.d.ts +9 -4
- package/dist/resources/2018/SongBoom.js +9 -4
- package/dist/resources/2019/BeachComb.d.ts +38 -1
- package/dist/resources/2019/BeachComb.js +39 -2
- package/dist/resources/2019/Snapper.d.ts +4 -0
- package/dist/resources/2019/Snapper.js +4 -0
- package/dist/resources/2020/Cartography.d.ts +13 -0
- package/dist/resources/2020/Cartography.js +13 -0
- package/dist/resources/2020/Guzzlr.d.ts +89 -23
- package/dist/resources/2020/Guzzlr.js +103 -34
- package/dist/resources/2020/RetroCape.d.ts +4 -0
- package/dist/resources/2020/RetroCape.js +4 -0
- package/dist/resources/2021/CrystalBall.d.ts +6 -0
- package/dist/resources/2021/CrystalBall.js +13 -1
- package/dist/resources/2021/DaylightShavings.d.ts +6 -0
- package/dist/resources/2021/DaylightShavings.js +6 -0
- package/dist/resources/2022/AutumnAton.d.ts +15 -0
- package/dist/resources/2022/AutumnAton.js +21 -0
- package/dist/resources/2022/CombatLoversLocket.d.ts +9 -0
- package/dist/resources/2022/CombatLoversLocket.js +10 -2
- package/dist/resources/2022/GreyGoose.d.ts +46 -0
- package/dist/resources/2022/GreyGoose.js +47 -1
- package/dist/resources/2022/JuneCleaver.d.ts +20 -0
- package/dist/resources/2022/JuneCleaver.js +20 -0
- package/dist/resources/2022/TrainSet.d.ts +48 -0
- package/dist/resources/2022/TrainSet.js +54 -0
- package/dist/resources/2023/ClosedCircuitPayphone.d.ts +75 -0
- package/dist/resources/2023/ClosedCircuitPayphone.js +117 -0
- package/dist/resources/LibramSummon.d.ts +5 -0
- package/dist/resources/LibramSummon.js +10 -3
- package/dist/resources/index.d.ts +3 -1
- package/dist/resources/index.js +3 -1
- package/dist/resources/putty-likes.d.ts +15 -0
- package/dist/resources/putty-likes.js +15 -0
- package/dist/session.d.ts +12 -0
- package/dist/session.js +20 -17
- package/dist/since.d.ts +3 -2
- package/dist/since.js +4 -2
- package/dist/utils.d.ts +96 -5
- package/dist/utils.js +106 -11
- package/package.json +10 -11
- package/dist/dungeons/Dreadsylvania.d.ts +0 -5
- package/dist/dungeons/Dreadsylvania.js +0 -14
- package/dist/dungeons/Dungeon.d.ts +0 -29
- package/dist/dungeons/Dungeon.js +0 -99
- package/dist/dungeons/Hobopolis.d.ts +0 -5
- package/dist/dungeons/Hobopolis.js +0 -14
- package/dist/dungeons/SlimeTube.d.ts +0 -5
- package/dist/dungeons/SlimeTube.js +0 -14
|
@@ -4,50 +4,42 @@ import { get } from "../../property";
|
|
|
4
4
|
import { $familiar } from "../../template-string";
|
|
5
5
|
export const familiar = $familiar `Pair of Stomping Boots`;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
* terrarium
|
|
7
|
+
* @returns whether the player has the Pair of Stomping Boots in their terrarium
|
|
9
8
|
*/
|
|
10
9
|
export function have() {
|
|
11
10
|
return _have(familiar);
|
|
12
11
|
}
|
|
13
12
|
/**
|
|
14
|
-
*
|
|
13
|
+
* @returns number of free runaways that have already been used today
|
|
15
14
|
* @see Bandersnatch with which the Stomping Boots shares a counter
|
|
16
15
|
*/
|
|
17
16
|
export function getRunaways() {
|
|
18
17
|
return get("_banderRunaways");
|
|
19
18
|
}
|
|
20
19
|
/**
|
|
21
|
-
* Returns the total number of free runaways that the player can
|
|
22
|
-
* get from their Stomping Boots
|
|
23
|
-
*
|
|
24
20
|
* @param considerWeightAdjustment Include familiar weight modifiers
|
|
21
|
+
* @returns total number of free runaways that the player can get from their Stomping Boots
|
|
25
22
|
*/
|
|
26
23
|
export function getMaxRunaways(considerWeightAdjustment = true) {
|
|
27
24
|
const weightBuffs = considerWeightAdjustment ? weightAdjustment() : 0;
|
|
28
25
|
return Math.floor((familiarWeight(familiar) + weightBuffs) / 5);
|
|
29
26
|
}
|
|
30
27
|
/**
|
|
31
|
-
*
|
|
32
|
-
* get from their Stomping Boots
|
|
33
|
-
*
|
|
34
|
-
* @param considerWeightAdjustment
|
|
28
|
+
* @param considerWeightAdjustment Whether to consider weight adjustment in free run calculation
|
|
29
|
+
* @returns the number of remaining free runaways the player can get from their Stomping Boots
|
|
35
30
|
*/
|
|
36
31
|
export function getRemainingRunaways(considerWeightAdjustment = true) {
|
|
37
32
|
return Math.max(0, getMaxRunaways(considerWeightAdjustment) - getRunaways());
|
|
38
33
|
}
|
|
39
34
|
/**
|
|
40
|
-
* Returns true if the player could use their Stomping Boots to
|
|
41
|
-
* get a free run in theory
|
|
42
|
-
*
|
|
43
35
|
* @param considerWeightAdjustment Include familiar weight modifiers
|
|
36
|
+
* @returns whether the player could use their Stomping Boots to get a free run in theory
|
|
44
37
|
*/
|
|
45
38
|
export function couldRunaway(considerWeightAdjustment = true) {
|
|
46
39
|
return have() && getRemainingRunaways(considerWeightAdjustment) > 0;
|
|
47
40
|
}
|
|
48
41
|
/**
|
|
49
|
-
*
|
|
50
|
-
* free run right now
|
|
42
|
+
* @returns whether the player can use their Stomping Boots to get a free run right now
|
|
51
43
|
*/
|
|
52
44
|
export function canRunaway() {
|
|
53
45
|
return isCurrentFamiliar(familiar) && couldRunaway();
|
|
@@ -57,6 +49,8 @@ export function canRunaway() {
|
|
|
57
49
|
*
|
|
58
50
|
* This will take your Stomping Boots with you.
|
|
59
51
|
* If any of those steps fail, it will return false.
|
|
52
|
+
*
|
|
53
|
+
* @returns Success
|
|
60
54
|
*/
|
|
61
55
|
export function prepareRunaway() {
|
|
62
56
|
return useFamiliar(familiar);
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
import { Monster } from "kolmafia";
|
|
2
2
|
export declare const box: import("kolmafia").Item;
|
|
3
|
+
/**
|
|
4
|
+
* See whether the player has a Rain-Doh item in some form
|
|
5
|
+
*
|
|
6
|
+
* @returns Whether the player has any Rain-Doh item
|
|
7
|
+
*/
|
|
3
8
|
export declare function have(): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Get Rain-Doh black box copies made today
|
|
11
|
+
*
|
|
12
|
+
* @returns Number of Rain-Doh black box copies made
|
|
13
|
+
*/
|
|
4
14
|
export declare function getRainDohBlackBoxCopiesMade(): number;
|
|
15
|
+
/**
|
|
16
|
+
* Get the current Rain-doh box monster
|
|
17
|
+
*
|
|
18
|
+
* @returns Current Rain-doh box monster
|
|
19
|
+
*/
|
|
5
20
|
export declare function getRainDohBlackBoxMonster(): Monster | null;
|
|
21
|
+
/**
|
|
22
|
+
* Use the Rain-Doh box full of monster (i.e. fight the monster probably)
|
|
23
|
+
*
|
|
24
|
+
* @returns Success
|
|
25
|
+
*/
|
|
6
26
|
export declare function useRainDohBlackBox(): boolean;
|
|
@@ -3,15 +3,35 @@ import { getFoldGroup, have as haveItem } from "../../lib";
|
|
|
3
3
|
import { get } from "../../property";
|
|
4
4
|
import { $item } from "../../template-string";
|
|
5
5
|
export const box = $item `Rain-Doh black box`;
|
|
6
|
+
/**
|
|
7
|
+
* See whether the player has a Rain-Doh item in some form
|
|
8
|
+
*
|
|
9
|
+
* @returns Whether the player has any Rain-Doh item
|
|
10
|
+
*/
|
|
6
11
|
export function have() {
|
|
7
12
|
return getFoldGroup(box).some((item) => haveItem(item));
|
|
8
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Get Rain-Doh black box copies made today
|
|
16
|
+
*
|
|
17
|
+
* @returns Number of Rain-Doh black box copies made
|
|
18
|
+
*/
|
|
9
19
|
export function getRainDohBlackBoxCopiesMade() {
|
|
10
20
|
return Math.max(0, get("_raindohCopiesMade"));
|
|
11
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Get the current Rain-doh box monster
|
|
24
|
+
*
|
|
25
|
+
* @returns Current Rain-doh box monster
|
|
26
|
+
*/
|
|
12
27
|
export function getRainDohBlackBoxMonster() {
|
|
13
28
|
return get("rainDohMonster");
|
|
14
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Use the Rain-Doh box full of monster (i.e. fight the monster probably)
|
|
32
|
+
*
|
|
33
|
+
* @returns Success
|
|
34
|
+
*/
|
|
15
35
|
export function useRainDohBlackBox() {
|
|
16
36
|
return use(box);
|
|
17
37
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Item } from "kolmafia";
|
|
2
|
+
/**
|
|
3
|
+
* @returns Whether the player has a Reagnimated Gnome in their terrarium
|
|
4
|
+
*/
|
|
2
5
|
export declare function have(): boolean;
|
|
3
6
|
export declare const bodyParts: {
|
|
4
7
|
readonly ears: Item;
|
|
@@ -8,6 +11,21 @@ export declare const bodyParts: {
|
|
|
8
11
|
readonly foot: Item;
|
|
9
12
|
};
|
|
10
13
|
export declare type BodyPart = keyof typeof bodyParts;
|
|
14
|
+
/**
|
|
15
|
+
* @returns Reagnimated Gnome parts that have already been retrieved from the arena
|
|
16
|
+
*/
|
|
11
17
|
export declare function chosenParts(): Item[];
|
|
18
|
+
/**
|
|
19
|
+
* Fetch Reagnimated Gnome part from the arena
|
|
20
|
+
*
|
|
21
|
+
* @param part Reagnimated Gnome body part
|
|
22
|
+
* @returns Success
|
|
23
|
+
*/
|
|
12
24
|
export declare function choosePart(part: BodyPart): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Calculate expected adventures from a given combat for a Reagnimated Gnome at a given weight
|
|
27
|
+
*
|
|
28
|
+
* @param weight Weight with which to calculuate
|
|
29
|
+
* @returns Expected adventures
|
|
30
|
+
*/
|
|
13
31
|
export declare function expectedAdvsPerCombat(weight: number): number;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { runChoice, visitUrl } from "kolmafia";
|
|
2
2
|
import { have as _have } from "../../lib";
|
|
3
3
|
import { $familiar, $item } from "../../template-string";
|
|
4
|
+
/**
|
|
5
|
+
* @returns Whether the player has a Reagnimated Gnome in their terrarium
|
|
6
|
+
*/
|
|
4
7
|
export function have() {
|
|
5
8
|
return _have($familiar `Reagnimated Gnome`);
|
|
6
9
|
}
|
|
@@ -11,9 +14,18 @@ export const bodyParts = {
|
|
|
11
14
|
kgnee: $item `gnomish housemaid's kgnee`,
|
|
12
15
|
foot: $item `gnomish athlete's foot`,
|
|
13
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* @returns Reagnimated Gnome parts that have already been retrieved from the arena
|
|
19
|
+
*/
|
|
14
20
|
export function chosenParts() {
|
|
15
21
|
return Object.values(bodyParts).filter((part) => _have(part));
|
|
16
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Fetch Reagnimated Gnome part from the arena
|
|
25
|
+
*
|
|
26
|
+
* @param part Reagnimated Gnome body part
|
|
27
|
+
* @returns Success
|
|
28
|
+
*/
|
|
17
29
|
export function choosePart(part) {
|
|
18
30
|
if (!have())
|
|
19
31
|
return false;
|
|
@@ -23,6 +35,12 @@ export function choosePart(part) {
|
|
|
23
35
|
runChoice(4);
|
|
24
36
|
return chosenParts().includes(bodyParts[part]);
|
|
25
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Calculate expected adventures from a given combat for a Reagnimated Gnome at a given weight
|
|
40
|
+
*
|
|
41
|
+
* @param weight Weight with which to calculuate
|
|
42
|
+
* @returns Expected adventures
|
|
43
|
+
*/
|
|
26
44
|
export function expectedAdvsPerCombat(weight) {
|
|
27
45
|
return Math.min(0.01 + (weight / 1000) * 0.99, 1);
|
|
28
46
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Item } from "kolmafia";
|
|
2
2
|
export declare const summonSkill: import("kolmafia").Skill;
|
|
3
3
|
/**
|
|
4
|
-
* @returns
|
|
4
|
+
* @returns Whether the player can Summon Resolutions
|
|
5
5
|
*/
|
|
6
6
|
export declare function have(): boolean;
|
|
7
7
|
/**
|
|
8
|
-
* @returns
|
|
8
|
+
* @returns Map containing the chance of an item to be summoned
|
|
9
9
|
*/
|
|
10
10
|
export declare function expected(): Map<Item, number>;
|
|
@@ -15,13 +15,13 @@ const libramExpected = new Map([
|
|
|
15
15
|
[$item `resolution: be more adventurous`, rareChance],
|
|
16
16
|
]);
|
|
17
17
|
/**
|
|
18
|
-
* @returns
|
|
18
|
+
* @returns Whether the player can Summon Resolutions
|
|
19
19
|
*/
|
|
20
20
|
export function have() {
|
|
21
21
|
return _have(summonSkill);
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* @returns
|
|
24
|
+
* @returns Map containing the chance of an item to be summoned
|
|
25
25
|
*/
|
|
26
26
|
export function expected() {
|
|
27
27
|
return libramExpected;
|
|
@@ -18,9 +18,24 @@ declare class Flower {
|
|
|
18
18
|
dig(): boolean;
|
|
19
19
|
plant(): boolean;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* @returns Whether or not the Florist is currently available
|
|
23
|
+
*/
|
|
21
24
|
export declare function have(): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @param location The location to check
|
|
27
|
+
* @returns an array of the Flowers in that location
|
|
28
|
+
*/
|
|
22
29
|
export declare function flowersIn(location: Location): Flower[];
|
|
30
|
+
/**
|
|
31
|
+
* @param location The location to check
|
|
32
|
+
* @returns an array of the Flowers we can plant in that location
|
|
33
|
+
*/
|
|
23
34
|
export declare function flowersAvailableFor(location?: Location): Flower[];
|
|
35
|
+
/**
|
|
36
|
+
* @param location The location to check
|
|
37
|
+
* @returns `true` if the location has 3 flowers in it; `false` otherwise
|
|
38
|
+
*/
|
|
24
39
|
export declare function isFull(location?: Location): boolean;
|
|
25
40
|
export declare const RabidDogwood: Flower;
|
|
26
41
|
export declare const Rutabeggar: Flower;
|
|
@@ -64,12 +64,25 @@ class Flower {
|
|
|
64
64
|
return this.isPlantedHere();
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* @returns Whether or not the Florist is currently available
|
|
69
|
+
*/
|
|
67
70
|
export function have() {
|
|
68
71
|
return floristAvailable();
|
|
69
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Internal function used to convert strings to Flower instances
|
|
75
|
+
*
|
|
76
|
+
* @param name The flower name
|
|
77
|
+
* @returns a Flower instance
|
|
78
|
+
*/
|
|
70
79
|
function toFlower(name) {
|
|
71
80
|
return all.find((flower) => name === flower.name);
|
|
72
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* @param location The location to check
|
|
84
|
+
* @returns an array of the Flowers in that location
|
|
85
|
+
*/
|
|
73
86
|
export function flowersIn(location) {
|
|
74
87
|
const returnValue = [];
|
|
75
88
|
Flower.plantNamesInZone(location)
|
|
@@ -80,9 +93,17 @@ export function flowersIn(location) {
|
|
|
80
93
|
});
|
|
81
94
|
return returnValue;
|
|
82
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* @param location The location to check
|
|
98
|
+
* @returns an array of the Flowers we can plant in that location
|
|
99
|
+
*/
|
|
83
100
|
export function flowersAvailableFor(location = myLocation()) {
|
|
84
101
|
return all.filter((flower) => flower.available(location));
|
|
85
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* @param location The location to check
|
|
105
|
+
* @returns `true` if the location has 3 flowers in it; `false` otherwise
|
|
106
|
+
*/
|
|
86
107
|
export function isFull(location = myLocation()) {
|
|
87
108
|
return flowersIn(location).length === 3;
|
|
88
109
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @returns Whether we `have` the Crimbo Shrub in our terrarium
|
|
3
|
+
*/
|
|
1
4
|
export declare function have(): boolean;
|
|
2
5
|
declare const Toppers: {
|
|
3
6
|
readonly Muscle: 1;
|
|
@@ -26,5 +29,14 @@ declare const Gifts: {
|
|
|
26
29
|
readonly Gifts: 3;
|
|
27
30
|
};
|
|
28
31
|
declare type ShrubGifts = keyof typeof Gifts;
|
|
32
|
+
/**
|
|
33
|
+
* Decorates our Crimbo Shrub with the chosen decour, if able
|
|
34
|
+
*
|
|
35
|
+
* @param topper The shrub Topper to select
|
|
36
|
+
* @param lights The shrub Lights to select
|
|
37
|
+
* @param garland The shrub Garland to select
|
|
38
|
+
* @param gifts The shrub Gifts to select
|
|
39
|
+
* @returns Whether the shrub's decour perfectly matches the given decour
|
|
40
|
+
*/
|
|
29
41
|
export declare function decorate(topper: ShrubTopper, lights: ShrubLights, garland: ShrubGarland, gifts: ShrubGifts): boolean;
|
|
30
42
|
export {};
|
|
@@ -2,6 +2,9 @@ import { toInt, useFamiliar, visitUrl } from "kolmafia";
|
|
|
2
2
|
import { have as have_ } from "../../lib";
|
|
3
3
|
import { get } from "../../property";
|
|
4
4
|
import { $familiar, $item } from "../../template-string";
|
|
5
|
+
/**
|
|
6
|
+
* @returns Whether we `have` the Crimbo Shrub in our terrarium
|
|
7
|
+
*/
|
|
5
8
|
export function have() {
|
|
6
9
|
return have_($familiar `Crimbo Shrub`);
|
|
7
10
|
}
|
|
@@ -45,6 +48,15 @@ const Prefs = {
|
|
|
45
48
|
meat: "Red Ray",
|
|
46
49
|
gifts: "Gifts",
|
|
47
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* Internal function used to check whether decour perfectly matches what we want
|
|
53
|
+
*
|
|
54
|
+
* @param topper Topper to check for
|
|
55
|
+
* @param lights Lights to check for
|
|
56
|
+
* @param garland Garland to check for
|
|
57
|
+
* @param gifts Gifts to check for
|
|
58
|
+
* @returns Whether every single decour matches what we expect
|
|
59
|
+
*/
|
|
48
60
|
function isDecoratedWith(topper, lights, garland, gifts) {
|
|
49
61
|
const decorations = [
|
|
50
62
|
get("shrubTopper"),
|
|
@@ -54,6 +66,15 @@ function isDecoratedWith(topper, lights, garland, gifts) {
|
|
|
54
66
|
].map((x) => Prefs[x]);
|
|
55
67
|
return [topper, lights, garland, gifts].every((x, i) => x === decorations[i]);
|
|
56
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Decorates our Crimbo Shrub with the chosen decour, if able
|
|
71
|
+
*
|
|
72
|
+
* @param topper The shrub Topper to select
|
|
73
|
+
* @param lights The shrub Lights to select
|
|
74
|
+
* @param garland The shrub Garland to select
|
|
75
|
+
* @param gifts The shrub Gifts to select
|
|
76
|
+
* @returns Whether the shrub's decour perfectly matches the given decour
|
|
77
|
+
*/
|
|
57
78
|
export function decorate(topper, lights, garland, gifts) {
|
|
58
79
|
if (!have())
|
|
59
80
|
return false;
|
|
@@ -64,5 +85,5 @@ export function decorate(topper, lights, garland, gifts) {
|
|
|
64
85
|
}
|
|
65
86
|
visitUrl(`inv_use.php?pwd=&which=99&whichitem=${toInt($item `box of old Crimbo decorations`)}`);
|
|
66
87
|
visitUrl(`choice.php?whichchoice=999&pwd=&option=1&topper=${Toppers[topper]}&lights=${Lights[lights]}&garland=${Garland[garland]}&gift=${Gifts[gifts]}`);
|
|
67
|
-
return
|
|
88
|
+
return isDecoratedWith(topper, lights, garland, gifts);
|
|
68
89
|
}
|
|
@@ -1,48 +1,56 @@
|
|
|
1
1
|
import { Effect, Item, Phylum } from "kolmafia";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* @returns Whether or not you `have` DNA lab or it's installed
|
|
4
4
|
*/
|
|
5
5
|
export declare function have(): boolean;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* @returns Whether the DNA Lab is your currently active workshed
|
|
8
8
|
*/
|
|
9
9
|
export declare function installed(): boolean;
|
|
10
10
|
/**
|
|
11
11
|
* Tells you whether you are currently hybridized. When passed with an input of any sort, tells you whether you are currently hybridized with that effect.
|
|
12
|
+
*
|
|
12
13
|
* @param tonic Optional input. When passed, the function returns whether that specific effect is hybridized.
|
|
14
|
+
* @returns Whether the given tonic is currently hybridized
|
|
13
15
|
*/
|
|
14
16
|
export declare function isHybridized(tonic?: Effect | Phylum | Item): boolean;
|
|
15
17
|
/**
|
|
16
18
|
* Returns the tonic item associated with a particular phylum.
|
|
19
|
+
*
|
|
17
20
|
* @param phylum The phylum in question.
|
|
18
21
|
* @returns The tonic item associated with that phylum; returns $item.none for $phylum.none.
|
|
19
22
|
*/
|
|
20
23
|
export declare function getTonic(phylum: Phylum): Item;
|
|
21
24
|
/**
|
|
22
25
|
* Returns the tonic effect associated with a particular phylum.
|
|
26
|
+
*
|
|
23
27
|
* @param phylum The phylum in question.
|
|
24
28
|
* @returns The tonic effect associated with that phylum; returns $effect.none for $phylum.none.
|
|
25
29
|
*/
|
|
26
30
|
export declare function getEffect(phylum: Phylum): Effect;
|
|
27
31
|
/**
|
|
28
32
|
* Tells you which phylum to hunt down for a given effect or item.
|
|
33
|
+
*
|
|
29
34
|
* @param dnatype The tonic effect or item in question
|
|
30
35
|
* @returns The Phylum associated with that effect or item; null if an invalid choice
|
|
31
36
|
*/
|
|
32
37
|
export declare function phylumFor(dnatype: Effect | Item): Phylum | null;
|
|
33
38
|
/**
|
|
34
39
|
* Hybridize yourself with the current contents of your syringe, if possible.
|
|
40
|
+
*
|
|
35
41
|
* @returns Whether or not we succeeded
|
|
36
42
|
*/
|
|
37
43
|
export declare function hybridize(): boolean;
|
|
38
44
|
/**
|
|
39
45
|
* Makes tonics with whatever phylum is currently in your syringe
|
|
46
|
+
*
|
|
40
47
|
* @param {number} [amount=1] the number of tonics to make
|
|
41
48
|
* @returns Whether we successfully made tonics; returns true if we made as many as we could, regardless of whether that was the number requested
|
|
42
49
|
*/
|
|
43
50
|
export declare function makeTonic(amount?: 1 | 2 | 3): boolean;
|
|
44
51
|
/**
|
|
45
52
|
* Tells you how many tonics you can make the rest of the day.
|
|
53
|
+
*
|
|
46
54
|
* @returns The remaining tonics you can make
|
|
47
55
|
*/
|
|
48
56
|
export declare function tonicsLeft(): number;
|
|
@@ -6,13 +6,13 @@ import { $effect, $item, $phylum } from "../../template-string";
|
|
|
6
6
|
import { clamp } from "../../utils";
|
|
7
7
|
const lab = $item `Little Geneticist DNA-Splicing Lab`;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* @returns Whether or not you `have` DNA lab or it's installed
|
|
10
10
|
*/
|
|
11
11
|
export function have() {
|
|
12
12
|
return haveItem(lab) || getWorkshed() === lab;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* @returns Whether the DNA Lab is your currently active workshed
|
|
16
16
|
*/
|
|
17
17
|
export function installed() {
|
|
18
18
|
return getWorkshed() === lab;
|
|
@@ -66,7 +66,9 @@ const phylaTonics = new Map([
|
|
|
66
66
|
const tonicEffects = Array.from(phylaEffects.values());
|
|
67
67
|
/**
|
|
68
68
|
* Tells you whether you are currently hybridized. When passed with an input of any sort, tells you whether you are currently hybridized with that effect.
|
|
69
|
+
*
|
|
69
70
|
* @param tonic Optional input. When passed, the function returns whether that specific effect is hybridized.
|
|
71
|
+
* @returns Whether the given tonic is currently hybridized
|
|
70
72
|
*/
|
|
71
73
|
export function isHybridized(tonic) {
|
|
72
74
|
if (!tonic)
|
|
@@ -80,6 +82,7 @@ export function isHybridized(tonic) {
|
|
|
80
82
|
}
|
|
81
83
|
/**
|
|
82
84
|
* Returns the tonic item associated with a particular phylum.
|
|
85
|
+
*
|
|
83
86
|
* @param phylum The phylum in question.
|
|
84
87
|
* @returns The tonic item associated with that phylum; returns $item.none for $phylum.none.
|
|
85
88
|
*/
|
|
@@ -89,6 +92,7 @@ export function getTonic(phylum) {
|
|
|
89
92
|
}
|
|
90
93
|
/**
|
|
91
94
|
* Returns the tonic effect associated with a particular phylum.
|
|
95
|
+
*
|
|
92
96
|
* @param phylum The phylum in question.
|
|
93
97
|
* @returns The tonic effect associated with that phylum; returns $effect.none for $phylum.none.
|
|
94
98
|
*/
|
|
@@ -98,6 +102,7 @@ export function getEffect(phylum) {
|
|
|
98
102
|
}
|
|
99
103
|
/**
|
|
100
104
|
* Tells you which phylum to hunt down for a given effect or item.
|
|
105
|
+
*
|
|
101
106
|
* @param dnatype The tonic effect or item in question
|
|
102
107
|
* @returns The Phylum associated with that effect or item; null if an invalid choice
|
|
103
108
|
*/
|
|
@@ -113,6 +118,7 @@ export function phylumFor(dnatype) {
|
|
|
113
118
|
}
|
|
114
119
|
/**
|
|
115
120
|
* Hybridize yourself with the current contents of your syringe, if possible.
|
|
121
|
+
*
|
|
116
122
|
* @returns Whether or not we succeeded
|
|
117
123
|
*/
|
|
118
124
|
export function hybridize() {
|
|
@@ -130,6 +136,7 @@ export function hybridize() {
|
|
|
130
136
|
}
|
|
131
137
|
/**
|
|
132
138
|
* Makes tonics with whatever phylum is currently in your syringe
|
|
139
|
+
*
|
|
133
140
|
* @param {number} [amount=1] the number of tonics to make
|
|
134
141
|
* @returns Whether we successfully made tonics; returns true if we made as many as we could, regardless of whether that was the number requested
|
|
135
142
|
*/
|
|
@@ -147,6 +154,7 @@ export function makeTonic(amount = 1) {
|
|
|
147
154
|
}
|
|
148
155
|
/**
|
|
149
156
|
* Tells you how many tonics you can make the rest of the day.
|
|
157
|
+
*
|
|
150
158
|
* @returns The remaining tonics you can make
|
|
151
159
|
*/
|
|
152
160
|
export function tonicsLeft() {
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import { Monster } from "kolmafia";
|
|
2
2
|
import { Copier } from "../../Copier";
|
|
3
|
+
/**
|
|
4
|
+
* @returns Whether the Winter Garden is our currently installed garden
|
|
5
|
+
*/
|
|
3
6
|
export declare function have(): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* @returns Whether we have an unfinished ice sculpture hanging around
|
|
9
|
+
*/
|
|
4
10
|
export declare function haveUnfinishedIceSculpture(): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* @returns Whether or not we've used an unfinished ice sculpture today
|
|
13
|
+
*/
|
|
5
14
|
export declare function isUnfinishedIceSculptureUsed(): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @returns Whether we're able to use an unfinished ice sculpture in combat right now
|
|
17
|
+
*/
|
|
6
18
|
export declare function couldUseUnfinishedIceSculpture(): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @returns Our current ice sculpture monster; `null` if none
|
|
21
|
+
*/
|
|
7
22
|
export declare function getUnfinishedIceSculptureMonster(): Monster | null;
|
|
8
23
|
export declare const UnfinishedIceSculpture: Copier;
|
|
@@ -2,18 +2,33 @@ import { Copier } from "../../Copier";
|
|
|
2
2
|
import { haveInCampground, have as haveItem } from "../../lib";
|
|
3
3
|
import { get } from "../../property";
|
|
4
4
|
import { $item } from "../../template-string";
|
|
5
|
+
/**
|
|
6
|
+
* @returns Whether the Winter Garden is our currently installed garden
|
|
7
|
+
*/
|
|
5
8
|
export function have() {
|
|
6
9
|
return haveInCampground($item `packet of winter seeds`);
|
|
7
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* @returns Whether we have an unfinished ice sculpture hanging around
|
|
13
|
+
*/
|
|
8
14
|
export function haveUnfinishedIceSculpture() {
|
|
9
15
|
return haveItem($item `unfinished ice sculpture`);
|
|
10
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* @returns Whether or not we've used an unfinished ice sculpture today
|
|
19
|
+
*/
|
|
11
20
|
export function isUnfinishedIceSculptureUsed() {
|
|
12
21
|
return get("_iceSculptureUsed");
|
|
13
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* @returns Whether we're able to use an unfinished ice sculpture in combat right now
|
|
25
|
+
*/
|
|
14
26
|
export function couldUseUnfinishedIceSculpture() {
|
|
15
27
|
return (haveItem($item `unfinished ice sculpture`) && !haveItem($item `ice sculpture`));
|
|
16
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* @returns Our current ice sculpture monster; `null` if none
|
|
31
|
+
*/
|
|
17
32
|
export function getUnfinishedIceSculptureMonster() {
|
|
18
33
|
return get("iceSculptureMonster");
|
|
19
34
|
}
|
|
@@ -2,9 +2,15 @@ import { availableAmount, runChoice, visitUrl } from "kolmafia";
|
|
|
2
2
|
import { get } from "../../property";
|
|
3
3
|
import { $items } from "../../template-string";
|
|
4
4
|
const BARRELS = $items `little firkin, normal barrel, big tun, weathered barrel, dusty barrel, disintegrating barrel, moist barrel, rotting barrel, mouldering barrel, barnacled barrel`;
|
|
5
|
+
/**
|
|
6
|
+
* @returns Whether we have the barrel shrine
|
|
7
|
+
*/
|
|
5
8
|
export function have() {
|
|
6
9
|
return get("barrelShrineUnlocked");
|
|
7
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Smashes all barrels in our inventory
|
|
13
|
+
*/
|
|
8
14
|
export function smashParty() {
|
|
9
15
|
if (!have())
|
|
10
16
|
return;
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
import { Monster } from "kolmafia";
|
|
2
|
+
/**
|
|
3
|
+
* @returns Whether we own the Chateau Mantegna
|
|
4
|
+
*/
|
|
2
5
|
export declare function have(): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* @returns `null` for an empty painting; otherwise, the monster trapped in our painting
|
|
8
|
+
*/
|
|
3
9
|
export declare function paintingMonster(): Monster | null;
|
|
10
|
+
/**
|
|
11
|
+
* @returns Whether or not we've fought our painted monster today
|
|
12
|
+
*/
|
|
4
13
|
export declare function paintingFought(): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Fights your currently installed painting monster if able
|
|
16
|
+
*
|
|
17
|
+
* @returns The result of `runCombat`, which is the page html of the final round of combat
|
|
18
|
+
*/
|
|
5
19
|
export declare function fightPainting(): string;
|
|
6
20
|
export declare const desks: readonly ["fancy stationery set", "Swiss piggy bank", "continental juice bar"];
|
|
7
21
|
export declare const ceilings: readonly ["antler chandelier", "ceiling fan", "artificial skylight"];
|
|
@@ -9,9 +23,30 @@ export declare const nightstands: readonly ["foreign language tapes", "bowl of p
|
|
|
9
23
|
export declare type Desk = typeof desks[number];
|
|
10
24
|
export declare type Ceiling = typeof ceilings[number];
|
|
11
25
|
export declare type Nightstand = typeof nightstands[number];
|
|
26
|
+
/**
|
|
27
|
+
* @returns The currently installed desk in your chateau; `null` for none
|
|
28
|
+
*/
|
|
12
29
|
export declare function getDesk(): Desk | null;
|
|
30
|
+
/**
|
|
31
|
+
* @returns The currently installed ceiling in your chateau; `null` for none
|
|
32
|
+
*/
|
|
13
33
|
export declare function getCeiling(): Ceiling | null;
|
|
34
|
+
/**
|
|
35
|
+
* @returns The currently installed nightstand in your chateau; `null` for none
|
|
36
|
+
*/
|
|
14
37
|
export declare function getNightstand(): Nightstand | null;
|
|
38
|
+
/**
|
|
39
|
+
* @param desk The desk to change to
|
|
40
|
+
* @returns Whether our desk currently matches the one requested
|
|
41
|
+
*/
|
|
15
42
|
export declare function changeDesk(desk: Desk): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* @param ceiling The ceiling to change to
|
|
45
|
+
* @returns Whether our ceiling currently matches the one requested
|
|
46
|
+
*/
|
|
16
47
|
export declare function changeCeiling(ceiling: Ceiling): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* @param nightstand The nightstand to change to
|
|
50
|
+
* @returns Whether our nightstand currently matches the one requested
|
|
51
|
+
*/
|
|
17
52
|
export declare function changeNightstand(nightstand: Nightstand): boolean;
|