From 3e0ba3210eae44feb6b6028e961aedc957742c99 Mon Sep 17 00:00:00 2001 From: bdf1 Date: Fri, 19 Jul 2024 20:07:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DXY5=E5=AE=9D=E7=AE=B1?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E9=94=99=E8=AF=AF;=20=E6=96=B9=E5=90=91?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E5=BD=93=E6=B2=A1=E6=9C=89=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E6=97=B6=E4=BC=9A=E6=A3=80=E6=B5=8B=E5=9B=9B=E5=91=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/floors/XY5.js | 2 +- project/plugins.js | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/project/floors/XY5.js b/project/floors/XY5.js index 41e4f74..6a1e5c1 100644 --- a/project/floors/XY5.js +++ b/project/floors/XY5.js @@ -52,7 +52,7 @@ main.floors.XY5= "type": "setValue", "name": "item:I357", "operator": "+=", - "value": "3" + "value": "1" } ] } diff --git a/project/plugins.js b/project/plugins.js index 5ef3940..d352916 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -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') {