修复XY5宝箱数量错误; 方向图标当没有事件时会检测四周

This commit is contained in:
bdf1 2024-07-19 20:07:01 +08:00
parent 29aba76629
commit 3e0ba3210e
2 changed files with 14 additions and 3 deletions

View File

@ -52,7 +52,7 @@ main.floors.XY5=
"type": "setValue",
"name": "item:I357",
"operator": "+=",
"value": "3"
"value": "1"
}
]
}

View File

@ -2761,9 +2761,20 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
const item = core.material.items[id];
if (portals.includes(block.event.id)) {
if (!block.event.trigger) {
drawItemDetail({ 'atk': 'X' }, x, y);
var dx = [0, 0, 1, -1],
dy = [1, -1, 0, 0];
for (var i = 0; i <= 4; i++) {
if (i == 4) {
drawItemDetail({ 'atk': 'X' }, x, y);
break;
}
if (core.getBlock(x + dx[i], y + dy[i], floorId) && core.getBlock(x + dx[i], y + dy[i], floorId).event.trigger == "changeFloor") {
drawItemDetail({ 'atk': core.getBlock(x + dx[i], y + dy[i], floorId).event.data.floorId }, x, y);
break;
}
}
} else if (block.event.trigger == "changeFloor") {
drawItemDetail({ 'atk': block.event.data.floorId /*, 'def': block.event.data.loc.join(',')*/ }, x, y);
drawItemDetail({ 'atk': block.event.data.floorId }, x, y);
}
}
if (item && item.cls === 'equips') {