修复换装bug

This commit is contained in:
草莓 2025-02-05 17:24:37 +08:00
parent 058f7088b3
commit 4079bb9710
5 changed files with 2743 additions and 2698 deletions

View File

@ -4624,8 +4624,8 @@ IdString
;
FixedId_List
: '生命'|'生命上限'|'攻击'|'防御'|'法强'|'魔攻比例'|'护盾比例'|'黄钥匙'|'蓝钥匙'|'红钥匙'|'金币'|'经验'|'魔力'|'魔力上限'|'当前横坐标'|'当前纵坐标'|'当前朝向'|'攻击增益'|'防御增益'|'护盾增益'
/*FixedId_List ['status:hp','status:hpmax','status:atk','status:def','status:spell','status:matk','status:mdef','item:yellowKey','item:blueKey','item:redKey','status:money','status:exp','status:mana','status:manamax','status:x','status:y','status:direction','buff:atk','buff:def','buff:mdef']*/;
: '生命'|'生命上限'|'攻击'|'防御'|'法强'|'魔攻比例'|'护盾比例'|'法抗比例'|'黄钥匙'|'蓝钥匙'|'红钥匙'|'金币'|'经验'|'魔力'|'魔力上限'|'当前横坐标'|'当前纵坐标'|'当前朝向'|'攻击增益'|'防御增益'|'法强增益'|'魔攻增益'|'法抗增益'|'护盾增益'
/*FixedId_List ['status:hp','status:hpmax','status:atk','status:def','status:spell','status:matk','status:mhp','status:mdef','item:yellowKey','item:blueKey','item:redKey','status:money','status:exp','status:mana','status:manamax','status:x','status:y','status:direction','buff:atk','buff:def','buff:spell','buff:matk','buff:mdef','buff:mhp']*/;
Id_List
: '变量' | '状态' | '物品' | '增益' | '独立开关' | '临时变量' |'全局存储'
@ -4640,8 +4640,8 @@ EnemyPoint_List
/*EnemyPoint_List ['hp','atk','def','money','exp','point','name']*/;
Equip_List
: '生命'|'生命上限'|'攻击'|'防御'|'法强'|'魔攻比例'|'护盾比例'|'魔力'|'魔力上限'|'速度'
/*Equip_List ['hp','hpmax','atk','def','spell','matk','mdef','mana','manamax','speed']*/;
: '生命'|'生命上限'|'攻击'|'防御'|'法强'|'魔攻比例'|'护盾比例'|'法抗百分比'|'魔力'|'魔力上限'|'速度'
/*Equip_List ['hp','hpmax','atk','def','spell','matk','mhp','mdef','mana','manamax','speed']*/;
Key_List
: '黄钥匙'|'蓝钥匙'|'红钥匙'|'绿钥匙'|'铁门钥匙'

View File

@ -48,8 +48,8 @@ main.floors.yiqu1=
[140142, 0,120015,120028,201037, 0,201029, 0, 0, 0, 0, 0,110197],
[140150, 0, 0,120019, 0, 0,201029, 0,110189,140,110191, 0,110205],
[ 92, 0, 0,120019,201037,201037,201037, 0,110197,140,110199, 81,110224],
[ 0, 0, 0,120027, 0, 0, 0, 0,110197,140,110199, 0,110232],
[110191, 0, 0, 0, 0, 0,110189,140,140,140,110199, 0, 94],
[ 0, 0, 0,120027, 37, 37, 0, 0,110197,140,110199, 0,110232],
[110191, 0, 0, 0, 36, 35,110189,140,140,140,110199, 0, 94],
[110199,140,140,110191, 0, 0,110197,140,140,110204,110207, 0, 0],
[140,140,140,110199,90684,90684,110197,140,140,110199,110234, 0, 0],
[140,140,140,110199,100307,100308,110197,140,140,110199, 0, 0, 0]

View File

@ -1454,8 +1454,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// 请注意此项仅影响 libs/ 下的内容(如绘制怪物手册、数据统计等)
// 自行定义的(比如获得道具效果)中用到的“攻击+3”等需要自己去对应地方修改
return (
{
return ({
name: "名称",
lv: "等级",
hpmax: "生命上限",
@ -1466,14 +1465,14 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
def: "防御",
spell: "法强",
matk: "魔攻比例",
mdef: "护盾比例",
mhp: "护盾比例",
mdef: "法抗比例",
speed: "速度",
money: "金币",
exp: "经验",
point: "加点",
steps: "步数",
}[name] || name
);
} [name] || name);
},
"triggerDebuff": function (action, type) {
// 毒衰咒效果的获得与解除

View File

@ -151,7 +151,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"type": 0,
"animate": "sword",
"value": {
"atk": 10
"mdef": 10
},
"percentage": {}
},
@ -167,7 +167,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"type": "武器",
"animate": "sword",
"value": {
"atk": 20
"mdef": 20
},
"percentage": {}
},
@ -248,7 +248,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"equip": {
"type": 1,
"value": {
"def": 10
"mdef": 10
},
"percentage": {}
},

View File

