From ef7215a2b0568a2aa45dc98bce54a11824f07b02 Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Sun, 30 Jul 2023 17:12:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=92=E4=BB=B6=E7=9B=AE?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/libs/events.js | 12 +----------- public/project/functions.js | 2 -- src/plugin/game/{ => dev}/hotReload.js | 2 +- src/plugin/game/{popup.ts => enemy/checkblock.ts} | 3 +-- src/plugin/game/{ => fx}/halo.ts | 0 src/plugin/game/{ => fx}/heroFourFrames.js | 2 +- src/plugin/game/{ => fx}/itemDetail.ts | 2 +- src/plugin/game/index.js | 10 +++++----- 8 files changed, 10 insertions(+), 23 deletions(-) rename src/plugin/game/{ => dev}/hotReload.js (99%) rename src/plugin/game/{popup.ts => enemy/checkblock.ts} (98%) rename src/plugin/game/{ => fx}/halo.ts (100%) rename src/plugin/game/{ => fx}/heroFourFrames.js (97%) rename src/plugin/game/{ => fx}/itemDetail.ts (98%) diff --git a/public/libs/events.js b/public/libs/events.js index 412be57..b60c31d 100644 --- a/public/libs/events.js +++ b/public/libs/events.js @@ -2086,17 +2086,7 @@ events.prototype._action_disableShop = function (data, x, y, prefix) { }; events.prototype._action_battle = function (data, x, y, prefix) { - // todo: 修改battle的参数 - if (data.id) { - this.battle(data.id, null, null, true, core.doAction); - } else { - if (data.floorId != core.status.floorId) { - core.doAction(); - return; - } - var loc = this.__action_getLoc(data.loc, x, y, prefix); - this.battle(null, loc[0], loc[1], true, core.doAction); - } + // Deprecated. See src/plugin/game/enemy/battle.ts }; events.prototype._action_trigger = function (data, x, y, prefix) { diff --git a/public/project/functions.js b/public/project/functions.js index 489127a..7267386 100644 --- a/public/project/functions.js +++ b/public/project/functions.js @@ -1171,12 +1171,10 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = { } core.setFlag('__fromLoad__', true); - // TODO:增加自己的一些读档处理 core.plugin.skillTree.loadSkillTree(data.skills); // 切换到对应的楼层 core.changeFloor(data.floorId, null, data.hero.loc, 0, function () { - // TODO:可以在这里设置读档后播放BGM if (core.hasFlag('__bgm__')) { // 持续播放 core.playBgm(core.getFlag('__bgm__')); diff --git a/src/plugin/game/hotReload.js b/src/plugin/game/dev/hotReload.js similarity index 99% rename from src/plugin/game/hotReload.js rename to src/plugin/game/dev/hotReload.js index 3ef58e8..4ab2de1 100644 --- a/src/plugin/game/hotReload.js +++ b/src/plugin/game/dev/hotReload.js @@ -1,4 +1,4 @@ -/// +/// export {}; /* @__PURE__ */ (function () { diff --git a/src/plugin/game/popup.ts b/src/plugin/game/enemy/checkblock.ts similarity index 98% rename from src/plugin/game/popup.ts rename to src/plugin/game/enemy/checkblock.ts index 8bc3f0a..ad59514 100644 --- a/src/plugin/game/popup.ts +++ b/src/plugin/game/enemy/checkblock.ts @@ -1,5 +1,4 @@ -/// -import { drawHalo } from './halo'; +import { drawHalo } from '../fx/halo'; // 伤害弹出 // 复写阻激夹域检测 diff --git a/src/plugin/game/halo.ts b/src/plugin/game/fx/halo.ts similarity index 100% rename from src/plugin/game/halo.ts rename to src/plugin/game/fx/halo.ts diff --git a/src/plugin/game/heroFourFrames.js b/src/plugin/game/fx/heroFourFrames.js similarity index 97% rename from src/plugin/game/heroFourFrames.js rename to src/plugin/game/fx/heroFourFrames.js index d41ae38..7aba4d4 100644 --- a/src/plugin/game/heroFourFrames.js +++ b/src/plugin/game/fx/heroFourFrames.js @@ -1,4 +1,4 @@ -/// +/// export {}; ['up', 'down', 'left', 'right'].forEach(one => { diff --git a/src/plugin/game/itemDetail.ts b/src/plugin/game/fx/itemDetail.ts similarity index 98% rename from src/plugin/game/itemDetail.ts rename to src/plugin/game/fx/itemDetail.ts index f4e448b..9f1894b 100644 --- a/src/plugin/game/itemDetail.ts +++ b/src/plugin/game/fx/itemDetail.ts @@ -1,4 +1,4 @@ -import { ensureFloorDamage } from './enemy/damage'; +import { ensureFloorDamage } from '../enemy/damage'; core.control.updateDamage = function (floorId = core.status.floorId, ctx) { if (!floorId || core.status.gameOver || main.mode !== 'play') return; diff --git a/src/plugin/game/index.js b/src/plugin/game/index.js index 3f8340f..fb2f24c 100644 --- a/src/plugin/game/index.js +++ b/src/plugin/game/index.js @@ -1,11 +1,11 @@ import './fiveLayer'; -import './heroFourFrames'; -import './hotReload'; -import './itemDetail'; -import './popup'; +import './fx/heroFourFrames'; +import './dev/hotReload'; +import './fx/itemDetail'; +import './enemy/checkblock'; import './replay'; import './ui'; -import * as halo from './halo'; +import * as halo from './fx/halo'; import * as hero from './hero'; import * as loopMap from './loopMap'; import * as remainEnemy from './remainEnemy';