farming-weight 0.14.3 → 0.15.0
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/README.md +45 -18
- package/dist/constants/attributes.d.ts +12 -7
- package/dist/constants/attributes.js +5 -27
- package/dist/constants/attributes.js.map +1 -1
- package/dist/constants/chips.d.ts +0 -5
- package/dist/constants/chips.js +10 -14
- package/dist/constants/chips.js.map +1 -1
- package/dist/constants/crops.d.ts +28 -4
- package/dist/constants/crops.js +65 -2
- package/dist/constants/crops.js.map +1 -1
- package/dist/constants/enchants.d.ts +1 -1
- package/dist/constants/enchants.js +99 -50
- package/dist/constants/enchants.js.map +1 -1
- package/dist/constants/garden.js +15 -0
- package/dist/constants/garden.js.map +1 -1
- package/dist/constants/pests.d.ts +3 -2
- package/dist/constants/pests.js +5 -0
- package/dist/constants/pests.js.map +1 -1
- package/dist/constants/reforge-types.d.ts +57 -0
- package/dist/constants/reforge-types.js +40 -0
- package/dist/constants/reforge-types.js.map +1 -0
- package/dist/constants/reforges.d.ts +8 -55
- package/dist/constants/reforges.js +10 -635
- package/dist/constants/reforges.js.map +1 -1
- package/dist/constants/stats.d.ts +1 -0
- package/dist/constants/stats.js +2 -0
- package/dist/constants/stats.js.map +1 -1
- package/dist/constants/tempfortune.d.ts +5 -0
- package/dist/constants/tempfortune.js +29 -0
- package/dist/constants/tempfortune.js.map +1 -1
- package/dist/constants/upgrades.d.ts +36 -3
- package/dist/constants/upgrades.js +12 -0
- package/dist/constants/upgrades.js.map +1 -1
- package/dist/crops/special.d.ts +1 -1
- package/dist/crops/special.js.map +1 -1
- package/dist/effects/environment.d.ts +12 -0
- package/dist/effects/environment.js +33 -0
- package/dist/effects/environment.js.map +1 -0
- package/dist/effects/index.d.ts +4 -0
- package/dist/effects/index.js +5 -0
- package/dist/effects/index.js.map +1 -0
- package/dist/effects/matcher.d.ts +23 -0
- package/dist/effects/matcher.js +108 -0
- package/dist/effects/matcher.js.map +1 -0
- package/dist/effects/resolver.d.ts +63 -0
- package/dist/effects/resolver.js +239 -0
- package/dist/effects/resolver.js.map +1 -0
- package/dist/effects/summary.d.ts +5 -0
- package/dist/effects/summary.js +21 -0
- package/dist/effects/summary.js.map +1 -0
- package/dist/effects/types.d.ts +147 -0
- package/dist/effects/types.js +9 -0
- package/dist/effects/types.js.map +1 -0
- package/dist/fortune/farmingaccessory.d.ts +9 -1
- package/dist/fortune/farmingaccessory.js +24 -13
- package/dist/fortune/farmingaccessory.js.map +1 -1
- package/dist/fortune/farmingarmor.d.ts +21 -10
- package/dist/fortune/farmingarmor.js +89 -29
- package/dist/fortune/farmingarmor.js.map +1 -1
- package/dist/fortune/farmingequipment.d.ts +10 -1
- package/dist/fortune/farmingequipment.js +44 -11
- package/dist/fortune/farmingequipment.js.map +1 -1
- package/dist/fortune/farmingpet.d.ts +16 -0
- package/dist/fortune/farmingpet.js +207 -0
- package/dist/fortune/farmingpet.js.map +1 -1
- package/dist/fortune/farmingtool.d.ts +13 -6
- package/dist/fortune/farmingtool.js +60 -44
- package/dist/fortune/farmingtool.js.map +1 -1
- package/dist/fortune/lotuspiecebonus.d.ts +6 -0
- package/dist/fortune/lotuspiecebonus.js +20 -0
- package/dist/fortune/lotuspiecebonus.js.map +1 -0
- package/dist/fortune/upgradeable.d.ts +2 -4
- package/dist/fortune/upgradeablebase.d.ts +2 -4
- package/dist/fortune/upgradeablebase.js +4 -10
- package/dist/fortune/upgradeablebase.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/items/accessories/base.d.ts +3 -0
- package/dist/items/accessories/base.js +4 -0
- package/dist/items/accessories/base.js.map +1 -0
- package/dist/items/accessories/fermento-family.d.ts +91 -0
- package/dist/items/accessories/fermento-family.js +125 -0
- package/dist/items/accessories/fermento-family.js.map +1 -0
- package/dist/items/accessories/freshly-baked.d.ts +80 -0
- package/dist/items/accessories/freshly-baked.js +119 -0
- package/dist/items/accessories/freshly-baked.js.map +1 -0
- package/dist/items/accessories/index.d.ts +25 -0
- package/dist/items/accessories/index.js +25 -0
- package/dist/items/accessories/index.js.map +1 -0
- package/dist/items/accessories/power-relic.d.ts +18 -0
- package/dist/items/accessories/power-relic.js +37 -0
- package/dist/items/accessories/power-relic.js.map +1 -0
- package/dist/items/accessories/special.d.ts +24 -0
- package/dist/items/accessories/special.js +41 -0
- package/dist/items/accessories/special.js.map +1 -0
- package/dist/items/accessories.d.ts +2 -3
- package/dist/items/accessories.js +1 -137
- package/dist/items/accessories.js.map +1 -1
- package/dist/items/armor/cropie.d.ts +4 -0
- package/dist/items/armor/cropie.js +6 -0
- package/dist/items/armor/cropie.js.map +1 -1
- package/dist/items/armor/fermento.d.ts +4 -0
- package/dist/items/armor/fermento.js +6 -0
- package/dist/items/armor/fermento.js.map +1 -1
- package/dist/items/armor/groups.d.ts +2 -0
- package/dist/items/armor/groups.js +17 -0
- package/dist/items/armor/groups.js.map +1 -0
- package/dist/items/armor/melon.d.ts +4 -0
- package/dist/items/armor/melon.js +6 -0
- package/dist/items/armor/melon.js.map +1 -1
- package/dist/items/armor/special.js +1 -1
- package/dist/items/armor/special.js.map +1 -1
- package/dist/items/armor/squash.d.ts +4 -0
- package/dist/items/armor/squash.js +6 -0
- package/dist/items/armor/squash.js.map +1 -1
- package/dist/items/gems/base.d.ts +19 -0
- package/dist/items/gems/base.js +60 -0
- package/dist/items/gems/base.js.map +1 -0
- package/dist/items/gems/index.d.ts +1 -0
- package/dist/items/gems/index.js +2 -0
- package/dist/items/gems/index.js.map +1 -0
- package/dist/items/pets/bee.d.ts +9 -0
- package/dist/items/pets/bee.js +32 -0
- package/dist/items/pets/bee.js.map +1 -1
- package/dist/items/pets/hedgehog.d.ts +5 -0
- package/dist/items/pets/hedgehog.js +5 -0
- package/dist/items/pets/hedgehog.js.map +1 -1
- package/dist/items/pets/pig.d.ts +5 -0
- package/dist/items/pets/pig.js +18 -13
- package/dist/items/pets/pig.js.map +1 -1
- package/dist/items/pets/rose-dragon.js +11 -13
- package/dist/items/pets/rose-dragon.js.map +1 -1
- package/dist/items/pets.d.ts +1 -1
- package/dist/items/pets.js +15 -1
- package/dist/items/pets.js.map +1 -1
- package/dist/items/reforges/base.d.ts +18 -0
- package/dist/items/reforges/base.js +54 -0
- package/dist/items/reforges/base.js.map +1 -0
- package/dist/items/reforges/blessed.d.ts +7 -0
- package/dist/items/reforges/blessed.js +90 -0
- package/dist/items/reforges/blessed.js.map +1 -0
- package/dist/items/reforges/blooming.d.ts +4 -0
- package/dist/items/reforges/blooming.js +43 -0
- package/dist/items/reforges/blooming.js.map +1 -0
- package/dist/items/reforges/bountiful.d.ts +4 -0
- package/dist/items/reforges/bountiful.js +63 -0
- package/dist/items/reforges/bountiful.js.map +1 -0
- package/dist/items/reforges/bustling.d.ts +4 -0
- package/dist/items/reforges/bustling.js +26 -0
- package/dist/items/reforges/bustling.js.map +1 -0
- package/dist/items/reforges/deep-fried.d.ts +7 -0
- package/dist/items/reforges/deep-fried.js +38 -0
- package/dist/items/reforges/deep-fried.js.map +1 -0
- package/dist/items/reforges/earthy.d.ts +4 -0
- package/dist/items/reforges/earthy.js +26 -0
- package/dist/items/reforges/earthy.js.map +1 -0
- package/dist/items/reforges/green-thumb.d.ts +4 -0
- package/dist/items/reforges/green-thumb.js +43 -0
- package/dist/items/reforges/green-thumb.js.map +1 -0
- package/dist/items/reforges/index.d.ts +16 -0
- package/dist/items/reforges/index.js +43 -0
- package/dist/items/reforges/index.js.map +1 -0
- package/dist/items/reforges/mantid.d.ts +4 -0
- package/dist/items/reforges/mantid.js +43 -0
- package/dist/items/reforges/mantid.js.map +1 -0
- package/dist/items/reforges/mossy.d.ts +4 -0
- package/dist/items/reforges/mossy.js +44 -0
- package/dist/items/reforges/mossy.js.map +1 -0
- package/dist/items/reforges/overpriced.d.ts +4 -0
- package/dist/items/reforges/overpriced.js +43 -0
- package/dist/items/reforges/overpriced.js.map +1 -0
- package/dist/items/reforges/robust.d.ts +4 -0
- package/dist/items/reforges/robust.js +22 -0
- package/dist/items/reforges/robust.js.map +1 -0
- package/dist/items/reforges/rooted.d.ts +4 -0
- package/dist/items/reforges/rooted.js +43 -0
- package/dist/items/reforges/rooted.js.map +1 -0
- package/dist/items/reforges/squeaky.d.ts +4 -0
- package/dist/items/reforges/squeaky.js +47 -0
- package/dist/items/reforges/squeaky.js.map +1 -0
- package/dist/items/sources/attributes.d.ts +119 -0
- package/dist/items/sources/attributes.js +285 -0
- package/dist/items/sources/attributes.js.map +1 -0
- package/dist/items/sources/base.d.ts +33 -0
- package/dist/items/sources/base.js +13 -0
- package/dist/items/sources/base.js.map +1 -0
- package/dist/items/sources/chips.d.ts +54 -0
- package/dist/items/sources/chips.js +100 -0
- package/dist/items/sources/chips.js.map +1 -0
- package/dist/items/sources/effects-util.d.ts +10 -0
- package/dist/items/sources/effects-util.js +35 -0
- package/dist/items/sources/effects-util.js.map +1 -0
- package/dist/items/sources/enchants.d.ts +28 -0
- package/dist/items/sources/enchants.js +87 -0
- package/dist/items/sources/enchants.js.map +1 -0
- package/dist/items/sources/gems.d.ts +9 -0
- package/dist/items/sources/gems.js +35 -0
- package/dist/items/sources/gems.js.map +1 -0
- package/dist/items/sources/index.d.ts +6 -0
- package/dist/items/sources/index.js +7 -0
- package/dist/items/sources/index.js.map +1 -0
- package/dist/items/sources/reforges.d.ts +8 -0
- package/dist/items/sources/reforges.js +10 -0
- package/dist/items/sources/reforges.js.map +1 -0
- package/dist/items/tools/cactus-knife.js +3 -3
- package/dist/items/tools/cactus-knife.js.map +1 -1
- package/dist/items/tools/cocoa-chopper.js +3 -3
- package/dist/items/tools/cocoa-chopper.js.map +1 -1
- package/dist/items/tools/fungi-cutter.js +3 -3
- package/dist/items/tools/fungi-cutter.js.map +1 -1
- package/dist/items/tools/mathematical-hoes.d.ts +5 -5
- package/dist/items/tools/mathematical-hoes.js +5 -5
- package/dist/items/tools/mathematical-hoes.js.map +1 -1
- package/dist/items/tools/special.js +1 -1
- package/dist/items/tools/special.js.map +1 -1
- package/dist/items/types/pets.d.ts +0 -2
- package/dist/player/player.d.ts +60 -7
- package/dist/player/player.js +318 -128
- package/dist/player/player.js.map +1 -1
- package/dist/player/playeroptions.d.ts +25 -1
- package/dist/player/playeroptions.js.map +1 -1
- package/dist/upgrades/enchantupgrades.js +22 -8
- package/dist/upgrades/enchantupgrades.js.map +1 -1
- package/dist/upgrades/getsourceprogress.js +7 -0
- package/dist/upgrades/getsourceprogress.js.map +1 -1
- package/dist/upgrades/groups.d.ts +3 -0
- package/dist/upgrades/groups.js +86 -0
- package/dist/upgrades/groups.js.map +1 -0
- package/dist/upgrades/itemcatalog.d.ts +3 -0
- package/dist/upgrades/itemcatalog.js +21 -0
- package/dist/upgrades/itemcatalog.js.map +1 -0
- package/dist/upgrades/itemregistry.d.ts +1 -2
- package/dist/upgrades/itemregistry.js +23 -3
- package/dist/upgrades/itemregistry.js.map +1 -1
- package/dist/upgrades/sources/armorsetsources.js +14 -14
- package/dist/upgrades/sources/armorsetsources.js.map +1 -1
- package/dist/upgrades/sources/cropsources.js +5 -0
- package/dist/upgrades/sources/cropsources.js.map +1 -1
- package/dist/upgrades/sources/dynamicfortunesources.d.ts +5 -2
- package/dist/upgrades/sources/effectsources.d.ts +4 -0
- package/dist/upgrades/sources/effectsources.js +60 -0
- package/dist/upgrades/sources/effectsources.js.map +1 -0
- package/dist/upgrades/sources/gearsources.js +32 -7
- package/dist/upgrades/sources/gearsources.js.map +1 -1
- package/dist/upgrades/sources/generalsources.d.ts +3 -2
- package/dist/upgrades/sources/generalsources.js +308 -17
- package/dist/upgrades/sources/generalsources.js.map +1 -1
- package/dist/upgrades/sources/toolsources.js +61 -81
- package/dist/upgrades/sources/toolsources.js.map +1 -1
- package/dist/upgrades/upgradekeys.d.ts +2 -0
- package/dist/upgrades/upgradekeys.js +5 -0
- package/dist/upgrades/upgradekeys.js.map +1 -0
- package/dist/upgrades/upgrades.d.ts +5 -7
- package/dist/upgrades/upgrades.js +142 -43
- package/dist/upgrades/upgrades.js.map +1 -1
- package/dist/upgrades/upgradeutils.d.ts +2 -4
- package/dist/upgrades/upgradeutils.js +26 -6
- package/dist/upgrades/upgradeutils.js.map +1 -1
- package/dist/util/bestiary.d.ts +10 -0
- package/dist/util/bestiary.js +41 -0
- package/dist/util/bestiary.js.map +1 -0
- package/dist/util/enchants.d.ts +6 -0
- package/dist/util/enchants.js +20 -5
- package/dist/util/enchants.js.map +1 -1
- package/dist/util/gems.js +4 -30
- package/dist/util/gems.js.map +1 -1
- package/dist/util/itemstats.d.ts +3 -0
- package/dist/util/itemstats.js +20 -2
- package/dist/util/itemstats.js.map +1 -1
- package/dist/util/ratecalc-effects.d.ts +64 -0
- package/dist/util/ratecalc-effects.js +252 -0
- package/dist/util/ratecalc-effects.js.map +1 -0
- package/dist/util/ratecalc.d.ts +0 -33
- package/dist/util/ratecalc.js +0 -187
- package/dist/util/ratecalc.js.map +1 -1
- package/dist/util/skyblocktime.d.ts +1 -0
- package/dist/util/skyblocktime.js +4 -0
- package/dist/util/skyblocktime.js.map +1 -1
- package/package.json +2 -1
package/dist/constants/stats.js
CHANGED
|
@@ -38,6 +38,7 @@ export var Stat;
|
|
|
38
38
|
Stat["Pristine"] = "Pristine";
|
|
39
39
|
Stat["BonusPestChance"] = "Bonus Pest Chance";
|
|
40
40
|
Stat["PestCooldownReduction"] = "Pest Cooldown Reduction";
|
|
41
|
+
Stat["Overbloom"] = "Overbloom";
|
|
41
42
|
Stat["FishingSpeed"] = "Fishing Speed";
|
|
42
43
|
})(Stat || (Stat = {}));
|
|
43
44
|
/**
|
|
@@ -174,6 +175,7 @@ export const STAT_NAMES = {
|
|
|
174
175
|
[Stat.Pristine]: 'Pristine',
|
|
175
176
|
[Stat.BonusPestChance]: 'Bonus Pest Chance',
|
|
176
177
|
[Stat.PestCooldownReduction]: 'Pest Cooldown Reduction',
|
|
178
|
+
[Stat.Overbloom]: 'Overbloom',
|
|
177
179
|
[Stat.FishingSpeed]: 'Fishing Speed',
|
|
178
180
|
};
|
|
179
181
|
//# sourceMappingURL=stats.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stats.js","sourceRoot":"","sources":["../../src/constants/stats.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"stats.js","sourceRoot":"","sources":["../../src/constants/stats.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,IAyCX;AAzCD,WAAY,IAAI;IACf,6BAAqB,CAAA;IACrB,yBAAiB,CAAA;IACjB,2BAAmB,CAAA;IACnB,uBAAe,CAAA;IACf,qCAA6B,CAAA;IAC7B,kCAA0B,CAAA;IAC1B,kCAA0B,CAAA;IAC1B,oCAA4B,CAAA;IAC5B,wCAAgC,CAAA;IAChC,gCAAwB,CAAA;IACxB,4BAAoB,CAAA;IACpB,oCAA4B,CAAA;IAC5B,iDAAyC,CAAA;IACzC,6BAAqB,CAAA;IACrB,oCAA4B,CAAA;IAC5B,wCAAgC,CAAA;IAChC,0CAAkC,CAAA;IAClC,wCAAgC,CAAA;IAChC,wCAAgC,CAAA;IAChC,gDAAwC,CAAA;IACxC,sCAA8B,CAAA;IAC9B,4CAAoC,CAAA;IACpC,iDAAyC,CAAA;IACzC,wCAAgC,CAAA;IAChC,0CAAkC,CAAA;IAClC,+CAAuC,CAAA;IACvC,sCAA8B,CAAA;IAC9B,8CAAsC,CAAA;IACtC,gDAAwC,CAAA;IACxC,6CAAqC,CAAA;IACrC,6CAAqC,CAAA;IACrC,4CAAoC,CAAA;IACpC,sCAA8B,CAAA;IAC9B,wCAAgC,CAAA;IAChC,0CAAkC,CAAA;IAClC,6BAAqB,CAAA;IACrB,6CAAqC,CAAA;IACrC,yDAAiD,CAAA;IACjD,+BAAuB,CAAA;IACvB,sCAA8B,CAAA;AAC/B,CAAC,EAzCW,IAAI,KAAJ,IAAI,QAyCf;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAqC;IAC5D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C,IAAI,CAAC,aAAa,CAAC,EAAE,gBAAgB;IACtC,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,iBAAiB;IACxC,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,oBAAoB;IAC7C,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,eAAe;IACpC,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,mBAAmB;IAC5C,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,oBAAoB;IAC9C,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,mBAAmB;IAC3C,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,mBAAmB;IAC3C,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,kBAAkB;IAC1C,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,eAAe;IACpC,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,gBAAgB;IACtC,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,iBAAiB;IACxC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,UAAU;IAC3B,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,mBAAmB;IAC3C,CAAC,IAAI,CAAC,qBAAqB,CAAC,EAAE,yBAAyB;IACvD,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,WAAW;IAC7B,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,eAAe;CACpC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Stat } from './stats.js';
|
|
1
2
|
export interface TemporaryFarmingFortune {
|
|
2
3
|
pestTurnIn?: number;
|
|
3
4
|
harvestPotion?: boolean;
|
|
@@ -6,10 +7,14 @@ export interface TemporaryFarmingFortune {
|
|
|
6
7
|
springFilter?: boolean;
|
|
7
8
|
magic8Ball?: boolean;
|
|
8
9
|
anitaContest?: boolean;
|
|
10
|
+
celestialMasonJar?: boolean;
|
|
11
|
+
melonJuiceMixin?: boolean;
|
|
12
|
+
finnsFocaccia?: boolean;
|
|
9
13
|
}
|
|
10
14
|
export interface TemporaryFortuneSource {
|
|
11
15
|
name: string;
|
|
12
16
|
wiki: string;
|
|
13
17
|
fortune: (settings: TemporaryFarmingFortune) => number | undefined;
|
|
18
|
+
stat?: Stat;
|
|
14
19
|
}
|
|
15
20
|
export declare const TEMPORARY_FORTUNE: Record<keyof TemporaryFarmingFortune, TemporaryFortuneSource>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Stat } from './stats.js';
|
|
1
2
|
export const TEMPORARY_FORTUNE = {
|
|
2
3
|
pestTurnIn: {
|
|
3
4
|
name: 'Pest Turn-In',
|
|
@@ -58,5 +59,33 @@ export const TEMPORARY_FORTUNE = {
|
|
|
58
59
|
return 25;
|
|
59
60
|
},
|
|
60
61
|
},
|
|
62
|
+
celestialMasonJar: {
|
|
63
|
+
name: 'Celestial Mason Jar',
|
|
64
|
+
wiki: 'https://w.elitesb.gg/Celestial_Mason_Jar',
|
|
65
|
+
fortune: (settings) => {
|
|
66
|
+
if (!settings.celestialMasonJar)
|
|
67
|
+
return;
|
|
68
|
+
return 15;
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
melonJuiceMixin: {
|
|
72
|
+
name: 'Melon Juice Mixin',
|
|
73
|
+
wiki: 'https://w.elitesb.gg/Melon_Juice_Mixin',
|
|
74
|
+
fortune: (settings) => {
|
|
75
|
+
if (!settings.melonJuiceMixin)
|
|
76
|
+
return;
|
|
77
|
+
return 15;
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
finnsFocaccia: {
|
|
81
|
+
name: "Finn's Focaccia",
|
|
82
|
+
wiki: 'https://w.elitesb.gg/Finn%27s_Focaccia',
|
|
83
|
+
stat: Stat.Overbloom,
|
|
84
|
+
fortune: (settings) => {
|
|
85
|
+
if (!settings.finnsFocaccia)
|
|
86
|
+
return;
|
|
87
|
+
return 5;
|
|
88
|
+
},
|
|
89
|
+
},
|
|
61
90
|
};
|
|
62
91
|
//# sourceMappingURL=tempfortune.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tempfortune.js","sourceRoot":"","sources":["../../src/constants/tempfortune.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tempfortune.js","sourceRoot":"","sources":["../../src/constants/tempfortune.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAuBlC,MAAM,CAAC,MAAM,iBAAiB,GAAkE;IAC/F,UAAU,EAAE;QACX,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,8CAA8C;QACpD,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU;KAC1C;IACD,aAAa,EAAE;QACd,IAAI,EAAE,0BAA0B;QAChC,IAAI,EAAE,+CAA+C;QACrD,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE;YACrB,IAAI,CAAC,QAAQ,CAAC,aAAa;gBAAE,OAAO;YACpC,OAAO,EAAE,CAAC;QACX,CAAC;KACD;IACD,gBAAgB,EAAE;QACjB,IAAI,EAAE,4BAA4B;QAClC,IAAI,EAAE,iDAAiD;QACvD,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE;YACrB,IAAI,CAAC,QAAQ,CAAC,gBAAgB;gBAAE,OAAO;YACvC,OAAO,EAAE,CAAC;QACX,CAAC;KACD;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,mCAAmC;QACzC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE;YACrB,IAAI,CAAC,QAAQ,CAAC,WAAW;gBAAE,OAAO;YAClC,OAAO,CAAC,CAAC;QACV,CAAC;KACD;IACD,YAAY,EAAE;QACb,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,yCAAyC;QAC/C,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE;YACrB,IAAI,CAAC,QAAQ,CAAC,YAAY;gBAAE,OAAO;YACnC,OAAO,EAAE,CAAC;QACX,CAAC;KACD;IACD,UAAU,EAAE;QACX,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,mCAAmC;QACzC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE;YACrB,IAAI,CAAC,QAAQ,CAAC,UAAU;gBAAE,OAAO;YACjC,OAAO,EAAE,CAAC;QACX,CAAC;KACD;IACD,YAAY,EAAE;QACb,IAAI,EAAE,uBAAuB;QAC7B,IAAI,EAAE,+CAA+C;QACrD,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE;YACrB,IAAI,CAAC,QAAQ,CAAC,YAAY;gBAAE,OAAO;YACnC,OAAO,EAAE,CAAC;QACX,CAAC;KACD;IACD,iBAAiB,EAAE;QAClB,IAAI,EAAE,qBAAqB;QAC3B,IAAI,EAAE,0CAA0C;QAChD,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE;YACrB,IAAI,CAAC,QAAQ,CAAC,iBAAiB;gBAAE,OAAO;YACxC,OAAO,EAAE,CAAC;QACX,CAAC;KACD;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,mBAAmB;QACzB,IAAI,EAAE,wCAAwC;QAC9C,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE;YACrB,IAAI,CAAC,QAAQ,CAAC,eAAe;gBAAE,OAAO;YACtC,OAAO,EAAE,CAAC;QACX,CAAC;KACD;IACD,aAAa,EAAE;QACd,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,wCAAwC;QAC9C,IAAI,EAAE,IAAI,CAAC,SAAS;QACpB,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE;YACrB,IAAI,CAAC,QAAQ,CAAC,aAAa;gBAAE,OAAO;YACpC,OAAO,CAAC,CAAC;QACV,CAAC;KACD;CACD,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { EffectOp, Scope } from '../effects/types.js';
|
|
1
2
|
import type { EliteItemDto } from '../fortune/item.js';
|
|
2
3
|
import type { UpgradeableInfo } from '../fortune/upgradeable.js';
|
|
3
4
|
import type { GearSlot } from '../items/armor.js';
|
|
4
5
|
import type { FARMING_TOOLS } from '../items/tools.js';
|
|
5
6
|
import type { JacobContestMedal } from '../util/jacob.js';
|
|
6
7
|
import type { Crop } from './crops.js';
|
|
7
|
-
import
|
|
8
|
+
import { Stat } from './stats.js';
|
|
8
9
|
export declare enum UpgradeReason {
|
|
9
10
|
NextTier = "next",// Standard upgrade
|
|
10
11
|
DeadEnd = "dead",// Not worth using, no more upgrades
|
|
@@ -37,6 +38,7 @@ export interface FortuneSourceProgress {
|
|
|
37
38
|
max: number;
|
|
38
39
|
ratio: number;
|
|
39
40
|
}>>;
|
|
41
|
+
effects?: EffectSummary[];
|
|
40
42
|
maxLevel?: number;
|
|
41
43
|
fortunePerLevel?: number;
|
|
42
44
|
max: number;
|
|
@@ -55,11 +57,22 @@ export interface FortuneSourceProgress {
|
|
|
55
57
|
stats?: Partial<Record<Stat, number>>;
|
|
56
58
|
};
|
|
57
59
|
}
|
|
60
|
+
export interface EffectSummary {
|
|
61
|
+
source: string;
|
|
62
|
+
op: EffectOp;
|
|
63
|
+
description?: string;
|
|
64
|
+
relatedStats?: readonly Stat[];
|
|
65
|
+
scope?: Scope;
|
|
66
|
+
value?: number;
|
|
67
|
+
valueDisplay?: 'stat' | 'percent' | 'factor';
|
|
68
|
+
valueStat?: Stat;
|
|
69
|
+
}
|
|
58
70
|
export interface UpgradeCost {
|
|
59
71
|
items?: Record<string, number>;
|
|
60
72
|
coins?: number;
|
|
61
73
|
copper?: number;
|
|
62
74
|
bits?: number;
|
|
75
|
+
kernels?: number;
|
|
63
76
|
medals?: Partial<Record<Exclude<JacobContestMedal, 'platinum' | 'diamond'>, number>>;
|
|
64
77
|
applyCost?: Omit<UpgradeCost, 'applyCost'>;
|
|
65
78
|
}
|
|
@@ -77,7 +90,8 @@ export declare enum UpgradeCategory {
|
|
|
77
90
|
Anita = "anita",
|
|
78
91
|
Misc = "misc",
|
|
79
92
|
Attribute = "attribute",
|
|
80
|
-
Composter = "composter"
|
|
93
|
+
Composter = "composter",
|
|
94
|
+
Pet = "pet"
|
|
81
95
|
}
|
|
82
96
|
export declare enum UpgradeAction {
|
|
83
97
|
Apply = "apply",
|
|
@@ -96,6 +110,15 @@ export interface FortuneUpgradeImprovement {
|
|
|
96
110
|
name: string;
|
|
97
111
|
fortune: number;
|
|
98
112
|
}
|
|
113
|
+
export interface UpgradeGroupDefinition {
|
|
114
|
+
id: string;
|
|
115
|
+
label: string;
|
|
116
|
+
strategy: 'available-pieces';
|
|
117
|
+
warning?: string;
|
|
118
|
+
}
|
|
119
|
+
export interface FortuneUpgradeGroupMeta extends UpgradeGroupDefinition {
|
|
120
|
+
memberCount: number;
|
|
121
|
+
}
|
|
99
122
|
export interface UpgradeInfo<T = number> {
|
|
100
123
|
title: string;
|
|
101
124
|
onto?: {
|
|
@@ -122,7 +145,7 @@ export interface UpgradeInfo<T = number> {
|
|
|
122
145
|
export interface UpgradeMeta {
|
|
123
146
|
id?: string;
|
|
124
147
|
itemUuid?: string;
|
|
125
|
-
type?: 'enchant' | 'item' | 'reforge' | 'gem' | 'skill' | 'accessory' | 'plot' | 'attribute' | 'crop_upgrade' | 'chip' | 'setting' | 'unlock' | 'buy_item';
|
|
148
|
+
type?: 'enchant' | 'item' | 'reforge' | 'gem' | 'skill' | 'accessory' | 'plot' | 'attribute' | 'crop_upgrade' | 'chip' | 'pet_item' | 'pet_level' | 'setting' | 'unlock' | 'upgrade_group' | 'buy_item';
|
|
126
149
|
key?: string;
|
|
127
150
|
value?: number | string;
|
|
128
151
|
slotIndex?: number;
|
|
@@ -148,6 +171,7 @@ export interface FortuneUpgrade {
|
|
|
148
171
|
* with the value from the `increase` field.
|
|
149
172
|
*/
|
|
150
173
|
stats?: Partial<Record<Stat, number>>;
|
|
174
|
+
effects?: EffectSummary[];
|
|
151
175
|
action: UpgradeAction;
|
|
152
176
|
purchase?: string;
|
|
153
177
|
category: UpgradeCategory;
|
|
@@ -158,10 +182,18 @@ export interface FortuneUpgrade {
|
|
|
158
182
|
cost?: UpgradeCost;
|
|
159
183
|
wiki?: string;
|
|
160
184
|
conflictKey?: string;
|
|
185
|
+
group?: FortuneUpgradeGroupMeta | UpgradeGroupDefinition;
|
|
186
|
+
groupedUpgrades?: FortuneUpgrade[];
|
|
161
187
|
improvements?: FortuneUpgradeImprovement[];
|
|
162
188
|
meta?: UpgradeMeta;
|
|
163
189
|
skillReq?: Partial<Record<string, number>> | undefined;
|
|
164
190
|
}
|
|
191
|
+
export interface StatQueryOptions {
|
|
192
|
+
stat?: Stat;
|
|
193
|
+
stats?: Stat[];
|
|
194
|
+
includeUpgradeGroups?: boolean;
|
|
195
|
+
}
|
|
196
|
+
export declare function getQueryStats(options?: StatQueryOptions, fallback?: Stat[]): Stat[];
|
|
165
197
|
export interface UpgradeTreeNode {
|
|
166
198
|
upgrade: FortuneUpgrade;
|
|
167
199
|
statsBefore: Partial<Record<Stat, number>>;
|
|
@@ -176,6 +208,7 @@ export interface Upgrade {
|
|
|
176
208
|
cost?: UpgradeCost;
|
|
177
209
|
why?: string;
|
|
178
210
|
preferred?: boolean;
|
|
211
|
+
group?: UpgradeGroupDefinition;
|
|
179
212
|
}
|
|
180
213
|
export interface InitialItems {
|
|
181
214
|
tools: Partial<Record<Crop, keyof typeof FARMING_TOOLS>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Stat } from './stats.js';
|
|
1
2
|
export var UpgradeReason;
|
|
2
3
|
(function (UpgradeReason) {
|
|
3
4
|
UpgradeReason["NextTier"] = "next";
|
|
@@ -27,6 +28,9 @@ function addCost(left, right) {
|
|
|
27
28
|
if (right.bits) {
|
|
28
29
|
left.bits = (left.bits || 0) + (right.bits || 0);
|
|
29
30
|
}
|
|
31
|
+
if (right.kernels) {
|
|
32
|
+
left.kernels = (left.kernels || 0) + (right.kernels || 0);
|
|
33
|
+
}
|
|
30
34
|
if (right.medals) {
|
|
31
35
|
left.medals ??= {};
|
|
32
36
|
for (const [key, value] of Object.entries(right.medals)) {
|
|
@@ -53,6 +57,7 @@ export var UpgradeCategory;
|
|
|
53
57
|
UpgradeCategory["Misc"] = "misc";
|
|
54
58
|
UpgradeCategory["Attribute"] = "attribute";
|
|
55
59
|
UpgradeCategory["Composter"] = "composter";
|
|
60
|
+
UpgradeCategory["Pet"] = "pet";
|
|
56
61
|
})(UpgradeCategory || (UpgradeCategory = {}));
|
|
57
62
|
export var UpgradeAction;
|
|
58
63
|
(function (UpgradeAction) {
|
|
@@ -64,4 +69,11 @@ export var UpgradeAction;
|
|
|
64
69
|
UpgradeAction["Upgrade"] = "upgrade";
|
|
65
70
|
UpgradeAction["Unlock"] = "unlock";
|
|
66
71
|
})(UpgradeAction || (UpgradeAction = {}));
|
|
72
|
+
export function getQueryStats(options, fallback = [Stat.FarmingFortune]) {
|
|
73
|
+
if (options?.stats && options.stats.length > 0)
|
|
74
|
+
return [...options.stats];
|
|
75
|
+
if (options?.stat)
|
|
76
|
+
return [options.stat];
|
|
77
|
+
return [...fallback];
|
|
78
|
+
}
|
|
67
79
|
//# sourceMappingURL=upgrades.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrades.js","sourceRoot":"","sources":["../../src/constants/upgrades.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"upgrades.js","sourceRoot":"","sources":["../../src/constants/upgrades.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACxB,kCAAiB,CAAA;IACjB,iCAAgB,CAAA;IAChB,4CAA2B,CAAA;AAC5B,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAkFD,MAAM,UAAU,SAAS,CAAC,GAAG,KAAoB;IAChD,MAAM,MAAM,GAAgB,EAAE,CAAC;IAC/B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QAC1B,OAAO,CAAC,MAAM,EAAE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AAC;QAAE,OAAO,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC1E,IAAI,OAAO,EAAE,IAAI;QAAE,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,OAAO,CAAC,GAAG,QAAQ,CAAC,CAAC;AACtB,CAAC"}
|
package/dist/crops/special.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Crop } from '../constants/crops.js';
|
|
2
|
-
export declare function calculateAverageSpecialCrops(blocksBroken: number, crop: Crop, armor: 1 | 2 | 3 | 4, multiplier?: number): {
|
|
2
|
+
export declare function calculateAverageSpecialCrops(blocksBroken: number, crop: Crop, armor: 0 | 1 | 2 | 3 | 4, multiplier?: number): {
|
|
3
3
|
id: string;
|
|
4
4
|
type: import("../constants/specialcrops.js").SpecialCrop;
|
|
5
5
|
amount: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"special.js","sourceRoot":"","sources":["../../src/crops/special.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAExF,MAAM,UAAU,4BAA4B,
|
|
1
|
+
{"version":3,"file":"special.js","sourceRoot":"","sources":["../../src/crops/special.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAExF,MAAM,UAAU,4BAA4B,CAC3C,YAAoB,EACpB,IAAU,EACV,KAAwB,EACxB,UAAU,GAAG,CAAC;IAEd,MAAM,IAAI,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAEzC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACnD,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,MAAM,GAAG,YAAY,GAAG,MAAM,GAAG,UAAU,CAAC;IAElD,OAAO;QACN,EAAE,EAAE,EAAE;QACN,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,MAAM;QACd,GAAG,EAAE,GAAG,GAAG,MAAM;KACjB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Crop } from '../constants/crops.js';
|
|
2
|
+
import type { FarmingPlayer } from '../player/player.js';
|
|
3
|
+
import type { PlayerOptions } from '../player/playeroptions.js';
|
|
4
|
+
import type { EffectEnvironment } from './types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Single source-of-truth for building an `EffectEnvironment` from a player.
|
|
7
|
+
*
|
|
8
|
+
* No other call site is allowed to construct an `EffectEnvironment` ad-hoc.
|
|
9
|
+
* Field derivations are intentionally simple and tested.
|
|
10
|
+
*/
|
|
11
|
+
export declare function buildEffectEnvironment(player: FarmingPlayer, crop?: Crop): EffectEnvironment;
|
|
12
|
+
export declare function buildEffectEnvironmentFromOptions(opts: PlayerOptions | undefined, crop?: Crop): EffectEnvironment;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source-of-truth for building an `EffectEnvironment` from a player.
|
|
3
|
+
*
|
|
4
|
+
* No other call site is allowed to construct an `EffectEnvironment` ad-hoc.
|
|
5
|
+
* Field derivations are intentionally simple and tested.
|
|
6
|
+
*/
|
|
7
|
+
export function buildEffectEnvironment(player, crop) {
|
|
8
|
+
return buildEffectEnvironmentFromOptions(player.options, crop);
|
|
9
|
+
}
|
|
10
|
+
export function buildEffectEnvironmentFromOptions(opts, crop) {
|
|
11
|
+
const harvestFeast = opts?.harvestFeast?.active === true;
|
|
12
|
+
let inSeason = false;
|
|
13
|
+
if (harvestFeast && crop !== undefined) {
|
|
14
|
+
const grand = opts?.harvestFeast?.grandFeast === true;
|
|
15
|
+
if (grand) {
|
|
16
|
+
inSeason = true;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
const seasonList = opts?.harvestFeast?.inSeasonCrops;
|
|
20
|
+
inSeason = Array.isArray(seasonList) ? seasonList.includes(crop) : false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const infestedPlot = typeof opts?.infestedPlotProbability === 'number' && opts.infestedPlotProbability > 0;
|
|
24
|
+
const selectedCrop = opts?.selectedCrop;
|
|
25
|
+
return {
|
|
26
|
+
crop,
|
|
27
|
+
harvestFeast,
|
|
28
|
+
inSeason,
|
|
29
|
+
infestedPlot,
|
|
30
|
+
selectedCrop,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=environment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/effects/environment.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAAqB,EAAE,IAAW;IACxE,OAAO,iCAAiC,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,iCAAiC,CAAC,IAA+B,EAAE,IAAW;IAC7F,MAAM,YAAY,GAAG,IAAI,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAEzD,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,YAAY,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACxC,MAAM,KAAK,GAAG,IAAI,EAAE,YAAY,EAAE,UAAU,KAAK,IAAI,CAAC;QACtD,IAAI,KAAK,EAAE,CAAC;YACX,QAAQ,GAAG,IAAI,CAAC;QACjB,CAAC;aAAM,CAAC;YACP,MAAM,UAAU,GAAG,IAAI,EAAE,YAAY,EAAE,aAAa,CAAC;YACrD,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAC1E,CAAC;IACF,CAAC;IAED,MAAM,YAAY,GAAG,OAAO,IAAI,EAAE,uBAAuB,KAAK,QAAQ,IAAI,IAAI,CAAC,uBAAuB,GAAG,CAAC,CAAC;IAE3G,MAAM,YAAY,GAAG,IAAI,EAAE,YAAY,CAAC;IAExC,OAAO;QACN,IAAI;QACJ,YAAY;QACZ,QAAQ;QACR,YAAY;QACZ,YAAY;KACZ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/effects/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { DropContext, Scope, StatContext } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Returns true if `scope` matches the given `DropContext`.
|
|
4
|
+
*
|
|
5
|
+
* Empty scope = global match. All declared fields are AND-ed. The optional
|
|
6
|
+
* `match` predicate runs last.
|
|
7
|
+
*/
|
|
8
|
+
export declare function matchesScopeForDrop(scope: Scope | undefined, ctx: DropContext): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Returns true if `scope` is valid for stat resolution.
|
|
11
|
+
*
|
|
12
|
+
* Drop-only scoped effects never match stat resolution. Any of `items`,
|
|
13
|
+
* `dropKinds`, `specialCropTypes`, `tags`, or `match` causes outright rejection.
|
|
14
|
+
*/
|
|
15
|
+
export declare function matchesScopeForStat(scope: Scope | undefined, ctx: StatContext): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Returns true if `scope` is structurally "global Overbloom-shaped":
|
|
18
|
+
* no crop/feast/season narrowing, optionally `tags: ['overbloom']` only.
|
|
19
|
+
*
|
|
20
|
+
* Used by `getStat(Stat.Overbloom)` to decide which Overbloom-related
|
|
21
|
+
* `add-rare-pct` effects count toward the scalar total.
|
|
22
|
+
*/
|
|
23
|
+
export declare function isGlobalOverbloomScope(scope: Scope | undefined): boolean;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns true if `scope` matches the given `DropContext`.
|
|
3
|
+
*
|
|
4
|
+
* Empty scope = global match. All declared fields are AND-ed. The optional
|
|
5
|
+
* `match` predicate runs last.
|
|
6
|
+
*/
|
|
7
|
+
export function matchesScopeForDrop(scope, ctx) {
|
|
8
|
+
if (!scope)
|
|
9
|
+
return true;
|
|
10
|
+
if (scope.crops && !scope.crops.includes(ctx.crop))
|
|
11
|
+
return false;
|
|
12
|
+
if (scope.dropKinds && !scope.dropKinds.includes(ctx.dropKind))
|
|
13
|
+
return false;
|
|
14
|
+
if (scope.items && !scope.items.includes(ctx.itemId))
|
|
15
|
+
return false;
|
|
16
|
+
if (scope.specialCropTypes) {
|
|
17
|
+
if (!ctx.specialCropType)
|
|
18
|
+
return false;
|
|
19
|
+
if (!scope.specialCropTypes.includes(ctx.specialCropType))
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
if (scope.tags) {
|
|
23
|
+
for (const tag of scope.tags) {
|
|
24
|
+
if (!ctx.tags.has(tag))
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (scope.requiresHarvestFeast && !ctx.env.harvestFeast)
|
|
29
|
+
return false;
|
|
30
|
+
if (scope.requiresInSeason && !ctx.env.inSeason)
|
|
31
|
+
return false;
|
|
32
|
+
if (scope.appliesToAddedDrops === false && ctx.fromAddDrop)
|
|
33
|
+
return false;
|
|
34
|
+
if (scope.match && !scope.match(ctx))
|
|
35
|
+
return false;
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Returns true if `scope` is valid for stat resolution.
|
|
40
|
+
*
|
|
41
|
+
* Drop-only scoped effects never match stat resolution. Any of `items`,
|
|
42
|
+
* `dropKinds`, `specialCropTypes`, `tags`, or `match` causes outright rejection.
|
|
43
|
+
*/
|
|
44
|
+
export function matchesScopeForStat(scope, ctx) {
|
|
45
|
+
if (!scope)
|
|
46
|
+
return true;
|
|
47
|
+
// Drop-only fields disqualify the effect from stat resolution.
|
|
48
|
+
if (scope.items)
|
|
49
|
+
return false;
|
|
50
|
+
if (scope.dropKinds)
|
|
51
|
+
return false;
|
|
52
|
+
if (scope.specialCropTypes)
|
|
53
|
+
return false;
|
|
54
|
+
if (scope.tags)
|
|
55
|
+
return false;
|
|
56
|
+
if (scope.match)
|
|
57
|
+
return false;
|
|
58
|
+
if (scope.crops) {
|
|
59
|
+
// A crop-scoped effect contributes to a stat query only when the query
|
|
60
|
+
// names a crop AND that crop is in the scope.
|
|
61
|
+
if (!ctx.crop)
|
|
62
|
+
return false;
|
|
63
|
+
if (!scope.crops.includes(ctx.crop))
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
if (scope.requiresHarvestFeast && !ctx.env.harvestFeast)
|
|
67
|
+
return false;
|
|
68
|
+
if (scope.requiresInSeason) {
|
|
69
|
+
// In-season requires a crop and an active feast.
|
|
70
|
+
if (!ctx.crop || !ctx.env.inSeason)
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Returns true if `scope` is structurally "global Overbloom-shaped":
|
|
77
|
+
* no crop/feast/season narrowing, optionally `tags: ['overbloom']` only.
|
|
78
|
+
*
|
|
79
|
+
* Used by `getStat(Stat.Overbloom)` to decide which Overbloom-related
|
|
80
|
+
* `add-rare-pct` effects count toward the scalar total.
|
|
81
|
+
*/
|
|
82
|
+
export function isGlobalOverbloomScope(scope) {
|
|
83
|
+
if (!scope)
|
|
84
|
+
return true;
|
|
85
|
+
if (scope.crops)
|
|
86
|
+
return false;
|
|
87
|
+
if (scope.dropKinds)
|
|
88
|
+
return false;
|
|
89
|
+
if (scope.items)
|
|
90
|
+
return false;
|
|
91
|
+
if (scope.specialCropTypes)
|
|
92
|
+
return false;
|
|
93
|
+
if (scope.match)
|
|
94
|
+
return false;
|
|
95
|
+
if (scope.requiresHarvestFeast)
|
|
96
|
+
return false;
|
|
97
|
+
if (scope.requiresInSeason)
|
|
98
|
+
return false;
|
|
99
|
+
if (scope.appliesToAddedDrops === false)
|
|
100
|
+
return false;
|
|
101
|
+
if (scope.tags) {
|
|
102
|
+
// Allow only `['overbloom']` (in any order/length 1).
|
|
103
|
+
if (scope.tags.length !== 1 || scope.tags[0] !== 'overbloom')
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=matcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matcher.js","sourceRoot":"","sources":["../../src/effects/matcher.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAwB,EAAE,GAAgB;IAC7E,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IACjE,IAAI,KAAK,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC;QAAE,OAAO,KAAK,CAAC;IAC7E,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC;QAAE,OAAO,KAAK,CAAC;IACnE,IAAI,KAAK,CAAC,gBAAgB,EAAE,CAAC;QAC5B,IAAI,CAAC,GAAG,CAAC,eAAe;YAAE,OAAO,KAAK,CAAC;QACvC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC;YAAE,OAAO,KAAK,CAAC;IACzE,CAAC;IACD,IAAI,KAAK,CAAC,IAAI,EAAE,CA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type DropContext, type Effect, type EffectAddDropPayload, type EffectEnvironment, type EffectPhase, type StatContext } from './types.js';
|
|
3
|
+
/** Resolve an effect's phase, defaulting from its op when omitted. */
|
|
4
|
+
export declare function effectPhase(effect: Effect): EffectPhase;
|
|
5
|
+
/**
|
|
6
|
+
* Throw if a multiplicative effect carries an invalid value. Catches the
|
|
7
|
+
* Cropeetle/Deep-Fried delta-vs-factor mismatch class of bugs at the source.
|
|
8
|
+
*/
|
|
9
|
+
export declare function assertValidEffect(effect: Effect): void;
|
|
10
|
+
/**
|
|
11
|
+
* Sum `add-stat` effects matching a stat query and a `StatContext`.
|
|
12
|
+
*
|
|
13
|
+
* Drop-only scoped effects are rejected by the matcher.
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveStatTotal(effects: readonly Effect[], stat: Stat, ctx: StatContext): number;
|
|
16
|
+
/**
|
|
17
|
+
* Per-stat breakdown of `add-stat` contributions matching a `StatContext`.
|
|
18
|
+
* Returns `{ source: amount }` aggregated by source name.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveStatBreakdown(effects: readonly Effect[], stat: Stat, ctx: StatContext): Record<string, number>;
|
|
21
|
+
/**
|
|
22
|
+
* Compute the virtual scalar for `Stat.Overbloom`.
|
|
23
|
+
*
|
|
24
|
+
* Sums `value` from `add-rare-pct` effects whose `relatedStats` includes
|
|
25
|
+
* `Stat.Overbloom` and whose scope is global Overbloom-shaped. Scoped Overbloom-
|
|
26
|
+
* flavored effects are excluded by design - see the architecture plan.
|
|
27
|
+
*/
|
|
28
|
+
export declare function resolveOverbloomScalar(effects: readonly Effect[], ctx: StatContext, overbloomStat: Stat): number;
|
|
29
|
+
/**
|
|
30
|
+
* Per-source breakdown of the global Overbloom scalar.
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveOverbloomBreakdown(effects: readonly Effect[], ctx: StatContext, overbloomStat: Stat): Record<string, number>;
|
|
33
|
+
export interface ProducedDrop {
|
|
34
|
+
source: string;
|
|
35
|
+
payload: EffectAddDropPayload;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Collect drops emitted by `add-drop` effects whose env-level scope matches.
|
|
39
|
+
*
|
|
40
|
+
* Real per-drop scope filtering (tags, items, etc.) happens later when the
|
|
41
|
+
* calculator builds a `DropContext` for each candidate.
|
|
42
|
+
*/
|
|
43
|
+
export declare function produceAddedDrops(effects: readonly Effect[], env: EffectEnvironment): ProducedDrop[];
|
|
44
|
+
export interface DropResolutionResult {
|
|
45
|
+
/** Additive percentage points (e.g. 50 = +50%) summed from `add-rare-pct` effects. */
|
|
46
|
+
addRarePct: number;
|
|
47
|
+
/** Combined `mul-rare` factor (product of all matching factors). 1.0 = identity. */
|
|
48
|
+
mulRare: number;
|
|
49
|
+
/** Combined `mul-drop` factor (product of all matching factors). 1.0 = identity. */
|
|
50
|
+
mulDrop: number;
|
|
51
|
+
/** Per-effect record of contributions to this drop, in pipeline order. */
|
|
52
|
+
applied: AppliedEffect[];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Resolve `add-rare-pct`, `mul-rare`, and `mul-drop` effects for a single drop.
|
|
56
|
+
*
|
|
57
|
+
* The calculator is expected to combine the parts as:
|
|
58
|
+
* `final = base * (1 + addRarePct/100) * mulRare * mulDrop`
|
|
59
|
+
*
|
|
60
|
+
* `applied` records every effect that touched this drop, with phase and
|
|
61
|
+
* resolved amount, for breakdown UIs.
|
|
62
|
+
*/
|
|
63
|
+
export declare function resolveDropEffects(effects: readonly Effect[], ctx: DropContext): DropResolutionResult;
|