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LkQSuOkkS8Tk1AFKk8ieIDVTCIkoSeMxHT1NrTSRIATiMvTFNM6iCDNSoMECApUAUJQfjA2BkBQbx4Q8xAtALOAUTQXBkHIeFHkYAAJA9MGCipwthCAcGYAwcBBKAGmC4BJnhAx6HQR5yXqf8fxWGFJkEIE8AkABBTBBwaQJnhkPxdIY4lYWYHB6Hihz4S2dBmEEZLio6DBsAA38dVKIgcTOSoKjlG4C2gARYCZBysBwbUiRYTAem8dBhDwLy4gm2BjACVh6CuqpijuxoDicbwWBujZ5EUZRyBaPYsHoBp7lGQcIDdJg5Dm6wzOsM5MQDMyeDMsy8TxIgzKIC5GlyWBYDBv0MdRBGzJcEmScxsxUhAQQZEwZLKcYBIS28tIMkp6mGuSlq3rkbxhCgAqEi5tgeZZ7BmCF9h6agNLnm2HBdggAZvHBCQ4BwABlWRtSOwdYChaG8TOHg8UGSY/M4WcSsmsr6hFMpXAd0hHedp3XdKABaExPdIb3fZMVw/Z9r3g6DoPKgd5byBoXJZE4F0oATLRUVYABeMQDEUb45kmNKNv2CQ0zMnAcUQPlBDOAhA2YMzS9yYnbD5TEzlRO0CDADlkaICJyGNegvJAPFBC5QREADTFYSIZhUWYWFUTAeHYUxRAcUEWEznm6xwlRRBEDAMzUTEPZ8YDGlBSRgg8SxQYgA=
|
@ -4596,8 +4596,8 @@ EnemyPoint_List
|
||||
/*EnemyPoint_List ['hp','atk','def','money','exp','point','name']*/;
|
||||
|
||||
Equip_List
|
||||
: '生命'|'生命上限'|'攻击'|'防御'|'护盾'|'魔力'|'魔力上限'
|
||||
/*Equip_List ['hp','hpmax','atk','def','mdef','mana','manamax']*/;
|
||||
: '力量'|'敏捷'|'智力'|'体质'|'生命'|'生命上限'|'攻击'|'物理防御'|'魔法防御'|'魔力'|'魔力上限'|'速度'
|
||||
/*Equip_List ['str','agi','int','con','hp','hpmax','atk','def','mdef','mana','manamax','speed']*/;
|
||||
|
||||
Key_List
|
||||
: '黄钥匙'|'蓝钥匙'|'红钥匙'|'绿钥匙'|'铁门钥匙'
|
||||
|
File diff suppressed because one or more lines are too long
@ -980,7 +980,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"equipName": [
|
||||
"武器",
|
||||
"武器",
|
||||
"防具",
|
||||
"护具",
|
||||
"饰品",
|
||||
"饰品"
|
||||
],
|
||||
"startBgm": "theme.mp3",
|
||||
@ -1053,10 +1054,10 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"steps": 0,
|
||||
"matk": 0,
|
||||
"speed": 0,
|
||||
"str": 10,
|
||||
"agi": 10,
|
||||
"int": 10,
|
||||
"con": 10,
|
||||
"str": 5,
|
||||
"agi": 5,
|
||||
"int": 5,
|
||||
"con": 5,
|
||||
"magic": false
|
||||
},
|
||||
"startCanvas": [
|
||||
|
@ -118,7 +118,7 @@ main.floors.street01=
|
||||
[110118,110118,200096,110116,110020, 0,200014, 0, 0, 0, 0, 0,110125],
|
||||
[ 92, 0, 0,110124, 0,201, 0, 0,110125,110122,110122,110122,110122],
|
||||
[ 0, 0, 0,110118,110118,202,110118,110118,110122, 0, 0, 0, 94],
|
||||
[130170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[130170, 0, 0, 0, 71, 35, 0, 0, 0, 0, 0, 0, 0],
|
||||
[130178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,130168,130169],
|
||||
[130225,130169,130169,130169,130169,130170,110122,110122,130168,130169,130169,130224,130177]
|
||||
],
|
||||
|
@ -38,4 +38,16 @@ main.floors.yiqu8=
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
],
|
||||
"bgmap": [
|
||||
|
||||
],
|
||||
"fgmap": [
|
||||
|
||||
],
|
||||
"bg2map": [
|
||||
|
||||
],
|
||||
"fg2map": [
|
||||
|
||||
]
|
||||
}
|
@ -151,7 +151,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"type": 0,
|
||||
"animate": "sword",
|
||||
"value": {
|
||||
"atk": 10
|
||||
"str": 10
|
||||
},
|
||||
"percentage": {}
|
||||
},
|
||||
@ -224,17 +224,22 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"equipCls": "匕首"
|
||||
},
|
||||
"shield0": {
|
||||
"cls": "items",
|
||||
"cls": "equips",
|
||||
"name": "破旧的盾",
|
||||
"text": "一个很破旧的铁盾",
|
||||
"equip": {
|
||||
"type": 1,
|
||||
"type": 2,
|
||||
"value": {
|
||||
"def": 0
|
||||
"str": 10,
|
||||
"agi": -5
|
||||
},
|
||||
"percentage": {
|
||||
"str": 10
|
||||
}
|
||||
},
|
||||
"itemEffect": "core.status.hero.def += 0",
|
||||
"itemEffectTip": ",防御+0"
|
||||
"itemEffectTip": ",防御+0",
|
||||
"equipCls": "护具"
|
||||
},
|
||||
"shield1": {
|
||||
"cls": "equips",
|
||||
|
@ -4987,9 +4987,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
|
||||
var itembar_right = rightArrow_right;
|
||||
var boxName =
|
||||
core.status.event.id == "toolbox"
|
||||
? "\r[yellow]道具栏\r | 装备栏"
|
||||
: "道具栏 | \r[yellow]装备栏\r";
|
||||
core.status.event.id == "toolbox" ?
|
||||
"\r[yellow]道具栏\r | 装备栏" :
|
||||
"道具栏 | \r[yellow]装备栏\r";
|
||||
core.drawArrow(
|
||||
ctx,
|
||||
arrow_x + arrow_width,
|
||||
@ -5264,6 +5264,16 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
itemText = core.replaceText(itemText);
|
||||
if (itemText[0] == "," || itemText[0] == ",")
|
||||
itemText = itemText.substring(1);
|
||||
if (itemCls === 'equips' && item.id) {
|
||||
let text = ""
|
||||
|
||||
switch (item.id) { //此处写道具效果描述\n表示换行
|
||||
case 'sword1':
|
||||
text = "普通攻击属性:物理\n作为主手时:物理攻击=力量+敏捷(" + (core.getRealStatusOrDefault(hero, 'str') + core.getRealStatusOrDefault(hero, 'agi')) + ")\n作为副手时:物理攻击+敏捷(" + core.getRealStatusOrDefault(hero, 'agi') + ")"
|
||||
break;
|
||||
}
|
||||
itemText = text ? '【装备效果】\n' + text : ""
|
||||
}
|
||||
/* 一个根据道具id修改道具名字(右栏)的例子
|
||||
* if (item.id == "xxx") itemNameColor = "red";
|
||||
*/
|
||||
@ -5291,6 +5301,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
);
|
||||
core.setTextAlign(ctx, "left");
|
||||
core.setTextBaseline(ctx, "middle");
|
||||
if (itemCls === 'equips' && item.id) {
|
||||
itemName = "【" + item.equipCls + "】" + itemName
|
||||
}
|
||||
core.fillText(
|
||||
ctx,
|
||||
itemName,
|
||||
@ -5300,7 +5313,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
itemNameFont,
|
||||
itemNameMaxWidth
|
||||
);
|
||||
core.fillText(
|
||||
if (!item.equip) core.fillText(
|
||||
ctx,
|
||||
"【" + itemClsName + "】",
|
||||
itemCls_x,
|
||||
@ -5308,7 +5321,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
itemClsColor,
|
||||
itemClsFont
|
||||
);
|
||||
var statusText = "【装备类型】" + item.equipCls + "\n\n";
|
||||
|
||||
/*if (core.status.event.id == "equipbox") {
|
||||
var type = item.equip.type;
|
||||
if (typeof type == "string") type = core.getEquipTypeByName(type);
|
||||
@ -5328,7 +5341,118 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
statusText += core.getStatusLabel(name) + " " + nowValue + "->\r[" + color + "]" + newValue + "\r\n";
|
||||
}
|
||||
}*/
|
||||
itemText = statusText + itemText;
|
||||
const equipValue = core.material.items[item.id]?.equip
|
||||
if (equipValue) {
|
||||
let value = ""
|
||||
for (const a in equipValue.value) {
|
||||
switch (a) {
|
||||
case "str":
|
||||
value += equipValue.value[a] > 0 ? "力量+" + equipValue.value[a] + '\n' : "力量" + equipValue.value[a] + '\n'
|
||||
break;
|
||||
case "agi":
|
||||
value += equipValue.value[a] > 0 ? "敏捷+" + equipValue.value[a] + '\n' : "敏捷" + equipValue.value[a] + '\n'
|
||||
break;
|
||||
case "int":
|
||||
value += equipValue.value[a] > 0 ? "智力+" + equipValue.value[a] + '\n' : "智力" + equipValue.value[a] + '\n'
|
||||
break;
|
||||
case "con":
|
||||
value += equipValue.value[a] > 0 ? "体质+" + equipValue.value[a] + '\n' : "体质" + equipValue.value[a] + '\n'
|
||||
break;
|
||||
case "hpmax":
|
||||
value += equipValue.value[a] > 0 ? "生命上限+" + equipValue.value[a] + '\n' : "生命上限" + equipValue.value[a] + '\n'
|
||||
break;
|
||||
case "manamax":
|
||||
value += equipValue.value[a] > 0 ? "魔力上限+" + equipValue.value[a] + '\n' : "魔力上限" + equipValue.value[a] + '\n'
|
||||
break;
|
||||
case "atk":
|
||||
value += equipValue.value[a] > 0 ? "攻击+" + equipValue.value[a] + '\n' : "攻击" + equipValue.value[a] + '\n'
|
||||
break;
|
||||
case "def":
|
||||
value += equipValue.value[a] > 0 ? "物理防御+" + equipValue.value[a] + '\n' : "物理防御" + equipValue.value[a] + '\n'
|
||||
break;
|
||||
case "mdef":
|
||||
value += equipValue.value[a] > 0 ? "魔法防御+" + equipValue.value[a] + '\n' : "魔法防御" + equipValue.value[a] + '\n'
|
||||
break;
|
||||
case "speed":
|
||||
value += equipValue.value[a] > 0 ? "速度+" + equipValue.value[a] + '\n' : "速度" + equipValue.value[a] + '\n'
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
for (const a in equipValue.percentage) {
|
||||
switch (a) {
|
||||
case "str":
|
||||
value += equipValue.percentage[a] > 0 ? "力量+" + equipValue.percentage[a] + '%\n' : "力量" + equipValue.percentage[a] + '%\n'
|
||||
break;
|
||||
case "agi":
|
||||
value += equipValue.percentage[a] > 0 ? "敏捷+" + equipValue.percentage[a] + '%\n' : "敏捷" + equipValue.percentage[a] + '%\n'
|
||||
break;
|
||||
case "int":
|
||||
value += equipValue.percentage[a] > 0 ? "智力+" + equipValue.percentage[a] + '%\n' : "智力" + equipValue.percentage[a] + '%\n'
|
||||
break;
|
||||
case "con":
|
||||
value += equipValue.percentage[a] > 0 ? "体质+" + equipValue.percentage[a] + '%\n' : "体质" + equipValue.percentage[a] + '%\n'
|
||||
break;
|
||||
case "hpmax":
|
||||
value += equipValue.percentage[a] > 0 ? "生命上限+" + equipValue.percentage[a] + '%\n' : "生命上限" + equipValue.percentage[a] + '%\n'
|
||||
break;
|
||||
case "manamax":
|
||||
value += equipValue.percentage[a] > 0 ? "魔力上限+" + equipValue.percentage[a] + '%\n' : "魔力上限" + equipValue.percentage[a] + '%\n'
|
||||
break;
|
||||
case "atk":
|
||||
value += equipValue.percentage[a] > 0 ? "攻击+" + equipValue.percentage[a] + '%\n' : "攻击" + equipValue.percentage[a] + '%\n'
|
||||
break;
|
||||
case "def":
|
||||
value += equipValue.percentage[a] > 0 ? "物理防御+" + equipValue.percentage[a] + '%\n' : "物理防御" + equipValue.percentage[a] + '%\n'
|
||||
break;
|
||||
case "mdef":
|
||||
value += equipValue.percentage[a] > 0 ? "魔法防御+" + equipValue.percentage[a] + '%\n' : "魔法防御" + equipValue.percentage[a] + '%\n'
|
||||
break;
|
||||
case "speed":
|
||||
value += equipValue.percentage[a] > 0 ? "速度+" + equipValue.percentage[a] + '%\n' : "速度" + equipValue.percentage[a] + '%\n'
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
if (value !== '') itemText += "\n\n【装备属性】\n" + value
|
||||
}
|
||||
|
||||
|
||||
|
||||
let needText = '\n【装备需求】\n'
|
||||
|
||||
const need = core.plugin.equipNeed[item.id]
|
||||
if (need) {
|
||||
for (const a in need) {
|
||||
switch (a) {
|
||||
case "str":
|
||||
needText += "力量【" + need[a] + '】\n'
|
||||
break;
|
||||
case "agi":
|
||||
needText += "敏捷【" + need[a] + '】\n'
|
||||
break;
|
||||
case "int":
|
||||
needText += "智力【" + need[a] + '】\n'
|
||||
break;
|
||||
case "con":
|
||||
needText += "体质【" + need[a] + '】\n'
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
itemText = need ? itemText + needText : itemText
|
||||
if (item.equip) {
|
||||
core.drawTextContent(ctx, itemText, {
|
||||
left: itemText_x,
|
||||
top: itemCls_middle,
|
||||
bold: false,
|
||||
color: "white",
|
||||
align: "left",
|
||||
fontSize: itemTextFontSize,
|
||||
maxWidth: rightbar_width - (itemText_x - rightbar_x) * 2 + itemTextFontSize / 2,
|
||||
});
|
||||
} else {
|
||||
core.drawTextContent(ctx, itemText, {
|
||||
left: itemText_x,
|
||||
top: itemText_y,
|
||||
@ -5336,9 +5460,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
color: "white",
|
||||
align: "left",
|
||||
fontSize: itemTextFontSize,
|
||||
maxWidth:
|
||||
rightbar_width - (itemText_x - rightbar_x) * 2 + itemTextFontSize / 2,
|
||||
maxWidth: rightbar_width - (itemText_x - rightbar_x) * 2 + itemTextFontSize / 2,
|
||||
});
|
||||
}
|
||||
|
||||
///// *** 退出按钮设置
|
||||
var btnRadius = 10;
|
||||
@ -5445,9 +5569,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
if (i === 1) name = "副手";
|
||||
var selectBorder = false;
|
||||
if (core.status.thisUIEventInfo.select.type == i) selectBorder = true;
|
||||
var borderStyle = selectBorder
|
||||
? box_selectBorderStyle
|
||||
: box_borderStyle;
|
||||
var borderStyle = selectBorder ?
|
||||
box_selectBorderStyle :
|
||||
box_borderStyle;
|
||||
core.drawEquipbox_drawOne(
|
||||
ctx,
|
||||
name,
|
||||
@ -5800,10 +5924,13 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
let equipClsid = core.material.items[id]?.equipCls;
|
||||
let equipCls0 = core.material.items[core.getEquip(0)]?.equipCls;
|
||||
let equipCls1 = core.material.items[core.getEquip(1)]?.equipCls;
|
||||
if (equipCls0 === "双手剑") {
|
||||
if (equipClsid === "双手剑") {
|
||||
core.unloadEquip(0, function () {
|
||||
core.status.route.push("unEquip:" + 0);
|
||||
});
|
||||
core.unloadEquip(1, function () {
|
||||
core.status.route.push("unEquip:" + 1);
|
||||
});
|
||||
}
|
||||
if (equipClsid === "单手剑") {
|
||||
if (
|
||||
@ -5873,12 +6000,35 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
});
|
||||
}
|
||||
}
|
||||
if (equipClsid === "护具") {
|
||||
core.unloadEquip(2, function () {
|
||||
core.status.route.push("unEquip:" + 2);
|
||||
});
|
||||
}
|
||||
if (equipClsid === "饰品" && core.getEquip(3) && core.getEquip(4)) {
|
||||
|
||||
core.unloadEquip(4, function () {
|
||||
core.status.route.push("unEquip:" + 4);
|
||||
});
|
||||
}
|
||||
|
||||
const idneed = core.plugin.equipNeed[id]
|
||||
let canload = true
|
||||
if (core.plugin.equipNeed[id]) {
|
||||
for (const a in idneed) {
|
||||
if (core.status.hero[a] < idneed[a]) canload = false
|
||||
}
|
||||
}
|
||||
if (canload) {
|
||||
core.loadEquip(id, function () {
|
||||
core.status.route.push("equip:" + id);
|
||||
info.select.type = type;
|
||||
core.setIndexAndSelect("select");
|
||||
core.drawEquipbox();
|
||||
});
|
||||
} else {
|
||||
core.drawTip("未达装备需求")
|
||||
}
|
||||
} else {
|
||||
var type = info.select.type;
|
||||
core.unloadEquip(type, function () {
|
||||
@ -13829,8 +13979,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
},
|
||||
"属性映射": function () {
|
||||
// 在此增加新插件
|
||||
this.statusEquip = function () {
|
||||
const hero = core.status.hero;
|
||||
this.statusEquip = function (hero = core.status.hero) {
|
||||
//装备具体效果在这里写,道具填写道具类型为equip并选择装备类型,道具的装备属性中装备类型遵循以下填写方式:
|
||||
//固定装备孔的填写0/1/2/3,分别对应主手、副手、防具、饰品
|
||||
//主副手同时可使用的,填写 武器
|
||||
@ -13840,20 +13989,20 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
if (core.getEquip[0]) {
|
||||
switch (core.getEquip[0]) {
|
||||
case "sword1":
|
||||
hero.atk = hero.str + hero.agi;
|
||||
hero.atk = hero_str + hero_agi;
|
||||
hero.magic = false;
|
||||
break;
|
||||
case "twoHandedSword1":
|
||||
hero.atk = Math.floor(hero.str * 2 + hero.con / 10);
|
||||
hero.atk = Math.floor(hero_str * 2 + hero_con / 10);
|
||||
hero.magic = false;
|
||||
break;
|
||||
case "wand1":
|
||||
hero.atk = hero.str + hero.int;
|
||||
hero.atk = hero_str + hero_int;
|
||||
hero.magic = true;
|
||||
break;
|
||||
case "knife1":
|
||||
hero.atk = Math.floor(hero.agi * 1.2);
|
||||
hero.speed = hero.agi * 2 + hero.int;
|
||||
hero.atk = Math.floor(hero_agi * 1.2);
|
||||
hero.speed = hero_agi * 2 + hero_int;
|
||||
hero.magic = false;
|
||||
break;
|
||||
}
|
||||
@ -13862,12 +14011,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
if (core.getEquip[1]) {
|
||||
switch (core.getEquip[1]) {
|
||||
case "sword1":
|
||||
hero.atk += hero.agi;
|
||||
hero.atk += hero_agi;
|
||||
break;
|
||||
case "knife1":
|
||||
hero.speed += Math.floor(hero.agi * 0.6);
|
||||
hero.speed += Math.floor(hero_agi * 0.6);
|
||||
if (core.getEquip[0] === "knife1") {
|
||||
hero.atk += Math.floor(hero.agi * 0.6);
|
||||
hero.atk += Math.floor(hero_agi * 0.6);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -13876,12 +14025,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
if (core.getEquip[2]) {
|
||||
switch (core.getEquip[2]) {
|
||||
case "armor1":
|
||||
hero.def = hero.con + hero.agi;
|
||||
hero.hpmax = Math.floor(2.5 * hero.con);
|
||||
hero.def = hero_con + hero_agi;
|
||||
hero.hpmax = Math.floor(2.5 * hero_con);
|
||||
break;
|
||||
case "armor2":
|
||||
hero.mdef = hero.con + hero.int;
|
||||
hero.hpmax = hero.con * 2 + hero.int;
|
||||
hero.mdef = hero_con + hero_int;
|
||||
hero.hpmax = hero_con * 2 + hero_int;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -13889,22 +14038,44 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
if (core.getEquip[3]) {
|
||||
switch (core.getEquip[3]) {
|
||||
case "jewel1":
|
||||
hero.speed += Math.floor(0.4 * hero.int + 0.6 * hero.agi);
|
||||
hero.speed += Math.floor(0.4 * hero_int + 0.6 * hero_agi);
|
||||
break;
|
||||
}
|
||||
}
|
||||
const list = ['str', 'agi', 'int', 'con'] //四维
|
||||
//处理当前装备数值效果(四维数值已经处理过,无需再次处理)
|
||||
for (let i = 0; i < 5; i++) {
|
||||
const value = core.material.items[core.getEquip(i)]?.value
|
||||
if (value) {
|
||||
for (let item in value) {
|
||||
if (!list.includes(item)) hero[item] += value[item]
|
||||
}
|
||||
}
|
||||
}
|
||||
return hero
|
||||
};
|
||||
this.equipNeed = { //装备需求(无需求装备不写,只写需求的属性,无要求属性不写)
|
||||
"sword1": { str: 10 },
|
||||
"knife1": { str: 5, agi: 5 }
|
||||
|
||||
}
|
||||
this.updateStatus = function () {
|
||||
const hero = core.status.hero;
|
||||
let hero = core.status.hero;
|
||||
//core.getRealStatusOrDefault计算增幅后属性
|
||||
const hero_str = core.getRealStatusOrDefault(hero, 'str')
|
||||
const hero_agi = core.getRealStatusOrDefault(hero, 'agi')
|
||||
const hero_int = core.getRealStatusOrDefault(hero, 'int')
|
||||
const hero_con = core.getRealStatusOrDefault(hero, 'con')
|
||||
|
||||
//默认映射关系
|
||||
hero.hpmax = hero.str * 100 + hero.con * 100;
|
||||
hero.atk = hero.str + hero.int;
|
||||
hero.manamax = hero.agi + hero.int;
|
||||
hero.def = hero.con + hero.agi;
|
||||
hero.mdef = hero.con + hero.int;
|
||||
hero.speed = hero.str + hero.agi;
|
||||
hero.hpmax = hero_str * 100 + hero_con * 100;
|
||||
hero.atk = hero_str + hero_int;
|
||||
hero.manamax = hero_agi + hero_int;
|
||||
hero.def = hero_con + hero_agi;
|
||||
hero.mdef = hero_con + hero_int;
|
||||
hero.speed = hero_str + hero_agi;
|
||||
hero.magic = false;
|
||||
this.statusEquip(); //处理装备效果
|
||||
hero = this.statusEquip(hero); //处理装备效果
|
||||
for (let v in hero) {
|
||||
//归整
|
||||
if (typeof hero[v] === "number") {
|
||||
|
Loading…
Reference in New Issue
Block a user