libram 0.8.32 → 0.8.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Clan.js +2 -4
- package/dist/Kmail.d.ts +1 -1
- package/dist/actions/ActionSource.d.ts +2 -2
- package/dist/actions/FreeRun.js +3 -3
- package/dist/ascend.d.ts +3 -3
- package/dist/ascend.js +1 -0
- package/dist/challengePaths/2015/CommunityService.js +2 -1
- package/dist/combat.d.ts +4 -4
- package/dist/diet/index.d.ts +5 -5
- package/dist/diet/index.js +2 -2
- package/dist/lib.d.ts +5 -5
- package/dist/logger.d.ts +2 -2
- package/dist/maximize.d.ts +3 -3
- package/dist/modifier.d.ts +2 -2
- package/dist/modifierTypes.d.ts +8 -8
- package/dist/mood.d.ts +1 -1
- package/dist/moonSign.d.ts +1 -1
- package/dist/property.d.ts +1 -1
- package/dist/propertyTypes.d.ts +9 -9
- package/dist/propertyTyping.d.ts +1 -1
- package/dist/resources/2008/Stickers.d.ts +1 -1
- package/dist/resources/2010/CrownOfThrones.d.ts +2 -2
- package/dist/resources/2012/ReagnimatedGnome.d.ts +1 -1
- package/dist/resources/2013/Florist.d.ts +1 -1
- package/dist/resources/2014/CrimboShrub.d.ts +4 -4
- package/dist/resources/2015/ChateauMantegna.d.ts +3 -3
- package/dist/resources/2015/DeckOfEveryCard.d.ts +1 -1
- package/dist/resources/2016/SourceTerminal.d.ts +1 -1
- package/dist/resources/2017/Horsery.d.ts +1 -1
- package/dist/resources/2017/Pantogram.d.ts +6 -6
- package/dist/resources/2017/Spacegate.d.ts +1 -1
- package/dist/resources/2017/TunnelOfLove.d.ts +3 -3
- package/dist/resources/2018/LatteLoversMembersMug.d.ts +2 -2
- package/dist/resources/2018/SongBoom.d.ts +1 -1
- package/dist/resources/2019/BeachComb.d.ts +1 -1
- package/dist/resources/2020/RetroCape.d.ts +2 -2
- package/dist/resources/2022/AutumnAton.d.ts +1 -1
- package/dist/resources/2022/JuneCleaver.d.ts +2 -2
- package/dist/resources/2022/TrainSet.d.ts +1 -1
- package/dist/resources/2023/ClosedCircuitPayphone.d.ts +1 -1
- package/dist/resources/2023/CursedMonkeyPaw.d.ts +1 -1
- package/dist/resources/2024/AprilingBandHelmet.d.ts +2 -2
- package/dist/resources/2024/ChestMimic.d.ts +1 -1
- package/dist/resources/2024/ChestMimic.js +5 -8
- package/dist/resources/2024/MayamCalendar.d.ts +66 -0
- package/dist/resources/2024/MayamCalendar.js +92 -0
- package/dist/resources/index.d.ts +2 -1
- package/dist/resources/index.js +2 -1
- package/dist/url.d.ts +5 -5
- package/dist/utils.d.ts +8 -8
- package/dist/utils.js +2 -1
- package/package.json +38 -39
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Familiar, Item } from "kolmafia";
|
|
2
2
|
import { NumericModifier } from "../../modifierTypes";
|
|
3
|
-
export
|
|
3
|
+
export type FamiliarRider = {
|
|
4
4
|
familiar: Familiar;
|
|
5
5
|
drops: number | Item[] | Map<Item, number>;
|
|
6
6
|
probability: number;
|
|
@@ -17,7 +17,7 @@ export declare const ridingFamiliars: readonly FamiliarRider[];
|
|
|
17
17
|
* @returns Rider value (in meat)
|
|
18
18
|
*/
|
|
19
19
|
export declare function valueRider(rider: FamiliarRider, modifierValueFunction: (familiar: Familiar) => number, dropsValueFunction: (drops: Item[] | Map<Item, number>) => number, ignoreLimitedDrops?: boolean): number;
|
|
20
|
-
|
|
20
|
+
type RiderMode = {
|
|
21
21
|
modifierValueFunction: (familiar: Familiar) => number;
|
|
22
22
|
dropsValueFunction: (drops: Item[] | Map<Item, number>) => number;
|
|
23
23
|
ignoreLimitedDrops: boolean;
|
|
@@ -10,7 +10,7 @@ export declare const bodyParts: {
|
|
|
10
10
|
readonly kgnee: Item;
|
|
11
11
|
readonly foot: Item;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type BodyPart = keyof typeof bodyParts;
|
|
14
14
|
/**
|
|
15
15
|
* @returns Reagnimated Gnome parts that have already been retrieved from the arena
|
|
16
16
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Location } from "kolmafia";
|
|
2
2
|
import { EnvironmentType } from "../../lib";
|
|
3
3
|
import { Modifiers } from "../../modifier";
|
|
4
|
-
|
|
4
|
+
type SpecialFlowerAbility = "Delevels Enemy" | "Blocks Attacks" | "Poison";
|
|
5
5
|
declare class Flower {
|
|
6
6
|
name: string;
|
|
7
7
|
id: number;
|
|
@@ -7,7 +7,7 @@ declare const Toppers: {
|
|
|
7
7
|
readonly Mysticality: 2;
|
|
8
8
|
readonly Moxie: 3;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
type ShrubTopper = keyof typeof Toppers;
|
|
11
11
|
declare const Lights: {
|
|
12
12
|
readonly "Prismatic Damage": 1;
|
|
13
13
|
readonly "Hot Damage": 2;
|
|
@@ -16,19 +16,19 @@ declare const Lights: {
|
|
|
16
16
|
readonly "Spooky Damage": 5;
|
|
17
17
|
readonly "Sleaze Damage": 6;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
type ShrubLights = keyof typeof Lights;
|
|
20
20
|
declare const Garland: {
|
|
21
21
|
readonly "HP Regen": 1;
|
|
22
22
|
readonly "PvP Fights": 2;
|
|
23
23
|
readonly Blocking: 3;
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
type ShrubGarland = keyof typeof Garland;
|
|
26
26
|
declare const Gifts: {
|
|
27
27
|
readonly "Yellow Ray": 1;
|
|
28
28
|
readonly "Red Ray": 2;
|
|
29
29
|
readonly Gifts: 3;
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
type ShrubGifts = keyof typeof Gifts;
|
|
32
32
|
/**
|
|
33
33
|
* Decorates our Crimbo Shrub with the chosen decour, if able
|
|
34
34
|
*
|
|
@@ -22,9 +22,9 @@ export declare function fightPainting(...combatParams: CombatParams): string;
|
|
|
22
22
|
export declare const desks: readonly ["fancy stationery set", "Swiss piggy bank", "continental juice bar"];
|
|
23
23
|
export declare const ceilings: readonly ["antler chandelier", "ceiling fan", "artificial skylight"];
|
|
24
24
|
export declare const nightstands: readonly ["foreign language tapes", "bowl of potpourri", "electric muscle stimulator"];
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
25
|
+
export type Desk = (typeof desks)[number];
|
|
26
|
+
export type Ceiling = (typeof ceilings)[number];
|
|
27
|
+
export type Nightstand = (typeof nightstands)[number];
|
|
28
28
|
/**
|
|
29
29
|
* @returns The currently installed desk in your chateau; `null` for none
|
|
30
30
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare function have(): boolean;
|
|
5
5
|
export declare const cards: readonly ["X of Clubs", "X of Diamonds", "X of Hearts", "X of Spades", "X of Papayas", "X of Kumquats", "X of Salads", "X of Cups", "X of Coins", "X of Swords", "X of Wands", "XVI - The Tower", "Professor Plum", "Spare Tire", "Extra Tank", "Sheep", "Year of Plenty", "Mine", "Laboratory", "Plains", "Swamp", "Mountain", "Forest", "Island", "Lead Pipe", "Rope", "Wrench", "Candlestick", "Knife", "Revolver", "Gift Card", "1952 Mickey Mantle", "XXI - The World", "III - The Empress", "VI - The Lovers", "Healing Salve", "Dark Ritual", "Lightning Bolt", "Giant Growth", "Ancestral Recall", "XI - Strength", "I - The Magician", "0 - The Fool", "X - The Wheel of Fortune", "The Race Card", "Green Card", "IV - The Emperor", "IX - The Hermit", "Werewolf", "The Hive", "XVII - The Star", "VII - The Chariot", "XV - The Devil", "V - The Hierophant", "Fire Elemental", "Christmas Card", "Go Fish", "Goblin Sapper", "II - The High Priestess", "XIV - Temperance", "XVIII - The Moon", "Hunky Fireman Card", "Aquarius Horoscope", "XII - The Hanged Man", "Suit Warehouse Discount Card", "Pirate Birthday Card", "Plantable Greeting Card", "Slimer Trading Card", "XIII - Death", "Unstable Portal"];
|
|
6
|
-
export
|
|
6
|
+
export type Card = (typeof cards)[number];
|
|
7
7
|
/**
|
|
8
8
|
* @returns The number of cards we've drawn so far today--remember, cheating counts as 5
|
|
9
9
|
*/
|
|
@@ -98,7 +98,7 @@ export declare const Items: Map<Item, string>;
|
|
|
98
98
|
* @returns Whether the `cliExecute` succeeded
|
|
99
99
|
*/
|
|
100
100
|
export declare function extrude(item: Item): boolean;
|
|
101
|
-
|
|
101
|
+
type Chip = "INGRAM" | "DIAGRAM" | "ASHRAM" | "SCRAM" | "TRIGRAM" | "CRAM" | "DRAM" | "TRAM";
|
|
102
102
|
/**
|
|
103
103
|
* @returns chips currently installed to player's Source Terminal
|
|
104
104
|
*/
|
|
@@ -3,7 +3,7 @@ import { Modifiers } from "../..";
|
|
|
3
3
|
* @returns Whether or not the horsery is available
|
|
4
4
|
*/
|
|
5
5
|
export declare function have(): boolean;
|
|
6
|
-
export
|
|
6
|
+
export type Horse = "pale" | "dark" | "normal" | "crazy";
|
|
7
7
|
/**
|
|
8
8
|
* @returns Your current horse; `null` if you are horseless
|
|
9
9
|
*/
|
|
@@ -7,7 +7,7 @@ export declare function have(): boolean;
|
|
|
7
7
|
* @returns Do we `have` pantogram pants?
|
|
8
8
|
*/
|
|
9
9
|
export declare function havePants(): boolean;
|
|
10
|
-
|
|
10
|
+
type PantogramAlignment = "Muscle" | "Moxie" | "Mysticality";
|
|
11
11
|
declare const Element: {
|
|
12
12
|
"Hot Resistance: 2": number;
|
|
13
13
|
"Cold Resistance: 2": number;
|
|
@@ -15,7 +15,7 @@ declare const Element: {
|
|
|
15
15
|
"Sleaze Resistance: 2": number;
|
|
16
16
|
"Stench Resistance: 2": number;
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
type PantogramElement = keyof typeof Element;
|
|
19
19
|
declare const LeftSacrifice: {
|
|
20
20
|
"Maximum HP: 40": number[];
|
|
21
21
|
"Maximum MP: 20": number[];
|
|
@@ -27,7 +27,7 @@ declare const LeftSacrifice: {
|
|
|
27
27
|
"MP Regen Max: 20": (number | Item)[];
|
|
28
28
|
"Mana Cost: -3": (number | Item)[];
|
|
29
29
|
};
|
|
30
|
-
|
|
30
|
+
type PantogramSacrificeL = keyof typeof LeftSacrifice;
|
|
31
31
|
declare const MiddleSacrifice: {
|
|
32
32
|
"Combat Rate: -5": number[];
|
|
33
33
|
"Combat Rate: 5": number[];
|
|
@@ -41,7 +41,7 @@ declare const MiddleSacrifice: {
|
|
|
41
41
|
"Avatar: Purple": (number | Item)[];
|
|
42
42
|
"Drops Items: true": (number | Item)[];
|
|
43
43
|
};
|
|
44
|
-
|
|
44
|
+
type PantogramSacrificeM = keyof typeof MiddleSacrifice;
|
|
45
45
|
declare const RightSacrifice: {
|
|
46
46
|
"Weapon Damage: 20": number[];
|
|
47
47
|
"Spell Damage Percent: 20": number[];
|
|
@@ -56,8 +56,8 @@ declare const RightSacrifice: {
|
|
|
56
56
|
"Mysticality Experience Percent: 25": (number | Item)[];
|
|
57
57
|
"Moxie Experience Percent: 25": (number | Item)[];
|
|
58
58
|
};
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
type PantogramSacrificeR = keyof typeof RightSacrifice;
|
|
60
|
+
type Pants = {
|
|
61
61
|
alignment: PantogramAlignment;
|
|
62
62
|
element: PantogramElement;
|
|
63
63
|
leftSac: PantogramSacrificeL;
|
|
@@ -62,7 +62,7 @@ export declare function hazardEquipment(hazards: string): Item[];
|
|
|
62
62
|
* @returns Whether you successfully acquired all necessary equipment
|
|
63
63
|
*/
|
|
64
64
|
export declare function getHazardEquipment(): boolean;
|
|
65
|
-
|
|
65
|
+
type Vaccine = "Rainbow" | "Broad-Spectrum" | "Emotional" | "Elemental Resistance" | "Stats" | "Monster Level";
|
|
66
66
|
/**
|
|
67
67
|
* Gets the requested Spacegate Vaccine Buff
|
|
68
68
|
*
|
|
@@ -25,9 +25,9 @@ export declare function couldUseLoveEnamorang(): boolean;
|
|
|
25
25
|
*/
|
|
26
26
|
export declare function getLovEnamorangMonster(): Monster | null;
|
|
27
27
|
export declare const LovEnamorang: Copier;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
type LOVEquipment = "LOV Eardigan" | "LOV Epaulettes" | "LOV Earring";
|
|
29
|
+
type LOVEffect = "Lovebotamy" | "Open Heart Surgery" | "Wandering Eye Surgery";
|
|
30
|
+
type LOVExtra = "LOV Enamorang" | "LOV Emotionizer" | "LOV Extraterrestrial Chocolate" | "LOV Echinacea Bouquet" | "LOV Elephant" | "toast" | null;
|
|
31
31
|
/**
|
|
32
32
|
* Fight all LOV monsters and get buffs/equipment.
|
|
33
33
|
*
|
|
@@ -363,7 +363,7 @@ declare const INGREDIENTS: {
|
|
|
363
363
|
readonly location: null;
|
|
364
364
|
};
|
|
365
365
|
};
|
|
366
|
-
export
|
|
366
|
+
export type Ingredient = keyof typeof INGREDIENTS;
|
|
367
367
|
/**
|
|
368
368
|
* @returns An array consisting of the Ingredients you've unlocked so far this ascension
|
|
369
369
|
*/
|
|
@@ -384,7 +384,7 @@ export declare function modifierOf(ingredient: Ingredient): Modifiers;
|
|
|
384
384
|
* @param ingredient A latte ingredient
|
|
385
385
|
* @returns The location that can be used to unlock said ingredient; null if the ingredient is free
|
|
386
386
|
*/
|
|
387
|
-
export declare function locationOf<T extends Ingredient>(ingredient: T): typeof INGREDIENTS[T]["location"];
|
|
387
|
+
export declare function locationOf<T extends Ingredient>(ingredient: T): (typeof INGREDIENTS)[T]["location"];
|
|
388
388
|
/**
|
|
389
389
|
* @returns An array consisting of all Ingredients currently in your latte
|
|
390
390
|
*/
|
|
@@ -9,7 +9,7 @@ declare const keywords: {
|
|
|
9
9
|
"These Fists Were Made for Punchin'": string;
|
|
10
10
|
"Total Eclipse of Your Meat": string;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type SongBoomSong = keyof typeof keywords | null;
|
|
13
13
|
export declare const songBoomSongs: Set<string>;
|
|
14
14
|
/**
|
|
15
15
|
* @returns The `SongBoomSong` you currently have active; `null` if none is active at this time
|
|
@@ -21,8 +21,8 @@ declare const Heroes: {
|
|
|
21
21
|
"Maximum MP": number;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
type Hero = keyof typeof Heroes;
|
|
25
|
+
type Mode = "hold" | "thrill" | "kiss" | "kill";
|
|
26
26
|
export declare const currentHero: () => "vampire" | "heck" | "robot";
|
|
27
27
|
export declare const currentMode: () => Mode;
|
|
28
28
|
/**
|
|
@@ -37,7 +37,7 @@ export declare function availableLocations(): Location[];
|
|
|
37
37
|
* The mafia names for the autumn-aton upgrades
|
|
38
38
|
*/
|
|
39
39
|
export declare const possibleUpgrades: readonly ["leftarm1", "leftleg1", "rightarm1", "rightleg1", "base_blackhat", "cowcatcher", "periscope", "radardish", "dualexhaust"];
|
|
40
|
-
export
|
|
40
|
+
export type Upgrade = (typeof possibleUpgrades)[number];
|
|
41
41
|
/**
|
|
42
42
|
* @returns An array containing the upgrades that you currently have on your autumn-aton.
|
|
43
43
|
*/
|
|
@@ -38,10 +38,10 @@ export declare const choices: readonly [1467, 1468, 1469, 1470, 1471, 1472, 1473
|
|
|
38
38
|
*
|
|
39
39
|
* @returns An array consisting of the cleaver choice adventures currently in the queue.
|
|
40
40
|
*/
|
|
41
|
-
export declare function queue(): typeof choices[number][];
|
|
41
|
+
export declare function queue(): (typeof choices)[number][];
|
|
42
42
|
/**
|
|
43
43
|
* Determines which choices are currently eligible to be encountered with your June cleaver
|
|
44
44
|
*
|
|
45
45
|
* @returns An array consisting of the cleaver choice adventures not currently in the queue.
|
|
46
46
|
*/
|
|
47
|
-
export declare function choicesAvailable(): typeof choices[number][];
|
|
47
|
+
export declare function choicesAvailable(): (typeof choices)[number][];
|
|
@@ -112,7 +112,7 @@ export declare function effect(station: Station): Effect | null;
|
|
|
112
112
|
* @returns The effect associated with given station, under the influence of coal
|
|
113
113
|
*/
|
|
114
114
|
export declare function doubledEffect(station: Station): Effect | null;
|
|
115
|
-
export
|
|
115
|
+
export type Cycle = Tuple<Station, 8>;
|
|
116
116
|
/**
|
|
117
117
|
* Determines the current configuration of train stations
|
|
118
118
|
*
|
|
@@ -22,7 +22,7 @@ declare const INGRESS_RIFTS: {
|
|
|
22
22
|
readonly plains: Location;
|
|
23
23
|
readonly town_right: Location;
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type Ingress = "" | keyof typeof INGRESS_RIFTS;
|
|
26
26
|
/**
|
|
27
27
|
* @returns Your current `shadowRiftIngress`; `null` if none is set this ascension
|
|
28
28
|
*/
|
|
@@ -7,7 +7,7 @@ export declare function have(): boolean;
|
|
|
7
7
|
* @returns The number of monkey paw wishes we have remaining
|
|
8
8
|
*/
|
|
9
9
|
export declare function wishes(): number;
|
|
10
|
-
export
|
|
10
|
+
export type WishableItemsFilters = Partial<{
|
|
11
11
|
location: (location: Location) => boolean;
|
|
12
12
|
monster: (monster: Monster) => boolean;
|
|
13
13
|
drop: (itemDrop: {
|
|
@@ -4,10 +4,10 @@ import { Effect, Item } from "kolmafia";
|
|
|
4
4
|
*/
|
|
5
5
|
export declare function have(): boolean;
|
|
6
6
|
export declare const MARCHING_SONGS: readonly ["Apriling Band Patrol Beat", "Apriling Band Battle Cadence", "Apriling Band Celebration Bop"];
|
|
7
|
-
export
|
|
7
|
+
export type MarchingSong = (typeof MARCHING_SONGS)[number];
|
|
8
8
|
export declare const MARCHING_SONG_EFFECTS: readonly Effect[];
|
|
9
9
|
export declare const INSTRUMENTS: readonly ["Apriling band saxophone", "Apriling band quad tom", "Apriling band tuba", "Apriling band staff", "Apriling band piccolo"];
|
|
10
|
-
export
|
|
10
|
+
export type Instrument = (typeof INSTRUMENTS)[number];
|
|
11
11
|
export declare const INSTRUMENT_ITEMS: readonly Item[];
|
|
12
12
|
/**
|
|
13
13
|
* @returns Whether we can currently join a new section of our Apriling band
|
|
@@ -37,7 +37,7 @@ export declare function differentiate(monster: Monster, ...combatParams: CombatP
|
|
|
37
37
|
/**
|
|
38
38
|
* Check how many of a monster is available to differentiate into
|
|
39
39
|
*
|
|
40
|
-
* @param monster The monster to differentiate your egg into
|
|
40
|
+
* @param monster The monster to differentiate your egg into
|
|
41
41
|
* @returns How many of a Monster we can differentiate
|
|
42
42
|
*/
|
|
43
43
|
export declare function differentiableQuantity(monster: Monster): number;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { itemAmount, runChoice, runCombat, toMonster, visitUrl, xpath, } from "kolmafia";
|
|
2
2
|
import { directlyUse, examine, have as have_ } from "../../lib";
|
|
3
3
|
import { get } from "../../property";
|
|
4
4
|
import { $familiar, $item } from "../../template-string";
|
|
5
|
-
import { clamp } from "../../utils";
|
|
6
5
|
const familiar = $familiar `Chest Mimic`;
|
|
7
6
|
/**
|
|
8
7
|
* @returns Whether you `have` the Chest Mimic familiar.
|
|
@@ -110,18 +109,16 @@ export function differentiate(monster, ...combatParams) {
|
|
|
110
109
|
/**
|
|
111
110
|
* Check how many of a monster is available to differentiate into
|
|
112
111
|
*
|
|
113
|
-
* @param monster The monster to differentiate your egg into
|
|
112
|
+
* @param monster The monster to differentiate your egg into
|
|
114
113
|
* @returns How many of a Monster we can differentiate
|
|
115
114
|
*/
|
|
116
115
|
export function differentiableQuantity(monster) {
|
|
117
116
|
if (!have_($item `mimic egg`))
|
|
118
117
|
return 0;
|
|
119
|
-
const regex = new RegExp(`<!-- monsterid
|
|
118
|
+
const regex = new RegExp(`<!-- monsterid:${monster.id} --> \\((\\d+)\\)`);
|
|
120
119
|
const page = examine($item `mimic egg`);
|
|
121
120
|
const match = page.match(regex);
|
|
122
|
-
if (!match)
|
|
121
|
+
if (!match?.[1])
|
|
123
122
|
return 0;
|
|
124
|
-
|
|
125
|
-
return 1;
|
|
126
|
-
return clamp(Number(match[1]), 1, availableAmount($item `mimic egg`));
|
|
123
|
+
return Math.min(Number(match[1]), itemAmount($item `mimic egg`));
|
|
127
124
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Effect, Item } from "kolmafia";
|
|
2
|
+
export declare const RINGS: readonly [readonly ["yam1", "sword", "eye", "chair", "fur", "vessel"], readonly ["lightning", "bottle", "meat", "wood", "yam2"], readonly ["yam3", "wall", "cheese", "eyepatch"], readonly ["explosion", "clock", "yam4"]];
|
|
3
|
+
export type MayamSymbol = (typeof RINGS)[number][number];
|
|
4
|
+
export type Ring<N extends number> = (typeof RINGS)[N][number];
|
|
5
|
+
export type Combination = [Ring<0>, Ring<1>, Ring<2>, Ring<3>];
|
|
6
|
+
export type CombinationString = `${Ring<0>} ${Ring<1>} ${Ring<2>} ${Ring<3>}`;
|
|
7
|
+
/**
|
|
8
|
+
* @returns Whether you `have` the Mayam calendar
|
|
9
|
+
*/
|
|
10
|
+
export declare function have(): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Determine whether a certain Mayam symbol is available for use today
|
|
13
|
+
*
|
|
14
|
+
* @param {MayamSymbol} symbol The symbol to check
|
|
15
|
+
* @returns Whether or not the given symbol is available for use
|
|
16
|
+
*/
|
|
17
|
+
export declare function available(symbol: MayamSymbol): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Determine whether a certain Mayam combination is available for use today
|
|
20
|
+
*
|
|
21
|
+
* @param {...Combination} combination The combination to check
|
|
22
|
+
* @returns Whether or not the given combination is available for use
|
|
23
|
+
*/
|
|
24
|
+
export declare function available(...combination: Combination): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @returns The remaining number of uses you have of your Mayam calendar today
|
|
27
|
+
*/
|
|
28
|
+
export declare function remainingUses(): number;
|
|
29
|
+
/**
|
|
30
|
+
* Enter a combination in the Mayam calendar
|
|
31
|
+
* @param combination The combination to submit, either as a single string or as a series of symbols
|
|
32
|
+
* @returns Whether we succeeded in our endeavor
|
|
33
|
+
*/
|
|
34
|
+
export declare function submit(...combination: Combination | [CombinationString]): boolean;
|
|
35
|
+
export declare const RESONANCES: Readonly<{
|
|
36
|
+
"eye yam2 eyepatch yam4": Item;
|
|
37
|
+
"vessel yam2 cheese explosion": Item;
|
|
38
|
+
"yam1 meat cheese yam4": Item;
|
|
39
|
+
"sword yam2 eyepatch explosion": Item;
|
|
40
|
+
"fur lightning eyepatch yam4": Item;
|
|
41
|
+
"yam1 lightning yam3 clock": Item;
|
|
42
|
+
"fur yam2 wall yam4": Item;
|
|
43
|
+
"yam1 yam2 yam3 explosion": Item;
|
|
44
|
+
"yam1 meat eyepatch yam4": Item;
|
|
45
|
+
"chair yam2 yam3 clock": Effect;
|
|
46
|
+
"yam1 yam2 cheese clock": Effect;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Find the combination needed to get a particular resonance
|
|
50
|
+
* @param target The Item or Effect granted by the resonance
|
|
51
|
+
* @returns The combination needed, or null if none such exists
|
|
52
|
+
*/
|
|
53
|
+
export declare function resonanceFor(target: Item | Effect): Combination | null;
|
|
54
|
+
/**
|
|
55
|
+
* Determines whether an item can be obtained via resonance at this moment
|
|
56
|
+
* @param target The target Item or Effect for your resonance
|
|
57
|
+
* @returns Whether or not you can currently use that resonance
|
|
58
|
+
*/
|
|
59
|
+
export declare function resonanceAvailable(target: Item | Effect): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Determine what Item or Effect results from a particular resonance
|
|
62
|
+
*
|
|
63
|
+
* @param combination The combination to check, either as a single string or a series of symbols
|
|
64
|
+
* @returns The Item or Effect of the resonance, if it is indeed a resonance; `null` otherwise
|
|
65
|
+
*/
|
|
66
|
+
export declare function getResonanceResult(...combination: Combination | [CombinationString]): Item | Effect | null;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { cliExecute } from "kolmafia";
|
|
2
|
+
import { have as have_ } from "../../lib";
|
|
3
|
+
import { get } from "../../property";
|
|
4
|
+
import { $effect, $item } from "../../template-string";
|
|
5
|
+
export const RINGS = Object.freeze([
|
|
6
|
+
["yam1", "sword", "eye", "chair", "fur", "vessel"],
|
|
7
|
+
["lightning", "bottle", "meat", "wood", "yam2"],
|
|
8
|
+
["yam3", "wall", "cheese", "eyepatch"],
|
|
9
|
+
["explosion", "clock", "yam4"],
|
|
10
|
+
]);
|
|
11
|
+
/**
|
|
12
|
+
* @returns Whether you `have` the Mayam calendar
|
|
13
|
+
*/
|
|
14
|
+
export function have() {
|
|
15
|
+
return have_($item `Mayam Calendar`);
|
|
16
|
+
}
|
|
17
|
+
const symbolsUsed = () => get("_mayamSymbolsUsed").split(",");
|
|
18
|
+
/**
|
|
19
|
+
* Determine whether certain Mayam symbols are available for use today
|
|
20
|
+
*
|
|
21
|
+
* @param {...MayamSymbol[]} symbols The symbols to check
|
|
22
|
+
* @returns Whether or not the given symbols are all available for use
|
|
23
|
+
*/
|
|
24
|
+
export function available(...symbols) {
|
|
25
|
+
return symbols.every((symbol) => !symbolsUsed().includes(symbol));
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @returns The remaining number of uses you have of your Mayam calendar today
|
|
29
|
+
*/
|
|
30
|
+
export function remainingUses() {
|
|
31
|
+
return RINGS[3].filter((symbol) => available(symbol)).length;
|
|
32
|
+
}
|
|
33
|
+
const toCombination = (combination) => combination.length === 1
|
|
34
|
+
? combination[0].split(" ")
|
|
35
|
+
: combination;
|
|
36
|
+
/**
|
|
37
|
+
* Enter a combination in the Mayam calendar
|
|
38
|
+
* @param combination The combination to submit, either as a single string or as a series of symbols
|
|
39
|
+
* @returns Whether we succeeded in our endeavor
|
|
40
|
+
*/
|
|
41
|
+
export function submit(...combination) {
|
|
42
|
+
if (!available(...toCombination(combination))) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
return cliExecute(`mayam ring ${combination.join(" ")}`);
|
|
46
|
+
}
|
|
47
|
+
export const RESONANCES = Object.freeze({
|
|
48
|
+
"eye yam2 eyepatch yam4": $item `Mayam spinach`,
|
|
49
|
+
"vessel yam2 cheese explosion": $item `stuffed yam stinkbomb`,
|
|
50
|
+
"yam1 meat cheese yam4": $item `yam and swiss`,
|
|
51
|
+
"sword yam2 eyepatch explosion": $item `yam cannon`,
|
|
52
|
+
"fur lightning eyepatch yam4": $item `tiny yam cannon`,
|
|
53
|
+
"yam1 lightning yam3 clock": $item `yam battery`,
|
|
54
|
+
"fur yam2 wall yam4": $item `furry yam buckler`,
|
|
55
|
+
"yam1 yam2 yam3 explosion": $item `thanksgiving bomb`,
|
|
56
|
+
"yam1 meat eyepatch yam4": $item `yamtility belt`,
|
|
57
|
+
"chair yam2 yam3 clock": $effect `Caught Yam-Handed`,
|
|
58
|
+
"yam1 yam2 cheese clock": $effect `Memories of Cheesier Age`,
|
|
59
|
+
});
|
|
60
|
+
/**
|
|
61
|
+
* Find the combination needed to get a particular resonance
|
|
62
|
+
* @param target The Item or Effect granted by the resonance
|
|
63
|
+
* @returns The combination needed, or null if none such exists
|
|
64
|
+
*/
|
|
65
|
+
export function resonanceFor(target) {
|
|
66
|
+
return ([...Object.entries(RESONANCES)]
|
|
67
|
+
.find(([, value]) => value === target)?.[0]
|
|
68
|
+
.split(" ") ?? null);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Determines whether an item can be obtained via resonance at this moment
|
|
72
|
+
* @param target The target Item or Effect for your resonance
|
|
73
|
+
* @returns Whether or not you can currently use that resonance
|
|
74
|
+
*/
|
|
75
|
+
export function resonanceAvailable(target) {
|
|
76
|
+
const resonance = resonanceFor(target);
|
|
77
|
+
return !!resonance && available(...resonance);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Determine what Item or Effect results from a particular resonance
|
|
81
|
+
*
|
|
82
|
+
* @param combination The combination to check, either as a single string or a series of symbols
|
|
83
|
+
* @returns The Item or Effect of the resonance, if it is indeed a resonance; `null` otherwise
|
|
84
|
+
*/
|
|
85
|
+
export function getResonanceResult(...combination) {
|
|
86
|
+
const combinationString = combination.length === 1
|
|
87
|
+
? combination[0]
|
|
88
|
+
: combination.join(" ");
|
|
89
|
+
return combinationString in RESONANCES
|
|
90
|
+
? RESONANCES[combinationString]
|
|
91
|
+
: null;
|
|
92
|
+
}
|
|
@@ -49,6 +49,7 @@ import * as ClosedCircuitPayphone from "./2023/ClosedCircuitPayphone";
|
|
|
49
49
|
import * as CursedMonkeyPaw from "./2023/CursedMonkeyPaw";
|
|
50
50
|
import * as AprilingBandHelmet from "./2024/AprilingBandHelmet";
|
|
51
51
|
import * as ChestMimic from "./2024/ChestMimic";
|
|
52
|
-
|
|
52
|
+
import * as MayamCalendar from "./2024/MayamCalendar";
|
|
53
|
+
export { AprilingBandHelmet, AugustScepter, AutumnAton, AsdonMartin, Bandersnatch, BarrelShrine, BeachComb, BurningLeaves, CampAway, Cartography, ChateauMantegna, ChestMimic, CinchoDeMayo, ClosedCircuitPayphone, CombatLoversLocket, CrimboShrub, CrownOfThrones, CrystalBall, CursedMonkeyPaw, DaylightShavings, DeckOfEveryCard, Dinseylandfill, DNALab, FloristFriar, GingerBread, GreyGoose, Guzzlr, Horsery, JuneCleaver, JungMan, Latte, LookingGlass, MayamCalendar, MayoClinic, MummingTrunk, ObtuseAngel, Pantogram, RainDoh, ReagnimatedGnome, RetroCape, Robortender, Snapper, SongBoom, SourceTerminal, Spacegate, SpookyPutty, Stickers, StompingBoots, TrainSet, TunnelOfLove, WinterGarden, Witchess, };
|
|
53
54
|
export * from "./putty-likes";
|
|
54
55
|
export * from "./LibramSummon";
|
package/dist/resources/index.js
CHANGED
|
@@ -49,6 +49,7 @@ import * as ClosedCircuitPayphone from "./2023/ClosedCircuitPayphone";
|
|
|
49
49
|
import * as CursedMonkeyPaw from "./2023/CursedMonkeyPaw";
|
|
50
50
|
import * as AprilingBandHelmet from "./2024/AprilingBandHelmet";
|
|
51
51
|
import * as ChestMimic from "./2024/ChestMimic";
|
|
52
|
-
|
|
52
|
+
import * as MayamCalendar from "./2024/MayamCalendar";
|
|
53
|
+
export { AprilingBandHelmet, AugustScepter, AutumnAton, AsdonMartin, Bandersnatch, BarrelShrine, BeachComb, BurningLeaves, CampAway, Cartography, ChateauMantegna, ChestMimic, CinchoDeMayo, ClosedCircuitPayphone, CombatLoversLocket, CrimboShrub, CrownOfThrones, CrystalBall, CursedMonkeyPaw, DaylightShavings, DeckOfEveryCard, Dinseylandfill, DNALab, FloristFriar, GingerBread, GreyGoose, Guzzlr, Horsery, JuneCleaver, JungMan, Latte, LookingGlass, MayamCalendar, MayoClinic, MummingTrunk, ObtuseAngel, Pantogram, RainDoh, ReagnimatedGnome, RetroCape, Robortender, Snapper, SongBoom, SourceTerminal, Spacegate, SpookyPutty, Stickers, StompingBoots, TrainSet, TunnelOfLove, WinterGarden, Witchess, };
|
|
53
54
|
export * from "./putty-likes";
|
|
54
55
|
export * from "./LibramSummon";
|
package/dist/url.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const EMPTY_VALUE: unique symbol;
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
|
|
2
|
+
type QValue = string | number | boolean | typeof EMPTY_VALUE;
|
|
3
|
+
export type QueryList = readonly (readonly [key: string, value: QValue])[];
|
|
4
|
+
export type QueryObject = Record<string, QValue>;
|
|
5
|
+
export type Query = QueryList | QueryObject;
|
|
6
|
+
type Options = {
|
|
7
7
|
method?: "GET" | "POST";
|
|
8
8
|
};
|
|
9
9
|
/**
|
package/dist/utils.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ export declare function countedMapToString<T>(map: Map<T, number>): string;
|
|
|
66
66
|
*/
|
|
67
67
|
export declare function sum<S extends string | number | symbol, T extends {
|
|
68
68
|
[s in S]: number;
|
|
69
|
-
}>(addends: T[], property: S): number;
|
|
69
|
+
}>(addends: readonly T[], property: S): number;
|
|
70
70
|
/**
|
|
71
71
|
* Sum an array of numbers.
|
|
72
72
|
*
|
|
@@ -74,7 +74,7 @@ export declare function sum<S extends string | number | symbol, T extends {
|
|
|
74
74
|
* @param mappingFunction Mapping function to turn addends into actual numbers.
|
|
75
75
|
* @returns Sum of numbers
|
|
76
76
|
*/
|
|
77
|
-
export declare function sum<T>(addends: T[], mappingFunction: (element: T) => number): number;
|
|
77
|
+
export declare function sum<T>(addends: readonly T[], mappingFunction: (element: T) => number): number;
|
|
78
78
|
/**
|
|
79
79
|
* Sum array of numbers
|
|
80
80
|
*
|
|
@@ -116,8 +116,8 @@ export declare function maxBy<T>(array: T[] | readonly T[], optimizer: (element:
|
|
|
116
116
|
export declare function maxBy<S extends string | number | symbol, T extends {
|
|
117
117
|
[x in S]: number;
|
|
118
118
|
}>(array: T[] | readonly T[], key: S, reverse?: boolean): T;
|
|
119
|
-
export
|
|
120
|
-
|
|
119
|
+
export type Tuple<T, N extends number> = N extends N ? number extends N ? T[] : _tupleOf<T, N, []> : never;
|
|
120
|
+
type _tupleOf<T, N extends number, R extends unknown[]> = R["length"] extends N ? R : _tupleOf<T, N, [T, ...R]>;
|
|
121
121
|
/**
|
|
122
122
|
* Compare arrays shallowly
|
|
123
123
|
*
|
|
@@ -130,7 +130,7 @@ export declare function arrayEquals<T>(left: T[] | readonly T[], right: T[] | re
|
|
|
130
130
|
* Type that extends any non-function entity--like a string, number, or array--into a itself and a no-input function that returns it.
|
|
131
131
|
* Used to interact with objects that could either be functions or static values.
|
|
132
132
|
*/
|
|
133
|
-
export
|
|
133
|
+
export type Delayed<T, S extends any[] = never[]> = [T] extends [
|
|
134
134
|
(...args: any) => any
|
|
135
135
|
] ? never : T | ((...args: S) => T);
|
|
136
136
|
/**
|
|
@@ -145,7 +145,7 @@ export declare function undelay<T, S extends any[] = never[]>(delayedObject: Del
|
|
|
145
145
|
* An object keyed by string type T, with values of S.
|
|
146
146
|
* or contains a 'default' parameter to use as a fallback.
|
|
147
147
|
*/
|
|
148
|
-
export
|
|
148
|
+
export type Switch<T extends string, S> = Record<T, S> | (Partial<{
|
|
149
149
|
[x in T]: S;
|
|
150
150
|
}> & {
|
|
151
151
|
default: S;
|
|
@@ -177,9 +177,9 @@ export declare function random<T>(array: T[]): T;
|
|
|
177
177
|
* @returns Word in title case
|
|
178
178
|
*/
|
|
179
179
|
export declare const tc: (word: string) => string;
|
|
180
|
-
|
|
180
|
+
type Enumerate<N extends number, A extends number[] = []> = A["length"] extends N ? A[number] : Enumerate<N, [...A, A["length"]]>;
|
|
181
181
|
/**
|
|
182
182
|
* Integers on the interval [A, B).
|
|
183
183
|
*/
|
|
184
|
-
export
|
|
184
|
+
export type Range<A extends number, B extends number> = Exclude<Enumerate<B>, Enumerate<A>>;
|
|
185
185
|
export {};
|
package/dist/utils.js
CHANGED
|
@@ -240,7 +240,8 @@ export function flat(arr, depth = Infinity) {
|
|
|
240
240
|
let flatArray = [];
|
|
241
241
|
for (const item of arr) {
|
|
242
242
|
if (Array.isArray(item) && depth > 0) {
|
|
243
|
-
|
|
243
|
+
const child = flat(item, depth - 1);
|
|
244
|
+
flatArray = flatArray.concat(child);
|
|
244
245
|
}
|
|
245
246
|
else {
|
|
246
247
|
flatArray.push(item);
|