UNPKG

borderlands2

Version:

Borderlands 2 weapon damage and DPS calculation library

137 lines 5.01 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 (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var _a; Object.defineProperty(exports, "__esModule", { value: true }); var stat_type_1 = require("../value_object/stat_type"); // TODO: Red Text can just be the weapon name, no? var RedTextEnum; (function (RedTextEnum) { RedTextEnum["DeDa"] = "De Da."; RedTextEnum["LadyFist"] = "Love is a Lady Finger. True love is a Lady Fist."; RedTextEnum["Gar"] = "Gar! Gorarr! My dad's a scientist! GWARRRR!!!!"; RedTextEnum["ByThePeople"] = "By the people. For the people."; RedTextEnum["GoodForStartingFires"] = "Good for starting fires."; RedTextEnum["PeleHumblyRequestsASacrifice"] = "Pele humbly requests a sacrifice, if it's not too much trouble"; RedTextEnum["FearTheSwarm"] = "Fear the swarm!"; })(RedTextEnum = exports.RedTextEnum || (exports.RedTextEnum = {})); var RedText = /** @class */ (function () { function RedText() { } RedText.prototype.getStat = function (statType) { var _a; var statValue = (_a = this.stats.find(function (stat) { return stat.type === statType; })) === null || _a === void 0 ? void 0 : _a.value; return statValue || 0; }; return RedText; }()); var DeDa = /** @class */ (function (_super) { __extends(DeDa, _super); function DeDa() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.stats = []; return _this; } return DeDa; }(RedText)); var LadyFist = /** @class */ (function (_super) { __extends(LadyFist, _super); function LadyFist() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.stats = [{ type: stat_type_1.StatType.CritHitDamage, value: 8 }]; return _this; } return LadyFist; }(RedText)); var Gar = /** @class */ (function (_super) { __extends(Gar, _super); function Gar() { var _this = _super !== null && _super.apply(this, arguments) || this; /* There is no crit stats on this thing despite what the wiki says... protected stats : Stat[] = [{ type: StatType.CritHitDamage, value: 0.5 },{ type: StatType.CritHitMultiplier, value: 0.15 }] */ _this.stats = []; return _this; } return Gar; }(RedText)); var ByThePeople = /** @class */ (function (_super) { __extends(ByThePeople, _super); function ByThePeople() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.stats = [{ type: stat_type_1.StatType.SplashDamage, value: 0.7 }]; return _this; } return ByThePeople; }(RedText)); var GoodForStartingFires = /** @class */ (function (_super) { __extends(GoodForStartingFires, _super); function GoodForStartingFires() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.stats = []; return _this; } return GoodForStartingFires; }(RedText)); var PeleHumblyRequestsASacrifice = /** @class */ (function (_super) { __extends(PeleHumblyRequestsASacrifice, _super); function PeleHumblyRequestsASacrifice() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.stats = [{ type: stat_type_1.StatType.SplashDamage, value: 0.8 }]; return _this; } return PeleHumblyRequestsASacrifice; }(RedText)); var FearTheSwarm = /** @class */ (function (_super) { __extends(FearTheSwarm, _super); function FearTheSwarm() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.stats = [{ type: stat_type_1.StatType.SplashDamage, value: 0.8 }]; return _this; } return FearTheSwarm; }(RedText)); var RedTextClassEnum = (_a = {}, _a[RedTextEnum.DeDa] = DeDa, _a[RedTextEnum.LadyFist] = LadyFist, _a[RedTextEnum.Gar] = Gar, _a[RedTextEnum.ByThePeople] = ByThePeople, _a[RedTextEnum.GoodForStartingFires] = GoodForStartingFires, _a[RedTextEnum.PeleHumblyRequestsASacrifice] = PeleHumblyRequestsASacrifice, _a[RedTextEnum.FearTheSwarm] = FearTheSwarm, _a); function RedTextFactory(enumVal) { return new RedTextClassEnum[enumVal](); } exports.RedTextFactory = RedTextFactory; //# sourceMappingURL=red_text.js.map