chore: 修复两个 eslint 报错

This commit is contained in:
unanmed 2025-09-23 10:41:51 +08:00
parent d1d6ebbdcb
commit 7cbe35e246
2 changed files with 4 additions and 3 deletions

View File

@ -133,7 +133,7 @@ export function patchBattle() {
// const enemy = getSingleEnemy(data.id as EnemyIds);
// todo: 与不在地图上的怪物战斗
} else {
if (data.floorId != core.status.floorId) {
if (data.floorId !== core.status.floorId) {
core.doAction();
return;
}
@ -246,7 +246,7 @@ export function patchBattle() {
} else core.drawHeroAnimate(animate);
// 如果已有事件正在处理中
if (core.status.event.id == null) core.continueAutomaticRoute();
if (isNil(core.status.event.id)) core.continueAutomaticRoute();
else core.clearContinueAutomaticRoute();
core.checkAutoEvents();

View File

@ -1,6 +1,7 @@
import { Patch, PatchClass } from '@motajs/legacy-common';
import { EnemyCollection, ensureFloorDamage } from '@user/data-state';
import { formatDamage } from '@user/data-utils';
import { isNil } from 'lodash-es';
export function patchDamage() {
const patch = new Patch(PatchClass.Control);
@ -13,7 +14,7 @@ export function patchDamage() {
) {
if (!floorId || core.status.gameOver || main.mode !== 'play')
return;
const onMap = ctx == null;
const onMap = isNil(ctx);
const floor = core.status.maps[floorId];
// 没有怪物手册