From e8e6b202afad2a0f3774f9aa87537a2aee753791 Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Fri, 28 Jul 2023 12:17:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E8=AE=B0todo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/libs/enemys.js | 4 ++++ public/libs/events.js | 1 + public/libs/maps.js | 1 + public/project/functions.js | 2 ++ src/panel/enemySpecial.vue | 1 + src/plugin/mark.ts | 2 ++ src/plugin/ui/fixed.ts | 1 + src/ui/markedEnemy.vue | 1 + 8 files changed, 13 insertions(+) diff --git a/public/libs/enemys.js b/public/libs/enemys.js index ccabad3..1d47fa4 100644 --- a/public/libs/enemys.js +++ b/public/libs/enemys.js @@ -203,12 +203,14 @@ enemys.prototype.getEnemyValue = function (enemy, name, x, y, floorId) { ////// 能否获胜 ////// enemys.prototype.canBattle = function (enemy, x, y, floorId) { + // todo: 重写这个函数 if (typeof enemy == 'string') enemy = core.material.enemys[enemy]; var damage = this.getDamage(enemy, x, y, floorId); return damage != null && damage < core.status.hero.hp; }; enemys.prototype.getDamageString = function (enemy, x, y, floorId, hero) { + // todo: 重写这个函数 if (typeof enemy == 'string') enemy = core.material.enemys[enemy]; var damage = this.getDamage(enemy, x, y, floorId, hero); @@ -399,6 +401,7 @@ enemys.prototype._nextCriticals_useBinarySearch = function ( ////// N防减伤计算 ////// enemys.prototype.getDefDamage = function (enemy, k, x, y, floorId, hero) { + // todo: 删除这个函数 if (typeof enemy == 'string') enemy = core.material.enemys[enemy]; k = k || 1; var nowDamage = this._getDamage(enemy, hero, x, y, floorId); @@ -488,6 +491,7 @@ enemys.prototype._getCurrentEnemys_addEnemy = function ( y, floorId ) { + // todo: 删除这个函数 var enemy = this._getCurrentEnemys_getEnemy(enemyId); if (enemy == null) return; diff --git a/public/libs/events.js b/public/libs/events.js index 03b6bb8..e8e11b3 100644 --- a/public/libs/events.js +++ b/public/libs/events.js @@ -471,6 +471,7 @@ events.prototype._sys_battle = function (data, callback) { ////// 战斗 ////// events.prototype.battle = function (id, x, y, force, callback) { + // todo: 重写这个函数的一部分,修改参数 core.saveAndStopAutomaticRoute(); id = id || core.getBlockId(x, y); if (!id) return core.clearContinueAutomaticRoute(callback); diff --git a/public/libs/maps.js b/public/libs/maps.js index 8ae2f57..5c6a1ca 100644 --- a/public/libs/maps.js +++ b/public/libs/maps.js @@ -3531,6 +3531,7 @@ maps.prototype.resetMap = function (floorId) { ////// 初始化独立的block canvas ////// maps.prototype._initDetachedBlock = function (blockInfo, x, y, displayDamage) { + // todo: 不使用 nextCriticals var headCanvas = null, bodyCanvas = '__body_' + x + '_' + y, damageCanvas = null; diff --git a/public/project/functions.js b/public/project/functions.js index 7ceaaa9..d4a4ff1 100644 --- a/public/project/functions.js +++ b/public/project/functions.js @@ -266,10 +266,12 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = { // 战斗前触发的事件,可以加上一些战前特效(详见下面支援的例子) // 此函数在“检测能否战斗和自动存档”【之后】执行。如果需要更早的战前事件,请在插件中覆重写 core.events.doSystemEvent 函数。 // 返回true则将继续战斗,返回false将不再战斗。 + // todo: 重写 return true; }, afterBattle: function (enemyId, x, y) { + // todo: 重写 // 战斗结束后触发的事件 const floorId = core.status.floorId; diff --git a/src/panel/enemySpecial.vue b/src/panel/enemySpecial.vue index bd7596d..e35415b 100644 --- a/src/panel/enemySpecial.vue +++ b/src/panel/enemySpecial.vue @@ -49,6 +49,7 @@ const enemy = core.plugin.bookDetailEnemy; const info = getSpecialHint(enemy); +// todo: 不使用 nextCriticals const criticals = core.nextCriticals(enemy, isMobile ? 4 : 8, mx, my); const format = core.formatBigNumber; diff --git a/src/plugin/mark.ts b/src/plugin/mark.ts index 9e64d67..f2d03cf 100644 --- a/src/plugin/mark.ts +++ b/src/plugin/mark.ts @@ -18,6 +18,7 @@ const enemyDamageInfo: Partial>> = {}; * @param id 标记的怪物id */ export function markEnemy(id: EnemyIds) { + // todo: 不使用 nextCriticals if (hasMarkedEnemy(id)) return; markedEnemy.push(id); markInfo[id] = { @@ -64,6 +65,7 @@ export function getMarkedEnemy() { * @param id 怪物id */ export function getMarkInfo(id: EnemyIds, noMessage: boolean = false) { + // todo: 不使用 nextCriticals const reached = criticalReached[id]!; const info = markInfo[id]!; if (core.status.hero.atk >= info.nextCritical) { diff --git a/src/plugin/ui/fixed.ts b/src/plugin/ui/fixed.ts index 6c2da5d..a48dd35 100644 --- a/src/plugin/ui/fixed.ts +++ b/src/plugin/ui/fixed.ts @@ -54,6 +54,7 @@ export function getDetailedEnemy( floorId: FloorIds = core.status.floorId ): DetailedEnemy { // todo: 删除 getDamageInfo + // todo: 不使用 nextCriticals const ratio = core.status.maps[floorId].ratio; const enemyInfo = Object.assign( {}, diff --git a/src/ui/markedEnemy.vue b/src/ui/markedEnemy.vue index 64164b7..087d327 100644 --- a/src/ui/markedEnemy.vue +++ b/src/ui/markedEnemy.vue @@ -111,6 +111,7 @@ function getDamage(id: EnemyIds) { } function getCritical(id: EnemyIds) { + // todo: 不使用 nextCriticals return ( core .nextCriticals(id, 1, void 0, void 0, 'empty')[0]