libram 0.4.1 → 0.4.2

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 (83) hide show
  1. package/dist/Clan.js +268 -485
  2. package/dist/Copier.js +11 -48
  3. package/dist/Dungeon.js +77 -157
  4. package/dist/Kmail.d.ts +3 -1
  5. package/dist/Kmail.js +92 -243
  6. package/dist/Path.js +68 -120
  7. package/dist/ascend.js +153 -172
  8. package/dist/combat.d.ts +84 -0
  9. package/dist/combat.js +294 -387
  10. package/dist/console.js +13 -36
  11. package/dist/diet/index.d.ts +23 -8
  12. package/dist/diet/index.js +320 -426
  13. package/dist/diet/knapsack.d.ts +1 -1
  14. package/dist/diet/knapsack.js +90 -100
  15. package/dist/dungeons/Dreadsylvania.d.ts +4 -0
  16. package/dist/dungeons/Dreadsylvania.js +14 -0
  17. package/dist/dungeons/Dungeon.d.ts +28 -0
  18. package/dist/dungeons/Dungeon.js +99 -0
  19. package/dist/dungeons/Hobopolis.d.ts +4 -0
  20. package/dist/dungeons/Hobopolis.js +14 -0
  21. package/dist/dungeons/SlimeTube.d.ts +4 -0
  22. package/dist/dungeons/SlimeTube.js +14 -0
  23. package/dist/freerun.d.ts +16 -4
  24. package/dist/freerun.js +88 -99
  25. package/dist/index.d.ts +3 -1
  26. package/dist/index.js +21 -300
  27. package/dist/lib.d.ts +2 -0
  28. package/dist/lib.js +264 -515
  29. package/dist/logger.js +23 -63
  30. package/dist/maximize.js +289 -562
  31. package/dist/modifier.js +35 -46
  32. package/dist/modifierTypes.js +8 -22
  33. package/dist/mood.js +220 -531
  34. package/dist/property.d.ts +2 -0
  35. package/dist/property.js +96 -242
  36. package/dist/propertyTypes.d.ts +2 -2
  37. package/dist/propertyTypes.js +1 -0
  38. package/dist/propertyTyping.js +42 -53
  39. package/dist/resources/2007/CandyHearts.d.ts +9 -0
  40. package/dist/resources/2007/CandyHearts.js +24 -0
  41. package/dist/resources/2008/DivineFavors.d.ts +9 -0
  42. package/dist/resources/2008/DivineFavors.js +27 -0
  43. package/dist/resources/2009/Bandersnatch.js +37 -112
  44. package/dist/resources/2009/LoveSongs.d.ts +9 -0
  45. package/dist/resources/2009/LoveSongs.js +24 -0
  46. package/dist/resources/2009/SpookyPutty.js +20 -46
  47. package/dist/resources/2010/Brickos.d.ts +9 -0
  48. package/dist/resources/2010/Brickos.js +21 -0
  49. package/dist/resources/2010/CrownOfThrones.d.ts +9 -0
  50. package/dist/resources/2010/CrownOfThrones.js +550 -374
  51. package/dist/resources/2011/Gygaxian.d.ts +9 -0
  52. package/dist/resources/2011/Gygaxian.js +24 -0
  53. package/dist/resources/2011/ObtuseAngel.js +21 -63
  54. package/dist/resources/2012/RainDoh.js +14 -40
  55. package/dist/resources/2012/Resolutions.d.ts +9 -0
  56. package/dist/resources/2012/Resolutions.js +28 -0
  57. package/dist/resources/2013/Florist.d.ts +1 -0
  58. package/dist/resources/2013/Florist.js +137 -207
  59. package/dist/resources/2013/PulledTaffy.d.ts +9 -0
  60. package/dist/resources/2013/PulledTaffy.js +33 -0
  61. package/dist/resources/2014/WinterGarden.js +15 -43
  62. package/dist/resources/2015/ChateauMantegna.js +52 -86
  63. package/dist/resources/2015/MayoClinic.d.ts +1 -0
  64. package/dist/resources/2015/MayoClinic.js +30 -65
  65. package/dist/resources/2016/SourceTerminal.d.ts +1 -0
  66. package/dist/resources/2016/SourceTerminal.js +114 -237
  67. package/dist/resources/2016/Witchess.js +33 -59
  68. package/dist/resources/2017/TunnelOfLove.js +62 -111
  69. package/dist/resources/2018/SongBoom.js +32 -68
  70. package/dist/resources/2019/BeachComb.js +26 -44
  71. package/dist/resources/2019/Snapper.d.ts +28 -0
  72. package/dist/resources/2019/Snapper.js +70 -0
  73. package/dist/resources/2020/Guzzlr.js +79 -163
  74. package/dist/resources/LibramSummon.d.ts +12 -0
  75. package/dist/resources/LibramSummon.js +66 -0
  76. package/dist/resources/index.d.ts +3 -1
  77. package/dist/resources/index.js +19 -105
  78. package/dist/resources/putty-likes.js +15 -30
  79. package/dist/since.d.ts +1 -0
  80. package/dist/since.js +56 -112
  81. package/dist/template-string.js +40 -132
  82. package/dist/utils.js +36 -134
  83. package/package.json +2 -2
