From bd1421b59cc253eb5044b4c8a13c20f42204566d Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Wed, 2 Oct 2024 23:24:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=AA=81=E5=88=BA=E6=8A=80=E8=83=BD?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E4=BC=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/game/enemy/damage.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/enemy/damage.ts b/src/game/enemy/damage.ts index 7edcdfe..00b939d 100644 --- a/src/game/enemy/damage.ts +++ b/src/game/enemy/damage.ts @@ -652,6 +652,7 @@ export class DamageEnemy { const endX = Math.min(floor.width - 1, this.x + range); const endY = Math.min(floor.height - 1, this.y + range); const dam = Math.max((enemy.value ?? 0) - hero.def!, 0); + const objs = core.getMapBlocksObj(this.floorId); for (let x = startX; x <= endX; x++) { for (let y = startY; y <= endY; y++) { @@ -661,7 +662,8 @@ export class DamageEnemy { ) { continue; } - const loc = `${x},${y}`; + const loc = `${x},${y}` as LocString; + if (objs[loc]?.event.noPass) continue; this.setMapDamage(damage, loc, dam, '突刺'); } }