UNPKG

@ffxiv-teamcraft/simulator

Version:
67 lines 2.97 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.AdvancedTouch = void 0; var quality_action_1 = require("../quality-action"); var crafting_job_enum_1 = require("../../crafting-job.enum"); var standard_touch_1 = require("./standard-touch"); var observe_1 = require("../other/observe"); var AdvancedTouch = /** @class */ (function (_super) { __extends(AdvancedTouch, _super); function AdvancedTouch() { return _super !== null && _super.apply(this, arguments) || this; } AdvancedTouch.prototype.getLevelRequirement = function () { return { job: crafting_job_enum_1.CraftingJob.ANY, level: 68 }; }; AdvancedTouch.prototype._canBeUsed = function (simulationState) { return true; }; AdvancedTouch.prototype.getBaseDurabilityCost = function (simulationState) { return 10; }; AdvancedTouch.prototype.getBaseSuccessRate = function (simulationState) { return 100; }; AdvancedTouch.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(standard_touch_1.StandardTouch) && step.success && step.combo) || step.action.is(observe_1.Observe)) { return true; } // If there's an action that isn't skipped (fail or not), combo is broken if (!step.skipped) { return false; } } return false; }; AdvancedTouch.prototype.getBaseCPCost = function (simulationState) { return this.hasCombo(simulationState) ? 18 : 46; }; AdvancedTouch.prototype.getIds = function () { return [100411, 100412, 100413, 100414, 100415, 100416, 100417, 100418]; }; AdvancedTouch.prototype.getPotency = function (simulation) { return 150; }; return AdvancedTouch; }(quality_action_1.QualityAction)); exports.AdvancedTouch = AdvancedTouch; //# sourceMappingURL=advanced-touch.js.map