@@ -1,109 +1,66 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.array.slice.js");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.have = have;
9
- exports.isUsed = isUsed;
10
- exports.haveLovEnamorang = haveLovEnamorang;
11
- exports.getLovEnamorangUses = getLovEnamorangUses;
12
- exports.couldUseLoveEnamorang = couldUseLoveEnamorang;
13
- exports.getLovEnamorangMonster = getLovEnamorangMonster;
14
- exports.fightAll = fightAll;
15
- exports.LovEnamorang = void 0;
16
-
17
- var _kolmafia = require("kolmafia");
18
-
19
- var _Copier = require("../../Copier");
20
-
21
- var _lib = require("../../lib");
22
-
23
- var _property = require("../../property");
24
-
25
- var _templateString = require("../../template-string");
26
-
27
- var _templateObject, _templateObject2;
28
-
29
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
30
-
31
- function have() {
32
- return (0, _property.get)("loveTunnelAvailable");
1
+ import { adv1 } from "kolmafia";
2
+ import { Copier } from "../../Copier";
3
+ import { have as haveItem, haveWandererCounter, Wanderer } from "../../lib";
4
+ import { get, set } from "../../property";
5
+ import { $item, $location } from "../../template-string";
6
+ export function have() {
7
+ return get("loveTunnelAvailable");
33
8
  }
34
-
35
- function isUsed() {
36
- return (0, _property.get)("_loveTunnelUsed");
9
+ export function isUsed() {
10
+ return get("_loveTunnelUsed");
37
11
  }
38
-
39
- function haveLovEnamorang() {
40
- return (0, _lib.have)((0, _templateString.$item)(_templateObject || (_templateObject = _taggedTemplateLiteral(["LOV Enamorang"]))));
12
+ export function haveLovEnamorang() {
13
+ return haveItem($item `LOV Enamorang`);
41
14
  }
42
-
43
- function getLovEnamorangUses() {
44
- return (0, _property.get)("_enamorangs");
15
+ export function getLovEnamorangUses() {
16
+ return get("_enamorangs");
45
17
  }
46
-
47
- function couldUseLoveEnamorang() {
48
- return !(0, _lib.haveWandererCounter)(_lib.Wanderer.Enamorang) && getLovEnamorangUses() < 3 && haveLovEnamorang();
18
+ export function couldUseLoveEnamorang() {
19
+ return (!haveWandererCounter(Wanderer.Enamorang) &&
20
+ getLovEnamorangUses() < 3 &&
21
+ haveLovEnamorang());
49
22
  }
50
-
51
- function getLovEnamorangMonster() {
52
- return (0, _property.get)("enamorangMonster");
23
+ export function getLovEnamorangMonster() {
24
+ return get("enamorangMonster");
53
25
  }
54
-
55
- var LovEnamorang = new _Copier.Copier(() => couldUseLoveEnamorang(), null, () => couldUseLoveEnamorang(), () => getLovEnamorangMonster());
56
- exports.LovEnamorang = LovEnamorang;
57
-
26
+ export const LovEnamorang = new Copier(() => couldUseLoveEnamorang(), null, () => couldUseLoveEnamorang(), () => getLovEnamorangMonster());
58
27
  function equipmentChoice(equipment) {
59
- switch (equipment) {
60
- case "LOV Eardigan":
61
- return 1;
62
-
63
- case "LOV Epaulettes":
64
- return 2;
65
-
66
- case "LOV Earring":
67
- return 3;
68
- }
28
+ switch (equipment) {
29
+ case "LOV Eardigan":
30
+ return 1;
31
+ case "LOV Epaulettes":
32
+ return 2;
33
+ case "LOV Earring":
34
+ return 3;
35
+ }
69
36
  }
70
-
71
37
  function effectChoice(effect) {
72
- switch (effect) {
73
- case "Lovebotamy":
74
- return 1;
75
-
76
- case "Open Heart Surgery":
77
- return 2;
78
-
79
- case "Wandering Eye Surgery":
80
- return 3;
81
- }
38
+ switch (effect) {
39
+ case "Lovebotamy":
40
+ return 1;
41
+ case "Open Heart Surgery":
42
+ return 2;
43
+ case "Wandering Eye Surgery":
44
+ return 3;
45
+ }
82
46
  }
83
-
84
47
  function extraChoice(extra) {
85
- switch (extra) {
86
- case "LOV Enamorang":
87
- return 1;
88
-
89
- case "LOV Emotionizer":
90
- return 2;
91
-
92
- case "LOV Extraterrestrial Chocolate":
93
- return 3;
94
-
95
- case "LOV Echinacea Bouquet":
96
- return 4;
97
-
98
- case "LOV Elephant":
99
- return 5;
100
-
101
- case "toast":
102
- return 6;
103
-
104
- case null:
105
- return 7;
106
- }
48
+ switch (extra) {
49
+ case "LOV Enamorang":
50
+ return 1;
51
+ case "LOV Emotionizer":
52
+ return 2;
53
+ case "LOV Extraterrestrial Chocolate":
54
+ return 3;
55
+ case "LOV Echinacea Bouquet":
56
+ return 4;
57
+ case "LOV Elephant":
58
+ return 5;
59
+ case "toast":
60
+ return 6;
61
+ case null:
62
+ return 7;
63
+ }
107
64
  }
108
65
  /**
109
66
  * Fight all LOV monsters and get buffs/equipment.
@@ -111,19 +68,13 @@ function extraChoice(extra) {
111
68
  * @param effect Effect to take from LOV.
112
69
  * @param extra Extra item to take from LOV.
113
70
  */
114
-
115
-
116
- function fightAll(equipment, effect, extra) {
117
- (0, _property.set)("choiceAdventure1222", 1); // Entrance
118
-
119
- (0, _property.set)("choiceAdventure1223", 1); // Fight LOV Enforcer
120
-
121
- (0, _property.set)("choiceAdventure1224", equipmentChoice(equipment));
122
- (0, _property.set)("choiceAdventure1225", 1); // Fight LOV Engineer
123
-
124
- (0, _property.set)("choiceAdventure1226", effectChoice(effect));
125
- (0, _property.set)("choiceAdventure1227", 1); // Fight LOV Equivocator
126
-
127
- (0, _property.set)("choiceAdventure1228", extraChoice(extra));
128
- (0, _kolmafia.adv1)((0, _templateString.$location)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["The Tunnel of L.O.V.E."]))), 0, "");
129
- }
71
+ export function fightAll(equipment, effect, extra) {
72
+ set("choiceAdventure1222", 1); // Entrance
73
+ set("choiceAdventure1223", 1); // Fight LOV Enforcer
74
+ set("choiceAdventure1224", equipmentChoice(equipment));
75
+ set("choiceAdventure1225", 1); // Fight LOV Engineer
76
+ set("choiceAdventure1226", effectChoice(effect));
77
+ set("choiceAdventure1227", 1); // Fight LOV Equivocator
78
+ set("choiceAdventure1228", extraChoice(extra));
79
+ adv1($location `The Tunnel of L.O.V.E.`, 0, "");
80
+ }
@@ -1,86 +1,50 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.array.slice.js");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.have = have;
9
- exports.song = song;
10
- exports.songChangesLeft = songChangesLeft;
11
- exports.setSong = setSong;
12
- exports.dropProgress = dropProgress;
13
- exports.songBoomSongs = exports.item = void 0;
14
-
15
- require("core-js/modules/es.array.iterator.js");
16
-
17
- require("core-js/modules/es.object.to-string.js");
18
-
19
- var _kolmafia = require("kolmafia");
20
-
21
- var _lib = require("../../lib");
22
-
23
- var _property = require("../../property");
24
-
25
- var _templateString = require("../../template-string");
26
-
27
- var _templateObject;
28
-
29
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
30
-
31
- var item = (0, _templateString.$item)(_templateObject || (_templateObject = _taggedTemplateLiteral(["SongBoom\u2122 BoomBox"])));
32
- exports.item = item;
33
-
34
- function have() {
35
- return (0, _lib.have)(item);
1
+ import { cliExecute } from "kolmafia";
2
+ import { have as haveItem } from "../../lib";
3
+ import { get } from "../../property";
4
+ import { $item } from "../../template-string";
5
+ export const item = $item `SongBoom™ BoomBox`;
6
+ export function have() {
7
+ return haveItem(item);
36
8
  }
37
-
38
- var keywords = {
39
- "Eye of the Giger": "spooky",
40
- "Food Vibrations": "food",
41
- "Remainin' Alive": "dr",
42
- "These Fists Were Made for Punchin'": "damage",
43
- "Total Eclipse of Your Meat": "meat"
9
+ const keywords = {
10
+ "Eye of the Giger": "spooky",
11
+ "Food Vibrations": "food",
12
+ "Remainin' Alive": "dr",
13
+ "These Fists Were Made for Punchin'": "damage",
14
+ "Total Eclipse of Your Meat": "meat",
44
15
  };
45
- var songBoomSongs = new Set(Object.keys(keywords));
16
+ export const songBoomSongs = new Set(Object.keys(keywords));
46
17
  /**
47
18
  * Current song.
48
19
  */
49
-
50
- exports.songBoomSongs = songBoomSongs;
51
-
52
- function song() {
53
- var stored = (0, _property.get)("boomBoxSong");
54
- return songBoomSongs.has(stored) ? stored : null;
20
+ export function song() {
21
+ const stored = get("boomBoxSong");
22
+ return songBoomSongs.has(stored) ? stored : null;
55
23
  }
56
24
  /**
57
25
  * Song changes left today.
58
26
  */
59
-
60
-
61
- function songChangesLeft() {
62
- return (0, _property.get)("_boomBoxSongsLeft");
27
+ export function songChangesLeft() {
28
+ return get("_boomBoxSongsLeft");
63
29
  }
64
30
  /**
65
31
  * Change the song.
66
32
  * @param newSong Song to change to.
67
33
  */
68
-
69
-
70
- function setSong(newSong) {
71
- if (song() !== newSong) {
72
- if (songChangesLeft() === 0) throw new Error("Out of song changes!");
73
- (0, _kolmafia.cliExecute)("boombox ".concat(newSong ? keywords[newSong] : "none"));
74
- return true;
75
- } else {
76
- return false;
77
- }
34
+ export function setSong(newSong) {
35
+ if (song() !== newSong) {
36
+ if (songChangesLeft() === 0)
37
+ throw new Error("Out of song changes!");
38
+ cliExecute(`boombox ${newSong ? keywords[newSong] : "none"}`);
39
+ return true;
40
+ }
41
+ else {
42
+ return false;
43
+ }
78
44
  }
79
45
  /**
80
46
  * Progress to next song drop (e.g. gathered meat-clip).
81
47
  */
82
-
83
-
84
- function dropProgress() {
85
- return (0, _property.get)("_boomBoxFights");
86
- }
48
+ export function dropProgress() {
49
+ return get("_boomBoxFights");
50
+ }
@@ -1,44 +1,26 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.array.slice.js");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.tryHead = tryHead;
9
- exports.headBuffs = void 0;
10
-
11
- require("core-js/modules/es.array.includes.js");
12
-
13
- require("core-js/modules/es.string.includes.js");
14
-
15
- require("core-js/modules/es.regexp.exec.js");
16
-
17
- require("core-js/modules/es.string.split.js");
18
-
19
- require("core-js/modules/es.object.to-string.js");
20
-
21
- require("core-js/modules/es.regexp.to-string.js");
22
-
23
- var _kolmafia = require("kolmafia");
24
-
25
- var _lib = require("../../lib");
26
-
27
- var _property = require("../../property");
28
-
29
- var _templateString = require("../../template-string");
30
-
31
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
32
-
33
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
34
-
35
- var headBuffs = [(0, _templateString.$effect)(_templateObject || (_templateObject = _taggedTemplateLiteral(["Hot-Headed"]))), (0, _templateString.$effect)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["Cold as Nice"]))), (0, _templateString.$effect)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["A Brush with Grossness"]))), (0, _templateString.$effect)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["Does It Have a Skull In There??"]))), (0, _templateString.$effect)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["Oiled, Slick"]))), (0, _templateString.$effect)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["Lack of Body-Building"]))), (0, _templateString.$effect)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["We're All Made of Starfish"]))), (0, _templateString.$effect)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["Pomp & Circumsands"]))), (0, _templateString.$effect)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["Resting Beach Face"]))), (0, _templateString.$effect)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["Do I Know You From Somewhere?"]))), (0, _templateString.$effect)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["You Learned Something Maybe!"])))];
36
- exports.headBuffs = headBuffs;
37
-
38
- function tryHead(effect) {
39
- if (!headBuffs.includes(effect)) return false;
40
- var headNumber = 1 + headBuffs.indexOf(effect);
41
- if ((0, _property.getString)("_beachHeadsUsed").split(",").includes(headNumber.toString())) return false;
42
- (0, _kolmafia.cliExecute)(effect.default);
43
- return (0, _lib.have)(effect);
44
- }
1
+ import { cliExecute } from "kolmafia";
2
+ import { have } from "../../lib";
3
+ import { getString } from "../../property";
4
+ import { $effect } from "../../template-string";
5
+ export const headBuffs = [
6
+ $effect `Hot-Headed`,
7
+ $effect `Cold as Nice`,
8
+ $effect `A Brush with Grossness`,
9
+ $effect `Does It Have a Skull In There??`,
10
+ $effect `Oiled, Slick`,
11
+ $effect `Lack of Body-Building`,
12
+ $effect `We're All Made of Starfish`,
13
+ $effect `Pomp & Circumsands`,
14
+ $effect `Resting Beach Face`,
15
+ $effect `Do I Know You From Somewhere?`,
16
+ $effect `You Learned Something Maybe!`,
17
+ ];
18
+ export function tryHead(effect) {
19
+ if (!headBuffs.includes(effect))
20
+ return false;
21
+ const headNumber = 1 + headBuffs.indexOf(effect);
22
+ if (getString("_beachHeadsUsed").split(",").includes(headNumber.toString()))
23
+ return false;
24
+ cliExecute(effect.default);
25
+ return have(effect);
26
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Map of phylum to item that phylum drops.
3
+ */
4
+ export declare const phylumItem: Map<Phylum, Item>;
5
+ /**
6
+ * Map of drop item to phylum it drops from.
7
+ */
8
+ export declare const itemPhylum: Map<Item, Phylum>;
9
+ /**
10
+ * Return whether you have a Red-Nosed Snapper.
11
+ * @returns True if you have a Red-Nosed Snapper, false otherwise.
12
+ */
13
+ export declare function have(): boolean;
14
+ /**
15
+ * Get the phylum currently being tracked by the snapper.
16
+ * @returns Tracked phylum, or null if no phylum tracked.
17
+ */
18
+ export declare function getTrackedPhylum(): Phylum | null;
19
+ /**
20
+ * Set snapper tracking to a certain phylum.
21
+ * @param phylum Phylum to track.
22
+ */
23
+ export declare function trackPhylum(phylum: Phylum): void;
24
+ /**
25
+ * Get progress to next snapper drop.
26
+ * @returns Number of fights completed (out of 11) to reach next drop.
27
+ */
28
+ export declare function getProgress(): number;
@@ -0,0 +1,70 @@
1
+ import { cliExecute, haveFamiliar, myFamiliar, toPhylum, useFamiliar, } from "kolmafia";
2
+ import { get } from "../../property";
3
+ const familiar = Familiar.get("Red-Nosed Snapper");
4
+ /**
5
+ * Map of phylum to item that phylum drops.
6
+ */
7
+ export const phylumItem = new Map([
8
+ [Phylum.get("Beast"), Item.get("patch of extra-warm fur")],
9
+ [Phylum.get("Bug"), Item.get("a bug's lymph")],
10
+ [Phylum.get("Constellation"), Item.get("micronova")],
11
+ [Phylum.get("Construct"), Item.get("industrial lubricant")],
12
+ [Phylum.get("Demon"), Item.get("infernal snowball")],
13
+ [Phylum.get("Dude"), Item.get("human musk")],
14
+ [Phylum.get("Elemental"), Item.get("livid energy")],
15
+ [Phylum.get("Elf"), Item.get("peppermint syrup")],
16
+ [Phylum.get("Fish"), Item.get("fish sauce")],
17
+ [Phylum.get("Goblin"), Item.get("guffin")],
18
+ [Phylum.get("Hippy"), Item.get("organic potpourri")],
19
+ [Phylum.get("Hobo"), Item.get("beggin' cologne")],
20
+ [Phylum.get("Horror"), Item.get("powdered madness")],
21
+ [Phylum.get("Humanoid"), Item.get("vial of humanoid growth hormone")],
22
+ [Phylum.get("Mer-kin"), Item.get("Mer-kin eyedrops")],
23
+ [Phylum.get("Orc"), Item.get("boot flask")],
24
+ [Phylum.get("Penguin"), Item.get("envelope full of Meat")],
25
+ [Phylum.get("Pirate"), Item.get("Shantix™")],
26
+ [Phylum.get("Plant"), Item.get("goodberry")],
27
+ [Phylum.get("Slime"), Item.get("extra-strength goo")],
28
+ [Phylum.get("Undead"), Item.get("unfinished pleasure")],
29
+ [Phylum.get("Weird"), Item.get("non-Euclidean angle]")],
30
+ ]);
31
+ /**
32
+ * Map of drop item to phylum it drops from.
33
+ */
34
+ export const itemPhylum = new Map([...phylumItem].map(([phylum, item]) => [item, phylum]));
35
+ /**
36
+ * Return whether you have a Red-Nosed Snapper.
37
+ * @returns True if you have a Red-Nosed Snapper, false otherwise.
38
+ */
39
+ export function have() {
40
+ return haveFamiliar(familiar);
41
+ }
42
+ /**
43
+ * Get the phylum currently being tracked by the snapper.
44
+ * @returns Tracked phylum, or null if no phylum tracked.
45
+ */
46
+ export function getTrackedPhylum() {
47
+ const phylum = toPhylum(get("redSnapperPhylum"));
48
+ return phylum === Phylum.get("none") ? null : phylum;
49
+ }
50
+ /**
51
+ * Set snapper tracking to a certain phylum.
52
+ * @param phylum Phylum to track.
53
+ */
54
+ export function trackPhylum(phylum) {
55
+ const currentFamiliar = myFamiliar();
56
+ try {
57
+ useFamiliar(familiar);
58
+ cliExecute(`snapper ${phylum}`);
59
+ }
60
+ finally {
61
+ useFamiliar(currentFamiliar);
62
+ }
63
+ }
64
+ /**
65
+ * Get progress to next snapper drop.
66
+ * @returns Number of fights completed (out of 11) to reach next drop.
67
+ */
68
+ export function getProgress() {
69
+ return get("redSnapperProgress");
70
+ }