From ac55517d577c85905d169f0993aca740e9579ce9 Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Fri, 6 Jan 2023 21:51:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E9=BC=A0=E6=A0=87=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E6=80=AA=E7=89=A9=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/libs/control.js | 9 +- public/libs/enemys.js | 43 +++------- public/project/enemys.js | 4 +- public/project/floors/MT22.js | 19 ++-- public/project/floors/MT31.js | 14 ++- public/project/floors/MT32.js | 78 ++++++++++------- public/project/floors/MT33.js | 102 +++++++++++++--------- public/project/functions.js | 32 +++++-- public/project/plugins.js | 7 +- src/App2.vue | 4 +- src/data/desc.json | 24 ++++-- src/data/settings.json | 9 ++ src/initPlugin.ts | 4 +- src/panel/enemyCritical.vue | 4 +- src/plugin/settings.ts | 9 ++ src/plugin/ui/book.tsx | 8 +- src/plugin/ui/fixed.ts | 64 ++++++++++++++ src/types/core.d.ts | 5 ++ src/ui/fixed.vue | 157 ++++++++++++++++++++++++++++++++++ src/ui/fly.vue | 6 +- src/ui/settings.vue | 15 +++- 21 files changed, 476 insertions(+), 141 deletions(-) create mode 100644 src/plugin/ui/fixed.ts create mode 100644 src/ui/fixed.vue diff --git a/public/libs/control.js b/public/libs/control.js index 6674bd3..b64cbfb 100644 --- a/public/libs/control.js +++ b/public/libs/control.js @@ -3056,7 +3056,14 @@ control.prototype.getStatus = function (name) { if (main.mode == 'editor' && !core.hasFlag('__statistics__')) { return data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.firstData.hero[name]; } - return core.status.hero[name]; + if (name === 'atk' || name === 'def') { + return ( + core.status.hero[name] + + (window.flags?.[`night_${core.status.floorId}`] ?? 0) + ); + } else { + return core.status.hero[name]; + } }; ////// 从status中获得属性,如果不存在则从勇士属性中获取 ////// diff --git a/public/libs/enemys.js b/public/libs/enemys.js index e5778a4..493f541 100644 --- a/public/libs/enemys.js +++ b/public/libs/enemys.js @@ -262,29 +262,14 @@ enemys.prototype.nextCriticals = function (enemy, number, x, y, floorId) { return [[info.__overAtk__ || 0, 0]]; } - if (core.flags.useLoop) { - if (core.status.hero.atk <= (main.criticalUseLoop || 1)) { - return this._nextCriticals_useLoop( - enemy, - info, - number, - x, - y, - floorId - ); - } else { - return this._nextCriticals_useBinarySearch( - enemy, - info, - number, - x, - y, - floorId - ); - } - } else { - return this._nextCriticals_useTurn(enemy, info, number, x, y, floorId); - } + return this._nextCriticals_useBinarySearch( + enemy, + info, + number, + x, + y, + floorId + ); }; /// 未破防临界采用二分计算 @@ -316,10 +301,10 @@ enemys.prototype._nextCriticals_overAtk = function (enemy, x, y, floorId) { ); return nextInfo == null ? null - : [start - core.status.hero.atk, nextInfo]; + : [start - core.getStatus('atk'), nextInfo]; }; return calNext( - core.status.hero.atk + 1, + core.getStatus('atk') + 1, core.getEnemyValue(enemy, 'hp', x, y, floorId) + core.getEnemyValue(enemy, 'def', x, y, floorId) ); @@ -346,7 +331,7 @@ enemys.prototype._nextCriticals_useLoop = function ( floorId ) { var mon_hp = info.mon_hp, - hero_atk = core.status.hero.atk, + hero_atk = core.getStatus('atk'), mon_def = info.mon_def, pre = info.damage; var list = []; @@ -378,7 +363,7 @@ enemys.prototype._nextCriticals_useBinarySearch = function ( floorId ) { var mon_hp = info.mon_hp, - hero_atk = core.status.hero.atk, + hero_atk = core.getStatus('atk'), mon_def = info.mon_def, pre = info.damage; var list = []; @@ -442,7 +427,7 @@ enemys.prototype._nextCriticals_useTurn = function ( floorId ) { var mon_hp = info.mon_hp, - hero_atk = core.status.hero.atk, + hero_atk = core.getStatus('atk'), mon_def = info.mon_def, turn = info.turn; // ------ 超大回合数强制使用二分算临界 @@ -499,7 +484,7 @@ enemys.prototype.getDefDamage = function (enemy, k, x, y, floorId) { var nowDamage = this._getDamage(enemy, null, x, y, floorId); var nextDamage = this._getDamage( enemy, - { def: core.status.hero.def + k }, + { def: core.getStatus('def') + k }, x, y, floorId diff --git a/public/project/enemys.js b/public/project/enemys.js index 4365652..b75e928 100644 --- a/public/project/enemys.js +++ b/public/project/enemys.js @@ -141,7 +141,7 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = "E579": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E590": {"name":"冰封史莱姆","hp":7500,"atk":1750,"def":1000,"money":2,"exp":75,"point":0,"special":[20],"ice":25}, "E591": {"name":"新敌人","hp":10000,"atk":2000,"def":1000,"money":0,"exp":0,"point":0,"special":[]}, - "E592": {"name":"冰封巨兽","hp":10000,"atk":2000,"def":1000,"money":2,"exp":85,"point":0,"special":[20,21],"iceHalo":10,"ice":50}, + "E592": {"name":"冰封巨兽","hp":6000,"atk":1750,"def":1000,"money":2,"exp":85,"point":0,"special":[20,21],"iceHalo":20,"ice":50}, "E593": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E594": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E595": {"name":"寒冰兽人","hp":12500,"atk":1800,"def":800,"money":2,"exp":100,"point":0,"special":[7],"hungry":25}, @@ -151,6 +151,6 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = "E599": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E600": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E601": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, - "E602": {"name":"永夜蝠","hp":6000,"atk":2000,"def":800,"money":1,"exp":65,"point":0,"special":[22],"night":100}, + "E602": {"name":"永夜蝙","hp":6000,"atk":2000,"def":800,"money":1,"exp":65,"point":0,"special":[22],"night":100}, "E603": {"name":"极昼蝠","hp":8000,"atk":1750,"def":1000,"money":1,"exp":65,"point":0,"special":[23],"day":100} } \ No newline at end of file diff --git a/public/project/floors/MT22.js b/public/project/floors/MT22.js index 9f563c6..b25c2d5 100644 --- a/public/project/floors/MT22.js +++ b/public/project/floors/MT22.js @@ -19,11 +19,20 @@ main.floors.MT22= "events": { "0,8": [ { - "type": "changeFloor", - "floorId": "MT21", - "loc": [ - 14, - 8 + "type": "if", + "condition": "flag:inWinter", + "true": [ + "\t[初级智人]\b[up,hero]没必要再回去了" + ], + "false": [ + { + "type": "changeFloor", + "floorId": "MT21", + "loc": [ + 14, + 8 + ] + } ] } ], diff --git a/public/project/floors/MT31.js b/public/project/floors/MT31.js index b94e84a..576889a 100644 --- a/public/project/floors/MT31.js +++ b/public/project/floors/MT31.js @@ -140,6 +140,16 @@ main.floors.MT31= } ] } + ], + "2,6": [ + "注意右方的清怪检测是检测\r[gold]勇气之路\r[]的怪物,本区域的怪物不检测,可以暂时留怪" + ], + "13,7": [ + "这里是漏怪检测,会检测\r[gold]勇气之路\r[]区域是否有遗漏怪物", + { + "type": "function", + "function": "function(){\nconst enemy = core.getRemainEnemyString(core.floorIds.slice(17, 22));\nif (enemy.length === 0) {\n\tcore.insertAction(['当前无剩余怪物!', { \"type\": \"hide\", \"remove\": true }, ]);\n} else {\n\tcore.insertAction(enemy);\n}\n}" + } ] }, "changeFloor": { @@ -246,8 +256,8 @@ main.floors.MT31= [143,143,143,143,143,143,143,143,143,143,143,143,143,143,143], [143,143, 0, 0, 0, 0,143,491,491,468,468,466,466,143,143], [143,143, 0,491,491, 0,143, 85,143,143,143,143,143,143,143], - [143,143, 0, 0, 0, 0,143, 0, 0, 0, 0, 0, 0,143,143], - [ 92, 0, 0, 23,123, 0,497, 0, 0, 0,577, 0, 0, 0, 94], + [143,143,129, 0, 0, 0,143, 0, 0, 0, 0, 0, 0,143,143], + [ 92, 0, 0, 23,123, 0,497, 0, 0, 0,577, 0, 0,516, 94], [143,143, 0, 0, 0, 0,143, 0, 0, 0, 0, 0, 0,143,143], [143,143, 0,491,491, 0,143, 85,143,143,143,143,143,143,143], [143,143, 0, 0, 0, 0,143,491,491,468,468,467,467,143,143], diff --git a/public/project/floors/MT32.js b/public/project/floors/MT32.js index 9edcef4..ee65d99 100644 --- a/public/project/floors/MT32.js +++ b/public/project/floors/MT32.js @@ -13,7 +13,12 @@ main.floors.MT32= "ratio": 8, "defaultGround": "T580", "bgm": "winter.mp3", - "firstArrive": [], + "firstArrive": [ + { + "type": "function", + "function": "function(){\ncore.removeMaps('MT17', 'MT21', true)\n}" + } + ], "eachArrive": [], "parallelDo": "", "events": { @@ -33,10 +38,19 @@ main.floors.MT32= "1,8": [ "衣服是个装备,记得穿上", "光环会在地图上显示,如果不想要可以在背包里面的系统设置里面关闭", - "每张地图会保证极昼怪的数量与永夜怪的数量相同" + "每张地图会保证极昼怪的数量与永夜怪的数量相同", + "注意打过永夜怪或者极昼怪之后怪物标记可能与当前地图不符,因为标记怪物是标记的某一类怪物而不是某一点的怪物" ] }, - "changeFloor": {}, + "changeFloor": { + "14,6": { + "floorId": "MT33", + "loc": [ + 0, + 6 + ] + } + }, "beforeBattle": {}, "afterBattle": {}, "afterGetItem": {}, @@ -46,19 +60,19 @@ main.floors.MT32= "cannotMoveIn": {}, "map": [ [147,147,147,147,147,147,147,147,147,147,147,147,147,147,147], - [147, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,147], - [147, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,147], - [147, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,147], - [147, 0, 0, 0, 0,514, 0, 0, 0, 0, 0, 0, 0, 0,147], - [147,147,147,147,147, 0,274, 0, 0, 0, 0, 0, 0, 0,147], - [147,129, 0, 21,147,590, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 92, 0,589, 0,492, 0,595, 0, 0, 0, 0, 0, 0, 0,147], - [147,129, 0, 22,147,602, 0, 0, 0, 0, 0, 0, 0, 0,147], - [147,147,147,147,147, 0,603, 0, 0, 0, 0, 0, 0, 0,147], - [147, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,147], - [147, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,592, 0, 0,147], - [147, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,147], - [147, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,147], + [147, 0,482,441,274, 0, 28,147, 34, 0,603, 0, 0, 0,147], + [147,595,147,147,147, 32, 0,590, 0, 34,587, 0,147,147,147], + [147, 0,403, 0,147,602,587,586,587,587,587, 21,147,381,147], + [147, 28, 33, 27,492, 34, 34,586, 34,390,588, 0,592, 34,147], + [147,147,494,147,147,585,492,585,595,588,588,590,147,492,147], + [147,129, 0, 21,147, 32, 0,602, 0,586, 0, 0, 34, 0, 94], + [ 92, 0,589, 0,492, 0, 32,584, 27,590, 0,587, 0, 28,147], + [147,129, 0, 22,147,590,492,584, 29,586,587,587,492,147,147], + [147,147,494,147,147, 0, 0,603, 0,586, 0, 32, 32, 0,147], + [147, 27, 33, 28,147,147,147,147,494,585,585,585,584,602,147], + [147, 0,403, 0,492, 34, 34,147, 0, 0,381,381, 0, 0,147], + [147,595,147,147,147,603,147,147,147,147,274,147,147,590,147], + [147, 0, 21, 27, 0, 0, 0, 0, 28, 33, 0,492, 0, 0,147], [147,147,147,147,147,147,147,147,147,147,147,147,147,147,147] ], "bgmap": [ @@ -66,16 +80,16 @@ main.floors.MT32= [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,145,145,145,145], - [145,145,145,145,145,145,145,145,145,145,145,145, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0,145,145, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0,145, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0,145, 0,145,145,145,145,145], + [145,145,145,145,145,145,145,145,145,145,145, 0,145, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,145, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,145,145, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,145, 0], + [ 0,145, 0, 0, 0, 0, 0, 0, 0, 0,145,145,145,145, 0], + [ 0,145, 0, 0, 0, 0, 0, 0, 0, 0,145, 0, 0, 0, 0], + [ 0,145,145,145,145,145,145,145,145,145,145, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ], "fgmap": [ @@ -85,15 +99,15 @@ main.floors.MT32= [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0,146,146,146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0,146,146,146, 0, 0, 0, 0,146,146, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0,146,146,146, 0, 0, 0,582, 0, 0, 0, 0,146,146, 0], + [ 0,146,146,146, 0, 0, 0, 0, 0, 0, 0, 0,146,146, 0], + [ 0,146,146,146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0,581,581,582, 0, 0, 0, 0, 0, 0, 0], [ 0,146,146,146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0,146,146,146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0,146,146,146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] diff --git a/public/project/floors/MT33.js b/public/project/floors/MT33.js index f6ed191..4463895 100644 --- a/public/project/floors/MT33.js +++ b/public/project/floors/MT33.js @@ -1,45 +1,65 @@ main.floors.MT33= { -"floorId": "MT33", -"title": "冰封雪原", -"name": "冰封雪原", -"width": 15, -"height": 15, -"canFlyTo": true, -"canFlyFrom": true, -"canUseQuickShop": true, -"cannotViewMap": false, -"images": [], -"ratio": 8, -"defaultGround": "T580", -"bgm": "winter.mp3", -"firstArrive": [], -"eachArrive": [], -"parallelDo": "", -"events": {}, -"changeFloor": {}, -"beforeBattle": {}, -"afterBattle": {}, -"afterGetItem": {}, -"afterOpenDoor": {}, -"autoEvent": {}, -"cannotMove": {}, -"cannotMoveIn": {}, -"map": [ - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + "floorId": "MT33", + "title": "冰封雪原", + "name": "冰封雪原", + "width": 15, + "height": 15, + "canFlyTo": true, + "canFlyFrom": true, + "canUseQuickShop": true, + "cannotViewMap": false, + "images": [], + "ratio": 8, + "defaultGround": "T580", + "bgm": "winter.mp3", + "firstArrive": [], + "eachArrive": [], + "parallelDo": "", + "events": {}, + "changeFloor": { + "0,6": { + "floorId": "MT32", + "loc": [ + 14, + 6 + ] + } + }, + "beforeBattle": {}, + "afterBattle": {}, + "afterGetItem": {}, + "afterOpenDoor": {}, + "autoEvent": {}, + "cannotMove": {}, + "cannotMoveIn": {}, + "map": [ + [147,147,147,147,147,147,147,147,147, 0,147,147,147,147,147], + [147, 0, 0, 0, 0, 0,147, 0,595, 0,592, 0, 0, 0,147], + [147,147,147,147,147,590,147, 0,586, 0,492, 0, 0, 0,147], + [147, 0,595, 0, 0, 0,147,586,586, 0,585,147,147,603, 0], + [147, 0,147,147,147,592, 0, 0, 0, 0,585,484,274, 0,147], + [147, 21, 34,147, 0,492,492,587,587,587,147,147,147, 0,147], + [ 92, 0, 0,590, 0,587, 32, 32,274, 32, 0, 32,147, 0,147], + [147,147,147,147, 27,587,587,602,585, 0,396, 0,147,603,147], + [147, 28, 34,274, 34,381, 0, 0,585,147,147,147,147, 0,147], + [147,403, 27,147,147,147,602,585,585, 0,602, 0, 0, 0,147], + [147,147,147,147, 0, 0, 0, 0,585, 0,147,147,147,147,147], + [147, 0, 0,147,590,147,147,147,147, 0,147, 0, 0, 0,147], + [147,147, 0,595, 0, 0, 0,147,147, 0,514, 0, 0,147,147], + [147,147,147,147,147, 0, 0, 0,603, 0,147,147,147,147,147], + [147,147,147,147,147,147,147,147,147,147,147,147,147,147,147] ], + "bgmap": [ + +], + "fgmap": [ + +], + "bg2map": [ + +], + "fg2map": [ + +] } \ No newline at end of file diff --git a/public/project/functions.js b/public/project/functions.js index de6f49d..a5af39e 100644 --- a/public/project/functions.js +++ b/public/project/functions.js @@ -326,6 +326,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = { }, afterBattle: function (enemyId, x, y) { // 战斗结束后触发的事件 + const floorId = core.status.floorId; var enemy = core.material.enemys[enemyId]; var special = enemy.special; @@ -369,7 +370,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = { // 智慧之源 if (core.hasSpecial(special, 14) && flags.hard == 2) { - var floorId = core.status.floorId; core.addFlag( 'inte_' + floorId, Math.ceil((core.status.hero.mdef / 10) * 0.3) * 10 @@ -378,6 +378,16 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = { Math.ceil((core.status.hero.mdef / 10) * 0.3) * 10; } + // 极昼永夜 + if (core.hasSpecial(special, 22)) { + flags[`night_${floorId}`] ??= 0; + flags[`night_${floorId}`] -= enemy.night; + } + if (core.hasSpecial(special, 23)) { + flags[`night_${floorId}`] ??= 0; + flags[`night_${floorId}`] += enemy.day; + } + if (core.getSkillLevel(11) > 0) { core.declineStudiedSkill(); } @@ -593,7 +603,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = { '%加在自己身上(勇士攻击也会降低)' ); }, - '#b30000' + '#b67' ], [ 8, @@ -724,14 +734,14 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = { 22, '永夜', enemy => - `战斗后,减少勇士${enemy.night}点攻防,加到本层所有怪物身上`, + `战斗后,减少勇士${enemy.night}点攻防,增加本层所有怪物${enemy.night}点攻防,仅在本层有效`, '#d8a' ], [ 23, '极昼', enemy => - `战斗后,减少本层所有怪物${enemy.day}点攻防,加到勇士身上`, + `战斗后,减少本层所有怪物${enemy.day}点攻防,增加勇士${enemy.day}点攻防,仅在本层有效`, '#ffd' ], [ @@ -815,6 +825,10 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = { mon_atk += core.getFlag('inte_' + floorId, 0); } + // 极昼永夜 + mon_atk -= flags[`night_${floorId}`] ?? 0; + mon_def -= flags[`night_${floorId}`] ?? 0; + if (flags.blade && flags.bladeOn) { hero_atk *= 1 + core.getSkillLevel(2) / 10; hero_def *= 1 - core.getSkillLevel(2) / 10; @@ -1470,7 +1484,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = { const haloMap = { 21: 'square:7:cyan' }; - const haloEntry = Object.entries(haloMap); var width = core.floors[floorId].width, height = core.floors[floorId].height; @@ -1711,12 +1724,13 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = { needCache = true; if (specialFlag & 2) haveHunt = true; + // 检查范围光环 if (enemy) { - for (const [num, range] of haloEntry) { - const n = parseInt(num); - if (core.hasSpecial(enemy.special, n)) { + if (!(enemy.special instanceof Array)) continue; + for (const num of enemy.special) { + if (num in haloMap) { halo[loc] ??= []; - halo[loc].push(range); + halo[loc].push(haloMap[num]); } } } diff --git a/public/project/plugins.js b/public/project/plugins.js index afbd3de..900a325 100644 --- a/public/project/plugins.js +++ b/public/project/plugins.js @@ -541,6 +541,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { flags.__disabled__ = flags.__disabled__ || {}; flags.__leaveLoc__ = flags.__leaveLoc__ || {}; flags.__forceDelete__ ??= {}; + let deleted = false; for (var i = fromIndex; i <= toIndex; ++i) { var floorId = core.floorIds[i]; if (core.status.maps[floorId].deleted) continue; @@ -562,6 +563,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { core.status.maps[floorId].forceDelete = true; flags.__forceDelete__[floorId] = true; } + deleted = true; + } + if (deleted && !main.replayChecking) { + core.splitArea(); } }; @@ -4602,9 +4607,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { if (!core.getLocalStorage('showHalo', true)) return; const halo = core.status.checkBlock.halo; ctx.save(); - core.clearMap(ctx); ctx.globalAlpha = 0.1; - ctx.globalCompositeOperation = 'source-over'; for (const [loc, range] of Object.entries(halo)) { const [x, y] = loc.split(',').map(v => parseInt(v)); for (const r of range) { diff --git a/src/App2.vue b/src/App2.vue index 2eeaa7a..0c97afd 100644 --- a/src/App2.vue +++ b/src/App2.vue @@ -5,6 +5,7 @@ + @@ -18,7 +19,8 @@ import Chapter from './ui/chapter.vue'; import { chapterContent, chapterShowed } from './plugin/ui/chapter'; import { showMarkedEnemy } from './plugin/mark'; import Studied from './ui/studied.vue'; -import { showStudied } from './plugin/settings'; +import { showStudied, useFixed } from './plugin/settings'; +import Fixed from './ui/fixed.vue'; diff --git a/src/ui/fly.vue b/src/ui/fly.vue index 8cefc2a..88ffd5c 100644 --- a/src/ui/fly.vue +++ b/src/ui/fly.vue @@ -97,7 +97,7 @@ const nowArea = ref( Object.keys(area).find(v => area[v].includes(core.status.floorId))! ); const nowFloor = ref(core.status.floorId); -const noBorder = ref(false); +const noBorder = ref(true); const tradition = ref(false); let scale = isMobile ? 1.5 : 3; let ox = 0; @@ -105,8 +105,8 @@ let oy = 0; let drawedThumbnail: Partial> = {}; let thumbnailLoc: Partial> = {}; -noBorder.value = core.getLocalStorage('noBorder') ?? false; -tradition.value = core.getLocalStorage('flyTradition') ?? false; +noBorder.value = core.getLocalStorage('noBorder', true); +tradition.value = core.getLocalStorage('flyTradition', false); const floor = computed(() => { return core.status.maps[nowFloor.value]; diff --git a/src/ui/settings.vue b/src/ui/settings.vue index c6e8e13..46aff66 100644 --- a/src/ui/settings.vue +++ b/src/ui/settings.vue @@ -42,6 +42,14 @@ showHalo ? 'ON' : 'OFF' }} + 移动鼠标显示怪物信息:   {{ + useFixed ? 'ON' : 'OFF' + }}