libram 0.4.1 → 0.4.5

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 (91) hide show
  1. package/dist/Clan.js +271 -485
  2. package/dist/Copier.js +15 -48
  3. package/dist/Dungeon.js +77 -157
  4. package/dist/Kmail.d.ts +3 -1
  5. package/dist/Kmail.js +99 -244
  6. package/dist/Path.js +77 -120
  7. package/dist/ascend.js +153 -172
  8. package/dist/combat.d.ts +98 -3
  9. package/dist/combat.js +349 -387
  10. package/dist/console.js +13 -36
  11. package/dist/diet/index.d.ts +32 -8
  12. package/dist/diet/index.js +420 -426
  13. package/dist/diet/knapsack.d.ts +1 -1
  14. package/dist/diet/knapsack.js +104 -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 +92 -99
  25. package/dist/index.d.ts +5 -1
  26. package/dist/index.js +22 -300
  27. package/dist/lib.d.ts +4 -0
  28. package/dist/lib.js +284 -515
  29. package/dist/logger.js +21 -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.d.ts +5 -0
  34. package/dist/mood.js +268 -551
  35. package/dist/property.d.ts +2 -0
  36. package/dist/property.js +100 -242
  37. package/dist/propertyTypes.d.ts +5 -4
  38. package/dist/propertyTypes.js +1 -0
  39. package/dist/propertyTyping.d.ts +4 -3
  40. package/dist/propertyTyping.js +52 -59
  41. package/dist/resources/2007/CandyHearts.d.ts +9 -0
  42. package/dist/resources/2007/CandyHearts.js +24 -0
  43. package/dist/resources/2008/DivineFavors.d.ts +9 -0
  44. package/dist/resources/2008/DivineFavors.js +27 -0
  45. package/dist/resources/2009/Bandersnatch.js +37 -112
  46. package/dist/resources/2009/LoveSongs.d.ts +9 -0
  47. package/dist/resources/2009/LoveSongs.js +24 -0
  48. package/dist/resources/2009/SpookyPutty.js +20 -46
  49. package/dist/resources/2010/Brickos.d.ts +9 -0
  50. package/dist/resources/2010/Brickos.js +21 -0
  51. package/dist/resources/2010/CrownOfThrones.d.ts +9 -0
  52. package/dist/resources/2010/CrownOfThrones.js +550 -374
  53. package/dist/resources/2011/Gygaxian.d.ts +9 -0
  54. package/dist/resources/2011/Gygaxian.js +24 -0
  55. package/dist/resources/2011/ObtuseAngel.js +21 -63
  56. package/dist/resources/2012/RainDoh.js +14 -40
  57. package/dist/resources/2012/Resolutions.d.ts +9 -0
  58. package/dist/resources/2012/Resolutions.js +28 -0
  59. package/dist/resources/2013/Florist.d.ts +1 -0
  60. package/dist/resources/2013/Florist.js +142 -207
  61. package/dist/resources/2013/PulledTaffy.d.ts +9 -0
  62. package/dist/resources/2013/PulledTaffy.js +33 -0
  63. package/dist/resources/2014/DNALab.d.ts +47 -0
  64. package/dist/resources/2014/DNALab.js +154 -0
  65. package/dist/resources/2014/WinterGarden.js +15 -43
  66. package/dist/resources/2015/ChateauMantegna.js +52 -86
  67. package/dist/resources/2015/MayoClinic.d.ts +3 -0
  68. package/dist/resources/2015/MayoClinic.js +36 -65
  69. package/dist/resources/2016/SourceTerminal.d.ts +1 -0
  70. package/dist/resources/2016/SourceTerminal.js +114 -237
  71. package/dist/resources/2016/Witchess.js +33 -59
  72. package/dist/resources/2017/AsdonMartin.d.ts +27 -0
  73. package/dist/resources/2017/AsdonMartin.js +80 -0
  74. package/dist/resources/2017/TunnelOfLove.js +62 -111
  75. package/dist/resources/2018/SongBoom.js +32 -68
  76. package/dist/resources/2019/BeachComb.js +26 -44
  77. package/dist/resources/2019/Snapper.d.ts +28 -0
  78. package/dist/resources/2019/Snapper.js +69 -0
  79. package/dist/resources/2020/Guzzlr.d.ts +3 -0
  80. package/dist/resources/2020/Guzzlr.js +92 -163
  81. package/dist/resources/LibramSummon.d.ts +12 -0
  82. package/dist/resources/LibramSummon.js +66 -0
  83. package/dist/resources/index.d.ts +5 -1
  84. package/dist/resources/index.js +21 -105
  85. package/dist/resources/putty-likes.js +15 -30
  86. package/dist/since.d.ts +1 -0
  87. package/dist/since.js +56 -112
  88. package/dist/template-string.js +40 -132
  89. package/dist/utils.d.ts +5 -0
  90. package/dist/utils.js +47 -134
  91. package/package.json +15 -9
