farming-weight
Version:
Tools for calculating farming weight and fortune in Hypixel Skyblock
31 lines (30 loc) • 858 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
exports.CreatePlayer = void 0;
function createPlayer(options) {
return new Player(options);
}
exports.CreatePlayer = createPlayer;
class Player {
constructor(options) {
this.collection = options.collection ?? {};
this.fortuneSources = options.fortuneSources ?? {};
this.cropSpecificFortune = options.cropSpecificFortune ?? {};
this.farmingXp = options.farmingXp ?? 0;
this.farmingLevel = options.farmingLevel ?? 0;
}
addFortune(name, amount) {
this.fortuneSources[name] = amount;
return this;
}
addCropFortune(crop, amount) {
this.cropSpecificFortune[crop] = amount;
return this;
}
setLotusGear() {}
getFortune() {
const GENERAL = Object.values(this.fortuneSources).reduce((a, b) => a + b, 0);
return GENERAL;
}
}
//# sourceMappingURL=player.js.map