@ffxiv-teamcraft/simulator
Version:
A FINAL FANTASY XIV crafting simulator
77 lines • 3.29 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.MuscleMemory = void 0;
var action_type_1 = require("../action-type");
var crafting_job_enum_1 = require("../../crafting-job.enum");
var progress_action_1 = require("../progress-action");
var buff_enum_1 = require("../../buff.enum");
var step_state_1 = require("../../step-state");
/**
* MuMe is just piece by piece with a different condition, cost and success rate.
*/
var MuscleMemory = /** @class */ (function (_super) {
__extends(MuscleMemory, _super);
function MuscleMemory() {
return _super !== null && _super.apply(this, arguments) || this;
}
MuscleMemory.prototype.getLevelRequirement = function () {
return { job: crafting_job_enum_1.CraftingJob.ANY, level: 54 };
};
MuscleMemory.prototype.getType = function () {
return action_type_1.ActionType.PROGRESSION;
};
MuscleMemory.prototype.execute = function (simulation) {
_super.prototype.execute.call(this, simulation);
simulation.buffs.push({
duration: simulation.state === step_state_1.StepState.PRIMED ? 7 : 5,
stacks: 0,
buff: buff_enum_1.Buff.MUSCLE_MEMORY,
appliedStep: simulation.steps.length,
});
};
MuscleMemory.prototype._canBeUsed = function (simulation) {
return simulation.steps.filter(function (step) { return !step.action.skipsBuffTicks(); }).length === 0;
};
MuscleMemory.prototype.canBeMoved = function (currentIndex) {
return currentIndex > 0;
};
MuscleMemory.prototype.getBaseCPCost = function (simulation) {
return 6;
};
MuscleMemory.prototype.getIds = function () {
return [100379, 100380, 100381, 100382, 100383, 100384, 100385, 100386];
};
MuscleMemory.prototype.getDurabilityCost = function (simulationState) {
return 10;
};
MuscleMemory.prototype._getSuccessRate = function (simulationState) {
return 100;
};
MuscleMemory.prototype.getBaseDurabilityCost = function (simulationState) {
return 10;
};
MuscleMemory.prototype.getBaseSuccessRate = function (simulationState) {
return 100;
};
MuscleMemory.prototype.getPotency = function (simulation) {
return 300;
};
return MuscleMemory;
}(progress_action_1.ProgressAction));
exports.MuscleMemory = MuscleMemory;
//# sourceMappingURL=muscle-memory.js.map