@ffxiv-teamcraft/simulator
Version:
A FINAL FANTASY XIV crafting simulator
77 lines • 3.64 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.HeartAndSoul = void 0;
var buff_action_1 = require("../buff-action");
var buff_enum_1 = require("../../buff.enum");
var action_type_1 = require("../action-type");
var crafting_job_enum_1 = require("../../crafting-job.enum");
var precise_touch_1 = require("../quality/precise-touch");
var intensive_synthesis_1 = require("../progression/intensive-synthesis");
var tricks_of_the_trade_1 = require("../other/tricks-of-the-trade");
var step_state_1 = require("../../step-state");
var HeartAndSoul = /** @class */ (function (_super) {
__extends(HeartAndSoul, _super);
function HeartAndSoul() {
return _super !== null && _super.apply(this, arguments) || this;
}
HeartAndSoul.prototype.getLevelRequirement = function () {
return { job: crafting_job_enum_1.CraftingJob.ANY, level: 86 };
};
HeartAndSoul.prototype.canBeClipped = function () {
return true;
};
HeartAndSoul.prototype.skipsBuffTicks = function () {
return true;
};
HeartAndSoul.prototype._canBeUsed = function (simulationState) {
return (simulationState.crafterStats.specialist &&
!simulationState.steps.some(function (step) { return step.action.is(HeartAndSoul); }));
};
HeartAndSoul.prototype.getType = function () {
return action_type_1.ActionType.OTHER;
};
HeartAndSoul.prototype.getBaseCPCost = function (simulationState) {
return 0;
};
HeartAndSoul.prototype.getDuration = function (simulation) {
return Infinity;
};
HeartAndSoul.prototype.getIds = function () {
return [100419, 100420, 100421, 100422, 100423, 100424, 100425, 100426];
};
HeartAndSoul.prototype.getBuff = function () {
return buff_enum_1.Buff.HEART_AND_SOUL;
};
HeartAndSoul.prototype.getInitialStacks = function () {
return 0;
};
HeartAndSoul.prototype.getTick = function () {
var _this = this;
return function (simulation, linear, action) {
var usedOnNonGoodOrExcellent = simulation.state !== step_state_1.StepState.GOOD && simulation.state !== step_state_1.StepState.EXCELLENT;
// If linear, this buff will be removed if last action is one of the buffed ones.
if (usedOnNonGoodOrExcellent &&
[precise_touch_1.PreciseTouch, intensive_synthesis_1.IntensiveSynthesis, tricks_of_the_trade_1.TricksOfTheTrade].some(function (a) { return action === null || action === void 0 ? void 0 : action.is(a); })) {
simulation.removeBuff(_this.getBuff());
}
};
};
return HeartAndSoul;
}(buff_action_1.BuffAction));
exports.HeartAndSoul = HeartAndSoul;
//# sourceMappingURL=heart-and-soul.js.map