@@ -0,0 +1,9 @@
1
+ export declare const summonSkill: Skill;
2
+ /**
3
+ * @returns true if the player can Summon Dice
4
+ */
5
+ export declare function have(): boolean;
6
+ /**
7
+ * @returns map containing the chance of an item to be summoned
8
+ */
9
+ export declare function expected(): Map<Item, number>;
@@ -0,0 +1,24 @@
1
+ import { $item, $skill } from "../../template-string";
2
+ import { have as _have } from "../../lib";
3
+ export const summonSkill = $skill `Summon Dice`;
4
+ const libramChance = 1.0 / 6;
5
+ const libramExpected = new Map([
6
+ [$item `d4`, libramChance],
7
+ [$item `d6`, libramChance],
8
+ [$item `d8`, libramChance],
9
+ [$item `d10`, libramChance],
10
+ [$item `d12`, libramChance],
11
+ [$item `d20`, libramChance],
12
+ ]);
13
+ /**
14
+ * @returns true if the player can Summon Dice
15
+ */
16
+ export function have() {
17
+ return _have(summonSkill);
18
+ }
19
+ /**
20
+ * @returns map containing the chance of an item to be summoned
21
+ */
22
+ export function expected() {
23
+ return libramExpected;
24
+ }
@@ -1,91 +1,49 @@
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.getBadlyRomanticArrowUses = getBadlyRomanticArrowUses;
10
- exports.haveBadlyRomanticArrowUsesRemaining = haveBadlyRomanticArrowUsesRemaining;
11
- exports.couldUseBadlyRomanticArrow = couldUseBadlyRomanticArrow;
12
- exports.prepareBadlyRomanticArrow = prepareBadlyRomanticArrow;
13
- exports.canUseBadlyRomanticArrow = canUseBadlyRomanticArrow;
14
- exports.getBadlyRomanticArrowMonster = getBadlyRomanticArrowMonster;
15
- exports.BadlyRomanticArrow = exports.familiar = 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;
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 familiar = (0, _templateString.$familiar)(_templateObject || (_templateObject = _taggedTemplateLiteral(["Obtuse Angel"])));
1
+ import { useFamiliar } from "kolmafia";
2
+ import { Copier } from "../../Copier";
3
+ import { have as _have, isCurrentFamiliar } from "../../lib";
4
+ import { get } from "../../property";
5
+ import { $familiar } from "../../template-string";
6
+ export const familiar = $familiar `Obtuse Angel`;
32
7
  /**
33
8
  * Returns true if the player has an Obtuse Angel
34
9
  */
