@ffxiv-teamcraft/simulator
Version:
A FINAL FANTASY XIV crafting simulator
64 lines • 3.19 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.ByregotsBlessing = void 0;
var buff_enum_1 = require("../../buff.enum");
var quality_action_1 = require("../quality-action");
var crafting_job_enum_1 = require("../../crafting-job.enum");
var simulation_fail_cause_enum_1 = require("../../simulation-fail-cause.enum");
var ByregotsBlessing = /** @class */ (function (_super) {
__extends(ByregotsBlessing, _super);
function ByregotsBlessing() {
return _super !== null && _super.apply(this, arguments) || this;
}
ByregotsBlessing.prototype.getLevelRequirement = function () {
return { job: crafting_job_enum_1.CraftingJob.ANY, level: 50 };
};
ByregotsBlessing.prototype._canBeUsed = function (simulationState) {
return (simulationState.hasBuff(buff_enum_1.Buff.INNER_QUIET) &&
simulationState.getBuff(buff_enum_1.Buff.INNER_QUIET).stacks > 0);
};
ByregotsBlessing.prototype.getFailCause = function (simulationState, linear, safeMode) {
var superCause = _super.prototype.getFailCause.call(this, simulationState, linear, safeMode);
if (!simulationState.success && !superCause && !simulationState.hasBuff(buff_enum_1.Buff.INNER_QUIET)) {
return simulation_fail_cause_enum_1.SimulationFailCause.NO_INNER_QUIET;
}
return superCause;
};
ByregotsBlessing.prototype.execute = function (simulation) {
_super.prototype.execute.call(this, simulation);
simulation.removeBuff(buff_enum_1.Buff.INNER_QUIET);
};
ByregotsBlessing.prototype.getBaseCPCost = function (simulationState) {
return 24;
};
ByregotsBlessing.prototype.getBaseDurabilityCost = function (simulationState) {
return 10;
};
ByregotsBlessing.prototype.getBaseSuccessRate = function (simulationState) {
return 100;
};
ByregotsBlessing.prototype.getIds = function () {
return [100339, 100340, 100341, 100342, 100343, 100344, 100345, 100346];
};
ByregotsBlessing.prototype.getPotency = function (simulation) {
return Math.min(100 + simulation.getBuff(buff_enum_1.Buff.INNER_QUIET).stacks * 20, 300);
};
return ByregotsBlessing;
}(quality_action_1.QualityAction));
exports.ByregotsBlessing = ByregotsBlessing;
//# sourceMappingURL=byregots-blessing.js.map