libram 0.8.26 → 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 -50
- package/dist/resources/2024/AprilingBandHelmet.js +0 -103
- 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,181 +0,0 @@
|
|
|
1
|
-
import { Effect, Item, Monster, Skill } from "kolmafia";
|
|
2
|
-
import { Copier } from "../../Copier";
|
|
3
|
-
/**
|
|
4
|
-
* @returns Is the terminal currently installed & available in our campground?
|
|
5
|
-
*/
|
|
6
|
-
export declare function have(): boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Buffs that can be acquired from Enhance
|
|
9
|
-
*
|
|
10
|
-
* - Items: +30% Item Drop
|
|
11
|
-
* - Meat: +60% Meat Drop
|
|
12
|
-
* - Init: +50% Initiative
|
|
13
|
-
* - Critical: +10% chance of Critical Hit, +10% chance of Spell Critical Hit
|
|
14
|
-
* - Damage: +5 Prismatic Damage
|
|
15
|
-
* - Substats: +3 Stats Per Fight
|
|
16
|
-
*/
|
|
17
|
-
export declare const Buffs: {
|
|
18
|
-
Items: Effect;
|
|
19
|
-
Meat: Effect;
|
|
20
|
-
Init: Effect;
|
|
21
|
-
Critical: Effect;
|
|
22
|
-
Damage: Effect;
|
|
23
|
-
Substats: Effect;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Acquire a buff from the Source Terminal
|
|
27
|
-
*
|
|
28
|
-
* @param buff The buff to acquire
|
|
29
|
-
* @see Buffs
|
|
30
|
-
* @returns Whether we successfully acquired the buff
|
|
31
|
-
*/
|
|
32
|
-
export declare function enhance(buff: Effect): boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Rollover buffs that can be acquired from Enquiry
|
|
35
|
-
*/
|
|
36
|
-
export declare const RolloverBuffs: {
|
|
37
|
-
/** +5 Familiar Weight */
|
|
38
|
-
Familiar: Effect;
|
|
39
|
-
/** +25 ML */
|
|
40
|
-
Monsters: Effect;
|
|
41
|
-
/** +5 Prismatic Resistance */
|
|
42
|
-
Protect: Effect;
|
|
43
|
-
/** +100% Muscle, +100% Mysticality, +100% Moxie */
|
|
44
|
-
Stats: Effect;
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Acquire a buff from the Source Terminal
|
|
48
|
-
*
|
|
49
|
-
* @param rolloverBuff The buff to acquire
|
|
50
|
-
* @see RolloverBuffs
|
|
51
|
-
* @returns Whether we successfully `enquire`d the terminal for our rollover buff
|
|
52
|
-
*/
|
|
53
|
-
export declare function enquiry(rolloverBuff: Effect): boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Skills that can be acquired from Enhance
|
|
56
|
-
*/
|
|
57
|
-
export declare const Skills: {
|
|
58
|
-
/** Collect Source essence from enemies once per combat */
|
|
59
|
-
Extract: Skill;
|
|
60
|
-
/** Stagger and create a wandering monster 1-3 times per day */
|
|
61
|
-
Digitize: Skill;
|
|
62
|
-
/** Stagger and deal 25% of enemy HP in damage once per combat */
|
|
63
|
-
Compress: Skill;
|
|
64
|
-
/** Double monster's HP, attack, defence, attacks per round and item drops once per fight and once per day (five in The Source) */
|
|
65
|
-
Duplicate: Skill;
|
|
66
|
-
/** Causes government agent/Source Agent wanderer next turn once per combat and three times per day */
|
|
67
|
-
Portscan: Skill;
|
|
68
|
-
/** Increase Max MP by 100% and recover 1000 MP once per combat with a 30 turn cooldown */
|
|
69
|
-
Turbo: Skill;
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* Make a skill available.
|
|
73
|
-
* The Source Terminal can give the player access to two skills at any time
|
|
74
|
-
*
|
|
75
|
-
* @param skills Skill or 2-tuple of Skills to learn
|
|
76
|
-
* @see Skills
|
|
77
|
-
* @returns Whether our current skills match the ones we asked for
|
|
78
|
-
*/
|
|
79
|
-
export declare function educate(skills: Skill | [Skill, Skill]): boolean;
|
|
80
|
-
/**
|
|
81
|
-
* @returns The Skills currently available from Source Terminal
|
|
82
|
-
*/
|
|
83
|
-
export declare function getSkills(): Skill[];
|
|
84
|
-
/**
|
|
85
|
-
* @param skills A Skill or 2-tuple of Skills to check if we currently have active
|
|
86
|
-
* @returns Whether the input agrees with our current skills
|
|
87
|
-
*/
|
|
88
|
-
export declare function isCurrentSkill(skills: Skill | [Skill, Skill]): boolean;
|
|
89
|
-
/**
|
|
90
|
-
* Items that can be generated by the Source Terminal
|
|
91
|
-
*/
|
|
92
|
-
export declare const Items: Map<Item, string>;
|
|
93
|
-
/**
|
|
94
|
-
* Collect an item from the Source Terminal (up to three times a day)
|
|
95
|
-
*
|
|
96
|
-
* @param item Item to collect
|
|
97
|
-
* @see Items
|
|
98
|
-
* @returns Whether the `cliExecute` succeeded
|
|
99
|
-
*/
|
|
100
|
-
export declare function extrude(item: Item): boolean;
|
|
101
|
-
declare type Chip = "INGRAM" | "DIAGRAM" | "ASHRAM" | "SCRAM" | "TRIGRAM" | "CRAM" | "DRAM" | "TRAM";
|
|
102
|
-
/**
|
|
103
|
-
* @returns chips currently installed to player's Source Terminal
|
|
104
|
-
*/
|
|
105
|
-
export declare function getChips(): Chip[];
|
|
106
|
-
/**
|
|
107
|
-
* @returns number of times digitize was cast today
|
|
108
|
-
*/
|
|
109
|
-
export declare function getDigitizeUses(): number;
|
|
110
|
-
/**
|
|
111
|
-
* @returns Monster that is currently digitized, else `null`
|
|
112
|
-
*/
|
|
113
|
-
export declare function getDigitizeMonster(): Monster | null;
|
|
114
|
-
/**
|
|
115
|
-
* @returns number of digitized monsters encountered since it was last cast
|
|
116
|
-
*/
|
|
117
|
-
export declare function getDigitizeMonsterCount(): number;
|
|
118
|
-
/**
|
|
119
|
-
* @returns maximum number of digitizes player can cast
|
|
120
|
-
*/
|
|
121
|
-
export declare function getMaximumDigitizeUses(): number;
|
|
122
|
-
/**
|
|
123
|
-
* @returns the current day's number of remaining digitize uses
|
|
124
|
-
*/
|
|
125
|
-
export declare function getDigitizeUsesRemaining(): number;
|
|
126
|
-
/**
|
|
127
|
-
* @returns whether the player could theoretically cast Digitize
|
|
128
|
-
*/
|
|
129
|
-
export declare function couldDigitize(): boolean;
|
|
130
|
-
/**
|
|
131
|
-
* Sets Digitize to be one of our skills if it currently isn't
|
|
132
|
-
*
|
|
133
|
-
* @returns Whether we expect that Digitize is one of our active skills now
|
|
134
|
-
*/
|
|
135
|
-
export declare function prepareDigitize(): boolean;
|
|
136
|
-
/**
|
|
137
|
-
* Determines whether the player can cast Digitize immediately
|
|
138
|
-
* This only considers whether the player has learned the skill
|
|
139
|
-
* and has sufficient daily casts remaining, not whether they have sufficient MP
|
|
140
|
-
*
|
|
141
|
-
* @returns Whether the player can currently cast digitize, ignoring the MP cost but accounting for other factors
|
|
142
|
-
*/
|
|
143
|
-
export declare function canDigitize(): boolean;
|
|
144
|
-
export declare const Digitize: Copier;
|
|
145
|
-
/**
|
|
146
|
-
* @returns number of times duplicate was cast today
|
|
147
|
-
*/
|
|
148
|
-
export declare function getDuplicateUses(): number;
|
|
149
|
-
/**
|
|
150
|
-
* @returns number of times enhance was cast today
|
|
151
|
-
*/
|
|
152
|
-
export declare function getEnhanceUses(): number;
|
|
153
|
-
/**
|
|
154
|
-
* @returns number of times portscan was cast today
|
|
155
|
-
*/
|
|
156
|
-
export declare function getPortscanUses(): number;
|
|
157
|
-
/**
|
|
158
|
-
* @returns maximum number of times duplicate can be used
|
|
159
|
-
*/
|
|
160
|
-
export declare function maximumDuplicateUses(): number;
|
|
161
|
-
/**
|
|
162
|
-
* @returns number of remaining times duplicate can be used today
|
|
163
|
-
*/
|
|
164
|
-
export declare function duplicateUsesRemaining(): number;
|
|
165
|
-
/**
|
|
166
|
-
* @returns number of times enhance can be used per day
|
|
167
|
-
*/
|
|
168
|
-
export declare function maximumEnhanceUses(): number;
|
|
169
|
-
/**
|
|
170
|
-
* @returns number of remaining times enahce can be used today
|
|
171
|
-
*/
|
|
172
|
-
export declare function enhanceUsesRemaining(): number;
|
|
173
|
-
/**
|
|
174
|
-
* @returns expected duration of an enhance buff
|
|
175
|
-
*/
|
|
176
|
-
export declare function enhanceBuffDuration(): number;
|
|
177
|
-
/**
|
|
178
|
-
* @returns expected duration of an enquiry buff
|
|
179
|
-
*/
|
|
180
|
-
export declare function enquiryBuffDuration(): number;
|
|
181
|
-
export {};
|
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
import { cliExecute, Path, myPath, Skill, } from "kolmafia";
|
|
2
|
-
import { Copier } from "../../Copier";
|
|
3
|
-
import { haveInCampground } from "../../lib";
|
|
4
|
-
import { get } from "../../property";
|
|
5
|
-
import { $effect, $item, $skill } from "../../template-string";
|
|
6
|
-
import { arrayEquals } from "../../utils";
|
|
7
|
-
const item = $item `Source terminal`;
|
|
8
|
-
/**
|
|
9
|
-
* @returns Is the terminal currently installed & available in our campground?
|
|
10
|
-
*/
|
|
11
|
-
export function have() {
|
|
12
|
-
return haveInCampground(item);
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Buffs that can be acquired from Enhance
|
|
16
|
-
*
|
|
17
|
-
* - Items: +30% Item Drop
|
|
18
|
-
* - Meat: +60% Meat Drop
|
|
19
|
-
* - Init: +50% Initiative
|
|
20
|
-
* - Critical: +10% chance of Critical Hit, +10% chance of Spell Critical Hit
|
|
21
|
-
* - Damage: +5 Prismatic Damage
|
|
22
|
-
* - Substats: +3 Stats Per Fight
|
|
23
|
-
*/
|
|
24
|
-
export const Buffs = {
|
|
25
|
-
Items: $effect `items.enh`,
|
|
26
|
-
Meat: $effect `meat.enh`,
|
|
27
|
-
Init: $effect `init.enh`,
|
|
28
|
-
Critical: $effect `critical.enh`,
|
|
29
|
-
Damage: $effect `damage.enh`,
|
|
30
|
-
Substats: $effect `substats.enh`,
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* Acquire a buff from the Source Terminal
|
|
34
|
-
*
|
|
35
|
-
* @param buff The buff to acquire
|
|
36
|
-
* @see Buffs
|
|
37
|
-
* @returns Whether we successfully acquired the buff
|
|
38
|
-
*/
|
|
39
|
-
export function enhance(buff) {
|
|
40
|
-
if (!Object.values(Buffs).includes(buff)) {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
return cliExecute(`terminal enhance ${buff.name}`);
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Rollover buffs that can be acquired from Enquiry
|
|
47
|
-
*/
|
|
48
|
-
export const RolloverBuffs = {
|
|
49
|
-
/** +5 Familiar Weight */
|
|
50
|
-
Familiar: $effect `familiar.enq`,
|
|
51
|
-
/** +25 ML */
|
|
52
|
-
Monsters: $effect `monsters.enq`,
|
|
53
|
-
/** +5 Prismatic Resistance */
|
|
54
|
-
Protect: $effect `protect.enq`,
|
|
55
|
-
/** +100% Muscle, +100% Mysticality, +100% Moxie */
|
|
56
|
-
Stats: $effect `stats.enq`,
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Acquire a buff from the Source Terminal
|
|
60
|
-
*
|
|
61
|
-
* @param rolloverBuff The buff to acquire
|
|
62
|
-
* @see RolloverBuffs
|
|
63
|
-
* @returns Whether we successfully `enquire`d the terminal for our rollover buff
|
|
64
|
-
*/
|
|
65
|
-
export function enquiry(rolloverBuff) {
|
|
66
|
-
if (!Object.values(RolloverBuffs).includes(rolloverBuff)) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
return cliExecute(`terminal enquiry ${rolloverBuff.name}`);
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Skills that can be acquired from Enhance
|
|
73
|
-
*/
|
|
74
|
-
export const Skills = {
|
|
75
|
-
/** Collect Source essence from enemies once per combat */
|
|
76
|
-
Extract: $skill `Extract`,
|
|
77
|
-
/** Stagger and create a wandering monster 1-3 times per day */
|
|
78
|
-
Digitize: $skill `Digitize`,
|
|
79
|
-
/** Stagger and deal 25% of enemy HP in damage once per combat */
|
|
80
|
-
Compress: $skill `Compress`,
|
|
81
|
-
/** Double monster's HP, attack, defence, attacks per round and item drops once per fight and once per day (five in The Source) */
|
|
82
|
-
Duplicate: $skill `Duplicate`,
|
|
83
|
-
/** Causes government agent/Source Agent wanderer next turn once per combat and three times per day */
|
|
84
|
-
Portscan: $skill `Portscan`,
|
|
85
|
-
/** Increase Max MP by 100% and recover 1000 MP once per combat with a 30 turn cooldown */
|
|
86
|
-
Turbo: $skill `Turbo`,
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* Make a skill available.
|
|
90
|
-
* The Source Terminal can give the player access to two skills at any time
|
|
91
|
-
*
|
|
92
|
-
* @param skills Skill or 2-tuple of Skills to learn
|
|
93
|
-
* @see Skills
|
|
94
|
-
* @returns Whether our current skills match the ones we asked for
|
|
95
|
-
*/
|
|
96
|
-
export function educate(skills) {
|
|
97
|
-
const skillsArray = Array.isArray(skills) ? skills.slice(0, 2) : [skills];
|
|
98
|
-
if (arrayEquals(skillsArray, getSkills()))
|
|
99
|
-
return true;
|
|
100
|
-
for (const skill of skillsArray) {
|
|
101
|
-
if (!Object.values(Skills).includes(skill))
|
|
102
|
-
return false;
|
|
103
|
-
cliExecute(`terminal educate ${skill.name.toLowerCase()}.edu`);
|
|
104
|
-
}
|
|
105
|
-
return true;
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* @returns The Skills currently available from Source Terminal
|
|
109
|
-
*/
|
|
110
|
-
export function getSkills() {
|
|
111
|
-
return ["sourceTerminalEducate1", "sourceTerminalEducate2"]
|
|
112
|
-
.map((p) => get(p))
|
|
113
|
-
.filter(Boolean)
|
|
114
|
-
.map((s) => Skill.get(s.slice(0, -4)));
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* @param skills A Skill or 2-tuple of Skills to check if we currently have active
|
|
118
|
-
* @returns Whether the input agrees with our current skills
|
|
119
|
-
*/
|
|
120
|
-
export function isCurrentSkill(skills) {
|
|
121
|
-
const currentSkills = getSkills();
|
|
122
|
-
const skillsArray = Array.isArray(skills) ? skills.slice(0, 2) : [skills];
|
|
123
|
-
return skillsArray.every((skill) => currentSkills.includes(skill));
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Items that can be generated by the Source Terminal
|
|
127
|
-
*/
|
|
128
|
-
export const Items = new Map([
|
|
129
|
-
[$item `browser cookie`, "food.ext"],
|
|
130
|
-
[$item `hacked gibson`, "booze.ext"],
|
|
131
|
-
[$item `Source shades`, "goggles.ext"],
|
|
132
|
-
[$item `Source terminal GRAM chip`, "gram.ext"],
|
|
133
|
-
[$item `Source terminal PRAM chip`, "pram.ext"],
|
|
134
|
-
[$item `Source terminal SPAM chip`, "spam.ext"],
|
|
135
|
-
[$item `Source terminal CRAM chip`, "cram.ext"],
|
|
136
|
-
[$item `Source terminal DRAM chip`, "dram.ext"],
|
|
137
|
-
[$item `Source terminal TRAM chip`, "tram.ext"],
|
|
138
|
-
[$item `software bug`, "familiar.ext"],
|
|
139
|
-
]);
|
|
140
|
-
/**
|
|
141
|
-
* Collect an item from the Source Terminal (up to three times a day)
|
|
142
|
-
*
|
|
143
|
-
* @param item Item to collect
|
|
144
|
-
* @see Items
|
|
145
|
-
* @returns Whether the `cliExecute` succeeded
|
|
146
|
-
*/
|
|
147
|
-
export function extrude(item) {
|
|
148
|
-
const fileName = Items.get(item);
|
|
149
|
-
if (!fileName)
|
|
150
|
-
return false;
|
|
151
|
-
return cliExecute(`terminal extrude ${fileName}`);
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* @returns chips currently installed to player's Source Terminal
|
|
155
|
-
*/
|
|
156
|
-
export function getChips() {
|
|
157
|
-
return get("sourceTerminalChips").split(",");
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* @returns number of times digitize was cast today
|
|
161
|
-
*/
|
|
162
|
-
export function getDigitizeUses() {
|
|
163
|
-
return get("_sourceTerminalDigitizeUses");
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* @returns Monster that is currently digitized, else `null`
|
|
167
|
-
*/
|
|
168
|
-
export function getDigitizeMonster() {
|
|
169
|
-
return get("_sourceTerminalDigitizeMonster");
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* @returns number of digitized monsters encountered since it was last cast
|
|
173
|
-
*/
|
|
174
|
-
export function getDigitizeMonsterCount() {
|
|
175
|
-
return get("_sourceTerminalDigitizeMonsterCount");
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* @returns maximum number of digitizes player can cast
|
|
179
|
-
*/
|
|
180
|
-
export function getMaximumDigitizeUses() {
|
|
181
|
-
const chips = getChips();
|
|
182
|
-
return (1 + (chips.includes("TRAM") ? 1 : 0) + (chips.includes("TRIGRAM") ? 1 : 0));
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* @returns the current day's number of remaining digitize uses
|
|
186
|
-
*/
|
|
187
|
-
export function getDigitizeUsesRemaining() {
|
|
188
|
-
return getMaximumDigitizeUses() - getDigitizeUses();
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* @returns whether the player could theoretically cast Digitize
|
|
192
|
-
*/
|
|
193
|
-
export function couldDigitize() {
|
|
194
|
-
return getDigitizeUses() < getMaximumDigitizeUses();
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Sets Digitize to be one of our skills if it currently isn't
|
|
198
|
-
*
|
|
199
|
-
* @returns Whether we expect that Digitize is one of our active skills now
|
|
200
|
-
*/
|
|
201
|
-
export function prepareDigitize() {
|
|
202
|
-
if (!isCurrentSkill(Skills.Digitize)) {
|
|
203
|
-
return educate(Skills.Digitize);
|
|
204
|
-
}
|
|
205
|
-
return true;
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Determines whether the player can cast Digitize immediately
|
|
209
|
-
* This only considers whether the player has learned the skill
|
|
210
|
-
* and has sufficient daily casts remaining, not whether they have sufficient MP
|
|
211
|
-
*
|
|
212
|
-
* @returns Whether the player can currently cast digitize, ignoring the MP cost but accounting for other factors
|
|
213
|
-
*/
|
|
214
|
-
export function canDigitize() {
|
|
215
|
-
return couldDigitize() && getSkills().includes(Skills.Digitize);
|
|
216
|
-
}
|
|
217
|
-
export const Digitize = new Copier(() => couldDigitize(), () => prepareDigitize(), () => canDigitize(), () => getDigitizeMonster());
|
|
218
|
-
/**
|
|
219
|
-
* @returns number of times duplicate was cast today
|
|
220
|
-
*/
|
|
221
|
-
export function getDuplicateUses() {
|
|
222
|
-
return get("_sourceTerminalDuplicateUses");
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* @returns number of times enhance was cast today
|
|
226
|
-
*/
|
|
227
|
-
export function getEnhanceUses() {
|
|
228
|
-
return get("_sourceTerminalEnhanceUses");
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* @returns number of times portscan was cast today
|
|
232
|
-
*/
|
|
233
|
-
export function getPortscanUses() {
|
|
234
|
-
return get("_sourceTerminalPortscanUses");
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
* @returns maximum number of times duplicate can be used
|
|
238
|
-
*/
|
|
239
|
-
export function maximumDuplicateUses() {
|
|
240
|
-
return myPath() === Path.get("The Source") ? 5 : 1;
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* @returns number of remaining times duplicate can be used today
|
|
244
|
-
*/
|
|
245
|
-
export function duplicateUsesRemaining() {
|
|
246
|
-
return maximumDuplicateUses() - getDuplicateUses();
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* @returns number of times enhance can be used per day
|
|
250
|
-
*/
|
|
251
|
-
export function maximumEnhanceUses() {
|
|
252
|
-
return (1 + getChips().filter((chip) => ["CRAM", "SCRAM"].includes(chip)).length);
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* @returns number of remaining times enahce can be used today
|
|
256
|
-
*/
|
|
257
|
-
export function enhanceUsesRemaining() {
|
|
258
|
-
return maximumEnhanceUses() - getEnhanceUses();
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* @returns expected duration of an enhance buff
|
|
262
|
-
*/
|
|
263
|
-
export function enhanceBuffDuration() {
|
|
264
|
-
return (25 +
|
|
265
|
-
get("sourceTerminalPram") * 5 +
|
|
266
|
-
(getChips().includes("INGRAM") ? 25 : 0));
|
|
267
|
-
}
|
|
268
|
-
/**
|
|
269
|
-
* @returns expected duration of an enquiry buff
|
|
270
|
-
*/
|
|
271
|
-
export function enquiryBuffDuration() {
|
|
272
|
-
return (50 +
|
|
273
|
-
10 * get("sourceTerminalGram") +
|
|
274
|
-
(getChips().includes("DIAGRAM") ? 50 : 0));
|
|
275
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Monster } from "kolmafia";
|
|
2
|
-
/**
|
|
3
|
-
* @returns Is the Witchess installed and available in our campground?
|
|
4
|
-
*/
|
|
5
|
-
export declare function have(): boolean;
|
|
6
|
-
/**
|
|
7
|
-
* @returns How many Witchess fights have we done so far today?
|
|
8
|
-
*/
|
|
9
|
-
export declare function fightsDone(): number;
|
|
10
|
-
export declare const pieces: Monster[];
|
|
11
|
-
/**
|
|
12
|
-
* Fight a Witchess piece of your choice
|
|
13
|
-
*
|
|
14
|
-
* @param piece The piece to fight
|
|
15
|
-
* @returns The value of `runCombat()`, which is the page html of the final round
|
|
16
|
-
*/
|
|
17
|
-
export declare function fightPiece(piece: Monster): string;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Monster, myHash, runChoice, runCombat, visitUrl } from "kolmafia";
|
|
2
|
-
import { haveInCampground } from "../../lib";
|
|
3
|
-
import { get } from "../../property";
|
|
4
|
-
import { $item } from "../../template-string";
|
|
5
|
-
const item = $item `Witchess Set`;
|
|
6
|
-
/**
|
|
7
|
-
* @returns Is the Witchess installed and available in our campground?
|
|
8
|
-
*/
|
|
9
|
-
export function have() {
|
|
10
|
-
return haveInCampground(item);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* @returns How many Witchess fights have we done so far today?
|
|
14
|
-
*/
|
|
15
|
-
export function fightsDone() {
|
|
16
|
-
return get("_witchessFights");
|
|
17
|
-
}
|
|
18
|
-
export const pieces = Monster.get([
|
|
19
|
-
"Witchess Pawn",
|
|
20
|
-
"Witchess Knight",
|
|
21
|
-
"Witchess Bishop",
|
|
22
|
-
"Witchess Rook",
|
|
23
|
-
"Witchess Queen",
|
|
24
|
-
"Witchess King",
|
|
25
|
-
"Witchess Witch",
|
|
26
|
-
"Witchess Ox",
|
|
27
|
-
]);
|
|
28
|
-
/**
|
|
29
|
-
* Fight a Witchess piece of your choice
|
|
30
|
-
*
|
|
31
|
-
* @param piece The piece to fight
|
|
32
|
-
* @returns The value of `runCombat()`, which is the page html of the final round
|
|
33
|
-
*/
|
|
34
|
-
export function fightPiece(piece) {
|
|
35
|
-
if (!pieces.includes(piece))
|
|
36
|
-
throw new Error("That is not a valid piece.");
|
|
37
|
-
if (!visitUrl("campground.php?action=witchess").includes("whichchoice value=1181")) {
|
|
38
|
-
throw new Error("Failed to open Witchess.");
|
|
39
|
-
}
|
|
40
|
-
if (!runChoice(1).includes("whichchoice=1182")) {
|
|
41
|
-
throw new Error("Failed to visit shrink ray.");
|
|
42
|
-
}
|
|
43
|
-
if (!visitUrl(`choice.php?option=1&pwd=${myHash()}&whichchoice=1182&piece=${piece.id}`, false).includes(piece.name)) {
|
|
44
|
-
throw new Error("Failed to start fight.");
|
|
45
|
-
}
|
|
46
|
-
return runCombat();
|
|
47
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Effect, Item } from "kolmafia";
|
|
2
|
-
/**
|
|
3
|
-
* @returns Whether the Asdon is our current active workshed
|
|
4
|
-
*/
|
|
5
|
-
export declare function installed(): boolean;
|
|
6
|
-
/**
|
|
7
|
-
* @returns `true` if we `have` the Asdon or if it's installed
|
|
8
|
-
*/
|
|
9
|
-
export declare function have(): boolean;
|
|
10
|
-
/**
|
|
11
|
-
* @param it the item in question
|
|
12
|
-
* @returns Can `it` be used as Asdon fuel?
|
|
13
|
-
*/
|
|
14
|
-
export declare function isFuelItem(it: Item): boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Fuel your Asdon Martin with a given quantity of a given item
|
|
17
|
-
*
|
|
18
|
-
* @param it Item to fuel with.
|
|
19
|
-
* @param quantity Number of items to fuel with.
|
|
20
|
-
* @returns Whether we succeeded at fueling with the given items.
|
|
21
|
-
*/
|
|
22
|
-
export declare function insertFuel(it: Item, quantity?: number): boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Fill your Asdon Martin to the given fuel level in the cheapest way possible
|
|
25
|
-
*
|
|
26
|
-
* @param targetUnits Fuel level to attempt to reach.
|
|
27
|
-
* @returns Whether we succeeded at filling to the target fuel level.
|
|
28
|
-
*/
|
|
29
|
-
export declare function fillTo(targetUnits: number): boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Fill your Asdon Martin by prioritizing mallmin items in your inventory. Default to the behavior of fillTo.
|
|
32
|
-
*
|
|
33
|
-
* @param targetUnits Fuel level to attempt to reach.
|
|
34
|
-
* @returns Whether we succeeded at filling to the target fuel level.
|
|
35
|
-
*/
|
|
36
|
-
export declare function fillWithInventoryTo(targetUnits: number): boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Object consisting of the various Asdon driving styles
|
|
39
|
-
*/
|
|
40
|
-
export declare const Driving: {
|
|
41
|
-
Obnoxiously: Effect;
|
|
42
|
-
Stealthily: Effect;
|
|
43
|
-
Wastefully: Effect;
|
|
44
|
-
Safely: Effect;
|
|
45
|
-
Recklessly: Effect;
|
|
46
|
-
Intimidatingly: Effect;
|
|
47
|
-
Quickly: Effect;
|
|
48
|
-
Observantly: Effect;
|
|
49
|
-
Waterproofly: Effect;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* Attempt to drive with a particular style for a particular number of turns.
|
|
53
|
-
*
|
|
54
|
-
* @param style The driving style to use.
|
|
55
|
-
* @param turns The number of turns to attempt to get.
|
|
56
|
-
* @param preferInventory Whether we should preferentially value items currently in our inventory.
|
|
57
|
-
* @returns Whether we have at least as many turns as requested of said driving style.
|
|
58
|
-
*/
|
|
59
|
-
export declare function drive(style: Effect, turns?: number, preferInventory?: boolean): boolean;
|