35
-
36
- exports.familiar = familiar;
37
-
38
- function have() {
39
- return (0, _lib.have)(familiar);
10
+ export function have() {
11
+ return _have(familiar);
40
12
  }
41
13
  /**
42
14
  * Returns number of badly romantic arrows used
43
15
  */
44
-
45
-
46
- function getBadlyRomanticArrowUses() {
47
- return Math.max(0, (0, _property.get)("_badlyRomanticArrows"));
16
+ export function getBadlyRomanticArrowUses() {
17
+ return Math.max(0, get("_badlyRomanticArrows"));
48
18
  }
49
19
  /**
50
20
  * Returns true if badly romantic arrow can still be used
51
21
  */
52
-
53
-
54
- function haveBadlyRomanticArrowUsesRemaining() {
55
- return getBadlyRomanticArrowUses() === 0;
22
+ export function haveBadlyRomanticArrowUsesRemaining() {
23
+ return getBadlyRomanticArrowUses() === 0;
56
24
  }
57
25
  /**
58
26
  * Returns true if the player could use badly romantic arrow in theory
59
27
  */
60
-
61
-
62
- function couldUseBadlyRomanticArrow() {
63
- return have() && haveBadlyRomanticArrowUsesRemaining();
28
+ export function couldUseBadlyRomanticArrow() {
29
+ return have() && haveBadlyRomanticArrowUsesRemaining();
64
30
  }
65
31
  /**
66
32
  * Prepares badly romantic arrow for use
67
33
  */
68
-
69
-
70
- function prepareBadlyRomanticArrow() {
71
- return (0, _kolmafia.useFamiliar)(familiar);
34
+ export function prepareBadlyRomanticArrow() {
35
+ return useFamiliar(familiar);
72
36
  }
73
37
  /**
74
38
  * Returns true if the player can use badly romantic arrow right now
75
39
  */
76
-
77
-
78
- function canUseBadlyRomanticArrow() {
79
- return (0, _lib.isCurrentFamiliar)(familiar) && haveBadlyRomanticArrowUsesRemaining();
40
+ export function canUseBadlyRomanticArrow() {
41
+ return isCurrentFamiliar(familiar) && haveBadlyRomanticArrowUsesRemaining();
80
42
  }
81
43
  /**
82
44
  * Returns the current badly romantic arrow monster target
83
45
  */
84
-
85
-
86
- function getBadlyRomanticArrowMonster() {
87
- return (0, _property.get)("romanticTarget");
46
+ export function getBadlyRomanticArrowMonster() {
47
+ return get("romanticTarget");
88
48
  }
89
-
90
- var BadlyRomanticArrow = new _Copier.Copier(() => couldUseBadlyRomanticArrow(), () => prepareBadlyRomanticArrow(), () => canUseBadlyRomanticArrow(), () => getBadlyRomanticArrowMonster());
91
- exports.BadlyRomanticArrow = BadlyRomanticArrow;
49
+ export const BadlyRomanticArrow = new Copier(() => couldUseBadlyRomanticArrow(), () => prepareBadlyRomanticArrow(), () => canUseBadlyRomanticArrow(), () => getBadlyRomanticArrowMonster());
@@ -1,43 +1,17 @@
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.getRainDohBlackBoxCopiesMade = getRainDohBlackBoxCopiesMade;
10
- exports.getRainDohBlackBoxMonster = getRainDohBlackBoxMonster;
11
- exports.useRainDohBlackBox = useRainDohBlackBox;
12
- exports.box = void 0;
13
-
14
- var _kolmafia = require("kolmafia");
15
-
16
- var _lib = require("../../lib");
17
-
18
- var _property = require("../../property");
19
-
20
- var _templateString = require("../../template-string");
21
-
22
- var _templateObject;
23
-
24
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
25
-
26
- var box = (0, _templateString.$item)(_templateObject || (_templateObject = _taggedTemplateLiteral(["Rain-Doh black box"])));
27
- exports.box = box;
28
-
29
- function have() {
30
- return (0, _lib.getFoldGroup)(box).some(item => (0, _lib.have)(item));
1
+ import { use } from "kolmafia";
2
+ import { getFoldGroup, have as haveItem } from "../../lib";
3
+ import { get } from "../../property";
4
+ import { $item } from "../../template-string";
5
+ export const box = $item `Rain-Doh black box`;
6
+ export function have() {
7
+ return getFoldGroup(box).some((item) => haveItem(item));
31
8
  }
32
-
33
- function getRainDohBlackBoxCopiesMade() {
34
- return Math.max(0, (0, _property.get)("_raindohCopiesMade"));
9
+ export function getRainDohBlackBoxCopiesMade() {
10
+ return Math.max(0, get("_raindohCopiesMade"));
35
11
  }
36
-
37
- function getRainDohBlackBoxMonster() {
38
- return (0, _property.get)("rainDohMonster");
12
+ export function getRainDohBlackBoxMonster() {
13
+ return get("rainDohMonster");
14
+ }
15
+ export function useRainDohBlackBox() {
16
+ return use(box);
39
17
  }
40
-
41
- function useRainDohBlackBox() {
42
- return (0, _kolmafia.use)(box);
43
- }
@@ -0,0 +1,9 @@
1
+ export declare const summonSkill: Skill;
2
+ /**
3
+ * @returns true if the player can Summon Resolutions
4
+ */
5
+ export declare function have(): boolean;
6
+ /**
7
+ * @returns map containing the chance of an item to be summoned
8
+ */
9
+ export declare function expected(): Map<Item, number>;
@@ -0,0 +1,28 @@
1
+ import { $item, $skill } from "../../template-string";
2
+ import { have as _have } from "../../lib";
3
+ export const summonSkill = $skill `Summon Resolutions`;
4
+ const commonChance = 0.98 / 6;
5
+ const rareChance = 0.02 / 3;
6
+ const libramExpected = new Map([
7
+ [$item `resolution: be feistier`, commonChance],
8
+ [$item `resolution: be happier`, commonChance],
9
+ [$item `resolution: be sexier`, commonChance],
10
+ [$item `resolution: be smarter`, commonChance],
11
+ [$item `resolution: be stronger`, commonChance],
12
+ [$item `resolution: be wealthier`, commonChance],
13
+ [$item `resolution: be kinder`, rareChance],
14
+ [$item `resolution: be luckier`, rareChance],
15
+ [$item `resolution: be more adventurous`, rareChance],
16
+ ]);
17
+ /**
18
+ * @returns true if the player can Summon Resolutions
19
+ */
20
+ export function have() {
21
+ return _have(summonSkill);
22
+ }
23
+ /**
24
+ * @returns map containing the chance of an item to be summoned
25
+ */
26
+ export function expected() {
27
+ return libramExpected;
28
+ }
@@ -14,6 +14,7 @@ declare class Flower {
14
14
  plant(): boolean;
15
15
  }
16
16
  export declare function have(): boolean;
17
+ export declare function flowersIn(location: Location): Flower[];
17
18
  export declare function flowersAvailableFor(location?: Location): Flower[];
18
19
  export declare function isFull(location?: Location): boolean;
19
20
  export declare const RabidDogwood: Flower;
@@ -1,219 +1,154 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.have = have;
7
- exports.flowersAvailableFor = flowersAvailableFor;
8
- exports.isFull = isFull;
9
- exports.all = exports.UpSeaDaisy = exports.Snori = exports.SubSeaRose = exports.Sargassum = exports.OrcaOrchid = exports.Duckweed = exports.ElectricEelgrass = exports.Crookweed = exports.Kelptomaniac = exports.Spankton = exports.MaxHeadshroom = exports.Portlybella = exports.Chillterelle = exports.FoulToadstool = exports.LooseMorels = exports.DisLichen = exports.ShuffleTruffle = exports.WizardsWig = exports.HornOfPlenty = exports.BlusteryPuffball = exports.PitcherPlant = exports.AloeGuvnor = exports.ArcticMoss = exports.BamBoo = exports.RedFern = exports.SpiderPlant = exports.Impatiens = exports.CannedSpinach = exports.StealingMagnolia = exports.WarLily = exports.SeltzerWatercress = exports.LettuceSpray = exports.CeleryStalker = exports.DeadlyCinnamon = exports.SkunkCabbage = exports.SmokeRa = exports.Artichoker = exports.RadishRadish = exports.Rutabeggar = exports.RabidDogwood = void 0;
10
-
11
- require("core-js/modules/es.object.to-string.js");
12
-
13
- require("core-js/modules/es.regexp.to-string.js");
14
-
15
- require("core-js/modules/es.array.filter.js");
16
-
17
- require("core-js/modules/es.array.map.js");
18
-
19
- require("core-js/modules/es.array.includes.js");
20
-
21
- require("core-js/modules/es.string.includes.js");
22
-
23
- require("core-js/modules/es.array.find.js");
24
-
25
- var _kolmafia = require("kolmafia");
26
-
27
- var _property = require("../../property");
28
-
29
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
30
-
31
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
32
-
33
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
34
-
35
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
36
-
37
- var Flower = /*#__PURE__*/function () {
38
- function Flower(name, id, environment, modifier) {
39
- var territorial = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
40
-
41
- _classCallCheck(this, Flower);
42
-
43
- _defineProperty(this, "name", void 0);
44
-
45
- _defineProperty(this, "id", void 0);
46
-
47
- _defineProperty(this, "environment", void 0);
48
-
49
- _defineProperty(this, "modifier", void 0);
50
-
51
- _defineProperty(this, "territorial", void 0);
52
-
53
- this.name = name;
54
- this.id = id;
55
- this.environment = environment;
56
- this.modifier = modifier;
57
- this.territorial = territorial;
58
- }
59
-
60
- _createClass(Flower, [{
61
- key: "plantNamesInZone",
62
- value: function plantNamesInZone() {
63
- var location = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (0, _kolmafia.myLocation)();
64
- return (0, _kolmafia.getFloristPlants)()[location.toString()];
1
+ import { floristAvailable, getFloristPlants, myLocation, visitUrl, } from "kolmafia";
2
+ import { get } from "../../property";
3
+ class Flower {
4
+ name;
5
+ id;
6
+ environment;
7
+ modifier;
8
+ territorial;
9
+ constructor(name, id, environment, modifier, territorial = false) {
10
+ this.name = name;
11
+ this.id = id;
12
+ this.environment = environment;
13
+ this.modifier = modifier;
14
+ this.territorial = territorial;
65
15
  }
66
- }, {
67
- key: "plantsInZone",
68
- value: function plantsInZone() {
69
- var _this$plantNamesInZon;
70
-
71
- var location = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (0, _kolmafia.myLocation)();
72
- return (_this$plantNamesInZon = this.plantNamesInZone(location)) === null || _this$plantNamesInZon === void 0 ? void 0 : _this$plantNamesInZon.map(flowerName => toFlower(flowerName)).filter(flower => flower !== undefined);
16
+ plantNamesInZone(location = myLocation()) {
17
+ return getFloristPlants()[location.toString()];
73
18
  }
74
- }, {
75
- key: "isPlantedHere",
76
- value: function isPlantedHere() {
77
- var _this$plantNamesInZon2;
78
-
79
- var location = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (0, _kolmafia.myLocation)();
80
- var plantedHere = (_this$plantNamesInZon2 = this.plantNamesInZone(location)) === null || _this$plantNamesInZon2 === void 0 ? void 0 : _this$plantNamesInZon2.includes(this.name);
81
- return plantedHere !== undefined && plantedHere;
19
+ plantsInZone(location = myLocation()) {
20
+ return this.plantNamesInZone(location)
21
+ ?.map((flowerName) => toFlower(flowerName))
22
+ .filter((flower) => flower !== undefined);
82
23
  }
83
- }, {
84
- key: "available",
85
- value: function available() {
86
- var location = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (0, _kolmafia.myLocation)();
87
- return this.environment === location.environment && !(0, _property.get)("_floristPlantsUsed").includes(this.name) && !this.isPlantedHere(location);
24
+ isPlantedHere(location = myLocation()) {
25
+ const plantedHere = this.plantNamesInZone(location)?.includes(this.name);
26
+ return plantedHere !== undefined && plantedHere;
88
27
  }
89
- }, {
90
- key: "dig",
91
- value: function dig() {
92
- if (!this.isPlantedHere()) return false;
93
- var flowers = this.plantNamesInZone();
94
- if (!flowers || !flowers[2]) return false;
95
- var plantNumber = (0, _kolmafia.getFloristPlants)()[(0, _kolmafia.myLocation)().toString()].indexOf(this.name);
96
- (0, _kolmafia.visitUrl)("choice.php?option=2&whichchoice=720&pwd&plnti=".concat(plantNumber));
97
- return !this.isPlantedHere();
28
+ available(location = myLocation()) {
29
+ return (this.environment === location.environment &&
30
+ !get("_floristPlantsUsed").includes(this.name) &&
31
+ !this.isPlantedHere(location));
98
32
  }
99
- }, {
100
- key: "plant",
101
- value: function plant() {
102
- if (this.isPlantedHere()) return true;
103
- if (isFull()) return false;
104
- (0, _kolmafia.visitUrl)("choice.php?whichchoice=720&whichoption=1&pwd&plant=".concat(this.id));
105
- return this.isPlantedHere();
33
+ dig() {
34
+ if (!this.isPlantedHere())
35
+ return false;
36
+ const flowers = this.plantNamesInZone();
37
+ if (!flowers || !flowers[2])
38
+ return false;
39
+ const plantNumber = getFloristPlants()[myLocation().toString()].indexOf(this.name);
40
+ visitUrl(`choice.php?option=2&whichchoice=720&pwd&plnti=${plantNumber}`);
41
+ return !this.isPlantedHere();
106
42
  }
107
- }]);
108
-
109
- return Flower;
110
- }();
111
-
112
- function have() {
113
- return (0, _kolmafia.floristAvailable)();
43
+ plant() {
44
+ if (this.isPlantedHere())
45
+ return true;
46
+ if (isFull())
47
+ return false;
48
+ visitUrl(`choice.php?whichchoice=720&whichoption=1&pwd&plant=${this.id}`);
49
+ return this.isPlantedHere();
50
+ }
51
+ }
52
+ export function have() {
53
+ return floristAvailable();
114
54
  }
115
-
116
55
  function toFlower(name) {
117
- return all.find(flower => name === flower.name);
56
+ return all.find((flower) => name === flower.name);
118
57
  }
119
-
120
- function flowersIn(location) {
121
- var returnValue = [];
122
- (0, _kolmafia.getFloristPlants)()[location.toString()].map(toFlower).forEach(flower => {
123
- if (flower) returnValue.push(flower);
124
- });
125
- return returnValue;
58
+ export function flowersIn(location) {
59
+ const returnValue = [];
60
+ getFloristPlants()[location.toString()].map(toFlower)
61
+ .forEach((flower) => {
62
+ if (flower)
63
+ returnValue.push(flower);
64
+ });
65
+ return returnValue;
126
66
  }
127
-
128
- function flowersAvailableFor() {
129
- var location = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (0, _kolmafia.myLocation)();
130
- return all.filter(flower => flower.available(location));
67
+ export function flowersAvailableFor(location = myLocation()) {
68
+ return all.filter((flower) => flower.available(location));
131
69
  }
132
-
133
- function isFull() {
134
- var location = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (0, _kolmafia.myLocation)();
135
- return flowersIn(location).length === 3;
70
+ export function isFull(location = myLocation()) {
71
+ return flowersIn(location).length === 3;
136
72
  }
137
-
138
- var RabidDogwood = new Flower("Rabid Dogwood", 1, "outdoor", "+30 Monster Level", true);
139
- exports.RabidDogwood = RabidDogwood;
140
- var Rutabeggar = new Flower("Rutabeggar", 2, "outdoor", "+25 Item Drop", true);
141
- exports.Rutabeggar = Rutabeggar;
142
- var RadishRadish = new Flower("Rad-ish Radish", 3, "outdoor", "+5 Moxie Experience", true);
143
- exports.RadishRadish = RadishRadish;
144
- var Artichoker = new Flower("Artichoker", 4, "outdoor", "Delevels enemies");
145
- exports.Artichoker = Artichoker;
146
- var SmokeRa = new Flower("Smoke-ra", 5, "outdoor", "Blocks attacks");
147
- exports.SmokeRa = SmokeRa;
148
- var SkunkCabbage = new Flower("Skunk Cabbage", 6, "outdoor", "Stench damage");
149
- exports.SkunkCabbage = SkunkCabbage;
150
- var DeadlyCinnamon = new Flower("Deadly Cinnamon", 7, "outdoor", "Hot damage");
151
- exports.DeadlyCinnamon = DeadlyCinnamon;
152
- var CeleryStalker = new Flower("Celery Stalker", 8, "outdoor", "Spooky damage");
153
- exports.CeleryStalker = CeleryStalker;
154
- var LettuceSpray = new Flower("Lettus Spray", 9, "outdoor", "Restores HP");
155
- exports.LettuceSpray = LettuceSpray;
156
- var SeltzerWatercress = new Flower("Seltzer Watercress", 10, "outdoor", "Restores MP");
157
- exports.SeltzerWatercress = SeltzerWatercress;
158
- var WarLily = new Flower("War Lily", 11, "indoor", "+30 Monster Level", true);
159
- exports.WarLily = WarLily;
160
- var StealingMagnolia = new Flower("Stealing Magnolia", 12, "indoor", "+25 Item Drop", true);
161
- exports.StealingMagnolia = StealingMagnolia;
162
- var CannedSpinach = new Flower("Canned Spinach", 13, "indoor", "+5 Muscle Experience", true);
163
- exports.CannedSpinach = CannedSpinach;
164
- var Impatiens = new Flower("Impatiens", 14, "indoor", "+25 Initiative");
165
- exports.Impatiens = Impatiens;
166
- var SpiderPlant = new Flower("Spider Plant", 15, "indoor", "Poison");
167
- exports.SpiderPlant = SpiderPlant;
168
- var RedFern = new Flower("Red Fern", 16, "indoor", "Delevels enemies");
169
- exports.RedFern = RedFern;
170
- var BamBoo = new Flower("Bam BOO!", 17, "indoor", "Spooky damage");
171
- exports.BamBoo = BamBoo;
172
- var ArcticMoss = new Flower("Arctic Moss", 18, "indoor", "Cold damage");
173
- exports.ArcticMoss = ArcticMoss;
174
- var AloeGuvnor = new Flower("Aloe Guv'nor", 19, "indoor", "Restores HP");
175
- exports.AloeGuvnor = AloeGuvnor;
176
- var PitcherPlant = new Flower("Pitcher Plant", 20, "indoor", "Restores MP");
177
- exports.PitcherPlant = PitcherPlant;
178
- var BlusteryPuffball = new Flower("Blustery Puffball", 21, "underground", "+30 Monster Level", true);
179
- exports.BlusteryPuffball = BlusteryPuffball;
180
- var HornOfPlenty = new Flower("Horn of Plenty", 22, "underground", "+25 Item Drop", true);
181
- exports.HornOfPlenty = HornOfPlenty;
182
- var WizardsWig = new Flower("Wizard's Wig", 23, "underground", "+5 Mysticality Experience", true);
183
- exports.WizardsWig = WizardsWig;
184
- var ShuffleTruffle = new Flower("Shuffle Truffle", 24, "underground", "+25 Initiative");
185
- exports.ShuffleTruffle = ShuffleTruffle;
186
- var DisLichen = new Flower("Dis Lichen", 25, "underground", "Delevels enemies");
187
- exports.DisLichen = DisLichen;
188
- var LooseMorels = new Flower("Loose Morels", 26, "underground", "Sleaze damage");
189
- exports.LooseMorels = LooseMorels;
190
- var FoulToadstool = new Flower("Foul Toadstool", 27, "underground", "Stench damage");
191
- exports.FoulToadstool = FoulToadstool;
192
- var Chillterelle = new Flower("Chillterelle", 28, "underground", "Cold damage");
193
- exports.Chillterelle = Chillterelle;
194
- var Portlybella = new Flower("Portlybella", 29, "underground", "Retores HP");
195
- exports.Portlybella = Portlybella;
196
- var MaxHeadshroom = new Flower("Max Headshroom", 30, "underground", "Restores MP");
197
- exports.MaxHeadshroom = MaxHeadshroom;
198
- var Spankton = new Flower("Spankton", 31, "underwater", "Delevels enemies", true);
199
- exports.Spankton = Spankton;
200
- var Kelptomaniac = new Flower("Kelptomaniac", 32, "underwater", "+40 Item Drop", true);
201
- exports.Kelptomaniac = Kelptomaniac;
202
- var Crookweed = new Flower("Crookweed", 33, "underwater", "+60 Meat Drop", true);
203
- exports.Crookweed = Crookweed;
204
- var ElectricEelgrass = new Flower("Electric Eelgrass", 34, "underwater", "Blocks attacks");
205
- exports.ElectricEelgrass = ElectricEelgrass;
206
- var Duckweed = new Flower("Duckweed", 35, "underwater", "Protects once");
207
- exports.Duckweed = Duckweed;
208
- var OrcaOrchid = new Flower("Orca Orchid", 36, "underwater", "Physical damage");
209
- exports.OrcaOrchid = OrcaOrchid;
210
- var Sargassum = new Flower("Sargassum", 37, "underwater", "Stench damage");
211
- exports.Sargassum = Sargassum;
212
- var SubSeaRose = new Flower("Sub-Sea Rose", 38, "underwater", "Cold damage");
213
- exports.SubSeaRose = SubSeaRose;
214
- var Snori = new Flower("Snori", 39, "underwater", "Restores HP, Restores MP");
215
- exports.Snori = Snori;
216
- var UpSeaDaisy = new Flower("Up Sea Daisy", 40, "underwater", "+30 Experience");
217
- exports.UpSeaDaisy = UpSeaDaisy;
218
- var all = Object.freeze([RabidDogwood, Rutabeggar, RadishRadish, Artichoker, SmokeRa, SkunkCabbage, DeadlyCinnamon, CeleryStalker, LettuceSpray, SeltzerWatercress, WarLily, StealingMagnolia, CannedSpinach, Impatiens, SpiderPlant, RedFern, BamBoo, ArcticMoss, AloeGuvnor, PitcherPlant, BlusteryPuffball, HornOfPlenty, WizardsWig, ShuffleTruffle, DisLichen, LooseMorels, FoulToadstool, Chillterelle, Portlybella, MaxHeadshroom, Spankton, Kelptomaniac, Crookweed, ElectricEelgrass, Duckweed, OrcaOrchid, Sargassum, SubSeaRose, Snori, UpSeaDaisy]);
219
- exports.all = all;
73
+ export const RabidDogwood = new Flower("Rabid Dogwood", 1, "outdoor", "+30 Monster Level", true);
74
+ export const Rutabeggar = new Flower("Rutabeggar", 2, "outdoor", "+25 Item Drop", true);
75
+ export const RadishRadish = new Flower("Rad-ish Radish", 3, "outdoor", "+5 Moxie Experience", true);
76
+ export const Artichoker = new Flower("Artichoker", 4, "outdoor", "Delevels enemies");
77
+ export const SmokeRa = new Flower("Smoke-ra", 5, "outdoor", "Blocks attacks");
78
+ export const SkunkCabbage = new Flower("Skunk Cabbage", 6, "outdoor", "Stench damage");
79
+ export const DeadlyCinnamon = new Flower("Deadly Cinnamon", 7, "outdoor", "Hot damage");
80
+ export const CeleryStalker = new Flower("Celery Stalker", 8, "outdoor", "Spooky damage");
81
+ export const LettuceSpray = new Flower("Lettus Spray", 9, "outdoor", "Restores HP");
82
+ export const SeltzerWatercress = new Flower("Seltzer Watercress", 10, "outdoor", "Restores MP");
83
+ export const WarLily = new Flower("War Lily", 11, "indoor", "+30 Monster Level", true);
84
+ export const StealingMagnolia = new Flower("Stealing Magnolia", 12, "indoor", "+25 Item Drop", true);
85
+ export const CannedSpinach = new Flower("Canned Spinach", 13, "indoor", "+5 Muscle Experience", true);
86
+ export const Impatiens = new Flower("Impatiens", 14, "indoor", "+25 Initiative");
87
+ export const SpiderPlant = new Flower("Spider Plant", 15, "indoor", "Poison");
88
+ export const RedFern = new Flower("Red Fern", 16, "indoor", "Delevels enemies");
89
+ export const BamBoo = new Flower("Bam BOO!", 17, "indoor", "Spooky damage");
90
+ export const ArcticMoss = new Flower("Arctic Moss", 18, "indoor", "Cold damage");
91
+ export const AloeGuvnor = new Flower("Aloe Guv'nor", 19, "indoor", "Restores HP");
92
+ export const PitcherPlant = new Flower("Pitcher Plant", 20, "indoor", "Restores MP");
93
+ export const BlusteryPuffball = new Flower("Blustery Puffball", 21, "underground", "+30 Monster Level", true);
94
+ export const HornOfPlenty = new Flower("Horn of Plenty", 22, "underground", "+25 Item Drop", true);
95
+ export const WizardsWig = new Flower("Wizard's Wig", 23, "underground", "+5 Mysticality Experience", true);
96
+ export const ShuffleTruffle = new Flower("Shuffle Truffle", 24, "underground", "+25 Initiative");
97
+ export const DisLichen = new Flower("Dis Lichen", 25, "underground", "Delevels enemies");
98
+ export const LooseMorels = new Flower("Loose Morels", 26, "underground", "Sleaze damage");
99
+ export const FoulToadstool = new Flower("Foul Toadstool", 27, "underground", "Stench damage");
100
+ export const Chillterelle = new Flower("Chillterelle", 28, "underground", "Cold damage");
101
+ export const Portlybella = new Flower("Portlybella", 29, "underground", "Retores HP");
102
+ export const MaxHeadshroom = new Flower("Max Headshroom", 30, "underground", "Restores MP");
103
+ export const Spankton = new Flower("Spankton", 31, "underwater", "Delevels enemies", true);
104
+ export const Kelptomaniac = new Flower("Kelptomaniac", 32, "underwater", "+40 Item Drop", true);
105
+ export const Crookweed = new Flower("Crookweed", 33, "underwater", "+60 Meat Drop", true);
106
+ export const ElectricEelgrass = new Flower("Electric Eelgrass", 34, "underwater", "Blocks attacks");
107
+ export const Duckweed = new Flower("Duckweed", 35, "underwater", "Protects once");
108
+ export const OrcaOrchid = new Flower("Orca Orchid", 36, "underwater", "Physical damage");
109
+ export const Sargassum = new Flower("Sargassum", 37, "underwater", "Stench damage");
110
+ export const SubSeaRose = new Flower("Sub-Sea Rose", 38, "underwater", "Cold damage");
111
+ export const Snori = new Flower("Snori", 39, "underwater", "Restores HP, Restores MP");
112
+ export const UpSeaDaisy = new Flower("Up Sea Daisy", 40, "underwater", "+30 Experience");
113
+ export const all = Object.freeze([
114
+ RabidDogwood,
115
+ Rutabeggar,
116
+ RadishRadish,
117
+ Artichoker,
118
+ SmokeRa,
119
+ SkunkCabbage,
120
+ DeadlyCinnamon,
121
+ CeleryStalker,
122
+ LettuceSpray,
123
+ SeltzerWatercress,
124
+ WarLily,
125
+ StealingMagnolia,
126
+ CannedSpinach,
127
+ Impatiens,
128
+ SpiderPlant,
129
+ RedFern,
130
+ BamBoo,
131
+ ArcticMoss,
132
+ AloeGuvnor,
133
+ PitcherPlant,
134
+ BlusteryPuffball,
135
+ HornOfPlenty,
136
+ WizardsWig,
137
+ ShuffleTruffle,
138
+ DisLichen,
139
+ LooseMorels,
140
+ FoulToadstool,
141
+ Chillterelle,
142
+ Portlybella,
143
+ MaxHeadshroom,
144
+ Spankton,
145
+ Kelptomaniac,
146
+ Crookweed,
147
+ ElectricEelgrass,
148
+ Duckweed,
149
+ OrcaOrchid,
150
+ Sargassum,
151
+ SubSeaRose,
152
+ Snori,
153
+ UpSeaDaisy,
154
+ ]);
@@ -0,0 +1,9 @@
1
+ export declare const summonSkill: Skill;
2
+ /**
3
+ * @returns true if the player can Summon Taffy
4
+ */
5
+ export declare function have(): boolean;
6
+ /**
7
+ * @returns map containing the chance of an item to be summoned
8
+ */
9
+ export declare function expected(): Map<Item, number>;