libram 0.8.27 → 0.8.28
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/package.json +9 -8
- package/dist/Clan.d.ts +0 -128
- package/dist/Clan.js +0 -300
- package/dist/Copier.d.ts +0 -9
- package/dist/Copier.js +0 -15
- package/dist/Dungeon.d.ts +0 -45
- package/dist/Dungeon.js +0 -115
- package/dist/Kmail.d.ts +0 -104
- package/dist/Kmail.js +0 -182
- package/dist/actions/ActionSource.d.ts +0 -131
- package/dist/actions/ActionSource.js +0 -177
- package/dist/actions/Banish.d.ts +0 -16
- package/dist/actions/Banish.js +0 -121
- package/dist/actions/FreeKill.d.ts +0 -16
- package/dist/actions/FreeKill.js +0 -94
- package/dist/actions/FreeRun.d.ts +0 -16
- package/dist/actions/FreeRun.js +0 -77
- package/dist/actions/index.d.ts +0 -4
- package/dist/actions/index.js +0 -4
- package/dist/ascend.d.ts +0 -83
- package/dist/ascend.js +0 -268
- package/dist/challengePaths/2014/HeavyRains.d.ts +0 -22
- package/dist/challengePaths/2014/HeavyRains.js +0 -75
- package/dist/challengePaths/2015/CommunityService.d.ts +0 -125
- package/dist/challengePaths/2015/CommunityService.js +0 -334
- package/dist/challengePaths/2016/NuclearAutumn.d.ts +0 -13
- package/dist/challengePaths/2016/NuclearAutumn.js +0 -21
- package/dist/challengePaths/index.d.ts +0 -4
- package/dist/challengePaths/index.js +0 -4
- package/dist/combat.d.ts +0 -414
- package/dist/combat.js +0 -711
- package/dist/console.d.ts +0 -12
- package/dist/console.js +0 -14
- package/dist/counter.d.ts +0 -22
- package/dist/counter.js +0 -37
- package/dist/diet/index.d.ts +0 -80
- package/dist/diet/index.js +0 -662
- package/dist/diet/knapsack.d.ts +0 -8
- package/dist/diet/knapsack.js +0 -128
- package/dist/index.d.ts +0 -29
- package/dist/index.js +0 -26
- package/dist/lib.d.ts +0 -497
- package/dist/lib.js +0 -958
- package/dist/logger.d.ts +0 -35
- package/dist/logger.js +0 -62
- package/dist/maximize.d.ts +0 -121
- package/dist/maximize.js +0 -525
- package/dist/modifier.d.ts +0 -41
- package/dist/modifier.js +0 -160
- package/dist/modifierTypes.d.ts +0 -16
- package/dist/modifierTypes.js +0 -9
- package/dist/mood.d.ts +0 -105
- package/dist/mood.js +0 -349
- package/dist/moonSign.d.ts +0 -13
- package/dist/moonSign.js +0 -25
- package/dist/overlappingNames.d.ts +0 -3
- package/dist/overlappingNames.js +0 -42
- package/dist/property.d.ts +0 -222
- package/dist/property.js +0 -385
- package/dist/propertyTypes.d.ts +0 -19
- package/dist/propertyTypes.js +0 -10
- package/dist/propertyTyping.d.ts +0 -65
- package/dist/propertyTyping.js +0 -91
- package/dist/resources/2007/CandyHearts.d.ts +0 -9
- package/dist/resources/2007/CandyHearts.js +0 -24
- package/dist/resources/2008/DivineFavors.d.ts +0 -9
- package/dist/resources/2008/DivineFavors.js +0 -27
- package/dist/resources/2008/Stickers.d.ts +0 -49
- package/dist/resources/2008/Stickers.js +0 -84
- package/dist/resources/2009/Bandersnatch.d.ts +0 -56
- package/dist/resources/2009/Bandersnatch.js +0 -93
- package/dist/resources/2009/LoveSongs.d.ts +0 -9
- package/dist/resources/2009/LoveSongs.js +0 -24
- package/dist/resources/2009/SpookyPutty.d.ts +0 -31
- package/dist/resources/2009/SpookyPutty.js +0 -49
- package/dist/resources/2010/Brickos.d.ts +0 -9
- package/dist/resources/2010/Brickos.js +0 -21
- package/dist/resources/2010/CrownOfThrones.d.ts +0 -68
- package/dist/resources/2010/CrownOfThrones.js +0 -418
- package/dist/resources/2010/LookingGlass.d.ts +0 -29
- package/dist/resources/2010/LookingGlass.js +0 -89
- package/dist/resources/2011/Gygaxian.d.ts +0 -9
- package/dist/resources/2011/Gygaxian.js +0 -24
- package/dist/resources/2011/ObtuseAngel.d.ts +0 -33
- package/dist/resources/2011/ObtuseAngel.js +0 -51
- package/dist/resources/2011/StompingBoots.d.ts +0 -37
- package/dist/resources/2011/StompingBoots.js +0 -57
- package/dist/resources/2012/RainDoh.d.ts +0 -25
- package/dist/resources/2012/RainDoh.js +0 -37
- package/dist/resources/2012/ReagnimatedGnome.d.ts +0 -31
- package/dist/resources/2012/ReagnimatedGnome.js +0 -46
- package/dist/resources/2012/Resolutions.d.ts +0 -9
- package/dist/resources/2012/Resolutions.js +0 -28
- package/dist/resources/2013/Florist.d.ts +0 -81
- package/dist/resources/2013/Florist.js +0 -245
- package/dist/resources/2013/JungMan.d.ts +0 -33
- package/dist/resources/2013/JungMan.js +0 -69
- package/dist/resources/2013/PulledTaffy.d.ts +0 -9
- package/dist/resources/2013/PulledTaffy.js +0 -33
- package/dist/resources/2014/CrimboShrub.d.ts +0 -42
- package/dist/resources/2014/CrimboShrub.js +0 -89
- package/dist/resources/2014/DNALab.d.ts +0 -56
- package/dist/resources/2014/DNALab.js +0 -162
- package/dist/resources/2014/WinterGarden.d.ts +0 -23
- package/dist/resources/2014/WinterGarden.js +0 -35
- package/dist/resources/2015/BarrelShrine.d.ts +0 -8
- package/dist/resources/2015/BarrelShrine.js +0 -25
- package/dist/resources/2015/ChateauMantegna.d.ts +0 -52
- package/dist/resources/2015/ChateauMantegna.js +0 -99
- package/dist/resources/2015/DeckOfEveryCard.d.ts +0 -29
- package/dist/resources/2015/DeckOfEveryCard.js +0 -122
- package/dist/resources/2015/Dinseylandfill.d.ts +0 -89
- package/dist/resources/2015/Dinseylandfill.js +0 -205
- package/dist/resources/2015/MayoClinic.d.ts +0 -23
- package/dist/resources/2015/MayoClinic.js +0 -49
- package/dist/resources/2016/GingerBread.d.ts +0 -32
- package/dist/resources/2016/GingerBread.js +0 -73
- package/dist/resources/2016/SourceTerminal.d.ts +0 -181
- package/dist/resources/2016/SourceTerminal.js +0 -275
- package/dist/resources/2016/Witchess.d.ts +0 -17
- package/dist/resources/2016/Witchess.js +0 -47
- package/dist/resources/2017/AsdonMartin.d.ts +0 -59
- package/dist/resources/2017/AsdonMartin.js +0 -238
- package/dist/resources/2017/Horsery.d.ts +0 -19
- package/dist/resources/2017/Horsery.js +0 -42
- package/dist/resources/2017/MummingTrunk.d.ts +0 -8
- package/dist/resources/2017/MummingTrunk.js +0 -33
- package/dist/resources/2017/Pantogram.d.ts +0 -92
- package/dist/resources/2017/Pantogram.js +0 -174
- package/dist/resources/2017/Robortender.d.ts +0 -30
- package/dist/resources/2017/Robortender.js +0 -90
- package/dist/resources/2017/Spacegate.d.ts +0 -86
- package/dist/resources/2017/Spacegate.js +0 -178
- package/dist/resources/2017/TunnelOfLove.d.ts +0 -39
- package/dist/resources/2017/TunnelOfLove.js +0 -120
- package/dist/resources/2018/LatteLoversMembersMug.d.ts +0 -392
- package/dist/resources/2018/LatteLoversMembersMug.js +0 -303
- package/dist/resources/2018/SongBoom.d.ts +0 -33
- package/dist/resources/2018/SongBoom.js +0 -55
- package/dist/resources/2019/BeachComb.d.ts +0 -72
- package/dist/resources/2019/BeachComb.js +0 -118
- package/dist/resources/2019/CampAway.d.ts +0 -39
- package/dist/resources/2019/CampAway.js +0 -72
- package/dist/resources/2019/Snapper.d.ts +0 -33
- package/dist/resources/2019/Snapper.js +0 -73
- package/dist/resources/2020/Cartography.d.ts +0 -16
- package/dist/resources/2020/Cartography.js +0 -48
- package/dist/resources/2020/Guzzlr.d.ts +0 -160
- package/dist/resources/2020/Guzzlr.js +0 -275
- package/dist/resources/2020/RetroCape.d.ts +0 -51
- package/dist/resources/2020/RetroCape.js +0 -115
- package/dist/resources/2021/CrystalBall.d.ts +0 -14
- package/dist/resources/2021/CrystalBall.js +0 -39
- package/dist/resources/2021/DaylightShavings.d.ts +0 -40
- package/dist/resources/2021/DaylightShavings.js +0 -74
- package/dist/resources/2022/AutumnAton.d.ts +0 -78
- package/dist/resources/2022/AutumnAton.js +0 -182
- package/dist/resources/2022/CombatLoversLocket.d.ts +0 -44
- package/dist/resources/2022/CombatLoversLocket.js +0 -82
- package/dist/resources/2022/GreyGoose.d.ts +0 -59
- package/dist/resources/2022/GreyGoose.js +0 -90
- package/dist/resources/2022/JuneCleaver.d.ts +0 -47
- package/dist/resources/2022/JuneCleaver.js +0 -69
- package/dist/resources/2022/TrainSet.d.ts +0 -146
- package/dist/resources/2022/TrainSet.js +0 -228
- package/dist/resources/2023/AugustScepter.d.ts +0 -25
- package/dist/resources/2023/AugustScepter.js +0 -40
- package/dist/resources/2023/BurningLeaves.d.ts +0 -25
- package/dist/resources/2023/BurningLeaves.js +0 -74
- package/dist/resources/2023/CinchoDeMayo.d.ts +0 -25
- package/dist/resources/2023/CinchoDeMayo.js +0 -45
- package/dist/resources/2023/ClosedCircuitPayphone.d.ts +0 -80
- package/dist/resources/2023/ClosedCircuitPayphone.js +0 -129
- package/dist/resources/2023/CursedMonkeyPaw.d.ts +0 -46
- package/dist/resources/2023/CursedMonkeyPaw.js +0 -113
- package/dist/resources/2024/AprilingBandHelmet.d.ts +0 -57
- package/dist/resources/2024/AprilingBandHelmet.js +0 -118
- package/dist/resources/2024/ChestMimic.d.ts +0 -35
- package/dist/resources/2024/ChestMimic.js +0 -108
- package/dist/resources/LibramSummon.d.ts +0 -18
- package/dist/resources/LibramSummon.js +0 -74
- package/dist/resources/index.d.ts +0 -54
- package/dist/resources/index.js +0 -54
- package/dist/resources/putty-likes.d.ts +0 -21
- package/dist/resources/putty-likes.js +0 -33
- package/dist/session.d.ts +0 -169
- package/dist/session.js +0 -284
- package/dist/since.d.ts +0 -51
- package/dist/since.js +0 -108
- package/dist/template-string.d.ts +0 -324
- package/dist/template-string.js +0 -265
- package/dist/url.d.ts +0 -35
- package/dist/url.js +0 -67
- package/dist/utils.d.ts +0 -178
- package/dist/utils.js +0 -255
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
import { autosellPrice, buy, canInteract, cliExecute, getFuel, getWorkshed, haveEffect, historicalAge, historicalPrice, isNpcItem, Item, itemAmount, mallPrice, mallPrices, retrieveItem, visitUrl, } from "kolmafia";
|
|
2
|
-
import { getAverageAdventures, have as haveItem } from "../../lib";
|
|
3
|
-
import { $effect, $item, $items } from "../../template-string";
|
|
4
|
-
import { clamp } from "../../utils";
|
|
5
|
-
var PriceAge;
|
|
6
|
-
(function (PriceAge) {
|
|
7
|
-
PriceAge[PriceAge["HISTORICAL"] = 0] = "HISTORICAL";
|
|
8
|
-
PriceAge[PriceAge["RECENT"] = 1] = "RECENT";
|
|
9
|
-
PriceAge[PriceAge["TODAY"] = 2] = "TODAY";
|
|
10
|
-
})(PriceAge || (PriceAge = {}));
|
|
11
|
-
/**
|
|
12
|
-
* @returns Whether the Asdon is our current active workshed
|
|
13
|
-
*/
|
|
14
|
-
export function installed() {
|
|
15
|
-
return getWorkshed() === $item `Asdon Martin keyfob (on ring)`;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* @returns `true` if we `have` the Asdon or if it's installed
|
|
19
|
-
*/
|
|
20
|
-
export function have() {
|
|
21
|
-
return installed() || haveItem($item `Asdon Martin keyfob (on ring)`);
|
|
22
|
-
}
|
|
23
|
-
const fuelSkiplist = $items `cup of "tea", thermos of "whiskey", Lucky Lindy, Bee's Knees, Sockdollager, Ish Kabibble, Hot Socks, Phonus Balonus, Flivver, Sloppy Jalopy, glass of "milk"`;
|
|
24
|
-
/**
|
|
25
|
-
* Internal function used to determine whether a historical price is recent enough
|
|
26
|
-
*
|
|
27
|
-
* @param item The item to check
|
|
28
|
-
* @returns Whether a price is too old to trust
|
|
29
|
-
*/
|
|
30
|
-
function priceTooOld(item) {
|
|
31
|
-
return historicalPrice(item) === 0 || historicalAge(item) >= 7;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* @param item The item in question
|
|
35
|
-
* @returns Mall max if historicalPrice is -1; otherwise, the historical price
|
|
36
|
-
*/
|
|
37
|
-
function historicalPriceOrMax(item) {
|
|
38
|
-
const historical = historicalPrice(item);
|
|
39
|
-
return historical < 0 ? 999999999 : historical;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* @param item The item in question
|
|
43
|
-
* @returns Mall max if historicalPrice is -1; otherwise, the mall price
|
|
44
|
-
*/
|
|
45
|
-
function mallPriceOrMax(item) {
|
|
46
|
-
const mall = mallPrice(item);
|
|
47
|
-
return mall < 0 ? 999999999 : mall;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Combined internal function to determine the price of an item
|
|
51
|
-
*
|
|
52
|
-
* @param item The item in question
|
|
53
|
-
* @param priceAge How do we decide when to use historical vs real mall prices?
|
|
54
|
-
* @returns The price of the item in question
|
|
55
|
-
*/
|
|
56
|
-
function price(item, priceAge) {
|
|
57
|
-
switch (priceAge) {
|
|
58
|
-
case PriceAge.HISTORICAL: {
|
|
59
|
-
const historical = historicalPriceOrMax(item);
|
|
60
|
-
return historical === 0 ? mallPriceOrMax(item) : historical;
|
|
61
|
-
}
|
|
62
|
-
case PriceAge.RECENT:
|
|
63
|
-
return priceTooOld(item)
|
|
64
|
-
? mallPriceOrMax(item)
|
|
65
|
-
: historicalPriceOrMax(item);
|
|
66
|
-
case PriceAge.TODAY:
|
|
67
|
-
return mallPriceOrMax(item);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
function inventoryItems() {
|
|
71
|
-
return Item.all()
|
|
72
|
-
.filter(isFuelItem)
|
|
73
|
-
.filter((item) => haveItem(item) &&
|
|
74
|
-
[100, autosellPrice(item)].includes(price(item, PriceAge.RECENT)));
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* @param it The item in question
|
|
78
|
-
* @param priceAge The PriceAge option to apply
|
|
79
|
-
* @returns Meat per fuel of an item
|
|
80
|
-
*/
|
|
81
|
-
function calculateFuelUnitCost(it, priceAge = PriceAge.RECENT) {
|
|
82
|
-
const units = getAverageAdventures(it);
|
|
83
|
-
return price(it, priceAge) / units;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* @param it the item in question
|
|
87
|
-
* @returns Can `it` be used as Asdon fuel?
|
|
88
|
-
*/
|
|
89
|
-
export function isFuelItem(it) {
|
|
90
|
-
return (!isNpcItem(it) &&
|
|
91
|
-
it.fullness + it.inebriety > 0 &&
|
|
92
|
-
getAverageAdventures(it) > 0 &&
|
|
93
|
-
it.tradeable &&
|
|
94
|
-
it.discardable &&
|
|
95
|
-
!fuelSkiplist.includes(it));
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* @returns The best fuel options available to us at this time
|
|
99
|
-
*/
|
|
100
|
-
function getBestFuels() {
|
|
101
|
-
// Three stages.
|
|
102
|
-
// 1. Filter to reasonable items using historical cost (within 5x of historical best).
|
|
103
|
-
const allFuel = Item.all().filter(isFuelItem);
|
|
104
|
-
if (allFuel.filter((item) => historicalPrice(item) === 0).length > 100) {
|
|
105
|
-
mallPrices("food");
|
|
106
|
-
mallPrices("booze");
|
|
107
|
-
}
|
|
108
|
-
const keyHistorical = (item) => calculateFuelUnitCost(item, PriceAge.HISTORICAL);
|
|
109
|
-
allFuel.sort((x, y) => keyHistorical(x) - keyHistorical(y));
|
|
110
|
-
const bestUnitCost = keyHistorical(allFuel[0]);
|
|
111
|
-
const firstBadIndex = allFuel.findIndex((item) => keyHistorical(item) > 5 * bestUnitCost);
|
|
112
|
-
const potentialFuel = firstBadIndex > 0 ? allFuel.slice(0, firstBadIndex) : allFuel;
|
|
113
|
-
// 2. Filter to top 10 candidates using prices at most a week old.
|
|
114
|
-
if (potentialFuel.filter((item) => priceTooOld(item)).length > 100) {
|
|
115
|
-
mallPrices("food");
|
|
116
|
-
mallPrices("booze");
|
|
117
|
-
}
|
|
118
|
-
const key1 = (item) => -getAverageAdventures(item);
|
|
119
|
-
const key2 = (item) => calculateFuelUnitCost(item, PriceAge.RECENT);
|
|
120
|
-
potentialFuel.sort((x, y) => key1(x) - key1(y));
|
|
121
|
-
potentialFuel.sort((x, y) => key2(x) - key2(y));
|
|
122
|
-
// 3. Find result using precise price for those top candidates.
|
|
123
|
-
const candidates = potentialFuel.slice(0, 10);
|
|
124
|
-
const key3 = (item) => calculateFuelUnitCost(item, PriceAge.TODAY);
|
|
125
|
-
candidates.sort((x, y) => key3(x) - key3(y));
|
|
126
|
-
if (calculateFuelUnitCost(candidates[0], PriceAge.TODAY) > 100) {
|
|
127
|
-
throw new Error("Could not identify any fuel with efficiency better than 100 meat per fuel. " +
|
|
128
|
-
"This means something went wrong.");
|
|
129
|
-
}
|
|
130
|
-
return candidates;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Fuel your Asdon Martin with a given quantity of a given item
|
|
134
|
-
*
|
|
135
|
-
* @param it Item to fuel with.
|
|
136
|
-
* @param quantity Number of items to fuel with.
|
|
137
|
-
* @returns Whether we succeeded at fueling with the given items.
|
|
138
|
-
*/
|
|
139
|
-
export function insertFuel(it, quantity = 1) {
|
|
140
|
-
const result = visitUrl(`campground.php?action=fuelconvertor&pwd&qty=${quantity}&iid=${it.id}&go=Convert%21`);
|
|
141
|
-
return result.includes("The display updates with a");
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Fill your Asdon Martin to the given fuel level in the cheapest way possible
|
|
145
|
-
*
|
|
146
|
-
* @param targetUnits Fuel level to attempt to reach.
|
|
147
|
-
* @returns Whether we succeeded at filling to the target fuel level.
|
|
148
|
-
*/
|
|
149
|
-
export function fillTo(targetUnits) {
|
|
150
|
-
if (!installed())
|
|
151
|
-
return false;
|
|
152
|
-
while (getFuel() < targetUnits) {
|
|
153
|
-
// if in Hardcore/ronin, skip the price calculation and just use soda bread
|
|
154
|
-
const [bestFuel, secondBest] = canInteract()
|
|
155
|
-
? getBestFuels()
|
|
156
|
-
: [$item `loaf of soda bread`, undefined];
|
|
157
|
-
const count = Math.ceil(targetUnits / getAverageAdventures(bestFuel));
|
|
158
|
-
let ceiling = undefined;
|
|
159
|
-
if (secondBest) {
|
|
160
|
-
const efficiencyOfSecondBest = mallPrice(secondBest) / getAverageAdventures(secondBest);
|
|
161
|
-
ceiling = Math.ceil(efficiencyOfSecondBest * getAverageAdventures(bestFuel));
|
|
162
|
-
}
|
|
163
|
-
if (!canInteract())
|
|
164
|
-
retrieveItem(count, bestFuel);
|
|
165
|
-
else
|
|
166
|
-
ceiling ? buy(count, bestFuel, ceiling) : buy(count, bestFuel);
|
|
167
|
-
if (!insertFuel(bestFuel, Math.min(itemAmount(bestFuel), count))) {
|
|
168
|
-
throw new Error("Failed to fuel Asdon Martin.");
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
return getFuel() >= targetUnits;
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* @param targetUnits The fuel level we aim to achieve
|
|
175
|
-
* @returns Whether we successfully filled our Asdon's tank
|
|
176
|
-
*/
|
|
177
|
-
function fillWithBestInventoryItem(targetUnits) {
|
|
178
|
-
const options = inventoryItems().sort((a, b) => getAverageAdventures(b) / autosellPrice(b) -
|
|
179
|
-
getAverageAdventures(a) / autosellPrice(a));
|
|
180
|
-
if (options.length === 0)
|
|
181
|
-
return false;
|
|
182
|
-
const best = options[0];
|
|
183
|
-
if (autosellPrice(best) / getAverageAdventures(best) > 100)
|
|
184
|
-
return false;
|
|
185
|
-
const amountToUse = clamp(Math.ceil(targetUnits / getAverageAdventures(best)), 0, itemAmount(best));
|
|
186
|
-
return insertFuel(best, amountToUse);
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Fill your Asdon Martin by prioritizing mallmin items in your inventory. Default to the behavior of fillTo.
|
|
190
|
-
*
|
|
191
|
-
* @param targetUnits Fuel level to attempt to reach.
|
|
192
|
-
* @returns Whether we succeeded at filling to the target fuel level.
|
|
193
|
-
*/
|
|
194
|
-
export function fillWithInventoryTo(targetUnits) {
|
|
195
|
-
if (!installed())
|
|
196
|
-
return false;
|
|
197
|
-
let continueFuelingFromInventory = true;
|
|
198
|
-
while (getFuel() < targetUnits && continueFuelingFromInventory) {
|
|
199
|
-
continueFuelingFromInventory &&= fillWithBestInventoryItem(targetUnits);
|
|
200
|
-
}
|
|
201
|
-
return fillTo(targetUnits);
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Object consisting of the various Asdon driving styles
|
|
205
|
-
*/
|
|
206
|
-
export const Driving = {
|
|
207
|
-
Obnoxiously: $effect `Driving Obnoxiously`,
|
|
208
|
-
Stealthily: $effect `Driving Stealthily`,
|
|
209
|
-
Wastefully: $effect `Driving Wastefully`,
|
|
210
|
-
Safely: $effect `Driving Safely`,
|
|
211
|
-
Recklessly: $effect `Driving Recklessly`,
|
|
212
|
-
Intimidatingly: $effect `Driving Intimidatingly`,
|
|
213
|
-
Quickly: $effect `Driving Quickly`,
|
|
214
|
-
Observantly: $effect `Driving Observantly`,
|
|
215
|
-
Waterproofly: $effect `Driving Waterproofly`,
|
|
216
|
-
};
|
|
217
|
-
/**
|
|
218
|
-
* Attempt to drive with a particular style for a particular number of turns.
|
|
219
|
-
*
|
|
220
|
-
* @param style The driving style to use.
|
|
221
|
-
* @param turns The number of turns to attempt to get.
|
|
222
|
-
* @param preferInventory Whether we should preferentially value items currently in our inventory.
|
|
223
|
-
* @returns Whether we have at least as many turns as requested of said driving style.
|
|
224
|
-
*/
|
|
225
|
-
export function drive(style, turns = 1, preferInventory = false) {
|
|
226
|
-
if (!Object.values(Driving).includes(style))
|
|
227
|
-
return false;
|
|
228
|
-
if (!installed())
|
|
229
|
-
return false;
|
|
230
|
-
if (haveEffect(style) >= turns)
|
|
231
|
-
return true;
|
|
232
|
-
const fuelNeeded = 37 * Math.ceil((turns - haveEffect(style)) / 30);
|
|
233
|
-
(preferInventory ? fillWithInventoryTo : fillTo)(fuelNeeded);
|
|
234
|
-
while (getFuel() >= 37 && haveEffect(style) < turns) {
|
|
235
|
-
cliExecute(`asdonmartin drive ${style.name.replace("Driving ", "")}`);
|
|
236
|
-
}
|
|
237
|
-
return haveEffect(style) >= turns;
|
|
238
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Modifiers } from "../..";
|
|
2
|
-
/**
|
|
3
|
-
* @returns Whether or not the horsery is available
|
|
4
|
-
*/
|
|
5
|
-
export declare function have(): boolean;
|
|
6
|
-
export declare type Horse = "pale" | "dark" | "normal" | "crazy";
|
|
7
|
-
/**
|
|
8
|
-
* @returns Your current horse; `null` if you are horseless
|
|
9
|
-
*/
|
|
10
|
-
export declare function current(): Horse | null;
|
|
11
|
-
/**
|
|
12
|
-
* @param horse The horse to change to
|
|
13
|
-
* @returns Whether, at the end of all things, that is your horse
|
|
14
|
-
*/
|
|
15
|
-
export declare function changeHorse(horse: Horse): boolean;
|
|
16
|
-
/**
|
|
17
|
-
* @returns a `Modifiers` object consisting of the crazy horse's stats today
|
|
18
|
-
*/
|
|
19
|
-
export declare function crazyHorseStats(): Modifiers;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { cliExecute, visitUrl } from "kolmafia";
|
|
2
|
-
import { get } from "../../property";
|
|
3
|
-
/**
|
|
4
|
-
* @returns Whether or not the horsery is available
|
|
5
|
-
*/
|
|
6
|
-
export function have() {
|
|
7
|
-
return get("horseryAvailable");
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* @returns Your current horse; `null` if you are horseless
|
|
11
|
-
*/
|
|
12
|
-
export function current() {
|
|
13
|
-
const horse = get("_horsery");
|
|
14
|
-
return (horse ? horse.split(" ")[0] : null);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @param horse The horse to change to
|
|
18
|
-
* @returns Whether, at the end of all things, that is your horse
|
|
19
|
-
*/
|
|
20
|
-
export function changeHorse(horse) {
|
|
21
|
-
if (horse === current())
|
|
22
|
-
return true;
|
|
23
|
-
if (!have())
|
|
24
|
-
return false;
|
|
25
|
-
cliExecute(`horsery ${horse}`);
|
|
26
|
-
return current() === horse;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* @returns a `Modifiers` object consisting of the crazy horse's stats today
|
|
30
|
-
*/
|
|
31
|
-
export function crazyHorseStats() {
|
|
32
|
-
if (!have())
|
|
33
|
-
return {};
|
|
34
|
-
if (!get("_horseryCrazyName")) {
|
|
35
|
-
visitUrl("place.php?whichplace=town_right&action=town_horsery");
|
|
36
|
-
}
|
|
37
|
-
return {
|
|
38
|
-
"Mysticality Percent": Number(get("_horseryCrazyMys")),
|
|
39
|
-
"Muscle Percent": Number(get("_horseryCrazyMus")),
|
|
40
|
-
"Moxie Percent": Number(get("_horseryCrazyMox")),
|
|
41
|
-
};
|
|
42
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Familiar } from "kolmafia";
|
|
2
|
-
import { NumericModifier } from "../../modifierTypes";
|
|
3
|
-
/**
|
|
4
|
-
* Parses the _mummeryMods preference into a Map for easier use.
|
|
5
|
-
*
|
|
6
|
-
* @returns A map, mapping Familiars to a Tuple consisting of the NumericModifier attached to the familiar, and the value thereof.
|
|
7
|
-
*/
|
|
8
|
-
export declare function currentCostumes(): Map<Familiar, [NumericModifier, number]>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { toFamiliar } from "kolmafia";
|
|
2
|
-
import { get } from "../../property";
|
|
3
|
-
/**
|
|
4
|
-
* Internal function used to parse mods
|
|
5
|
-
*
|
|
6
|
-
* @param input The modstring used in your mummery pref
|
|
7
|
-
* @returns a NumericModifier matching that string
|
|
8
|
-
*/
|
|
9
|
-
function toModifier(input) {
|
|
10
|
-
const regExp = new RegExp(/Experience \((.*?)\)/);
|
|
11
|
-
const matcher = input.match(regExp);
|
|
12
|
-
return (matcher ? `${matcher[2]} Experience` : input);
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Parses the _mummeryMods preference into a Map for easier use.
|
|
16
|
-
*
|
|
17
|
-
* @returns A map, mapping Familiars to a Tuple consisting of the NumericModifier attached to the familiar, and the value thereof.
|
|
18
|
-
*/
|
|
19
|
-
export function currentCostumes() {
|
|
20
|
-
const entries = get("_mummeryMods").split(",");
|
|
21
|
-
const returnValue = new Map();
|
|
22
|
-
const regExp = new RegExp(/([^:]+): \[(\d+)\*fam\(([^)]+)\)\]/);
|
|
23
|
-
for (const entry of entries) {
|
|
24
|
-
const matcher = entry.match(regExp);
|
|
25
|
-
if (matcher) {
|
|
26
|
-
returnValue.set(toFamiliar(matcher[3]), [
|
|
27
|
-
toModifier(matcher[1]),
|
|
28
|
-
parseInt(matcher[2]),
|
|
29
|
-
]);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return returnValue;
|
|
33
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { Item } from "kolmafia";
|
|
2
|
-
/**
|
|
3
|
-
* @returns Do we `have` the Pantogram itself?
|
|
4
|
-
*/
|
|
5
|
-
export declare function have(): boolean;
|
|
6
|
-
/**
|
|
7
|
-
* @returns Do we `have` pantogram pants?
|
|
8
|
-
*/
|
|
9
|
-
export declare function havePants(): boolean;
|
|
10
|
-
declare type PantogramAlignment = "Muscle" | "Moxie" | "Mysticality";
|
|
11
|
-
declare const Element: {
|
|
12
|
-
"Hot Resistance: 2": number;
|
|
13
|
-
"Cold Resistance: 2": number;
|
|
14
|
-
"Spooky Resistance: 2": number;
|
|
15
|
-
"Sleaze Resistance: 2": number;
|
|
16
|
-
"Stench Resistance: 2": number;
|
|
17
|
-
};
|
|
18
|
-
declare type PantogramElement = keyof typeof Element;
|
|
19
|
-
declare const LeftSacrifice: {
|
|
20
|
-
"Maximum HP: 40": number[];
|
|
21
|
-
"Maximum MP: 20": number[];
|
|
22
|
-
"HP Regen Max: 10": (number | Item)[];
|
|
23
|
-
"HP Regen Max: 15": (number | Item)[];
|
|
24
|
-
"HP Regen Max: 20": (number | Item)[];
|
|
25
|
-
"MP Regen Max: 10": (number | Item)[];
|
|
26
|
-
"MP Regen Max: 15": (number | Item)[];
|
|
27
|
-
"MP Regen Max: 20": (number | Item)[];
|
|
28
|
-
"Mana Cost: -3": (number | Item)[];
|
|
29
|
-
};
|
|
30
|
-
declare type PantogramSacrificeL = keyof typeof LeftSacrifice;
|
|
31
|
-
declare const MiddleSacrifice: {
|
|
32
|
-
"Combat Rate: -5": number[];
|
|
33
|
-
"Combat Rate: 5": number[];
|
|
34
|
-
"Critical Hit Percent: 10": (number | Item)[];
|
|
35
|
-
"Initiative: 50": (number | Item)[];
|
|
36
|
-
"Familiar Weight: 10": (number | Item)[];
|
|
37
|
-
"Candy Drop: 100": (number | Item)[];
|
|
38
|
-
"Item Drop Penalty: -10": (number | Item)[];
|
|
39
|
-
"Fishing Skill: 5": (number | Item)[];
|
|
40
|
-
"Pool Skill: 5": (number | Item)[];
|
|
41
|
-
"Avatar: Purple": (number | Item)[];
|
|
42
|
-
"Drops Items: true": (number | Item)[];
|
|
43
|
-
};
|
|
44
|
-
declare type PantogramSacrificeM = keyof typeof MiddleSacrifice;
|
|
45
|
-
declare const RightSacrifice: {
|
|
46
|
-
"Weapon Damage: 20": number[];
|
|
47
|
-
"Spell Damage Percent: 20": number[];
|
|
48
|
-
"Meat Drop: 30": (number | Item)[];
|
|
49
|
-
"Meat Drop: 60": (number | Item)[];
|
|
50
|
-
"Item Drop: 15": (number | Item)[];
|
|
51
|
-
"Item Drop: 30": (number | Item)[];
|
|
52
|
-
"Muscle Experience: 3": (number | Item)[];
|
|
53
|
-
"Mysticality Experience: 3": (number | Item)[];
|
|
54
|
-
"Moxie Experience: 3": (number | Item)[];
|
|
55
|
-
"Muscle Experience Percent: 25": (number | Item)[];
|
|
56
|
-
"Mysticality Experience Percent: 25": (number | Item)[];
|
|
57
|
-
"Moxie Experience Percent: 25": (number | Item)[];
|
|
58
|
-
};
|
|
59
|
-
declare type PantogramSacrificeR = keyof typeof RightSacrifice;
|
|
60
|
-
declare type Pants = {
|
|
61
|
-
alignment: PantogramAlignment;
|
|
62
|
-
element: PantogramElement;
|
|
63
|
-
leftSac: PantogramSacrificeL;
|
|
64
|
-
rightSac: PantogramSacrificeR;
|
|
65
|
-
middleSac: PantogramSacrificeM;
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* Finds the item requirements for a particular pair of pants.
|
|
69
|
-
*
|
|
70
|
-
* @param modifiers An object consisting of the modifiers you want on your pants. For modifiers repeated across a particular sacrifice, use a tuple of that modifier and its value.
|
|
71
|
-
* @returns A map of the items you need to make these pants and the quantities needed.
|
|
72
|
-
*/
|
|
73
|
-
export declare function findRequirements(modifiers: Partial<Pants>): Map<Item, number>;
|
|
74
|
-
/**
|
|
75
|
-
* Makes a pair of pants with the given modifiers
|
|
76
|
-
*
|
|
77
|
-
* @param alignment The stat you'd like your pants to improve. Moxie, Mysticality, or Muscle
|
|
78
|
-
* @param element The element you'd like your pants to provide resistance for
|
|
79
|
-
* @param leftSac The modifier you'd like to get from your leftmost sacrifice in Pantagramming.
|
|
80
|
-
* @param middleSac The modifier you'd like to get from your middle sacrifice in Pantagramming.
|
|
81
|
-
* @param rightSac The modifier you'd like to get from your rightmost sacrifice in Pantagramming.
|
|
82
|
-
* @returns Whether or not you successfully created a pair of pants. False if you don't own the pantogram or if you already have pantogram pants.
|
|
83
|
-
*/
|
|
84
|
-
export declare function makePants(alignment: PantogramAlignment, element: PantogramElement, leftSac: PantogramSacrificeL, middleSac: PantogramSacrificeM, rightSac: PantogramSacrificeR): boolean;
|
|
85
|
-
/**
|
|
86
|
-
* Creates a pair of pants from a Pants object.
|
|
87
|
-
*
|
|
88
|
-
* @param pants An object consisting of the modifiers you'd like the pants to give you.
|
|
89
|
-
* @returns Whether or not you successfully created a pair of pants. False if you don't own the pantogram or if you already have pantogram pants.
|
|
90
|
-
*/
|
|
91
|
-
export declare function makePantsFromObject(pants: Pants): boolean;
|
|
92
|
-
export {};
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { Item, visitUrl } from "kolmafia";
|
|
2
|
-
import { directlyUse, have as haveItem } from "../../lib";
|
|
3
|
-
import { $item } from "../../template-string";
|
|
4
|
-
const pantogram = $item `portable pantogram`;
|
|
5
|
-
const pants = $item `pantogram pants`;
|
|
6
|
-
/**
|
|
7
|
-
* @returns Do we `have` the Pantogram itself?
|
|
8
|
-
*/
|
|
9
|
-
export function have() {
|
|
10
|
-
return haveItem(pantogram);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* @returns Do we `have` pantogram pants?
|
|
14
|
-
*/
|
|
15
|
-
export function havePants() {
|
|
16
|
-
return haveItem(pants);
|
|
17
|
-
}
|
|
18
|
-
const Alignment = {
|
|
19
|
-
["Muscle"]: 1,
|
|
20
|
-
["Mysticality"]: 2,
|
|
21
|
-
["Moxie"]: 3,
|
|
22
|
-
};
|
|
23
|
-
const Element = {
|
|
24
|
-
["Hot Resistance: 2"]: 1,
|
|
25
|
-
["Cold Resistance: 2"]: 2,
|
|
26
|
-
["Spooky Resistance: 2"]: 3,
|
|
27
|
-
["Sleaze Resistance: 2"]: 4,
|
|
28
|
-
["Stench Resistance: 2"]: 5,
|
|
29
|
-
};
|
|
30
|
-
const LeftSacrifice = {
|
|
31
|
-
["Maximum HP: 40"]: [-1, 0],
|
|
32
|
-
["Maximum MP: 20"]: [-2, 0],
|
|
33
|
-
["HP Regen Max: 10"]: [$item `red pixel potion`, 1],
|
|
34
|
-
["HP Regen Max: 15"]: [$item `royal jelly`, 1],
|
|
35
|
-
["HP Regen Max: 20"]: [$item `scented massage oil`, 1],
|
|
36
|
-
["MP Regen Max: 10"]: [$item `Cherry Cloaca Cola`, 1],
|
|
37
|
-
["MP Regen Max: 15"]: [$item `bubblin' crude`, 1],
|
|
38
|
-
["MP Regen Max: 20"]: [$item `glowing New Age crystal`, 1],
|
|
39
|
-
["Mana Cost: -3"]: [$item `baconstone`, 1],
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Internal function used for `makePants`
|
|
43
|
-
*
|
|
44
|
-
* @param mod Modifier to get from our Left sacrifice
|
|
45
|
-
* @returns Item-tuple to use in our URL string
|
|
46
|
-
*/
|
|
47
|
-
function getLeftSacPair(mod) {
|
|
48
|
-
return LeftSacrifice[mod];
|
|
49
|
-
}
|
|
50
|
-
const MiddleSacrifice = {
|
|
51
|
-
["Combat Rate: -5"]: [-1, 0],
|
|
52
|
-
["Combat Rate: 5"]: [-2, 0],
|
|
53
|
-
["Critical Hit Percent: 10"]: [$item `hamethyst`, 1],
|
|
54
|
-
["Initiative: 50"]: [$item `bar skin`, 1],
|
|
55
|
-
["Familiar Weight: 10"]: [$item `lead necklace`, 11],
|
|
56
|
-
["Candy Drop: 100"]: [$item `huge bowl of candy`, 1],
|
|
57
|
-
["Item Drop Penalty: -10"]: [$item `sea salt crystal`, 11],
|
|
58
|
-
["Fishing Skill: 5"]: [$item `wriggling worm`, 1],
|
|
59
|
-
["Pool Skill: 5"]: [$item `8-ball`, 15],
|
|
60
|
-
["Avatar: Purple"]: [$item `moxie weed`, 99],
|
|
61
|
-
["Drops Items: true"]: [$item `ten-leaf clover`, 1],
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Internal function used for `makePants`
|
|
65
|
-
*
|
|
66
|
-
* @param mod Modifier to get from our Middle sacrifice
|
|
67
|
-
* @returns Item-tuple to use in our URL string
|
|
68
|
-
*/
|
|
69
|
-
function getMiddleSacPair(mod) {
|
|
70
|
-
return MiddleSacrifice[mod];
|
|
71
|
-
}
|
|
72
|
-
const RightSacrifice = {
|
|
73
|
-
["Weapon Damage: 20"]: [-1, 0],
|
|
74
|
-
["Spell Damage Percent: 20"]: [-2, 0],
|
|
75
|
-
["Meat Drop: 30"]: [$item `taco shell`, 1],
|
|
76
|
-
["Meat Drop: 60"]: [$item `porquoise`, 1],
|
|
77
|
-
["Item Drop: 15"]: [$item `fairy gravy boat`, 1],
|
|
78
|
-
["Item Drop: 30"]: [$item `tiny dancer`, 1],
|
|
79
|
-
["Muscle Experience: 3"]: [$item `Knob Goblin firecracker`, 3],
|
|
80
|
-
["Mysticality Experience: 3"]: [$item `razor-sharp can lid`, 3],
|
|
81
|
-
["Moxie Experience: 3"]: [$item `spider web`, 3],
|
|
82
|
-
["Muscle Experience Percent: 25"]: [$item `synthetic marrow`, 5],
|
|
83
|
-
["Mysticality Experience Percent: 25"]: [$item `haunted battery`, 5],
|
|
84
|
-
["Moxie Experience Percent: 25"]: [$item `the funk`, 5],
|
|
85
|
-
};
|
|
86
|
-
/**
|
|
87
|
-
* Internal function used for `makePants`
|
|
88
|
-
*
|
|
89
|
-
* @param mod Modifier to get from our Right sacrifice
|
|
90
|
-
* @returns Item-tuple to use in our URL string
|
|
91
|
-
*/
|
|
92
|
-
function getRightSacPair(mod) {
|
|
93
|
-
return RightSacrifice[mod];
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Finds the item requirements for a particular pair of pants.
|
|
97
|
-
*
|
|
98
|
-
* @param modifiers An object consisting of the modifiers you want on your pants. For modifiers repeated across a particular sacrifice, use a tuple of that modifier and its value.
|
|
99
|
-
* @returns A map of the items you need to make these pants and the quantities needed.
|
|
100
|
-
*/
|
|
101
|
-
export function findRequirements(modifiers) {
|
|
102
|
-
const { leftSac, rightSac, middleSac } = modifiers;
|
|
103
|
-
const returnValue = new Map();
|
|
104
|
-
if (leftSac) {
|
|
105
|
-
const [sacrifice, quantity] = getLeftSacPair(leftSac);
|
|
106
|
-
if (sacrifice instanceof Item) {
|
|
107
|
-
returnValue.set(sacrifice, quantity);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
if (rightSac) {
|
|
111
|
-
const [sacrifice, quantity] = getRightSacPair(rightSac);
|
|
112
|
-
if (sacrifice instanceof Item) {
|
|
113
|
-
returnValue.set(sacrifice, quantity);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
if (middleSac) {
|
|
117
|
-
const [sacrifice, quantity] = getMiddleSacPair(middleSac);
|
|
118
|
-
if (sacrifice instanceof Item) {
|
|
119
|
-
returnValue.set(sacrifice, quantity);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
return returnValue;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Internal function used in `makePants`
|
|
126
|
-
*
|
|
127
|
-
* @param pair Tuple consisting of an item or number and another number
|
|
128
|
-
* @returns URL parameter associated with the tuple
|
|
129
|
-
*/
|
|
130
|
-
function sacrificePairToURL(pair) {
|
|
131
|
-
const [rawSacrifice, quantity] = pair;
|
|
132
|
-
const sacrifice = rawSacrifice instanceof Item ? rawSacrifice.id : rawSacrifice;
|
|
133
|
-
return `${sacrifice},${quantity}`;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Makes a pair of pants with the given modifiers
|
|
137
|
-
*
|
|
138
|
-
* @param alignment The stat you'd like your pants to improve. Moxie, Mysticality, or Muscle
|
|
139
|
-
* @param element The element you'd like your pants to provide resistance for
|
|
140
|
-
* @param leftSac The modifier you'd like to get from your leftmost sacrifice in Pantagramming.
|
|
141
|
-
* @param middleSac The modifier you'd like to get from your middle sacrifice in Pantagramming.
|
|
142
|
-
* @param rightSac The modifier you'd like to get from your rightmost sacrifice in Pantagramming.
|
|
143
|
-
* @returns Whether or not you successfully created a pair of pants. False if you don't own the pantogram or if you already have pantogram pants.
|
|
144
|
-
*/
|
|
145
|
-
export function makePants(alignment, element, leftSac, middleSac, rightSac) {
|
|
146
|
-
if (haveItem(pants) || !haveItem(pantogram))
|
|
147
|
-
return false;
|
|
148
|
-
const requirements = findRequirements({
|
|
149
|
-
alignment: alignment,
|
|
150
|
-
element: element,
|
|
151
|
-
leftSac: leftSac,
|
|
152
|
-
rightSac: rightSac,
|
|
153
|
-
middleSac: middleSac,
|
|
154
|
-
});
|
|
155
|
-
if (Array.from(requirements.entries()).some(([item, quantity]) => !haveItem(item, quantity))) {
|
|
156
|
-
return false;
|
|
157
|
-
}
|
|
158
|
-
const s1 = sacrificePairToURL(getLeftSacPair(leftSac));
|
|
159
|
-
const s2 = sacrificePairToURL(getRightSacPair(rightSac));
|
|
160
|
-
const s3 = sacrificePairToURL(getMiddleSacPair(middleSac));
|
|
161
|
-
const url = `choice.php?whichchoice=1270&pwd&option=1&m=${Alignment[alignment]}&e=${Element[element]}&s1=${s1}&s2=${s2}&s3=${s3}`;
|
|
162
|
-
directlyUse(pantogram);
|
|
163
|
-
visitUrl(url);
|
|
164
|
-
return haveItem(pants);
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Creates a pair of pants from a Pants object.
|
|
168
|
-
*
|
|
169
|
-
* @param pants An object consisting of the modifiers you'd like the pants to give you.
|
|
170
|
-
* @returns Whether or not you successfully created a pair of pants. False if you don't own the pantogram or if you already have pantogram pants.
|
|
171
|
-
*/
|
|
172
|
-
export function makePantsFromObject(pants) {
|
|
173
|
-
return makePants(pants.alignment, pants.element, pants.leftSac, pants.middleSac, pants.rightSac);
|
|
174
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Item, Monster, Phylum } from "kolmafia";
|
|
2
|
-
/**
|
|
3
|
-
* @returns Whether you have the Robortender in your terrarium/available
|
|
4
|
-
*/
|
|
5
|
-
export declare function have(): boolean;
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param target The phylum or monster you want to know the robortender drop of
|
|
9
|
-
* @returns The robortender drop associated with that phylum or monster
|
|
10
|
-
*/
|
|
11
|
-
export declare function dropFrom(target: Monster | Phylum): Item;
|
|
12
|
-
/**
|
|
13
|
-
* Determines the probability of getting a robortender drop based on number of drops received
|
|
14
|
-
*
|
|
15
|
-
* @param dropNumber The number of drops to assume you've already received; defaults to mafia's tracked amount
|
|
16
|
-
* @returns The probability of getting a robort drop
|
|
17
|
-
*/
|
|
18
|
-
export declare function dropChance(dropNumber?: number): number;
|
|
19
|
-
export declare const minorDrinks: Item[];
|
|
20
|
-
export declare const majorDrinks: Item[];
|
|
21
|
-
export declare const drinks: Item[];
|
|
22
|
-
/**
|
|
23
|
-
* @returns An array consisting of the drinks you've fed your robortender today.
|
|
24
|
-
*/
|
|
25
|
-
export declare function currentDrinks(): Item[];
|
|
26
|
-
/**
|
|
27
|
-
* @param beverage A robortender-consumable drink of choice (i.e. Drive-By Shooting, Single Entendre, etc)
|
|
28
|
-
* @returns A boolean; if true, the user's robortender has drunk that drink after execution. If false, it has not. This ALSO returns false if the user has not passed the function a robortender-consumable drink. If the user does not already have the beverage in their inventory, this function will not purchase the requested for you.
|
|
29
|
-
*/
|
|
30
|
-
export declare function feed(beverage: Item): boolean;
|