修复换装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
: '生命'|'生命上限'|'攻击'|'防御'|'法强'|'魔攻比例'|'护盾比例'|'黄钥匙'|'蓝钥匙'|'红钥匙'|'金币'|'经验'|'魔力'|'魔力上限'|'当前横坐标'|'当前纵坐标'|'当前朝向'|'攻击增益'|'防御增益'|'护盾增益' : '生命'|'生命上限'|'攻击'|'防御'|'法强'|'魔攻比例'|'护盾比例'|'法抗比例'|'黄钥匙'|'蓝钥匙'|'红钥匙'|'金币'|'经验'|'魔力'|'魔力上限'|'当前横坐标'|'当前纵坐标'|'当前朝向'|'攻击增益'|'防御增益'|'法强增益'|'魔攻增益'|'法抗增益'|'护盾增益'
/*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 Id_List
: '变量' | '状态' | '物品' | '增益' | '独立开关' | '临时变量' |'全局存储' : '变量' | '状态' | '物品' | '增益' | '独立开关' | '临时变量' |'全局存储'
@ -4640,8 +4640,8 @@ EnemyPoint_List
/*EnemyPoint_List ['hp','atk','def','money','exp','point','name']*/; /*EnemyPoint_List ['hp','atk','def','money','exp','point','name']*/;
Equip_List 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 Key_List
: '黄钥匙'|'蓝钥匙'|'红钥匙'|'绿钥匙'|'铁门钥匙' : '黄钥匙'|'蓝钥匙'|'红钥匙'|'绿钥匙'|'铁门钥匙'

View File

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

View File

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

View File