@ -3789,7 +3789,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
};
return loc;
};
core.ui._drawWindowSelector = function (background, x, y, w, h) {
/* core.ui._drawWindowSelector = function (background, x, y, w, h) {
w = Math.round(w) + 48;
h = Math.round(h);
var ctx = core.ui.createCanvas("_selector", x - 24, y, w, h, 165);
@ -3818,7 +3818,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
24,
24
);
};
};*/
enemys.prototype._nextCriticals_useBinarySearch = function (
enemy,
@ -3847,8 +3847,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
var mid = Math.floor((start + end) / 2);
if (mid - start > end - mid) mid--;
var nextInfo = core.enemys.getDamageInfo(
enemy,
{ atk: mid },
enemy, { atk: mid },
x,
y,
floorId
@ -3858,17 +3857,15 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
else start = mid + 1;
}
var nextInfo = core.enemys.getDamageInfo(
enemy,
{ atk: start },
enemy, { atk: start },
x,
y,
floorId
);
return nextInfo == null ||
typeof nextInfo == "number" ||
nextInfo.damage >= pre
? null
: [start, nextInfo.damage];
nextInfo.damage >= pre ?
null : [start, nextInfo.damage];
};
var currAtk = start_atk;
while (true) {
@ -5285,9 +5282,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,
@ -5636,6 +5633,18 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
(compare2?.percentage[name] || 0))) /
100
);
/*if (name === 'mdef') {
nowValue = core.getRealStatus(name) + '%'
newValue = Math.floor(
((core.getStatus(name) +
((compare.value[name] || 0) +
(compare2?.value[name] || 0) - 2) * 100) *
(core.getBuff(name) * 100 +
(compare.percentage[name] || 0) +
(compare2?.percentage[name] || 0))) /
100
) + '%';
}*/
if (nowValue == newValue) continue;
var color = newValue > nowValue ? "#00FF00" : "#FF0000";
nowValue = core.formatBigNumber(nowValue);
@ -5660,8 +5669,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
color: "white",
align: "left",
fontSize: itemTextFontSize,
maxWidth:
rightbar_width -
maxWidth: rightbar_width -
(itemText_x - rightbar_x) * 2 +
itemTextFontSize / 2,
});
@ -5673,8 +5681,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
color: "white",
align: "left",
fontSize: itemTextFontSize,
maxWidth:
rightbar_width -
maxWidth: rightbar_width -
(itemText_x - rightbar_x) * 2 +
itemTextFontSize / 2,
});
@ -5785,9 +5792,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,
@ -5877,9 +5884,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
name = toDrawList[i];
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,
@ -6210,10 +6217,15 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.status.route.push("unEquip:" + 1);
});
}
if (equipCls0 === "双手剑" && !(equipClsid === "饰品" || equipClsid === "护具")) {
core.unloadEquip(0, function () {
core.status.route.push("unEquip:" + 0);
});
}
core.loadEquip(id, function () {
core.status.route.push("equip:" + id);
info.select.type = type;
core.setIndexAndSelect("select");
//core.setIndexAndSelect("select");
core.drawEquipbox();
});
} else {
@ -6222,7 +6234,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.status.route.push("unEquip:" + type);
info.select.type = type;
//info.select.action = 'load'
core.setIndexAndSelect("select");
//core.setIndexAndSelect("select");
core.drawEquipbox();
});
}
@ -18345,30 +18357,26 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
break;
case "fog":
if (core.animateFrame.weather.fog) {
core.animateFrame.weather.nodes[type] = [
{
core.animateFrame.weather.nodes[type] = [{
level: number,
x: 0,
y: -core.__PIXELS__ / 2,
dx: -Math.random() * 1.5,
dy: Math.random(),
delta: 0.001,
},
];
}, ];
}
break;
case "cloud":
if (core.animateFrame.weather.cloud) {
core.animateFrame.weather.nodes[type] = [
{
core.animateFrame.weather.nodes[type] = [{
level: number,
x: 0,
y: -core.__PIXELS__ / 2,
dx: -Math.random() * 1.5,
dy: Math.random(),
delta: 0.001,
},
];
}, ];
}
break;
case "sun":
@ -18581,8 +18589,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
ctx,
"生命 " +
core.formatBigNumber(heroInfo.hp, true) +
" / " +
core.formatBigNumber(heroInfo.hpmax, true),
90,
205,
"#FFFFFF",
@ -19564,5 +19570,45 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
["梅尔特", "「我忘记了」"],
["吉克", "「骗人」"],
];
},
"勇士法抗乘算叠加": function () {
// 在此增加新插件
items.prototype.compareEquipment = function (compareEquipId, beComparedEquipId) {
var result = { "value": {}, "percentage": {} };
var first = core.material.items[compareEquipId],
second = core.material.items[beComparedEquipId];
for (var one in result) {
for (var name in core.status.hero) {
if (name === "mdef" && one === 'value') {
var ans = 1;
if (first) ans *= (((first.equip || {})[one] || {})[name] || 0) / 100 + 1;
if (second) ans /= (((second.equip || {})[one] || {})[name] || 0) / 100 + 1;
if (ans != 1) result[one][name] = ans;
} else {
if (typeof core.status.hero[name] == 'number') {
var ans = 0;
if (first) ans += ((first.equip || {})[one] || {})[name] || 0;
if (second) ans -= ((second.equip || {})[one] || {})[name] || 0;
if (ans != 0) result[one][name] = ans;
}
}
}
}
return result;
}
items.prototype._loadEquipEffect = function (equipId, unloadEquipId) {
// 比较能力值
var result = core.compareEquipment(equipId, unloadEquipId);
for (var name in result.percentage)
core.addBuff(name, result.percentage[name] / 100);
for (var name in result.value)
if (name === 'mdef') {
core.status.hero[name] += (result.value[name] - 1) * 100
} else {
core.status.hero[name] += result.value[name];
}
}
}
}