farming-weight 0.1.4 → 0.2.1
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/classes/farmingarmor.d.ts +2 -0
- package/dist/classes/farmingarmor.js +7 -0
- package/dist/classes/farmingarmor.js.map +1 -0
- package/dist/classes/farmingtool.d.ts +27 -0
- package/dist/classes/farmingtool.js +101 -0
- package/dist/classes/farmingtool.js.map +1 -0
- package/dist/classes/item.d.ts +14 -0
- package/dist/classes/item.js +3 -0
- package/dist/classes/item.js.map +1 -0
- package/dist/classes/player.d.ts +30 -0
- package/dist/classes/player.js +30 -0
- package/dist/classes/player.js.map +1 -0
- package/dist/classes/weightcalc.d.ts +50 -0
- package/dist/classes/weightcalc.js +168 -0
- package/dist/classes/weightcalc.js.map +1 -0
- package/dist/constants/armor.d.ts +27 -0
- package/dist/constants/armor.js +403 -0
- package/dist/constants/armor.js.map +1 -0
- package/dist/constants/crops.d.ts +1 -0
- package/dist/constants/crops.js +5 -0
- package/dist/constants/crops.js.map +1 -1
- package/dist/constants/reforges.d.ts +59 -0
- package/dist/constants/reforges.js +449 -0
- package/dist/constants/reforges.js.map +1 -0
- package/dist/constants/skills.d.ts +13 -0
- package/dist/constants/skills.js +18 -0
- package/dist/constants/skills.js.map +1 -0
- package/dist/constants/tools.d.ts +19 -0
- package/dist/constants/tools.js +263 -0
- package/dist/constants/tools.js.map +1 -0
- package/dist/crops/special.js +2 -1
- package/dist/crops/special.js.map +1 -1
- package/dist/index.d.ts +16 -6
- package/dist/index.js +30 -18
- package/dist/index.js.map +1 -1
- package/dist/ratecalc.js +13 -15
- package/dist/ratecalc.js.map +1 -1
- package/dist/util/itemstats.d.ts +4 -0
- package/dist/util/itemstats.js +73 -0
- package/dist/util/itemstats.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"farmingarmor.js","sourceRoot":"","sources":["../../src/classes/farmingarmor.ts"],"names":[],"mappings":";;;AAAA,MAAa,YAAY;CAAG;AAA5B,oCAA4B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Crop } from '../constants/crops';
|
|
2
|
+
import { Rarity, Reforge, ReforgeTier } from '../constants/reforges';
|
|
3
|
+
import { FarmingToolInfo } from '../constants/tools';
|
|
4
|
+
import { Item } from './item';
|
|
5
|
+
export declare class FarmingTool {
|
|
6
|
+
readonly item: Item;
|
|
7
|
+
readonly crop: Crop;
|
|
8
|
+
readonly tool: FarmingToolInfo;
|
|
9
|
+
readonly rarity: Rarity;
|
|
10
|
+
readonly counter: number | undefined;
|
|
11
|
+
readonly cultivating: number;
|
|
12
|
+
readonly reforge: Reforge | undefined;
|
|
13
|
+
readonly reforgeStats: ReforgeTier | undefined;
|
|
14
|
+
readonly farmingForDummies: number;
|
|
15
|
+
readonly recombobulated: boolean;
|
|
16
|
+
fortune: number;
|
|
17
|
+
fortuneBreakdown: Record<string, number>;
|
|
18
|
+
constructor(item: Item);
|
|
19
|
+
private sumFortune;
|
|
20
|
+
private getCounter;
|
|
21
|
+
private getCultivating;
|
|
22
|
+
getCultivatingLevel(): number;
|
|
23
|
+
get farmed(): number;
|
|
24
|
+
private getFarmingAbilityFortune;
|
|
25
|
+
static isValid(item: Item): boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare function IsValidFarmingTool(item: Item): boolean;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IsValidFarmingTool = exports.FarmingTool = void 0;
|
|
4
|
+
const reforges_1 = require("../constants/reforges");
|
|
5
|
+
const tools_1 = require("../constants/tools");
|
|
6
|
+
const itemstats_1 = require("../util/itemstats");
|
|
7
|
+
class FarmingTool {
|
|
8
|
+
constructor(item) {
|
|
9
|
+
this.item = item;
|
|
10
|
+
const tool = tools_1.FARMING_TOOLS[item.skyblockId];
|
|
11
|
+
if (!tool) {
|
|
12
|
+
throw new Error(`Unknown farming tool: ${item.name} (${item.skyblockId})`);
|
|
13
|
+
}
|
|
14
|
+
this.tool = tool;
|
|
15
|
+
this.crop = tool.crop;
|
|
16
|
+
if (item.lore) {
|
|
17
|
+
this.rarity = (0, itemstats_1.GetRarityFromLore)(item.lore);
|
|
18
|
+
}
|
|
19
|
+
this.counter = this.getCounter();
|
|
20
|
+
this.cultivating = this.getCultivating() ?? 0;
|
|
21
|
+
this.reforge = reforges_1.REFORGES[item.attributes?.modifier ?? ''] ?? undefined;
|
|
22
|
+
this.reforgeStats = this.reforge?.tiers?.[this.rarity];
|
|
23
|
+
this.farmingForDummies = +(this.item.attributes?.farming_for_dummies_count ?? 0);
|
|
24
|
+
this.recombobulated = this.item.attributes?.rarity_upgrades === '1';
|
|
25
|
+
this.fortune = this.sumFortune();
|
|
26
|
+
}
|
|
27
|
+
sumFortune() {
|
|
28
|
+
this.fortuneBreakdown = {};
|
|
29
|
+
let sum = 0;
|
|
30
|
+
// Base fortune
|
|
31
|
+
const base = this.tool.baseStats?.[reforges_1.Stat.FarmingFortune] ?? 0;
|
|
32
|
+
if (base > 0) {
|
|
33
|
+
this.fortuneBreakdown['Tool Bonus'] = base;
|
|
34
|
+
sum += base;
|
|
35
|
+
}
|
|
36
|
+
// Tool rarity stats
|
|
37
|
+
const baseRarity = this.recombobulated ? (0, itemstats_1.PreviousRarity)(this.rarity) : this.rarity;
|
|
38
|
+
const rarityStats = this.tool.stats?.[baseRarity]?.[reforges_1.Stat.FarmingFortune] ?? 0;
|
|
39
|
+
if (rarityStats > 0) {
|
|
40
|
+
this.fortuneBreakdown['Tool Stats'] = rarityStats;
|
|
41
|
+
sum += rarityStats;
|
|
42
|
+
}
|
|
43
|
+
// Reforge stats
|
|
44
|
+
const reforge = this.reforgeStats?.stats?.[reforges_1.Stat.FarmingFortune] ?? 0;
|
|
45
|
+
if (reforge > 0) {
|
|
46
|
+
this.fortuneBreakdown[this.reforge?.name ?? 'Reforge'] = reforge;
|
|
47
|
+
sum += reforge;
|
|
48
|
+
}
|
|
49
|
+
// Farming for Dummies
|
|
50
|
+
if (this.farmingForDummies > 0) {
|
|
51
|
+
this.fortuneBreakdown['Farming for Dummies'] = this.farmingForDummies;
|
|
52
|
+
sum += this.farmingForDummies;
|
|
53
|
+
}
|
|
54
|
+
// Collection analysis and digit bonuses
|
|
55
|
+
if (this.tool.type === tools_1.FarmingToolType.MathematicalHoe) {
|
|
56
|
+
const ability = this.getFarmingAbilityFortune(this);
|
|
57
|
+
if (ability > 0) {
|
|
58
|
+
this.fortuneBreakdown['Tool Ability'] = ability;
|
|
59
|
+
sum += ability;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return sum;
|
|
63
|
+
}
|
|
64
|
+
getCounter() {
|
|
65
|
+
const counter = +(this.item?.attributes?.mined_crops ?? 0);
|
|
66
|
+
return counter && !isNaN(counter) ? counter : undefined;
|
|
67
|
+
}
|
|
68
|
+
getCultivating() {
|
|
69
|
+
const cultivating = +(this.item?.attributes?.farmed_cultivating ?? 0);
|
|
70
|
+
return cultivating && !isNaN(cultivating) ? cultivating : undefined;
|
|
71
|
+
}
|
|
72
|
+
getCultivatingLevel() {
|
|
73
|
+
return this.item.enchantments?.cultivating ?? 0;
|
|
74
|
+
}
|
|
75
|
+
get farmed() {
|
|
76
|
+
return this.counter ?? this.cultivating ?? 0;
|
|
77
|
+
}
|
|
78
|
+
getFarmingAbilityFortune(tool) {
|
|
79
|
+
let fortune = 0;
|
|
80
|
+
const regex = /§7You have §6\+(\d+)☘ Farming Fortune/g;
|
|
81
|
+
for (const line of tool.item.lore ?? []) {
|
|
82
|
+
const match = regex.exec(line);
|
|
83
|
+
if (!match?.length || !match[1])
|
|
84
|
+
continue;
|
|
85
|
+
const found = +match[1];
|
|
86
|
+
if (isNaN(found))
|
|
87
|
+
continue;
|
|
88
|
+
fortune += found;
|
|
89
|
+
}
|
|
90
|
+
return fortune;
|
|
91
|
+
}
|
|
92
|
+
static isValid(item) {
|
|
93
|
+
return IsValidFarmingTool(item);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.FarmingTool = FarmingTool;
|
|
97
|
+
function IsValidFarmingTool(item) {
|
|
98
|
+
return tools_1.FARMING_TOOLS[item.skyblockId] !== undefined;
|
|
99
|
+
}
|
|
100
|
+
exports.IsValidFarmingTool = IsValidFarmingTool;
|
|
101
|
+
//# sourceMappingURL=farmingtool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"farmingtool.js","sourceRoot":"","sources":["../../src/classes/farmingtool.ts"],"names":[],"mappings":";;;AACA,oDAAqF;AACrF,8CAAqF;AACrF,iDAAsE;AAGtE,MAAa,WAAW;IAiBvB,YAAY,IAAU;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,MAAM,IAAI,GAAG,qBAAa,CAAC,IAAI,CAAC,UAAwC,CAAC,CAAC;QAE1E,IAAI,CAAC,IAAI,EAAE;YACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;SAC3E;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAEtB,IAAI,IAAI,CAAC,IAAI,EAAE;YACd,IAAI,CAAC,MAAM,GAAG,IAAA,6BAAiB,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC3C;QAED,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QACjC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,OAAO,GAAG,mBAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,IAAI,EAAE,CAAC,IAAI,SAAS,CAAC;QACtE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,C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C;IACjD,CAAC;IAED,IAAI,MAAM;QACT,OAAO,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC,CAAC;IAC9C,CAAC;IAEO,wBAAwB,CAAC,IAAiB;QACjD,IAAI,OAAO,GAAG,CAAC,CAAC;QAEhB,MAAM,KAAK,GAAG,wCAAwC,CAAC;QAEvD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,EAAE;YACxC,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC/B,IAAI,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;gBAAE,SAAS;YAE1C,MAAM,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACxB,IAAI,KAAK,CAAC,KAAK,CAAC;gBAAE,SAAS;YAE3B,OAAO,IAAI,KAAK,CAAC;SACjB;QAED,OAAO,OAAO,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,IAAU;QACxB,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;CACD;AA/HD,kCA+HC;AAED,SAAgB,kBAAkB,CAAC,IAAU;IAC5C,OAAO,qBAAa,CAAC,IAAI,CAAC,UAAwC,CAAC,KAAK,SAAS,CAAC;AACnF,CAAC;AAFD,gDAEC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface Item {
|
|
2
|
+
id?: number | null;
|
|
3
|
+
count?: number | null;
|
|
4
|
+
skyblockId?: string | null;
|
|
5
|
+
uuid?: string | null;
|
|
6
|
+
name?: string | null;
|
|
7
|
+
lore?: string[] | null;
|
|
8
|
+
enchantments?: {
|
|
9
|
+
[key: string]: number | null;
|
|
10
|
+
} | null;
|
|
11
|
+
attributes?: {
|
|
12
|
+
[key: string]: string | null;
|
|
13
|
+
} | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.js","sourceRoot":"","sources":["../../src/classes/item.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Crop } from '../constants/crops';
|
|
2
|
+
interface PlayerOptions {
|
|
3
|
+
collection?: Record<string, number>;
|
|
4
|
+
fortuneSources?: Record<string, number>;
|
|
5
|
+
cropSpecificFortune?: Record<Crop, number>;
|
|
6
|
+
farmingXp?: number;
|
|
7
|
+
farmingLevel?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function CreatePlayer(options: PlayerOptions): Player;
|
|
10
|
+
declare class Player {
|
|
11
|
+
collection: Partial<Record<Crop, number>>;
|
|
12
|
+
fortuneSources: Record<string, number>;
|
|
13
|
+
cropSpecificFortune: Partial<Record<Crop, number>>;
|
|
14
|
+
farmingXp: number;
|
|
15
|
+
farmingLevel: number;
|
|
16
|
+
constructor(options: PlayerOptions);
|
|
17
|
+
addFortune(name: string, amount: number): this;
|
|
18
|
+
addCropFortune(crop: Crop, amount: number): this;
|
|
19
|
+
setLotusGear(): void;
|
|
20
|
+
getFortune(): number;
|
|
21
|
+
}
|
|
22
|
+
export interface JacobFarmingContest {
|
|
23
|
+
crop: Crop;
|
|
24
|
+
timestamp: number;
|
|
25
|
+
collected: number;
|
|
26
|
+
position?: number;
|
|
27
|
+
participants?: number;
|
|
28
|
+
medal?: number;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreatePlayer = void 0;
|
|
4
|
+
function CreatePlayer(options) {
|
|
5
|
+
return new Player(options);
|
|
6
|
+
}
|
|
7
|
+
exports.CreatePlayer = CreatePlayer;
|
|
8
|
+
class Player {
|
|
9
|
+
constructor(options) {
|
|
10
|
+
this.collection = options.collection ?? {};
|
|
11
|
+
this.fortuneSources = options.fortuneSources ?? {};
|
|
12
|
+
this.cropSpecificFortune = options.cropSpecificFortune ?? {};
|
|
13
|
+
this.farmingXp = options.farmingXp ?? 0;
|
|
14
|
+
this.farmingLevel = options.farmingLevel ?? 0;
|
|
15
|
+
}
|
|
16
|
+
addFortune(name, amount) {
|
|
17
|
+
this.fortuneSources[name] = amount;
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
addCropFortune(crop, amount) {
|
|
21
|
+
this.cropSpecificFortune[crop] = amount;
|
|
22
|
+
return this;
|
|
23
|
+
}
|
|
24
|
+
setLotusGear() { }
|
|
25
|
+
getFortune() {
|
|
26
|
+
const general = Object.values(this.fortuneSources).reduce((a, b) => a + b, 0);
|
|
27
|
+
return general;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=player.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"player.js","sourceRoot":"","sources":["../../src/classes/player.ts"],"names":[],"mappings":";;;AAUA,SAAgB,YAAY,CAAC,OAAsB;IAClD,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAC5B,CAAC;AAFD,oCAEC;AAED,MAAM,MAAM;IAOX,YAAY,OAAsB;QACjC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC;QAC3C,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,IAAI,EAAE,CAAC;QACnD,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,IAAI,EAAE,CAAC;QAC7D,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,CAAC,CAAC;IAC/C,CAAC;IAED,UAAU,CAAC,IAAY,EAAE,MAAc;QACtC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;QACnC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,cAAc,CAAC,IAAU,EAAE,MAAc;QACxC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;QACxC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,YAAY,KAAI,CAAC;IAEjB,UAAU;QACT,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9E,OAAO,OAAO,CAAC;IAChB,CAAC;CACD"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Crop } from '../constants/crops';
|
|
2
|
+
export declare function CreateFarmingWeightCalculator(info?: FarmingWeightInfo): FarmingWeight;
|
|
3
|
+
export interface FarmingWeightInfo {
|
|
4
|
+
collection?: Record<string, number>;
|
|
5
|
+
farmingXp?: number;
|
|
6
|
+
levelCapUpgrade?: number;
|
|
7
|
+
anitaBonusFarmingFortuneLevel?: number;
|
|
8
|
+
minions?: string[];
|
|
9
|
+
contests?: {
|
|
10
|
+
collected: number;
|
|
11
|
+
claimed_position?: number;
|
|
12
|
+
claimed_participants?: number;
|
|
13
|
+
claimed_medal?: 'bronze' | 'silver' | 'gold';
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
16
|
+
declare class FarmingWeight {
|
|
17
|
+
collection: Record<Crop, number>;
|
|
18
|
+
levelCapUpgrade: number;
|
|
19
|
+
farmingXp: number;
|
|
20
|
+
anitaBonusFarmingFortuneLevel: number;
|
|
21
|
+
tier12MinionCount: number;
|
|
22
|
+
earnedGoldMedals: number;
|
|
23
|
+
cropWeights: Record<Crop, number>;
|
|
24
|
+
bonusSources: Record<string, number>;
|
|
25
|
+
constructor(info?: FarmingWeightInfo);
|
|
26
|
+
/**
|
|
27
|
+
* Expectes a dictionary of collections and amounts with the default Hypixel SkyBlock IDs
|
|
28
|
+
* @param {Record<string, number>} collections
|
|
29
|
+
* @returns {FarmingWeight}
|
|
30
|
+
*/
|
|
31
|
+
setCropsFromCollections(collections: Record<string, number>): FarmingWeight;
|
|
32
|
+
setCrop: (crop: Crop, collection: number) => this;
|
|
33
|
+
setLevelCap: (levelCap: number) => this;
|
|
34
|
+
setFarmingXp: (farmingXp: number) => this;
|
|
35
|
+
setAnitaBonusLevel: (anitaBonusFarmingFortuneLevel: number) => this;
|
|
36
|
+
addMinions: (minions: string[]) => this;
|
|
37
|
+
setEarnedGoldMedals: (count: number) => this;
|
|
38
|
+
setTier12MinionCount: (count: number) => this;
|
|
39
|
+
setContests: (contests: FarmingWeightInfo['contests']) => this;
|
|
40
|
+
getWeightInfo: () => {
|
|
41
|
+
totalWeight: number;
|
|
42
|
+
bonusWeight: number;
|
|
43
|
+
cropWeight: number;
|
|
44
|
+
bonusSources: Record<string, number>;
|
|
45
|
+
};
|
|
46
|
+
getBonusWeights: () => Record<string, number>;
|
|
47
|
+
getCropWeights: () => Record<Crop, number>;
|
|
48
|
+
getCropWeight: (crop: Crop) => void;
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateFarmingWeightCalculator = void 0;
|
|
4
|
+
const crops_1 = require("../constants/crops");
|
|
5
|
+
const weight_1 = require("../constants/weight");
|
|
6
|
+
function CreateFarmingWeightCalculator(info) {
|
|
7
|
+
return new FarmingWeight(info);
|
|
8
|
+
}
|
|
9
|
+
exports.CreateFarmingWeightCalculator = CreateFarmingWeightCalculator;
|
|
10
|
+
const crops = [
|
|
11
|
+
crops_1.Crop.Cactus,
|
|
12
|
+
crops_1.Crop.Carrot,
|
|
13
|
+
crops_1.Crop.CocoaBeans,
|
|
14
|
+
crops_1.Crop.Melon,
|
|
15
|
+
crops_1.Crop.Mushroom,
|
|
16
|
+
crops_1.Crop.NetherWart,
|
|
17
|
+
crops_1.Crop.Potato,
|
|
18
|
+
crops_1.Crop.Pumpkin,
|
|
19
|
+
crops_1.Crop.SugarCane,
|
|
20
|
+
crops_1.Crop.Wheat,
|
|
21
|
+
];
|
|
22
|
+
class FarmingWeight {
|
|
23
|
+
constructor(info) {
|
|
24
|
+
this.collection = {};
|
|
25
|
+
this.levelCapUpgrade = info?.levelCapUpgrade ?? 0;
|
|
26
|
+
this.anitaBonusFarmingFortuneLevel = info?.anitaBonusFarmingFortuneLevel ?? 0;
|
|
27
|
+
this.farmingXp = info?.farmingXp ?? 0;
|
|
28
|
+
this.earnedGoldMedals = 0;
|
|
29
|
+
this.tier12MinionCount = 0;
|
|
30
|
+
this.setCropsFromCollections(info?.collection ?? {});
|
|
31
|
+
this.addMinions(info?.minions ?? []);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Expectes a dictionary of collections and amounts with the default Hypixel SkyBlock IDs
|
|
35
|
+
* @param {Record<string, number>} collections
|
|
36
|
+
* @returns {FarmingWeight}
|
|
37
|
+
*/
|
|
38
|
+
setCropsFromCollections(collections) {
|
|
39
|
+
for (const crop of crops) {
|
|
40
|
+
this.collection[crop] = collections[crop] ?? 0;
|
|
41
|
+
}
|
|
42
|
+
this.getCropWeights();
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
|
+
setCrop = (crop, collection) => {
|
|
46
|
+
this.collection[crop] = collection;
|
|
47
|
+
this.getCropWeights();
|
|
48
|
+
return this;
|
|
49
|
+
};
|
|
50
|
+
setLevelCap = (levelCap) => {
|
|
51
|
+
this.levelCapUpgrade = levelCap;
|
|
52
|
+
return this;
|
|
53
|
+
};
|
|
54
|
+
setFarmingXp = (farmingXp) => {
|
|
55
|
+
this.farmingXp = farmingXp;
|
|
56
|
+
return this;
|
|
57
|
+
};
|
|
58
|
+
setAnitaBonusLevel = (anitaBonusFarmingFortuneLevel) => {
|
|
59
|
+
this.anitaBonusFarmingFortuneLevel = anitaBonusFarmingFortuneLevel;
|
|
60
|
+
return this;
|
|
61
|
+
};
|
|
62
|
+
addMinions = (minions) => {
|
|
63
|
+
for (const minion of minions) {
|
|
64
|
+
if (!minion.endsWith('_12'))
|
|
65
|
+
continue;
|
|
66
|
+
if (!weight_1.TIER_12_MINIONS.includes(minion))
|
|
67
|
+
continue;
|
|
68
|
+
this.tier12MinionCount++;
|
|
69
|
+
}
|
|
70
|
+
return this;
|
|
71
|
+
};
|
|
72
|
+
setEarnedGoldMedals = (count) => {
|
|
73
|
+
this.earnedGoldMedals = count;
|
|
74
|
+
return this;
|
|
75
|
+
};
|
|
76
|
+
setTier12MinionCount = (count) => {
|
|
77
|
+
this.tier12MinionCount = count;
|
|
78
|
+
return this;
|
|
79
|
+
};
|
|
80
|
+
setContests = (contests) => {
|
|
81
|
+
if (!contests?.length)
|
|
82
|
+
return this;
|
|
83
|
+
for (const contest of contests) {
|
|
84
|
+
if (contest.claimed_medal === 'gold') {
|
|
85
|
+
this.earnedGoldMedals++;
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
const position = contest.claimed_position;
|
|
89
|
+
const participants = contest.claimed_participants;
|
|
90
|
+
if (position === undefined || participants === undefined)
|
|
91
|
+
continue;
|
|
92
|
+
if (position <= participants * 0.05 + 1) {
|
|
93
|
+
this.earnedGoldMedals++;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return this;
|
|
97
|
+
};
|
|
98
|
+
getWeightInfo = () => {
|
|
99
|
+
const bonus = this.getBonusWeights();
|
|
100
|
+
const crops = this.getCropWeights();
|
|
101
|
+
const bonusTotal = Object.values(bonus).reduce((a, b) => a + b, 0);
|
|
102
|
+
const cropTotal = Object.values(crops).reduce((a, b) => a + b, 0);
|
|
103
|
+
return {
|
|
104
|
+
totalWeight: bonusTotal + cropTotal,
|
|
105
|
+
bonusWeight: bonusTotal,
|
|
106
|
+
cropWeight: cropTotal,
|
|
107
|
+
bonusSources: bonus,
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
getBonusWeights = () => {
|
|
111
|
+
if (this.farmingXp >= 111_672_425 && this.levelCapUpgrade >= 10) {
|
|
112
|
+
// Farming 60 bonus
|
|
113
|
+
this.bonusSources['Farming 60'] = weight_1.BONUS_WEIGHT.Farming60Bonus;
|
|
114
|
+
}
|
|
115
|
+
else if (this.farmingXp >= 55_172_425) {
|
|
116
|
+
// Farming 50 bonus
|
|
117
|
+
this.bonusSources['Farming 50'] = weight_1.BONUS_WEIGHT.Farming50Bonus;
|
|
118
|
+
}
|
|
119
|
+
// Tier 12 minion bonus
|
|
120
|
+
if (this.tier12MinionCount > 0) {
|
|
121
|
+
this.bonusSources['Tier 12 Minions'] = this.tier12MinionCount * weight_1.BONUS_WEIGHT.MinionRewardWeight;
|
|
122
|
+
}
|
|
123
|
+
// Anita bonus
|
|
124
|
+
if (this.anitaBonusFarmingFortuneLevel > 0) {
|
|
125
|
+
this.bonusSources['Anita Bonus'] =
|
|
126
|
+
this.anitaBonusFarmingFortuneLevel * weight_1.BONUS_WEIGHT.AnitaBuffBonusMultiplier;
|
|
127
|
+
}
|
|
128
|
+
if (this.earnedGoldMedals > weight_1.BONUS_WEIGHT.MaxMedalsCounted) {
|
|
129
|
+
this.bonusSources['Gold Medals'] = Math.floor(weight_1.BONUS_WEIGHT.WeightPerGoldMedal * weight_1.BONUS_WEIGHT.MaxMedalsCounted);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
const rewardCount = Math.floor((this.earnedGoldMedals / 50) * 50);
|
|
133
|
+
if (rewardCount > 0) {
|
|
134
|
+
this.bonusSources['Gold Medals'] = Math.floor(weight_1.BONUS_WEIGHT.WeightPerGoldMedal * rewardCount);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return this.bonusSources;
|
|
138
|
+
};
|
|
139
|
+
getCropWeights = () => {
|
|
140
|
+
const cropWeight = {};
|
|
141
|
+
let totalWeight = 0;
|
|
142
|
+
let doubleBreakWeight = 0;
|
|
143
|
+
for (const crop of crops) {
|
|
144
|
+
const collected = this.collection[crop] ?? 0;
|
|
145
|
+
const weight = collected / weight_1.CROP_WEIGHT[crop];
|
|
146
|
+
totalWeight += weight;
|
|
147
|
+
if (crop === crops_1.Crop.Cactus || crop === crops_1.Crop.SugarCane) {
|
|
148
|
+
doubleBreakWeight += weight;
|
|
149
|
+
}
|
|
150
|
+
cropWeight[crop] = weight;
|
|
151
|
+
}
|
|
152
|
+
// Mushroom is a special case, it needs to be calculated dynamically based on the
|
|
153
|
+
// ratio between the farmed crops that give two mushrooms per break with cow pet
|
|
154
|
+
// and the farmed crops that give one mushroom per break with cow pet
|
|
155
|
+
const mushroomCollection = this.collection[crops_1.Crop.Mushroom] ?? 0;
|
|
156
|
+
const mushroomWeightNumber = weight_1.CROP_WEIGHT[crops_1.Crop.Mushroom];
|
|
157
|
+
const doubleBreakRatio = doubleBreakWeight / totalWeight;
|
|
158
|
+
const normalCropRatio = (totalWeight - doubleBreakWeight) / totalWeight;
|
|
159
|
+
const mushroomWeight = doubleBreakRatio * (mushroomCollection / (mushroomWeightNumber * 2)) +
|
|
160
|
+
normalCropRatio * (mushroomCollection / mushroomWeightNumber);
|
|
161
|
+
cropWeight[crops_1.Crop.Mushroom] = mushroomWeight;
|
|
162
|
+
return cropWeight;
|
|
163
|
+
};
|
|
164
|
+
getCropWeight = (crop) => {
|
|
165
|
+
weight_1.CROP_WEIGHT[crop];
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=weightcalc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weightcalc.js","sourceRoot":"","sources":["../../src/classes/weightcalc.ts"],"names":[],"mappings":";;;AAAA,8CAA0C;AAC1C,gDAAiF;AAEjF,SAAgB,6BAA6B,CAAC,IAAwB;IACrE,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAFD,sEAEC;AAED,MAAM,KAAK,GAAG;IACb,YAAI,CAAC,MAAM;IACX,YAAI,CAAC,MAAM;IACX,YAAI,CAAC,UA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AC;YAEtB,IAAI,IAAI,KAAK,YAAI,CAAC,MAAM,IAAI,IAAI,KAAK,YAAI,CAAC,SAAS,EAAE;gBACpD,iBAAiB,IAAI,MAAM,CAAC;aAC5B;YAED,UAAU,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;SAC1B;QAED,iFAAiF;QACjF,gFAAgF;QAChF,qEAAqE;QACrE,MAAM,kBAAkB,GAAG,IAAI,CAAC,UAAU,CAAC,YAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC/D,MAAM,oBAAoB,GAAG,oBAAW,CAAC,YAAI,CAAC,QAAQ,CAAC,CAAC;QAExD,MAAM,gBAAgB,GAAG,iBAAiB,GAAG,WAAW,CAAC;QACzD,MAAM,eAAe,GAAG,CAAC,WAAW,GAAG,iBAAiB,CAAC,GAAG,WAAW,CAAC;QAExE,MAAM,cAAc,GACnB,gBAAgB,GAAG,CAAC,kBAAkB,GAAG,CAAC,oBAAoB,GAAG,CAAC,CAAC,CAAC;YACpE,eAAe,GAAG,CAAC,kBAAkB,GAAG,oBAAoB,CAAC,CAAC;QAE/D,UAAU,CAAC,YAAI,CAAC,QAAQ,CAAC,GAAG,cAAc,CAAC;QAE3C,OAAO,UAAU,CAAC;IACnB,CAAC,CAAC;IAEF,aAAa,GAAG,CAAC,IAAU,EAAE,EAAE;QAC9B,oBAAW,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC,CAAC;CACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Rarity, ReforgeTarget, Stat } from './reforges';
|
|
2
|
+
import { Skill } from './skills';
|
|
3
|
+
import { SpecialCrop } from './specialcrops';
|
|
4
|
+
export declare enum GearSlot {
|
|
5
|
+
Boots = "Boots",
|
|
6
|
+
Leggings = "Leggings",
|
|
7
|
+
Chestplate = "Chestplate",
|
|
8
|
+
Helmet = "Helmet"
|
|
9
|
+
}
|
|
10
|
+
interface ArmorInfo {
|
|
11
|
+
special?: SpecialCrop[];
|
|
12
|
+
slot: GearSlot;
|
|
13
|
+
family?: string;
|
|
14
|
+
name: string;
|
|
15
|
+
maxRarity: Rarity;
|
|
16
|
+
upgrade?: string;
|
|
17
|
+
wiki: string;
|
|
18
|
+
stats?: Partial<Record<Stat, number>>;
|
|
19
|
+
perLevelStats?: {
|
|
20
|
+
skill: Skill;
|
|
21
|
+
appliesTo?: ReforgeTarget[];
|
|
22
|
+
stats: Partial<Record<Stat, number>>;
|
|
23
|
+
};
|
|
24
|
+
skillReq?: Partial<Record<Skill, number>>;
|
|
25
|
+
}
|
|
26
|
+
export declare const ARMOR_INFO: Record<string, ArmorInfo>;
|
|
27
|
+
export {};
|