UNPKG

@ffxiv-teamcraft/simulator

Version:
74 lines 3.23 kB
"use strict"; 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.RefinedTouch = void 0; var quality_action_1 = require("../quality-action"); var crafting_job_enum_1 = require("../../crafting-job.enum"); var basic_touch_1 = require("./basic-touch"); var RefinedTouch = /** @class */ (function (_super) { __extends(RefinedTouch, _super); function RefinedTouch() { return _super !== null && _super.apply(this, arguments) || this; } RefinedTouch.prototype.execute = function (simulation, safe, skipStackAddition) { if (safe === void 0) { safe = false; } if (skipStackAddition === void 0) { skipStackAddition = false; } var hasCombo = this.hasCombo(simulation); _super.prototype.execute.call(this, simulation, safe, skipStackAddition); if (hasCombo) { simulation.addInnerQuietStacks(1); } }; RefinedTouch.prototype.getLevelRequirement = function () { return { job: crafting_job_enum_1.CraftingJob.ANY, level: 92 }; }; RefinedTouch.prototype._canBeUsed = function (simulationState) { return true; }; RefinedTouch.prototype.getBaseDurabilityCost = function (simulationState) { return 10; }; RefinedTouch.prototype.getBaseSuccessRate = function (simulationState) { return 100; }; RefinedTouch.prototype.hasCombo = function (simulation) { for (var index = simulation.steps.length - 1; index >= 0; index--) { var step = simulation.steps[index]; // If we end up finding the action, the combo is available if (step.action.is(basic_touch_1.BasicTouch) && step.success) { return true; } // If there's an action that isn't skipped (fail or not), combo is broken if (!step.skipped) { return false; } } return false; }; RefinedTouch.prototype.getBaseCPCost = function (simulationState) { return 24; }; RefinedTouch.prototype.getIds = function () { return [100443, 100444, 100445, 100446, 100447, 100448, 100449, 100450]; }; RefinedTouch.prototype.getPotency = function (simulation) { return 100; }; return RefinedTouch; }(quality_action_1.QualityAction)); exports.RefinedTouch = RefinedTouch; //# sourceMappingURL=refined-touch.js.map