@ -3789,7 +3789,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
}; };
return loc; 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; w = Math.round(w) + 48;
h = Math.round(h); h = Math.round(h);
var ctx = core.ui.createCanvas("_selector", x - 24, y, w, h, 165); 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,
24 24
); );
}; };*/
enemys.prototype._nextCriticals_useBinarySearch = function ( enemys.prototype._nextCriticals_useBinarySearch = function (
enemy, enemy,
@ -3847,8 +3847,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
var mid = Math.floor((start + end) / 2); var mid = Math.floor((start + end) / 2);
if (mid - start > end - mid) mid--; if (mid - start > end - mid) mid--;
var nextInfo = core.enemys.getDamageInfo( var nextInfo = core.enemys.getDamageInfo(
enemy, enemy, { atk: mid },
{ atk: mid },
x, x,
y, y,
floorId floorId
@ -3858,17 +3857,15 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
else start = mid + 1; else start = mid + 1;
} }
var nextInfo = core.enemys.getDamageInfo( var nextInfo = core.enemys.getDamageInfo(
enemy, enemy, { atk: start },
{ atk: start },
x, x,
y, y,
floorId floorId
); );
return nextInfo == null || return nextInfo == null ||
typeof nextInfo == "number" || typeof nextInfo == "number" ||
nextInfo.damage >= pre nextInfo.damage >= pre ?
? null null : [start, nextInfo.damage];
: [start, nextInfo.damage];
}; };
var currAtk = start_atk; var currAtk = start_atk;
while (true) { while (true) {
@ -5285,9 +5282,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
var itembar_right = rightArrow_right; var itembar_right = rightArrow_right;
var boxName = var boxName =
core.status.event.id == "toolbox" core.status.event.id == "toolbox" ?
? "\r[yellow]道具栏\r | 装备栏" "\r[yellow]道具栏\r | 装备栏" :
: "道具栏 | \r[yellow]装备栏\r"; "道具栏 | \r[yellow]装备栏\r";
core.drawArrow( core.drawArrow(
ctx, ctx,
arrow_x + arrow_width, arrow_x + arrow_width,
@ -5636,6 +5633,18 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
(compare2?.percentage[name] || 0))) / (compare2?.percentage[name] || 0))) /
100 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; if (nowValue == newValue) continue;
var color = newValue > nowValue ? "#00FF00" : "#FF0000"; var color = newValue > nowValue ? "#00FF00" : "#FF0000";
nowValue = core.formatBigNumber(nowValue); nowValue = core.formatBigNumber(nowValue);
@ -5660,8 +5669,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
color: "white", color: "white",
align: "left", align: "left",
fontSize: itemTextFontSize, fontSize: itemTextFontSize,
maxWidth: maxWidth: rightbar_width -
rightbar_width -
(itemText_x - rightbar_x) * 2 + (itemText_x - rightbar_x) * 2 +
itemTextFontSize / 2, itemTextFontSize / 2,
}); });
@ -5673,8 +5681,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
color: "white", color: "white",
align: "left", align: "left",
fontSize: itemTextFontSize, fontSize: itemTextFontSize,
maxWidth: maxWidth: rightbar_width -
rightbar_width -
(itemText_x - rightbar_x) * 2 + (itemText_x - rightbar_x) * 2 +
itemTextFontSize / 2, itemTextFontSize / 2,
}); });
@ -5785,9 +5792,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
if (i === 1) name = "副手"; if (i === 1) name = "副手";
var selectBorder = false; var selectBorder = false;
if (core.status.thisUIEventInfo.select.type == i) selectBorder = true; if (core.status.thisUIEventInfo.select.type == i) selectBorder = true;
var borderStyle = selectBorder var borderStyle = selectBorder ?
? box_selectBorderStyle box_selectBorderStyle :
: box_borderStyle; box_borderStyle;
core.drawEquipbox_drawOne( core.drawEquipbox_drawOne(
ctx, ctx,
name, name,
@ -5877,9 +5884,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
name = toDrawList[i]; name = toDrawList[i];
var selectBorder = false; var selectBorder = false;
if (core.status.thisUIEventInfo.select.type == i) selectBorder = true; if (core.status.thisUIEventInfo.select.type == i) selectBorder = true;
var borderStyle = selectBorder var borderStyle = selectBorder ?
? box_selectBorderStyle box_selectBorderStyle :
: box_borderStyle; box_borderStyle;
core.drawEquipbox_drawOne( core.drawEquipbox_drawOne(
ctx, ctx,
name, name,
@ -6210,10 +6217,15 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.status.route.push("unEquip:" + 1); 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.loadEquip(id, function () {
core.status.route.push("equip:" + id); core.status.route.push("equip:" + id);
info.select.type = type; info.select.type = type;
core.setIndexAndSelect("select"); //core.setIndexAndSelect("select");
core.drawEquipbox(); core.drawEquipbox();
}); });
} else { } else {
@ -6222,7 +6234,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.status.route.push("unEquip:" + type); core.status.route.push("unEquip:" + type);
info.select.type = type; info.select.type = type;
//info.select.action = 'load' //info.select.action = 'load'
core.setIndexAndSelect("select"); //core.setIndexAndSelect("select");
core.drawEquipbox(); core.drawEquipbox();
}); });
} }
@ -18345,30 +18357,26 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
break; break;
case "fog": case "fog":
if (core.animateFrame.weather.fog) { if (core.animateFrame.weather.fog) {
core.animateFrame.weather.nodes[type] = [ core.animateFrame.weather.nodes[type] = [{
{
level: number, level: number,
x: 0, x: 0,
y: -core.__PIXELS__ / 2, y: -core.__PIXELS__ / 2,
dx: -Math.random() * 1.5, dx: -Math.random() * 1.5,
dy: Math.random(), dy: Math.random(),
delta: 0.001, delta: 0.001,
}, }, ];
];
} }
break; break;
case "cloud": case "cloud":
if (core.animateFrame.weather.cloud) { if (core.animateFrame.weather.cloud) {
core.animateFrame.weather.nodes[type] = [ core.animateFrame.weather.nodes[type] = [{
{
level: number, level: number,
x: 0, x: 0,
y: -core.__PIXELS__ / 2, y: -core.__PIXELS__ / 2,
dx: -Math.random() * 1.5, dx: -Math.random() * 1.5,
dy: Math.random(), dy: Math.random(),
delta: 0.001, delta: 0.001,
}, }, ];
];
} }
break; break;
case "sun": case "sun":
@ -18581,8 +18589,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
ctx, ctx,
"生命 " + "生命 " +
core.formatBigNumber(heroInfo.hp, true) + core.formatBigNumber(heroInfo.hp, true) +
" / " +
core.formatBigNumber(heroInfo.hpmax, true),
90, 90,
205, 205,
"#FFFFFF", "#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];
}
}
} }
} }