mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2025-07-17 09:33:55 +08:00
1 line
28 KiB
JavaScript
1 line
28 KiB
JavaScript
"use strict";(self.webpackChunklife_restart=self.webpackChunklife_restart||[]).push([[614],{2614:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (/* binding */ Property)\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1249);\n/* harmony import */ var core_js_modules_es_array_fill_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3290);\n/* harmony import */ var core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1058);\n/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6992);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1539);\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8783);\n/* harmony import */ var core_js_modules_es_weak_map_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4129);\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3948);\n/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8304);\n/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(489);\n/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(2419);\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(2526);\n/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(1817);\n/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(2165);\nfunction _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\n\nfunction _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }\n\nfunction _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }\n\nfunction _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\n\nfunction _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\n\nfunction _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }\n\nfunction _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }\n\nvar _types = /*#__PURE__*/new WeakMap();\n\nvar _propertyPoints = /*#__PURE__*/new WeakMap();\n\nvar _propertyAllocate = /*#__PURE__*/new WeakMap();\n\nvar _propertyAllocateLimit = /*#__PURE__*/new WeakMap();\n\nvar Property = /*#__PURE__*/function (_ui$view$DefaultTheme) {\n _inherits(Property, _ui$view$DefaultTheme);\n\n var _super = _createSuper(Property);\n\n function Property() {\n var _this;\n\n _classCallCheck(this, Property);\n\n _this = _super.call(this);\n\n _classPrivateFieldInitSpec(_assertThisInitialized(_this), _types, {\n writable: true,\n value: void 0\n });\n\n _classPrivateFieldInitSpec(_assertThisInitialized(_this), _propertyPoints, {\n writable: true,\n value: void 0\n });\n\n _classPrivateFieldInitSpec(_assertThisInitialized(_this), _propertyAllocate, {\n writable: true,\n value: void 0\n });\n\n _classPrivateFieldInitSpec(_assertThisInitialized(_this), _propertyAllocateLimit, {\n writable: true,\n value: void 0\n });\n\n var types = _classPrivateFieldSet(_assertThisInitialized(_this), _types, core.PropertyTypes);\n\n _this.btnCharmIncrease.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.CHR, 1]);\n\n _this.btnCharmReduce.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.CHR, -1]);\n\n _this.btnIntelligenceIncrease.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.INT, 1]);\n\n _this.btnIntelligenceReduce.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.INT, -1]);\n\n _this.btnStrengthIncrease.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.STR, 1]);\n\n _this.btnStrengthReduce.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.STR, -1]);\n\n _this.btnMoneyIncrease.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.MNY, 1]);\n\n _this.btnMoneyReduce.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.onPropertyAllocate, [types.MNY, -1]);\n\n _this.inputCharm.on(Laya.Event.INPUT, _assertThisInitialized(_this), _this.onPropertyAllocateInput, [types.CHR]);\n\n _this.inputIntelligence.on(Laya.Event.INPUT, _assertThisInitialized(_this), _this.onPropertyAllocateInput, [types.INT]);\n\n _this.inputStrength.on(Laya.Event.INPUT, _assertThisInitialized(_this), _this.onPropertyAllocateInput, [types.STR]);\n\n _this.inputMoney.on(Laya.Event.INPUT, _assertThisInitialized(_this), _this.onPropertyAllocateInput, [types.MNY]);\n\n var selectAll = function selectAll(_ref) {\n var item = _ref.currentTarget;\n item.text = \'\';\n };\n\n _this.inputCharm.on(Laya.Event.MOUSE_DOWN, _assertThisInitialized(_this), selectAll);\n\n _this.inputIntelligence.on(Laya.Event.MOUSE_DOWN, _assertThisInitialized(_this), selectAll);\n\n _this.inputStrength.on(Laya.Event.MOUSE_DOWN, _assertThisInitialized(_this), selectAll);\n\n _this.inputMoney.on(Laya.Event.MOUSE_DOWN, _assertThisInitialized(_this), selectAll);\n\n _this.btnRandomAllocate.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.random);\n\n _this.btnNext.on(Laya.Event.CLICK, _assertThisInitialized(_this), _this.next);\n\n _this.listSelectedTalents.renderHandler = Laya.Handler.create(_assertThisInitialized(_this), _this.renderTalent, null, false);\n return _this;\n }\n\n _createClass(Property, [{\n key: "init",\n value: function init(_ref2) {\n var _classPrivateFieldSet2;\n\n var talents = _ref2.talents;\n this.listSelectedTalents.array = talents;\n var replace = core.remake(talents.map(function (talent) {\n return talent.id;\n }));\n\n if (replace.length > 0) {\n $$event(\'message\', [replace.map(function (v) {\n return [\'F_TalentReplace\', v];\n })]);\n }\n\n _classPrivateFieldSet(this, _propertyPoints, core.getPropertyPoints());\n\n _classPrivateFieldSet(this, _propertyAllocateLimit, core.propertyAllocateLimit);\n\n this.labLeftPropertyPoint.text = _classPrivateFieldGet(this, _propertyPoints);\n\n _classPrivateFieldSet(this, _propertyAllocate, (_classPrivateFieldSet2 = {}, _defineProperty(_classPrivateFieldSet2, _classPrivateFieldGet(this, _types).CHR, 0), _defineProperty(_classPrivateFieldSet2, _classPrivateFieldGet(this, _types).INT, 0), _defineProperty(_classPrivateFieldSet2, _classPrivateFieldGet(this, _types).STR, 0), _defineProperty(_classPrivateFieldSet2, _classPrivateFieldGet(this, _types).MNY, 0), _classPrivateFieldSet2));\n\n this.updateAllocate();\n }\n }, {\n key: "next",\n value: function next() {\n var left = _classPrivateFieldGet(this, _propertyPoints) - this.total;\n\n if (left > 0) {\n return $$event(\'message\', [\'F_PropertyPointLeft\', left]);\n }\n\n $ui.switchView(UI.pages.TRAJECTORY, {\n propertyAllocate: _classPrivateFieldGet(this, _propertyAllocate),\n talents: this.listSelectedTalents.array,\n enableExtend: true\n });\n }\n }, {\n key: "total",\n get: function get() {\n return _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).CHR] + _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).INT] + _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).STR] + _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).MNY];\n }\n }, {\n key: "updateAllocate",\n value: function updateAllocate() {\n var charm = _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).CHR];\n\n var intelligence = _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).INT];\n\n var strength = _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).STR];\n\n var money = _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).MNY];\n\n this.inputCharm.text = \'\' + charm;\n this.inputIntelligence.text = \'\' + intelligence;\n this.inputStrength.text = \'\' + strength;\n this.inputMoney.text = \'\' + money;\n this.labLeftPropertyPoint.text = _classPrivateFieldGet(this, _propertyPoints) - this.total;\n this.btnCharmIncrease.disabled = this.btnCharmIncrease.gray = false;\n this.btnCharmReduce.disabled = this.btnCharmReduce.gray = false;\n this.btnIntelligenceIncrease.disabled = this.btnIntelligenceIncrease.gray = false;\n this.btnIntelligenceReduce.disabled = this.btnIntelligenceReduce.gray = false;\n this.btnStrengthIncrease.disabled = this.btnStrengthIncrease.gray = false;\n this.btnStrengthReduce.disabled = this.btnStrengthReduce.gray = false;\n this.btnMoneyIncrease.disabled = this.btnMoneyIncrease.gray = false;\n this.btnMoneyReduce.disabled = this.btnMoneyReduce.gray = false;\n }\n }, {\n key: "check",\n value: function check(left, right, value) {\n if (value < left) return false;\n if (value > right) return false;\n return true;\n }\n }, {\n key: "random",\n value: function random() {\n var t = _classPrivateFieldGet(this, _propertyPoints);\n\n var arr = new Array(4).fill(_classPrivateFieldGet(this, _propertyAllocateLimit)[1]);\n\n while (t > 0) {\n var sub = Math.round(Math.random() * (Math.min(t, _classPrivateFieldGet(this, _propertyAllocateLimit)[1]) - 1)) + 1;\n\n while (true) {\n var select = Math.floor(Math.random() * 4) % 4;\n if (arr[select] - sub < 0) continue;\n arr[select] -= sub;\n t -= sub;\n break;\n }\n }\n\n _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).CHR] = _classPrivateFieldGet(this, _propertyAllocateLimit)[1] - arr[0];\n _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).INT] = _classPrivateFieldGet(this, _propertyAllocateLimit)[1] - arr[1];\n _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).STR] = _classPrivateFieldGet(this, _propertyAllocateLimit)[1] - arr[2];\n _classPrivateFieldGet(this, _propertyAllocate)[_classPrivateFieldGet(this, _types).MNY] = _classPrivateFieldGet(this, _propertyAllocateLimit)[1] - arr[3];\n this.updateAllocate();\n }\n }, {\n key: "onPropertyAllocate",\n value: function onPropertyAllocate(type, value) {\n if (!this.check(_classPrivateFieldGet(this, _propertyAllocateLimit)[0], _classPrivateFieldGet(this, _propertyAllocateLimit)[1], _classPrivateFieldGet(this, _propertyAllocate)[type] + value)) {\n return;\n }\n\n if (!this.check(0, _classPrivateFieldGet(this, _propertyPoints), this.total + value)) {\n return;\n }\n\n _classPrivateFieldGet(this, _propertyAllocate)[type] += value;\n this.updateAllocate();\n }\n }, {\n key: "onPropertyAllocateInput",\n value: function onPropertyAllocateInput(type, inputItem) {\n var value = parseInt(inputItem.text) || 0;\n var total = this.total;\n\n if (total + value < 0) {\n value = _classPrivateFieldGet(this, _propertyAllocateLimit)[0] * 4 - total;\n } else if (total + value > _classPrivateFieldGet(this, _propertyPoints)) {\n value = _classPrivateFieldGet(this, _propertyPoints) - total;\n }\n\n if (value < _classPrivateFieldGet(this, _propertyAllocateLimit)[0]) {\n value = _classPrivateFieldGet(this, _propertyAllocateLimit)[0];\n } else if (value > _classPrivateFieldGet(this, _propertyAllocateLimit)[1]) {\n value = _classPrivateFieldGet(this, _propertyAllocateLimit)[1];\n }\n\n var alter = value - _classPrivateFieldGet(this, _propertyAllocate)[type];\n\n if (alter) {\n this.onPropertyAllocate(type, alter);\n } else {\n this.updateAllocate();\n }\n }\n }, {\n key: "renderTalent",\n value: function renderTalent(box) {\n var dataSource = box.dataSource;\n box.label = $_.format($lang.F_TalentSelection, dataSource);\n var style = $ui.common.card[dataSource.grade].normal;\n $_.deepMapSet(box, style);\n }\n }]);\n\n return Property;\n}(ui.view.DefaultTheme.PropertyUI);\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjYxNC5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7Ozs7O0FBQ0E7QUFBQTs7QUFBQTs7QUFDQTs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xyXG4gICAgICAgIGNvbnN0IGFsdGVyID0gdmFsdWUgLSB0aGlzLiNwcm9wZXJ0eUFsbG9jYXRlW3R5cGVdO1xyXG4gICAgICAgIGlmIChhbHRlcikge1xyXG4gICAgICAgICAgICB0aGlzLm9uUHJvcGVydHlBbGxvY2F0ZSh0eXBlLCBhbHRlcik7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgdGhpcy51cGRhdGVBbGxvY2F0ZSgpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICByZW5kZXJUYWxlbnQoYm94KSB7XHJcbiAgICAgICAgY29uc3QgZGF0YVNvdXJjZSA9IGJveC5kYXRhU291cmNlO1xyXG5cclxuICAgICAgICBib3gubGFiZWwgPSAkXy5mb3JtYXQoJGxhbmcuRl9UYWxlbnRTZWxlY3Rpb24sIGRhdGFTb3VyY2UpO1xyXG4gICAgICAgIGNvbnN0IHN0eWxlID0gJHVpLmNvbW1vbi5jYXJkW2RhdGFTb3VyY2UuZ3JhZGVdLm5vcm1hbDtcclxuXHJcbiAgICAgICAgJF8uZGVlcE1hcFNldChib3gsIHN0eWxlKTtcclxuICAgIH1cclxufSJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///2614\n')}}]); |