fix: 突刺技能的显伤

This commit is contained in:
unanmed 2024-10-02 23:24:27 +08:00
parent 1c04f68982
commit bd1421b59c

View File

@ -652,6 +652,7 @@ export class DamageEnemy<T extends EnemyIds = EnemyIds> {
const endX = Math.min(floor.width - 1, this.x + range); const endX = Math.min(floor.width - 1, this.x + range);
const endY = Math.min(floor.height - 1, this.y + range); const endY = Math.min(floor.height - 1, this.y + range);
const dam = Math.max((enemy.value ?? 0) - hero.def!, 0); 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 x = startX; x <= endX; x++) {
for (let y = startY; y <= endY; y++) { for (let y = startY; y <= endY; y++) {
@ -661,7 +662,8 @@ export class DamageEnemy<T extends EnemyIds = EnemyIds> {
) { ) {
continue; continue;
} }
const loc = `${x},${y}`; const loc = `${x},${y}` as LocString;
if (objs[loc]?.event.noPass) continue;
this.setMapDamage(damage, loc, dam, '突刺'); this.setMapDamage(damage, loc, dam, '突刺');
} }
} }