@ffxiv-teamcraft/simulator
Version:
A FINAL FANTASY XIV crafting simulator
56 lines • 2.45 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Groundwork = void 0;
var progress_action_1 = require("../progress-action");
var crafting_job_enum_1 = require("../../crafting-job.enum");
var buff_enum_1 = require("../../buff.enum");
var Groundwork = /** @class */ (function (_super) {
__extends(Groundwork, _super);
function Groundwork() {
return _super !== null && _super.apply(this, arguments) || this;
}
Groundwork.prototype.getLevelRequirement = function () {
return { job: crafting_job_enum_1.CraftingJob.ANY, level: 72 };
};
Groundwork.prototype._canBeUsed = function (simulationState) {
return true;
};
Groundwork.prototype.getBaseCPCost = function (simulationState) {
return 18;
};
Groundwork.prototype.getBaseDurabilityCost = function (simulationState) {
return 20;
};
Groundwork.prototype.getBaseSuccessRate = function (simulationState) {
return 100;
};
Groundwork.prototype.getIds = function () {
return [100403, 100404, 100405, 100406, 100407, 100408, 100409, 100410];
};
Groundwork.prototype.getPotency = function (simulation) {
var basePotency = simulation.crafterStats.level >= 86 ? 360 : 300;
if (simulation.hasBuff(buff_enum_1.Buff.TRAINED_PERFECTION) ||
simulation.durability >= this.getDurabilityCost(simulation)) {
return basePotency;
}
return basePotency / 2;
};
return Groundwork;
}(progress_action_1.ProgressAction));
exports.Groundwork = Groundwork;
//# sourceMappingURL=groundwork.js.map