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.
Files changed (195) hide show
  1. package/package.json +9 -8
  2. package/dist/Clan.d.ts +0 -128
  3. package/dist/Clan.js +0 -300
  4. package/dist/Copier.d.ts +0 -9
  5. package/dist/Copier.js +0 -15
  6. package/dist/Dungeon.d.ts +0 -45
  7. package/dist/Dungeon.js +0 -115
  8. package/dist/Kmail.d.ts +0 -104
  9. package/dist/Kmail.js +0 -182
  10. package/dist/actions/ActionSource.d.ts +0 -131
  11. package/dist/actions/ActionSource.js +0 -177
  12. package/dist/actions/Banish.d.ts +0 -16
  13. package/dist/actions/Banish.js +0 -121
  14. package/dist/actions/FreeKill.d.ts +0 -16
  15. package/dist/actions/FreeKill.js +0 -94
  16. package/dist/actions/FreeRun.d.ts +0 -16
  17. package/dist/actions/FreeRun.js +0 -77
  18. package/dist/actions/index.d.ts +0 -4
  19. package/dist/actions/index.js +0 -4
  20. package/dist/ascend.d.ts +0 -83
  21. package/dist/ascend.js +0 -268
  22. package/dist/challengePaths/2014/HeavyRains.d.ts +0 -22
  23. package/dist/challengePaths/2014/HeavyRains.js +0 -75
  24. package/dist/challengePaths/2015/CommunityService.d.ts +0 -125
  25. package/dist/challengePaths/2015/CommunityService.js +0 -334
  26. package/dist/challengePaths/2016/NuclearAutumn.d.ts +0 -13
  27. package/dist/challengePaths/2016/NuclearAutumn.js +0 -21
  28. package/dist/challengePaths/index.d.ts +0 -4
  29. package/dist/challengePaths/index.js +0 -4
  30. package/dist/combat.d.ts +0 -414
  31. package/dist/combat.js +0 -711
  32. package/dist/console.d.ts +0 -12
  33. package/dist/console.js +0 -14
  34. package/dist/counter.d.ts +0 -22
  35. package/dist/counter.js +0 -37
  36. package/dist/diet/index.d.ts +0 -80
  37. package/dist/diet/index.js +0 -662
  38. package/dist/diet/knapsack.d.ts +0 -8
  39. package/dist/diet/knapsack.js +0 -128
  40. package/dist/index.d.ts +0 -29
  41. package/dist/index.js +0 -26
  42. package/dist/lib.d.ts +0 -497
  43. package/dist/lib.js +0 -958
  44. package/dist/logger.d.ts +0 -35
  45. package/dist/logger.js +0 -62
  46. package/dist/maximize.d.ts +0 -121
  47. package/dist/maximize.js +0 -525
  48. package/dist/modifier.d.ts +0 -41
  49. package/dist/modifier.js +0 -160
  50. package/dist/modifierTypes.d.ts +0 -16
  51. package/dist/modifierTypes.js +0 -9
  52. package/dist/mood.d.ts +0 -105
  53. package/dist/mood.js +0 -349
  54. package/dist/moonSign.d.ts +0 -13
  55. package/dist/moonSign.js +0 -25
  56. package/dist/overlappingNames.d.ts +0 -3
  57. package/dist/overlappingNames.js +0 -42
  58. package/dist/property.d.ts +0 -222
  59. package/dist/property.js +0 -385
  60. package/dist/propertyTypes.d.ts +0 -19
  61. package/dist/propertyTypes.js +0 -10
  62. package/dist/propertyTyping.d.ts +0 -65
  63. package/dist/propertyTyping.js +0 -91
  64. package/dist/resources/2007/CandyHearts.d.ts +0 -9
  65. package/dist/resources/2007/CandyHearts.js +0 -24
  66. package/dist/resources/2008/DivineFavors.d.ts +0 -9
  67. package/dist/resources/2008/DivineFavors.js +0 -27
  68. package/dist/resources/2008/Stickers.d.ts +0 -49
  69. package/dist/resources/2008/Stickers.js +0 -84
  70. package/dist/resources/2009/Bandersnatch.d.ts +0 -56
  71. package/dist/resources/2009/Bandersnatch.js +0 -93
  72. package/dist/resources/2009/LoveSongs.d.ts +0 -9
  73. package/dist/resources/2009/LoveSongs.js +0 -24
  74. package/dist/resources/2009/SpookyPutty.d.ts +0 -31
  75. package/dist/resources/2009/SpookyPutty.js +0 -49
  76. package/dist/resources/2010/Brickos.d.ts +0 -9
  77. package/dist/resources/2010/Brickos.js +0 -21
  78. package/dist/resources/2010/CrownOfThrones.d.ts +0 -68
  79. package/dist/resources/2010/CrownOfThrones.js +0 -418
  80. package/dist/resources/2010/LookingGlass.d.ts +0 -29
  81. package/dist/resources/2010/LookingGlass.js +0 -89
  82. package/dist/resources/2011/Gygaxian.d.ts +0 -9
  83. package/dist/resources/2011/Gygaxian.js +0 -24
  84. package/dist/resources/2011/ObtuseAngel.d.ts +0 -33
  85. package/dist/resources/2011/ObtuseAngel.js +0 -51
  86. package/dist/resources/2011/StompingBoots.d.ts +0 -37
  87. package/dist/resources/2011/StompingBoots.js +0 -57
  88. package/dist/resources/2012/RainDoh.d.ts +0 -25
  89. package/dist/resources/2012/RainDoh.js +0 -37
  90. package/dist/resources/2012/ReagnimatedGnome.d.ts +0 -31
  91. package/dist/resources/2012/ReagnimatedGnome.js +0 -46
  92. package/dist/resources/2012/Resolutions.d.ts +0 -9
  93. package/dist/resources/2012/Resolutions.js +0 -28
  94. package/dist/resources/2013/Florist.d.ts +0 -81
  95. package/dist/resources/2013/Florist.js +0 -245
  96. package/dist/resources/2013/JungMan.d.ts +0 -33
  97. package/dist/resources/2013/JungMan.js +0 -69
  98. package/dist/resources/2013/PulledTaffy.d.ts +0 -9
  99. package/dist/resources/2013/PulledTaffy.js +0 -33
  100. package/dist/resources/2014/CrimboShrub.d.ts +0 -42
  101. package/dist/resources/2014/CrimboShrub.js +0 -89
  102. package/dist/resources/2014/DNALab.d.ts +0 -56
  103. package/dist/resources/2014/DNALab.js +0 -162
  104. package/dist/resources/2014/WinterGarden.d.ts +0 -23
  105. package/dist/resources/2014/WinterGarden.js +0 -35
  106. package/dist/resources/2015/BarrelShrine.d.ts +0 -8
  107. package/dist/resources/2015/BarrelShrine.js +0 -25
  108. package/dist/resources/2015/ChateauMantegna.d.ts +0 -52
  109. package/dist/resources/2015/ChateauMantegna.js +0 -99
  110. package/dist/resources/2015/DeckOfEveryCard.d.ts +0 -29
  111. package/dist/resources/2015/DeckOfEveryCard.js +0 -122
  112. package/dist/resources/2015/Dinseylandfill.d.ts +0 -89
  113. package/dist/resources/2015/Dinseylandfill.js +0 -205
  114. package/dist/resources/2015/MayoClinic.d.ts +0 -23
  115. package/dist/resources/2015/MayoClinic.js +0 -49
  116. package/dist/resources/2016/GingerBread.d.ts +0 -32
  117. package/dist/resources/2016/GingerBread.js +0 -73
  118. package/dist/resources/2016/SourceTerminal.d.ts +0 -181
  119. package/dist/resources/2016/SourceTerminal.js +0 -275
  120. package/dist/resources/2016/Witchess.d.ts +0 -17
  121. package/dist/resources/2016/Witchess.js +0 -47
  122. package/dist/resources/2017/AsdonMartin.d.ts +0 -59
  123. package/dist/resources/2017/AsdonMartin.js +0 -238
  124. package/dist/resources/2017/Horsery.d.ts +0 -19
  125. package/dist/resources/2017/Horsery.js +0 -42
  126. package/dist/resources/2017/MummingTrunk.d.ts +0 -8
  127. package/dist/resources/2017/MummingTrunk.js +0 -33
  128. package/dist/resources/2017/Pantogram.d.ts +0 -92
  129. package/dist/resources/2017/Pantogram.js +0 -174
  130. package/dist/resources/2017/Robortender.d.ts +0 -30
  131. package/dist/resources/2017/Robortender.js +0 -90
  132. package/dist/resources/2017/Spacegate.d.ts +0 -86
  133. package/dist/resources/2017/Spacegate.js +0 -178
  134. package/dist/resources/2017/TunnelOfLove.d.ts +0 -39
  135. package/dist/resources/2017/TunnelOfLove.js +0 -120
  136. package/dist/resources/2018/LatteLoversMembersMug.d.ts +0 -392
  137. package/dist/resources/2018/LatteLoversMembersMug.js +0 -303
  138. package/dist/resources/2018/SongBoom.d.ts +0 -33
  139. package/dist/resources/2018/SongBoom.js +0 -55
  140. package/dist/resources/2019/BeachComb.d.ts +0 -72
  141. package/dist/resources/2019/BeachComb.js +0 -118
  142. package/dist/resources/2019/CampAway.d.ts +0 -39
  143. package/dist/resources/2019/CampAway.js +0 -72
  144. package/dist/resources/2019/Snapper.d.ts +0 -33
  145. package/dist/resources/2019/Snapper.js +0 -73
  146. package/dist/resources/2020/Cartography.d.ts +0 -16
  147. package/dist/resources/2020/Cartography.js +0 -48
  148. package/dist/resources/2020/Guzzlr.d.ts +0 -160
  149. package/dist/resources/2020/Guzzlr.js +0 -275
  150. package/dist/resources/2020/RetroCape.d.ts +0 -51
  151. package/dist/resources/2020/RetroCape.js +0 -115
  152. package/dist/resources/2021/CrystalBall.d.ts +0 -14
  153. package/dist/resources/2021/CrystalBall.js +0 -39
  154. package/dist/resources/2021/DaylightShavings.d.ts +0 -40
  155. package/dist/resources/2021/DaylightShavings.js +0 -74
  156. package/dist/resources/2022/AutumnAton.d.ts +0 -78
  157. package/dist/resources/2022/AutumnAton.js +0 -182
  158. package/dist/resources/2022/CombatLoversLocket.d.ts +0 -44
  159. package/dist/resources/2022/CombatLoversLocket.js +0 -82
  160. package/dist/resources/2022/GreyGoose.d.ts +0 -59
  161. package/dist/resources/2022/GreyGoose.js +0 -90
  162. package/dist/resources/2022/JuneCleaver.d.ts +0 -47
  163. package/dist/resources/2022/JuneCleaver.js +0 -69
  164. package/dist/resources/2022/TrainSet.d.ts +0 -146
  165. package/dist/resources/2022/TrainSet.js +0 -228
  166. package/dist/resources/2023/AugustScepter.d.ts +0 -25
  167. package/dist/resources/2023/AugustScepter.js +0 -40
  168. package/dist/resources/2023/BurningLeaves.d.ts +0 -25
  169. package/dist/resources/2023/BurningLeaves.js +0 -74
  170. package/dist/resources/2023/CinchoDeMayo.d.ts +0 -25
  171. package/dist/resources/2023/CinchoDeMayo.js +0 -45
  172. package/dist/resources/2023/ClosedCircuitPayphone.d.ts +0 -80
  173. package/dist/resources/2023/ClosedCircuitPayphone.js +0 -129
  174. package/dist/resources/2023/CursedMonkeyPaw.d.ts +0 -46
  175. package/dist/resources/2023/CursedMonkeyPaw.js +0 -113
  176. package/dist/resources/2024/AprilingBandHelmet.d.ts +0 -50
  177. package/dist/resources/2024/AprilingBandHelmet.js +0 -103
  178. package/dist/resources/2024/ChestMimic.d.ts +0 -35
  179. package/dist/resources/2024/ChestMimic.js +0 -108
  180. package/dist/resources/LibramSummon.d.ts +0 -18
  181. package/dist/resources/LibramSummon.js +0 -74
  182. package/dist/resources/index.d.ts +0 -54
  183. package/dist/resources/index.js +0 -54
  184. package/dist/resources/putty-likes.d.ts +0 -21
  185. package/dist/resources/putty-likes.js +0 -33
  186. package/dist/session.d.ts +0 -169
  187. package/dist/session.js +0 -284
  188. package/dist/since.d.ts +0 -51
  189. package/dist/since.js +0 -108
  190. package/dist/template-string.d.ts +0 -324
  191. package/dist/template-string.js +0 -265
  192. package/dist/url.d.ts +0 -35
  193. package/dist/url.js +0 -67
  194. package/dist/utils.d.ts +0 -178
  195. 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;