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.
- package/dist/Clan.js +271 -485
- package/dist/Copier.js +15 -48
- package/dist/Dungeon.js +77 -157
- package/dist/Kmail.d.ts +3 -1
- package/dist/Kmail.js +99 -244
- package/dist/Path.js +77 -120
- package/dist/ascend.js +153 -172
- package/dist/combat.d.ts +98 -3
- package/dist/combat.js +349 -387
- package/dist/console.js +13 -36
- package/dist/diet/index.d.ts +32 -8
- package/dist/diet/index.js +420 -426
- package/dist/diet/knapsack.d.ts +1 -1
- package/dist/diet/knapsack.js +104 -100
- package/dist/dungeons/Dreadsylvania.d.ts +4 -0
- package/dist/dungeons/Dreadsylvania.js +14 -0
- package/dist/dungeons/Dungeon.d.ts +28 -0
- package/dist/dungeons/Dungeon.js +99 -0
- package/dist/dungeons/Hobopolis.d.ts +4 -0
- package/dist/dungeons/Hobopolis.js +14 -0
- package/dist/dungeons/SlimeTube.d.ts +4 -0
- package/dist/dungeons/SlimeTube.js +14 -0
- package/dist/freerun.d.ts +16 -4
- package/dist/freerun.js +92 -99
- package/dist/index.d.ts +5 -1
- package/dist/index.js +22 -300
- package/dist/lib.d.ts +4 -0
- package/dist/lib.js +284 -515
- package/dist/logger.js +21 -63
- package/dist/maximize.js +289 -562
- package/dist/modifier.js +35 -46
- package/dist/modifierTypes.js +8 -22
- package/dist/mood.d.ts +5 -0
- package/dist/mood.js +268 -551
- package/dist/property.d.ts +2 -0
- package/dist/property.js +100 -242
- package/dist/propertyTypes.d.ts +5 -4
- package/dist/propertyTypes.js +1 -0
- package/dist/propertyTyping.d.ts +4 -3
- package/dist/propertyTyping.js +52 -59
- package/dist/resources/2007/CandyHearts.d.ts +9 -0
- package/dist/resources/2007/CandyHearts.js +24 -0
- package/dist/resources/2008/DivineFavors.d.ts +9 -0
- package/dist/resources/2008/DivineFavors.js +27 -0
- package/dist/resources/2009/Bandersnatch.js +37 -112
- package/dist/resources/2009/LoveSongs.d.ts +9 -0
- package/dist/resources/2009/LoveSongs.js +24 -0
- package/dist/resources/2009/SpookyPutty.js +20 -46
- package/dist/resources/2010/Brickos.d.ts +9 -0
- package/dist/resources/2010/Brickos.js +21 -0
- package/dist/resources/2010/CrownOfThrones.d.ts +9 -0
- package/dist/resources/2010/CrownOfThrones.js +550 -374
- package/dist/resources/2011/Gygaxian.d.ts +9 -0
- package/dist/resources/2011/Gygaxian.js +24 -0
- package/dist/resources/2011/ObtuseAngel.js +21 -63
- package/dist/resources/2012/RainDoh.js +14 -40
- package/dist/resources/2012/Resolutions.d.ts +9 -0
- package/dist/resources/2012/Resolutions.js +28 -0
- package/dist/resources/2013/Florist.d.ts +1 -0
- package/dist/resources/2013/Florist.js +142 -207
- package/dist/resources/2013/PulledTaffy.d.ts +9 -0
- package/dist/resources/2013/PulledTaffy.js +33 -0
- package/dist/resources/2014/DNALab.d.ts +47 -0
- package/dist/resources/2014/DNALab.js +154 -0
- package/dist/resources/2014/WinterGarden.js +15 -43
- package/dist/resources/2015/ChateauMantegna.js +52 -86
- package/dist/resources/2015/MayoClinic.d.ts +3 -0
- package/dist/resources/2015/MayoClinic.js +36 -65
- package/dist/resources/2016/SourceTerminal.d.ts +1 -0
- package/dist/resources/2016/SourceTerminal.js +114 -237
- package/dist/resources/2016/Witchess.js +33 -59
- package/dist/resources/2017/AsdonMartin.d.ts +27 -0
- package/dist/resources/2017/AsdonMartin.js +80 -0
- package/dist/resources/2017/TunnelOfLove.js +62 -111
- package/dist/resources/2018/SongBoom.js +32 -68
- package/dist/resources/2019/BeachComb.js +26 -44
- package/dist/resources/2019/Snapper.d.ts +28 -0
- package/dist/resources/2019/Snapper.js +69 -0
- package/dist/resources/2020/Guzzlr.d.ts +3 -0
- package/dist/resources/2020/Guzzlr.js +92 -163
- package/dist/resources/LibramSummon.d.ts +12 -0
- package/dist/resources/LibramSummon.js +66 -0
- package/dist/resources/index.d.ts +5 -1
- package/dist/resources/index.js +21 -105
- package/dist/resources/putty-likes.js +15 -30
- package/dist/since.d.ts +1 -0
- package/dist/since.js +56 -112
- package/dist/template-string.js +40 -132
- package/dist/utils.d.ts +5 -0
- package/dist/utils.js +47 -134
- 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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
34
|
-
return Math.max(0, (0, _property.get)("_raindohCopiesMade"));
|
|
9
|
+
export function getRainDohBlackBoxCopiesMade() {
|
|
10
|
+
return Math.max(0, get("_raindohCopiesMade"));
|
|
35
11
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
-
|
|
85
|
-
|
|
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
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
56
|
+
return all.find((flower) => name === flower.name);
|
|
118
57
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
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>;
|