libram 0.8.28 → 0.8.30
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 +128 -0
- package/dist/Clan.js +300 -0
- package/dist/Copier.d.ts +9 -0
- package/dist/Copier.js +15 -0
- package/dist/Dungeon.d.ts +45 -0
- package/dist/Dungeon.js +115 -0
- package/dist/Kmail.d.ts +133 -0
- package/dist/Kmail.js +259 -0
- package/dist/actions/ActionSource.d.ts +131 -0
- package/dist/actions/ActionSource.js +178 -0
- package/dist/actions/Banish.d.ts +16 -0
- package/dist/actions/Banish.js +121 -0
- package/dist/actions/FreeKill.d.ts +16 -0
- package/dist/actions/FreeKill.js +94 -0
- package/dist/actions/FreeRun.d.ts +16 -0
- package/dist/actions/FreeRun.js +81 -0
- package/dist/actions/index.d.ts +4 -0
- package/dist/actions/index.js +4 -0
- package/dist/ascend.d.ts +83 -0
- package/dist/ascend.js +268 -0
- package/dist/challengePaths/2014/HeavyRains.d.ts +22 -0
- package/dist/challengePaths/2014/HeavyRains.js +75 -0
- package/dist/challengePaths/2015/CommunityService.d.ts +125 -0
- package/dist/challengePaths/2015/CommunityService.js +334 -0
- package/dist/challengePaths/2016/NuclearAutumn.d.ts +13 -0
- package/dist/challengePaths/2016/NuclearAutumn.js +21 -0
- package/dist/challengePaths/index.d.ts +4 -0
- package/dist/challengePaths/index.js +4 -0
- package/dist/combat.d.ts +414 -0
- package/dist/combat.js +711 -0
- package/dist/console.d.ts +12 -0
- package/dist/console.js +14 -0
- package/dist/counter.d.ts +22 -0
- package/dist/counter.js +37 -0
- package/dist/diet/index.d.ts +80 -0
- package/dist/diet/index.js +682 -0
- package/dist/diet/knapsack.d.ts +8 -0
- package/dist/diet/knapsack.js +128 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +26 -0
- package/dist/lib.d.ts +508 -0
- package/dist/lib.js +970 -0
- package/dist/logger.d.ts +35 -0
- package/dist/logger.js +62 -0
- package/dist/maximize.d.ts +122 -0
- package/dist/maximize.js +531 -0
- package/dist/modifier.d.ts +41 -0
- package/dist/modifier.js +160 -0
- package/dist/modifierTypes.d.ts +16 -0
- package/dist/modifierTypes.js +9 -0
- package/dist/mood.d.ts +105 -0
- package/dist/mood.js +349 -0
- package/dist/moonSign.d.ts +13 -0
- package/dist/moonSign.js +25 -0
- package/dist/overlappingNames.d.ts +3 -0
- package/dist/overlappingNames.js +42 -0
- package/dist/property.d.ts +222 -0
- package/dist/property.js +385 -0
- package/dist/propertyTypes.d.ts +19 -0
- package/dist/propertyTypes.js +10 -0
- package/dist/propertyTyping.d.ts +65 -0
- package/dist/propertyTyping.js +91 -0
- 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/2008/Stickers.d.ts +49 -0
- package/dist/resources/2008/Stickers.js +84 -0
- package/dist/resources/2009/Bandersnatch.d.ts +56 -0
- package/dist/resources/2009/Bandersnatch.js +93 -0
- package/dist/resources/2009/LoveSongs.d.ts +9 -0
- package/dist/resources/2009/LoveSongs.js +24 -0
- package/dist/resources/2009/SpookyPutty.d.ts +31 -0
- package/dist/resources/2009/SpookyPutty.js +49 -0
- package/dist/resources/2010/Brickos.d.ts +9 -0
- package/dist/resources/2010/Brickos.js +21 -0
- package/dist/resources/2010/CrownOfThrones.d.ts +68 -0
- package/dist/resources/2010/CrownOfThrones.js +418 -0
- package/dist/resources/2010/LookingGlass.d.ts +29 -0
- package/dist/resources/2010/LookingGlass.js +89 -0
- package/dist/resources/2011/Gygaxian.d.ts +9 -0
- package/dist/resources/2011/Gygaxian.js +24 -0
- package/dist/resources/2011/ObtuseAngel.d.ts +33 -0
- package/dist/resources/2011/ObtuseAngel.js +51 -0
- package/dist/resources/2011/StompingBoots.d.ts +37 -0
- package/dist/resources/2011/StompingBoots.js +57 -0
- package/dist/resources/2012/RainDoh.d.ts +25 -0
- package/dist/resources/2012/RainDoh.js +37 -0
- package/dist/resources/2012/ReagnimatedGnome.d.ts +31 -0
- package/dist/resources/2012/ReagnimatedGnome.js +46 -0
- package/dist/resources/2012/Resolutions.d.ts +9 -0
- package/dist/resources/2012/Resolutions.js +28 -0
- package/dist/resources/2013/Florist.d.ts +81 -0
- package/dist/resources/2013/Florist.js +245 -0
- package/dist/resources/2013/JungMan.d.ts +33 -0
- package/dist/resources/2013/JungMan.js +69 -0
- package/dist/resources/2013/PulledTaffy.d.ts +9 -0
- package/dist/resources/2013/PulledTaffy.js +33 -0
- package/dist/resources/2014/CrimboShrub.d.ts +42 -0
- package/dist/resources/2014/CrimboShrub.js +89 -0
- package/dist/resources/2014/DNALab.d.ts +56 -0
- package/dist/resources/2014/DNALab.js +162 -0
- package/dist/resources/2014/WinterGarden.d.ts +23 -0
- package/dist/resources/2014/WinterGarden.js +35 -0
- package/dist/resources/2015/BarrelShrine.d.ts +8 -0
- package/dist/resources/2015/BarrelShrine.js +25 -0
- package/dist/resources/2015/ChateauMantegna.d.ts +54 -0
- package/dist/resources/2015/ChateauMantegna.js +100 -0
- package/dist/resources/2015/DeckOfEveryCard.d.ts +29 -0
- package/dist/resources/2015/DeckOfEveryCard.js +122 -0
- package/dist/resources/2015/Dinseylandfill.d.ts +89 -0
- package/dist/resources/2015/Dinseylandfill.js +205 -0
- package/dist/resources/2015/MayoClinic.d.ts +23 -0
- package/dist/resources/2015/MayoClinic.js +49 -0
- package/dist/resources/2016/GingerBread.d.ts +32 -0
- package/dist/resources/2016/GingerBread.js +73 -0
- package/dist/resources/2016/SourceTerminal.d.ts +181 -0
- package/dist/resources/2016/SourceTerminal.js +275 -0
- package/dist/resources/2016/Witchess.d.ts +19 -0
- package/dist/resources/2016/Witchess.js +48 -0
- package/dist/resources/2017/AsdonMartin.d.ts +59 -0
- package/dist/resources/2017/AsdonMartin.js +238 -0
- package/dist/resources/2017/Horsery.d.ts +19 -0
- package/dist/resources/2017/Horsery.js +42 -0
- package/dist/resources/2017/MummingTrunk.d.ts +8 -0
- package/dist/resources/2017/MummingTrunk.js +33 -0
- package/dist/resources/2017/Pantogram.d.ts +92 -0
- package/dist/resources/2017/Pantogram.js +174 -0
- package/dist/resources/2017/Robortender.d.ts +30 -0
- package/dist/resources/2017/Robortender.js +90 -0
- package/dist/resources/2017/Spacegate.d.ts +86 -0
- package/dist/resources/2017/Spacegate.js +178 -0
- package/dist/resources/2017/TunnelOfLove.d.ts +39 -0
- package/dist/resources/2017/TunnelOfLove.js +120 -0
- package/dist/resources/2018/LatteLoversMembersMug.d.ts +392 -0
- package/dist/resources/2018/LatteLoversMembersMug.js +303 -0
- package/dist/resources/2018/SongBoom.d.ts +33 -0
- package/dist/resources/2018/SongBoom.js +55 -0
- package/dist/resources/2019/BeachComb.d.ts +72 -0
- package/dist/resources/2019/BeachComb.js +118 -0
- package/dist/resources/2019/CampAway.d.ts +39 -0
- package/dist/resources/2019/CampAway.js +72 -0
- package/dist/resources/2019/Snapper.d.ts +33 -0
- package/dist/resources/2019/Snapper.js +73 -0
- package/dist/resources/2020/Cartography.d.ts +16 -0
- package/dist/resources/2020/Cartography.js +48 -0
- package/dist/resources/2020/Guzzlr.d.ts +160 -0
- package/dist/resources/2020/Guzzlr.js +275 -0
- package/dist/resources/2020/RetroCape.d.ts +51 -0
- package/dist/resources/2020/RetroCape.js +115 -0
- package/dist/resources/2021/CrystalBall.d.ts +14 -0
- package/dist/resources/2021/CrystalBall.js +41 -0
- package/dist/resources/2021/DaylightShavings.d.ts +40 -0
- package/dist/resources/2021/DaylightShavings.js +74 -0
- package/dist/resources/2022/AutumnAton.d.ts +78 -0
- package/dist/resources/2022/AutumnAton.js +182 -0
- package/dist/resources/2022/CombatLoversLocket.d.ts +46 -0
- package/dist/resources/2022/CombatLoversLocket.js +83 -0
- package/dist/resources/2022/GreyGoose.d.ts +59 -0
- package/dist/resources/2022/GreyGoose.js +90 -0
- package/dist/resources/2022/JuneCleaver.d.ts +47 -0
- package/dist/resources/2022/JuneCleaver.js +69 -0
- package/dist/resources/2022/TrainSet.d.ts +146 -0
- package/dist/resources/2022/TrainSet.js +228 -0
- package/dist/resources/2023/AugustScepter.d.ts +25 -0
- package/dist/resources/2023/AugustScepter.js +40 -0
- package/dist/resources/2023/BurningLeaves.d.ts +25 -0
- package/dist/resources/2023/BurningLeaves.js +74 -0
- package/dist/resources/2023/CinchoDeMayo.d.ts +25 -0
- package/dist/resources/2023/CinchoDeMayo.js +45 -0
- package/dist/resources/2023/ClosedCircuitPayphone.d.ts +80 -0
- package/dist/resources/2023/ClosedCircuitPayphone.js +129 -0
- package/dist/resources/2023/CursedMonkeyPaw.d.ts +46 -0
- package/dist/resources/2023/CursedMonkeyPaw.js +113 -0
- package/dist/resources/2024/AprilingBandHelmet.d.ts +57 -0
- package/dist/resources/2024/AprilingBandHelmet.js +118 -0
- package/dist/resources/2024/ChestMimic.d.ts +43 -0
- package/dist/resources/2024/ChestMimic.js +125 -0
- package/dist/resources/LibramSummon.d.ts +18 -0
- package/dist/resources/LibramSummon.js +74 -0
- package/dist/resources/index.d.ts +54 -0
- package/dist/resources/index.js +54 -0
- package/dist/resources/putty-likes.d.ts +21 -0
- package/dist/resources/putty-likes.js +33 -0
- package/dist/session.d.ts +169 -0
- package/dist/session.js +284 -0
- package/dist/since.d.ts +51 -0
- package/dist/since.js +108 -0
- package/dist/template-string.d.ts +324 -0
- package/dist/template-string.js +265 -0
- package/dist/url.d.ts +35 -0
- package/dist/url.js +67 -0
- package/dist/utils.d.ts +185 -0
- package/dist/utils.js +264 -0
- package/package.json +2 -2
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { booleanProperties, familiarProperties, locationProperties, monsterProperties, numericOrStringProperties, numericProperties, phylumProperties, statProperties, stringProperties, } from "./propertyTypes";
|
|
2
|
+
const booleanPropertiesSet = new Set(booleanProperties);
|
|
3
|
+
const numericPropertiesSet = new Set(numericProperties);
|
|
4
|
+
const numericOrStringPropertiesSet = new Set(numericOrStringProperties);
|
|
5
|
+
const stringPropertiesSet = new Set(stringProperties);
|
|
6
|
+
const locationPropertiesSet = new Set(locationProperties);
|
|
7
|
+
const monsterPropertiesSet = new Set(monsterProperties);
|
|
8
|
+
const familiarPropertiesSet = new Set(familiarProperties);
|
|
9
|
+
const statPropertiesSet = new Set(statProperties);
|
|
10
|
+
const phylumPropertiesSet = new Set(phylumProperties);
|
|
11
|
+
/**
|
|
12
|
+
* Determine whether a property has a boolean value
|
|
13
|
+
*
|
|
14
|
+
* @param property Property to check
|
|
15
|
+
* @returns Whether the supplied property has a boolean value
|
|
16
|
+
*/
|
|
17
|
+
export function isBooleanProperty(property) {
|
|
18
|
+
return booleanPropertiesSet.has(property);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Determine whether a property has a numeric value
|
|
22
|
+
*
|
|
23
|
+
* @param property Property to check
|
|
24
|
+
* @returns Whether the supplied property has a numeric value
|
|
25
|
+
*/
|
|
26
|
+
export function isNumericProperty(property) {
|
|
27
|
+
return numericPropertiesSet.has(property);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Determine whether a property has a numeric or string value
|
|
31
|
+
*
|
|
32
|
+
* @param property Property to check
|
|
33
|
+
* @returns Whether the supplied property has a numeric or string value
|
|
34
|
+
*/
|
|
35
|
+
export function isNumericOrStringProperty(property) {
|
|
36
|
+
return numericOrStringPropertiesSet.has(property);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Determine whether a property has a string value
|
|
40
|
+
*
|
|
41
|
+
* @param property Property to check
|
|
42
|
+
* @returns Whether the supplied property has a string value
|
|
43
|
+
*/
|
|
44
|
+
export function isStringProperty(property) {
|
|
45
|
+
return stringPropertiesSet.has(property);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Determine whether a property has a Location value
|
|
49
|
+
*
|
|
50
|
+
* @param property Property to check
|
|
51
|
+
* @returns Whether the supplied property has a Location value
|
|
52
|
+
*/
|
|
53
|
+
export function isLocationProperty(property) {
|
|
54
|
+
return locationPropertiesSet.has(property);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Determine whether a property has a Monster value
|
|
58
|
+
*
|
|
59
|
+
* @param property Property to check
|
|
60
|
+
* @returns Whether the supplied property has a Monster value
|
|
61
|
+
*/
|
|
62
|
+
export function isMonsterProperty(property) {
|
|
63
|
+
return monsterPropertiesSet.has(property);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Determine whether a property has a Familiar value
|
|
67
|
+
*
|
|
68
|
+
* @param property Property to check
|
|
69
|
+
* @returns Whether the supplied property has a Familiar value
|
|
70
|
+
*/
|
|
71
|
+
export function isFamiliarProperty(property) {
|
|
72
|
+
return familiarPropertiesSet.has(property);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Determine whether a property has a Stat value
|
|
76
|
+
*
|
|
77
|
+
* @param property Property to check
|
|
78
|
+
* @returns Whether the supplied property has a Stat value
|
|
79
|
+
*/
|
|
80
|
+
export function isStatProperty(property) {
|
|
81
|
+
return statPropertiesSet.has(property);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Determine whether a property has a Phylum value
|
|
85
|
+
*
|
|
86
|
+
* @param property Property to check
|
|
87
|
+
* @returns Whether the supplied property has a Phylum value
|
|
88
|
+
*/
|
|
89
|
+
export function isPhylumProperty(property) {
|
|
90
|
+
return phylumPropertiesSet.has(property);
|
|
91
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Item } from "kolmafia";
|
|
2
|
+
/**
|
|
3
|
+
* @returns true if the player can Summon Candy Heart
|
|
4
|
+
*/
|
|
5
|
+
export declare function have(): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* @returns map containing the chance of an item to be summoned
|
|
8
|
+
*/
|
|
9
|
+
export declare function expected(): Map<Item, number>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { have as _have } from "../../lib";
|
|
2
|
+
import { $item, $skill } from "../../template-string";
|
|
3
|
+
const summonSkill = $skill `Summon Candy Heart`;
|
|
4
|
+
const libramChance = 1.0 / 6;
|
|
5
|
+
const libramExpected = new Map([
|
|
6
|
+
[$item `green candy heart`, libramChance],
|
|
7
|
+
[$item `lavender candy heart`, libramChance],
|
|
8
|
+
[$item `orange candy heart`, libramChance],
|
|
9
|
+
[$item `pink candy heart`, libramChance],
|
|
10
|
+
[$item `white candy heart`, libramChance],
|
|
11
|
+
[$item `yellow candy heart`, libramChance],
|
|
12
|
+
]);
|
|
13
|
+
/**
|
|
14
|
+
* @returns true if the player can Summon Candy Heart
|
|
15
|
+
*/
|
|
16
|
+
export function have() {
|
|
17
|
+
return _have(summonSkill);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @returns map containing the chance of an item to be summoned
|
|
21
|
+
*/
|
|
22
|
+
export function expected() {
|
|
23
|
+
return libramExpected;
|
|
24
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Item } from "kolmafia";
|
|
2
|
+
/**
|
|
3
|
+
* @returns true if the player can Summon Party Favors
|
|
4
|
+
*/
|
|
5
|
+
export declare function have(): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* @returns map containing the chance of an item to be summoned
|
|
8
|
+
*/
|
|
9
|
+
export declare function expected(): Map<Item, number>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { have as _have } from "../../lib";
|
|
2
|
+
import { get } from "../../property";
|
|
3
|
+
import { $item, $skill } from "../../template-string";
|
|
4
|
+
const summonSkill = $skill `Summon Party Favor`;
|
|
5
|
+
/**
|
|
6
|
+
* @returns true if the player can Summon Party Favors
|
|
7
|
+
*/
|
|
8
|
+
export function have() {
|
|
9
|
+
return _have(summonSkill);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @returns map containing the chance of an item to be summoned
|
|
13
|
+
*/
|
|
14
|
+
export function expected() {
|
|
15
|
+
const rareSummons = get("_favorRareSummons");
|
|
16
|
+
const totalRareChance = 1.0 / 2 ** (rareSummons + 1);
|
|
17
|
+
const commonChance = (1.0 - totalRareChance) / 3;
|
|
18
|
+
const rareChance = totalRareChance / 3;
|
|
19
|
+
return new Map([
|
|
20
|
+
[$item `divine blowout`, commonChance],
|
|
21
|
+
[$item `divine can of silly string`, commonChance],
|
|
22
|
+
[$item `divine noisemaker`, commonChance],
|
|
23
|
+
[$item `divine champagne flute`, rareChance],
|
|
24
|
+
[$item `divine champagne popper`, rareChance],
|
|
25
|
+
[$item `divine cracker`, rareChance],
|
|
26
|
+
]);
|
|
27
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Item } from "kolmafia";
|
|
2
|
+
export declare const stickers: {
|
|
3
|
+
readonly unicorn: Item;
|
|
4
|
+
readonly apple: Item;
|
|
5
|
+
readonly UPC: Item;
|
|
6
|
+
readonly wrestler: Item;
|
|
7
|
+
readonly dragon: Item;
|
|
8
|
+
readonly rockband: Item;
|
|
9
|
+
};
|
|
10
|
+
export declare type Sticker = keyof typeof stickers;
|
|
11
|
+
/**
|
|
12
|
+
* @returns Whether the player has the Summon Stickers skill
|
|
13
|
+
*/
|
|
14
|
+
export declare function have(): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @returns The player's current sticker weapon
|
|
17
|
+
*/
|
|
18
|
+
export declare function weapon(): Item | null;
|
|
19
|
+
declare const weapons: {
|
|
20
|
+
sword: Item;
|
|
21
|
+
crossbow: Item;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Make a sword
|
|
25
|
+
*
|
|
26
|
+
* @param sticker Sticker to use when making the sword
|
|
27
|
+
*/
|
|
28
|
+
export declare function makeSword(sticker: Sticker): void;
|
|
29
|
+
/**
|
|
30
|
+
* Change weapon mode
|
|
31
|
+
*
|
|
32
|
+
* @param mode New weapon mode
|
|
33
|
+
* @returns Success
|
|
34
|
+
*/
|
|
35
|
+
export declare function foldWeapon(mode: keyof typeof weapons): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Get current stickers on sticker weapon
|
|
38
|
+
*
|
|
39
|
+
* @returns Tuple of stickers
|
|
40
|
+
*/
|
|
41
|
+
export declare function currentStickers(): [Item, Item, Item];
|
|
42
|
+
/**
|
|
43
|
+
* Set configuration for sticker weapon
|
|
44
|
+
*
|
|
45
|
+
* @param options Tuple of either sticker or null
|
|
46
|
+
* @returns Resultant configuration
|
|
47
|
+
*/
|
|
48
|
+
export declare function setStickers(...options: [Sticker | null, Sticker | null, Sticker | null]): [Item, Item, Item];
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { availableAmount, equippedItem, haveSkill, retrieveItem, visitUrl, } from "kolmafia";
|
|
2
|
+
import { $item, $items, $skill, $slots } from "../../template-string";
|
|
3
|
+
export const stickers = {
|
|
4
|
+
unicorn: $item `scratch 'n' sniff unicorn sticker`,
|
|
5
|
+
apple: $item `scratch 'n' sniff apple sticker`,
|
|
6
|
+
UPC: $item `scratch 'n' sniff UPC sticker`,
|
|
7
|
+
wrestler: $item `scratch 'n' sniff wrestler sticker`,
|
|
8
|
+
dragon: $item `scratch 'n' sniff dragon sticker`,
|
|
9
|
+
rockband: $item `scratch 'n' sniff rock band sticker`,
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @returns Whether the player has the Summon Stickers skill
|
|
13
|
+
*/
|
|
14
|
+
export function have() {
|
|
15
|
+
return haveSkill($skill `Summon Stickers`);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @returns The player's current sticker weapon
|
|
19
|
+
*/
|
|
20
|
+
export function weapon() {
|
|
21
|
+
return ($items `scratch 'n' sniff sword, scratch 'n' sniff crossbow`.find((i) => availableAmount(i)) ?? null);
|
|
22
|
+
}
|
|
23
|
+
const weapons = {
|
|
24
|
+
sword: $item `scratch 'n' sniff sword`,
|
|
25
|
+
crossbow: $item `scratch 'n' sniff crossbow`,
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Make a sword
|
|
29
|
+
*
|
|
30
|
+
* @param sticker Sticker to use when making the sword
|
|
31
|
+
*/
|
|
32
|
+
export function makeSword(sticker) {
|
|
33
|
+
if (weapon())
|
|
34
|
+
return;
|
|
35
|
+
visitUrl(`bedazzle.php?action=juststick&sticker=${stickers[sticker].id}&pwd`);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Change weapon mode
|
|
39
|
+
*
|
|
40
|
+
* @param mode New weapon mode
|
|
41
|
+
* @returns Success
|
|
42
|
+
*/
|
|
43
|
+
export function foldWeapon(mode) {
|
|
44
|
+
const currentWep = weapon();
|
|
45
|
+
if (!currentWep)
|
|
46
|
+
return false;
|
|
47
|
+
if (weapons[mode] === currentWep)
|
|
48
|
+
return true;
|
|
49
|
+
visitUrl("bedazzle.php?action=fold&pwd");
|
|
50
|
+
return weapons[mode] === currentWep;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Get current stickers on sticker weapon
|
|
54
|
+
*
|
|
55
|
+
* @returns Tuple of stickers
|
|
56
|
+
*/
|
|
57
|
+
export function currentStickers() {
|
|
58
|
+
return $slots `sticker1, sticker2, sticker3`.map((s) => equippedItem(s));
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Set configuration for sticker weapon
|
|
62
|
+
*
|
|
63
|
+
* @param options Tuple of either sticker or null
|
|
64
|
+
* @returns Resultant configuration
|
|
65
|
+
*/
|
|
66
|
+
export function setStickers(...options) {
|
|
67
|
+
for (const s of options) {
|
|
68
|
+
if (s)
|
|
69
|
+
retrieveItem(stickers[s], options.filter((x) => x === s).length);
|
|
70
|
+
}
|
|
71
|
+
visitUrl("bedazzle.php");
|
|
72
|
+
const start = currentStickers();
|
|
73
|
+
for (let i = 0; i <= 2; i++) {
|
|
74
|
+
const sticker = options[i];
|
|
75
|
+
if (!sticker)
|
|
76
|
+
continue;
|
|
77
|
+
const item = stickers[sticker];
|
|
78
|
+
if (start[i] === item)
|
|
79
|
+
continue;
|
|
80
|
+
visitUrl(`bedazzle.php?action=peel&slot=${i + 1}&pwd`);
|
|
81
|
+
visitUrl(`bedazzle.php?action=stick&slot=${i + 1}&sticker=${item.id}&pwd`);
|
|
82
|
+
}
|
|
83
|
+
return currentStickers();
|
|
84
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Effect } from "kolmafia";
|
|
2
|
+
/**
|
|
3
|
+
* Determines whether the player has the Frumious Bandersnatch in their
|
|
4
|
+
* terrarium
|
|
5
|
+
*
|
|
6
|
+
* @returns Whether the player has a Frumious Bandersnatch
|
|
7
|
+
*/
|
|
8
|
+
export declare function have(): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Get the number of free runaways that have already been used
|
|
11
|
+
*
|
|
12
|
+
* @see StompingBoots with which the Bandersnatch shares a counter
|
|
13
|
+
* @returns Number of free runaways used today
|
|
14
|
+
*/
|
|
15
|
+
export declare function getRunaways(): number;
|
|
16
|
+
/**
|
|
17
|
+
* Determine the total number of free runaways that the player can
|
|
18
|
+
* get from their Bandersnatch
|
|
19
|
+
*
|
|
20
|
+
* @param considerWeightAdjustment Include familiar weight modifiers
|
|
21
|
+
* @returns Current maximum runaways
|
|
22
|
+
*/
|
|
23
|
+
export declare function getMaxRunaways(considerWeightAdjustment?: boolean): number;
|
|
24
|
+
/**
|
|
25
|
+
* Determine the number of remaining free runaways the player can
|
|
26
|
+
* get from their Bandersnatch
|
|
27
|
+
*
|
|
28
|
+
* @param considerWeightAdjustment Include familiar weight modifiers
|
|
29
|
+
* @returns Current maximum runaways reamining
|
|
30
|
+
*/
|
|
31
|
+
export declare function getRemainingRunaways(considerWeightAdjustment?: boolean): number;
|
|
32
|
+
/**
|
|
33
|
+
* Determine whether the player could use their Bandersnatch to
|
|
34
|
+
* get a free run in theory
|
|
35
|
+
*
|
|
36
|
+
* @param considerWeightAdjustment Include familiar weight modifiers
|
|
37
|
+
* @returns Whether a free run is theoretically possible right now
|
|
38
|
+
*/
|
|
39
|
+
export declare function couldRunaway(considerWeightAdjustment?: boolean): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Determine whether the player can use their Bandersnatch to get a
|
|
42
|
+
* free run right now
|
|
43
|
+
*
|
|
44
|
+
* @returns Whether a free run is actually possible right now
|
|
45
|
+
*/
|
|
46
|
+
export declare function canRunaway(): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Prepare a Bandersnatch runaway.
|
|
49
|
+
*
|
|
50
|
+
* This will cast Ode to Booze and take your Bandersnatch with you.
|
|
51
|
+
* If any of those steps fail, it will return false.
|
|
52
|
+
*
|
|
53
|
+
* @param songsToRemove Ordered list of songs that could be shrugged to make room for Ode to Booze
|
|
54
|
+
* @returns Success
|
|
55
|
+
*/
|
|
56
|
+
export declare function prepareRunaway(songsToRemove: Effect[]): boolean;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { familiarWeight, useFamiliar, useSkill, weightAdjustment, } from "kolmafia";
|
|
2
|
+
import { have as _have, canRememberSong, getActiveSongs, isCurrentFamiliar, uneffect, } from "../../lib";
|
|
3
|
+
import { get } from "../../property";
|
|
4
|
+
import { $effect, $familiar, $skill } from "../../template-string";
|
|
5
|
+
const familiar = $familiar `Frumious Bandersnatch`;
|
|
6
|
+
/**
|
|
7
|
+
* Determines whether the player has the Frumious Bandersnatch in their
|
|
8
|
+
* terrarium
|
|
9
|
+
*
|
|
10
|
+
* @returns Whether the player has a Frumious Bandersnatch
|
|
11
|
+
*/
|
|
12
|
+
export function have() {
|
|
13
|
+
return _have(familiar);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Get the number of free runaways that have already been used
|
|
17
|
+
*
|
|
18
|
+
* @see StompingBoots with which the Bandersnatch shares a counter
|
|
19
|
+
* @returns Number of free runaways used today
|
|
20
|
+
*/
|
|
21
|
+
export function getRunaways() {
|
|
22
|
+
return get("_banderRunaways");
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Determine the total number of free runaways that the player can
|
|
26
|
+
* get from their Bandersnatch
|
|
27
|
+
*
|
|
28
|
+
* @param considerWeightAdjustment Include familiar weight modifiers
|
|
29
|
+
* @returns Current maximum runaways
|
|
30
|
+
*/
|
|
31
|
+
export function getMaxRunaways(considerWeightAdjustment = true) {
|
|
32
|
+
const weightBuffs = considerWeightAdjustment ? weightAdjustment() : 0;
|
|
33
|
+
return Math.floor((familiarWeight(familiar) + weightBuffs) / 5);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Determine the number of remaining free runaways the player can
|
|
37
|
+
* get from their Bandersnatch
|
|
38
|
+
*
|
|
39
|
+
* @param considerWeightAdjustment Include familiar weight modifiers
|
|
40
|
+
* @returns Current maximum runaways reamining
|
|
41
|
+
*/
|
|
42
|
+
export function getRemainingRunaways(considerWeightAdjustment = true) {
|
|
43
|
+
return Math.max(0, getMaxRunaways(considerWeightAdjustment) - getRunaways());
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Determine whether the player could use their Bandersnatch to
|
|
47
|
+
* get a free run in theory
|
|
48
|
+
*
|
|
49
|
+
* @param considerWeightAdjustment Include familiar weight modifiers
|
|
50
|
+
* @returns Whether a free run is theoretically possible right now
|
|
51
|
+
*/
|
|
52
|
+
export function couldRunaway(considerWeightAdjustment = true) {
|
|
53
|
+
return have() && getRemainingRunaways(considerWeightAdjustment) > 0;
|
|
54
|
+
}
|
|
55
|
+
const odeSkill = $skill `The Ode to Booze`;
|
|
56
|
+
const odeEffect = $effect `Ode to Booze`;
|
|
57
|
+
/**
|
|
58
|
+
* Determine whether the player can use their Bandersnatch to get a
|
|
59
|
+
* free run right now
|
|
60
|
+
*
|
|
61
|
+
* @returns Whether a free run is actually possible right now
|
|
62
|
+
*/
|
|
63
|
+
export function canRunaway() {
|
|
64
|
+
return isCurrentFamiliar(familiar) && couldRunaway() && _have(odeEffect);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Prepare a Bandersnatch runaway.
|
|
68
|
+
*
|
|
69
|
+
* This will cast Ode to Booze and take your Bandersnatch with you.
|
|
70
|
+
* If any of those steps fail, it will return false.
|
|
71
|
+
*
|
|
72
|
+
* @param songsToRemove Ordered list of songs that could be shrugged to make room for Ode to Booze
|
|
73
|
+
* @returns Success
|
|
74
|
+
*/
|
|
75
|
+
export function prepareRunaway(songsToRemove) {
|
|
76
|
+
if (!_have(odeEffect)) {
|
|
77
|
+
if (!_have(odeSkill)) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
if (!canRememberSong()) {
|
|
81
|
+
const activeSongs = getActiveSongs();
|
|
82
|
+
for (const song of songsToRemove) {
|
|
83
|
+
if (activeSongs.includes(song) && uneffect(song)) {
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (!useSkill(odeSkill)) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return useFamiliar(familiar);
|
|
93
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Item } from "kolmafia";
|
|
2
|
+
/**
|
|
3
|
+
* @returns true if the player can Summon Love Song
|
|
4
|
+
*/
|
|
5
|
+
export declare function have(): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* @returns map containing the chance of an item to be summoned
|
|
8
|
+
*/
|
|
9
|
+
export declare function expected(): Map<Item, number>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { have as _have } from "../../lib";
|
|
2
|
+
import { $item, $skill } from "../../template-string";
|
|
3
|
+
const summonSkill = $skill `Summon Love Song`;
|
|
4
|
+
const libramChance = 1.0 / 6;
|
|
5
|
+
const libramExpected = new Map([
|
|
6
|
+
[$item `love song of disturbing obsession`, libramChance],
|
|
7
|
+
[$item `love song of icy revenge`, libramChance],
|
|
8
|
+
[$item `love song of naughty innuendo`, libramChance],
|
|
9
|
+
[$item `love song of smoldering passion`, libramChance],
|
|
10
|
+
[$item `love song of sugary cuteness`, libramChance],
|
|
11
|
+
[$item `love song of vague ambiguity`, libramChance],
|
|
12
|
+
]);
|
|
13
|
+
/**
|
|
14
|
+
* @returns true if the player can Summon Love Song
|
|
15
|
+
*/
|
|
16
|
+
export function have() {
|
|
17
|
+
return _have(summonSkill);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @returns map containing the chance of an item to be summoned
|
|
21
|
+
*/
|
|
22
|
+
export function expected() {
|
|
23
|
+
return libramExpected;
|
|
24
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Monster } from "kolmafia";
|
|
2
|
+
/**
|
|
3
|
+
* See whether the player has a Spooky Putty item in some form
|
|
4
|
+
*
|
|
5
|
+
* @returns Whether the player has any Spooky Putty item
|
|
6
|
+
*/
|
|
7
|
+
export declare function have(): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Get spooky putty sheet copies made today
|
|
10
|
+
*
|
|
11
|
+
* @returns Number of spooky putty sheet copies made
|
|
12
|
+
*/
|
|
13
|
+
export declare function getSpookyPuttySheetCopiesMade(): number;
|
|
14
|
+
/**
|
|
15
|
+
* Prepares a spooky putty sheet for use
|
|
16
|
+
*
|
|
17
|
+
* @returns Success
|
|
18
|
+
*/
|
|
19
|
+
export declare function prepareSpookyPuttySheet(): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Get the current puttied monster
|
|
22
|
+
*
|
|
23
|
+
* @returns Current puttied monster
|
|
24
|
+
*/
|
|
25
|
+
export declare function getSpookyPuttySheetMonster(): Monster | null;
|
|
26
|
+
/**
|
|
27
|
+
* Use the spooky putty sheet (i.e. fight the monster probably)
|
|
28
|
+
*
|
|
29
|
+
* @returns Success
|
|
30
|
+
*/
|
|
31
|
+
export declare function useSpookyPuttySheet(): boolean;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { cliExecute, use } from "kolmafia";
|
|
2
|
+
import { getFoldGroup, have as haveItem } from "../../lib";
|
|
3
|
+
import { get } from "../../property";
|
|
4
|
+
import { $item } from "../../template-string";
|
|
5
|
+
const sheet = $item `Spooky Putty sheet`;
|
|
6
|
+
/**
|
|
7
|
+
* See whether the player has a Spooky Putty item in some form
|
|
8
|
+
*
|
|
9
|
+
* @returns Whether the player has any Spooky Putty item
|
|
10
|
+
*/
|
|
11
|
+
export function have() {
|
|
12
|
+
return getFoldGroup(sheet).some((item) => haveItem(item));
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Get spooky putty sheet copies made today
|
|
16
|
+
*
|
|
17
|
+
* @returns Number of spooky putty sheet copies made
|
|
18
|
+
*/
|
|
19
|
+
export function getSpookyPuttySheetCopiesMade() {
|
|
20
|
+
return Math.max(0, get("spookyPuttyCopiesMade"));
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Prepares a spooky putty sheet for use
|
|
24
|
+
*
|
|
25
|
+
* @returns Success
|
|
26
|
+
*/
|
|
27
|
+
export function prepareSpookyPuttySheet() {
|
|
28
|
+
if (!have())
|
|
29
|
+
return false;
|
|
30
|
+
if (haveItem(sheet))
|
|
31
|
+
return true;
|
|
32
|
+
return cliExecute("fold Spooky putty sheet");
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Get the current puttied monster
|
|
36
|
+
*
|
|
37
|
+
* @returns Current puttied monster
|
|
38
|
+
*/
|
|
39
|
+
export function getSpookyPuttySheetMonster() {
|
|
40
|
+
return get("spookyPuttyMonster");
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Use the spooky putty sheet (i.e. fight the monster probably)
|
|
44
|
+
*
|
|
45
|
+
* @returns Success
|
|
46
|
+
*/
|
|
47
|
+
export function useSpookyPuttySheet() {
|
|
48
|
+
return use(sheet);
|
|
49
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Item } from "kolmafia";
|
|
2
|
+
/**
|
|
3
|
+
* @returns true if the player can Summon BRICKOs
|
|
4
|
+
*/
|
|
5
|
+
export declare function have(): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* @returns map containing the chance of an item to be summoned
|
|
8
|
+
*/
|
|
9
|
+
export declare function expected(): Map<Item, number>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { have as _have } from "../../lib";
|
|
2
|
+
import { get } from "../../property";
|
|
3
|
+
import { $item, $skill } from "../../template-string";
|
|
4
|
+
const summonSkill = $skill `Summon BRICKOs`;
|
|
5
|
+
/**
|
|
6
|
+
* @returns true if the player can Summon BRICKOs
|
|
7
|
+
*/
|
|
8
|
+
export function have() {
|
|
9
|
+
return _have(summonSkill);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @returns map containing the chance of an item to be summoned
|
|
13
|
+
*/
|
|
14
|
+
export function expected() {
|
|
15
|
+
const eyeSummons = get("_brickoEyeSummons");
|
|
16
|
+
const eyeChance = eyeSummons === 3 ? 0.0 : eyeSummons === 0 ? 0.5 : 1.0 / 3.0;
|
|
17
|
+
return new Map([
|
|
18
|
+
[$item `BRICKO eye brick`, eyeChance],
|
|
19
|
+
[$item `BRICKO brick`, 3.0 - eyeChance],
|
|
20
|
+
]);
|
|
21
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Familiar, Item } from "kolmafia";
|
|
2
|
+
import { NumericModifier } from "../../modifierTypes";
|
|
3
|
+
export declare type FamiliarRider = {
|
|
4
|
+
familiar: Familiar;
|
|
5
|
+
drops: number | Item[] | Map<Item, number>;
|
|
6
|
+
probability: number;
|
|
7
|
+
dropPredicate?: () => boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const ridingFamiliars: readonly FamiliarRider[];
|
|
10
|
+
/**
|
|
11
|
+
* Value a specified familiar Crown rider
|
|
12
|
+
*
|
|
13
|
+
* @param rider Familiar to value
|
|
14
|
+
* @param modifierValueFunction Value of the extra modifiers the familiar provides,
|
|
15
|
+
* @param dropsValueFunction Value to assign the drops of the familiar gives
|
|
16
|
+
* @param ignoreLimitedDrops Whether to ignore drops that are daily or otherwise limited
|
|
17
|
+
* @returns Rider value (in meat)
|
|
18
|
+
*/
|
|
19
|
+
export declare function valueRider(rider: FamiliarRider, modifierValueFunction: (familiar: Familiar) => number, dropsValueFunction: (drops: Item[] | Map<Item, number>) => number, ignoreLimitedDrops?: boolean): number;
|
|
20
|
+
declare type RiderMode = {
|
|
21
|
+
modifierValueFunction: (familiar: Familiar) => number;
|
|
22
|
+
dropsValueFunction: (drops: Item[] | Map<Item, number>) => number;
|
|
23
|
+
ignoreLimitedDrops: boolean;
|
|
24
|
+
excludeCurrentFamiliar: boolean;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Creates a rider mode for this session
|
|
28
|
+
*
|
|
29
|
+
* @param name Rider mode name
|
|
30
|
+
* @param details An object consisting of various settings for the RiderMode:
|
|
31
|
+
* @param details.modifierValueFunction Function to value a familiar itself, often using modifiers,
|
|
32
|
+
* @param details.dropsValueFunction Function to value the drops of a familiar, which are stored as an `Item[]` or `Map<Item, number>`
|
|
33
|
+
* @param details.ignoreLimitedDrops Whether to ignore daily or otherwise limited drops
|
|
34
|
+
* @param details.excludeCurrentFamiliar Whether to exclude the player's current familiar
|
|
35
|
+
* @returns Map of all rider modes created this session, including the one that was just made
|
|
36
|
+
*/
|
|
37
|
+
export declare function createRiderMode(name: string, details: Partial<RiderMode>): Map<string, RiderMode>;
|
|
38
|
+
/**
|
|
39
|
+
* @param name The name of the `RiderMode` to check
|
|
40
|
+
* @returns Whether or not said `RiderMode` exists
|
|
41
|
+
*/
|
|
42
|
+
export declare function hasRiderMode(name: string): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Pick a rider
|
|
45
|
+
*
|
|
46
|
+
* @param mode Mode by which to select possible riders
|
|
47
|
+
* @returns Picked faimiliar rider or null if no rider could be selected
|
|
48
|
+
*/
|
|
49
|
+
export declare function pickRider(mode: string): FamiliarRider | null;
|
|
50
|
+
/**
|
|
51
|
+
* Find the associated NumericModifier for a given familiar when enthroned or bjornified
|
|
52
|
+
*
|
|
53
|
+
* @param modifier The NumericModifier in question
|
|
54
|
+
* @param familiar The Familiar in question
|
|
55
|
+
* @returns The value of the given numeric modifier for the Crown of Thrones (or buddy bjorn) when the given familiar is encromulated
|
|
56
|
+
*/
|
|
57
|
+
export declare function getModifier(modifier: NumericModifier, familiar: Familiar): number;
|
|
58
|
+
/**
|
|
59
|
+
* Create a `modifierValueFunction` for a familiar.
|
|
60
|
+
*
|
|
61
|
+
* @param modifiers An array consisting of the `NumericModifier`s relevant to your valuation
|
|
62
|
+
* @param functions An object keyed by `NumericModifier`s whose values are functions that map the the result of a modifier to its corresponding valuation
|
|
63
|
+
* @returns A function that maps a familiar to the value of its modifiers in the crown of thrones or buddy bjorn.
|
|
64
|
+
*/
|
|
65
|
+
export declare function createModifierValueFunction<T extends NumericModifier>(modifiers: T[], functions: {
|
|
66
|
+
[x in T]: (mod: number) => number;
|
|
67
|
+
}): (familiar: Familiar) => number;
|
|
68
|
+
export {};
|