From 8418bccdf6bf0b5a5f961a44a39d85708575b5d6 Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Thu, 29 Dec 2022 00:26:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=80=AA=E7=89=A9=E6=A0=87=E8=AE=B0=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/libs/actions.js | 3 - public/project/enemys.js | 2 +- public/project/floors/MT0.js | 19 +- public/project/icons.js | 4 +- public/project/items.js | 13 ++ public/project/maps.js | 2 + public/project/materials/items.png | Bin 33847 -> 38747 bytes public/project/plugins.js | 280 +---------------------------- src/App2.vue | 2 + src/components/box.vue | 12 +- src/components/boxAnimate.vue | 6 +- src/data/desc.json | 40 +++++ src/data/settings.json | 6 + src/initPlugin.ts | 11 +- src/panel/enemyTarget.vue | 77 ++++++++ src/plugin/mark.ts | 127 +++++++++++++ src/plugin/settings.ts | 15 ++ src/plugin/uiController.ts | 14 +- src/plugin/use.ts | 5 +- src/plugin/utils.ts | 1 + src/source/cls.d.ts | 2 + src/source/items.d.ts | 2 + src/source/maps.d.ts | 4 + src/types/enemy.d.ts | 5 + src/types/plugin.d.ts | 19 +- src/ui/book.vue | 6 +- src/ui/bookDetail.vue | 24 ++- src/ui/desc.vue | 14 ++ src/ui/markedEnemy.vue | 156 ++++++++++++++++ src/ui/settings.vue | 106 +++++++++++ src/ui/toolbox.vue | 1 - 31 files changed, 662 insertions(+), 316 deletions(-) create mode 100644 src/data/desc.json create mode 100644 src/data/settings.json create mode 100644 src/panel/enemyTarget.vue create mode 100644 src/plugin/mark.ts create mode 100644 src/plugin/settings.ts create mode 100644 src/ui/desc.vue create mode 100644 src/ui/markedEnemy.vue create mode 100644 src/ui/settings.vue diff --git a/public/libs/actions.js b/public/libs/actions.js index ee0a3af..9e88113 100644 --- a/public/libs/actions.js +++ b/public/libs/actions.js @@ -388,9 +388,6 @@ actions.prototype._sys_keyDown_lockControl = function (keyCode) { case 'viewMaps': this._keyDownViewMaps(keyCode); break; - case 'toolbox': - this._keyDownToolbox(keyCode); - break; case 'save': case 'load': case 'replayLoad': diff --git a/public/project/enemys.js b/public/project/enemys.js index ae3be79..5355e32 100644 --- a/public/project/enemys.js +++ b/public/project/enemys.js @@ -1,6 +1,6 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = { - "greenSlime": {"name":"绿头怪","hp":100,"atk":11,"def":3,"money":0,"exp":1,"point":0,"special":[]}, + "greenSlime": {"name":"绿头怪","hp":100,"atk":11,"def":3,"money":0,"exp":1,"point":0,"special":[],"description":"一种极其低级的怪物,低级到普通人用手都可以打死。"}, "redSlime": {"name":"红头怪","hp":120,"atk":16,"def":6,"money":0,"exp":2,"point":0,"special":[],"value":10}, "blackSlime": {"name":"青头怪","hp":170,"atk":20,"def":8,"money":0,"exp":3,"point":0,"special":[]}, "slimelord": {"name":"粘液王","hp":200,"atk":58,"def":24,"money":0,"exp":8,"point":0,"special":[]}, diff --git a/public/project/floors/MT0.js b/public/project/floors/MT0.js index f20a0b4..9b7d66e 100644 --- a/public/project/floors/MT0.js +++ b/public/project/floors/MT0.js @@ -21,10 +21,10 @@ main.floors.MT0= [141,141,141,141, 0, 0, 0,141, 0, 0, 0,141, 33, 33,20040], [141, 34, 34,141, 0,141, 0, 0, 0,141, 0,494,482,482,20040], [141, 33, 33,492, 0,141, 0, 0, 0,141, 0,141, 33, 33,20040], - [141, 34, 34,141, 0,141, 0, 0, 0,141, 0,141,141,141,20040], - [141,141,141,141, 0,129,558, 46,322,129, 0,141, 33, 33,20040], + [141, 34, 34,141, 0,141, 0,559, 0,141, 0,141,141,141,20040], + [141,141,141,141, 0,129,558, 46,560, 0, 0,141, 33, 33,20040], [141, 33, 33,141, 0,141,367, 0,129,141, 0,494,482,482,20040], - [141, 33, 33,492, 0,141,129, 0,129,141, 0,141, 33, 33,20040], + [141, 33, 33,492, 0,141, 0, 0,129,141, 0,141, 33, 33,20040], [141,141,141,141,141,141,141,141,141,141,141,141,141,141,20040] ], "firstArrive": [ @@ -46,22 +46,11 @@ main.floors.MT0= "\t[原始人]\b[up,hero]出去找些柴火" ], "8,13": [ - "对状态栏的说明", - "PC端:\n从上到下依次是楼层名、境界名、生命(右方为每回合生命回复)、攻击(右方为额外攻击)、防御、智慧、金币、距离升级剩余经验、三色钥匙", - "手机端:\n最左边一列为生命、生命(右方为每回合生命回复)、攻击(右方为额外攻击)\n第二列为智慧、金币、距离升级剩余经验\n第三列为三色钥匙、楼层名、等级名" - ], - "6,13": [ - "你可以在初始赠送的系统设置里面修改一些设置\n带地图的楼传开启时,如果是手机玩家,请尽量使用2D绘图模式而不是3D,因为3D绘图比较耗能,该功能可以有效解决找不到路的问题\n你也可以用定点查看代替怪物手册,对性能消耗较低,更加流畅", - "打开小地图时,小地图会在右上角显示,可随意开启或关闭,打开时,点击小地图可以进入大地图模式,大地图模式下可以按W或点击相应位置开启区域地图模式(比较耗性能,因为是绘制整个区域的地图,而不是6格以内的地图)\n楼传界面中可以按PgUp和PgDn来上楼或下楼,上下左右移动地图\n在地图界面中用紫色标记的地图为目前可以到达(即去到了临近的地图)却没有到达的地图,可以防止找不到路", - "注意,小地图和平面楼传只能浏览和传送当前区域的地图,非当前区域可能无法浏览和传送", - "你面前的三个道具比较重要,请充分利用" + "本塔有很多新的功能,所有的说明都详细地写在了前方的百科全书里面,里面包含所有的功能说明,不阅读可能会影响正常的游戏体验,请仔细阅读。" ], "8,12": [ "该塔计分方式:生命+5000*黄钥匙+15000*蓝钥匙" ], - "9,11": [ - "对怪物手册的说明:\n1.该塔可以显示未破防时的临界显伤,如果减伤项为黄色且有->标识,说明改临界是在当前未破防的情况下算得的,比如 临界 10 减伤 \r[#ffd700] ->1000\r[] 说明再加10点攻击破防,破防后伤害为1000" - ], "5,11": [ "原声音乐可以在网易云音乐搜索:魔塔 人类:开天辟地 bgm,部分音乐因为版权问题可能无法播放或者不在歌单内" ] diff --git a/public/project/icons.js b/public/project/icons.js index 160d5dc..09d8edd 100644 --- a/public/project/icons.js +++ b/public/project/icons.js @@ -515,7 +515,9 @@ var icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 = "I489": 92, "I490": 93, "I491": 94, - "I558": 95 + "I558": 95, + "I559": 96, + "I560": 97 }, "autotile": { "autotile": 0, diff --git a/public/project/items.js b/public/project/items.js index fcccbbc..2cfe404 100644 --- a/public/project/items.js +++ b/public/project/items.js @@ -1242,5 +1242,18 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = "canUseItemEffect": "true", "text": "可以查看游戏内你已经听过的bgm,歌曲名格式:歌手——歌曲名", "useItemEffect": "core.openBgms();" + }, + "I559": { + "cls": "constants", + "name": "系统设置", + "canUseItemEffect": "true", + "text": "内含所有系统设置项", + "useItemEffect": "if (!main.replayChecking) {\n\tcore.plugin.settingsOpened.value = true;\n}" + }, + "I560": { + "cls": "constants", + "name": "百科全书", + "canUseItemEffect": "true", + "text": "一个包含游戏中所有功能详细说明的百科全书,可以查看游戏中所有的功能" } } \ No newline at end of file diff --git a/public/project/maps.js b/public/project/maps.js index 0224b4c..9f940a1 100644 --- a/public/project/maps.js +++ b/public/project/maps.js @@ -483,6 +483,8 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e = "556": {"cls":"enemys","id":"E556"}, "557": {"cls":"enemys","id":"E557"}, "558": {"cls":"items","id":"I558"}, + "559": {"cls":"items","id":"I559"}, + "560": {"cls":"items","id":"I560"}, "20037": {"cls":"tileset","id":"X20037","cannotOut":["up","left"],"cannotIn":["up","left"]}, "20038": {"cls":"tileset","id":"X20038","cannotOut":["up"],"cannotIn":["up"]}, "20039": {"cls":"tileset","id":"X20039","cannotOut":["up","right"],"cannotIn":["up","right"]}, diff --git a/public/project/materials/items.png b/public/project/materials/items.png index 3ddcc51b6eb2e124ecca0df6b9d912341a9be595..833e4edf9769437f3a3295f26bd764ada4c32240 100644 GIT binary patch delta 8900 zcmZu%RaDf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K*lob{G5TT7i~d|0f_Qxr=>Fr9o^bs}M4(5e--MQX zkFdO5mz}>C0(9yB8oUsfs@g+=_^cBf_t!A-2za)eSTjh6^wm&&}&CcHN zX-Cq%l`G@AqU?$dn2A&u4w){z^Kr(1{4Enur)Zwwp_#syC9()ffr$TfHN+8(f+8+$IYRxE^Cp?moof>Sg z2X4y!%(C&TlHU52;yC&A?6aRZRR{hCO!%c=U>7OXyg~tYn8VuJ=yxt6Houu=4cQh0 za<>PHD}a@)?4WCij^h1*UpeOF9MAoXEywCNyXwM8B(Cqtn|l0GZ{DV9*2%xnelYrC zGiYyDzW>Lw#Vs8W=)nyhBNQcJ@YbRD1T=1Jkh%Y4QDa8_aIh}H-uPBRQBLjsReQdn zOpUDT)h|Z(3CCadghnT-4M6tmBHn6C0Z-MO*=CJmo;zK}sd@fvh#EQDoEuu!V=Mk_4T)dZR&RBIPQAR$>3>M#J--Bz|_> zZ|T~4O5Q6OoZ&(n{#I1%VU+;9EKOxu819VB_ zi76;Pbfdj=>G47PY<@6aAlBxjt|$d3ch5jlM|n^2S*-XqYJlx|rbsx0RkEOs;g3Ly z8=AMf{B8JH6J7ywN=|M0f4P(QBvp4Z&87zUoHMeSC2#IYv)YB()XZ~)8dhXS)@p5; zgnr1+POWE|3#^o3%uL`e?tR3TV;L=Yoh_cP@5==;G)~)kRmW@S_k#`SXc(x!Q^kh; E2d!dn{{R30 diff --git a/public/project/plugins.js b/public/project/plugins.js index 7486f89..3027321 100644 --- a/public/project/plugins.js +++ b/public/project/plugins.js @@ -3370,13 +3370,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { * 如有bug在大群或造塔群@古祠 */ - // 谁tm在即捡即用效果里面调用带有含刷新状态栏的函数 - var origin = core.control.updateStatusBar; - core.updateStatusBar = core.control.updateStatusBar = function () { - if (core.getFlag('__statistics__')) return; - else return origin.apply(core.control, arguments); - }; - core.bigmap.threshold = 256; core.control.updateDamage = function (floorId, ctx) { @@ -8008,268 +8001,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { } }; }, - weatherSuperimpose: function () { - // 天气叠加功能 - ////// 更改天气效果 ////// - control.prototype.setWeather = function (type, level) { - // 非雨雪 - if (type == null) { - Object.keys(core.control.weathers).forEach(one => { - core.deleteCanvas('weather' + one); - }); - core.animateFrame.weather.type = []; - core.animateFrame.weather.nodes = {}; - core.animateFrame.weather.level = {}; - core.animateFrame.weather.time = {}; - return; - } - if (!core.animateFrame.weather.level || level == null) - core.animateFrame.weather.level = {}; - if (!core.animateFrame.weather.type) - core.animateFrame.weather.type = []; - level = core.clamp(parseInt(level) || 5, 1, 10); - // 当前天气:则忽略 - if ( - core.animateFrame.weather.type.includes(type) && - level == core.animateFrame.weather.level[type] - ) - return; - if (core.animateFrame.weather.nodes[type]) return; - // 计算当前的宽高 - core.createCanvas( - 'weather' + type, - 0, - 0, - core.__PIXELS__, - core.__PIXELS__, - 80 - ); - core.animateFrame.weather.type.push(type); - core.animateFrame.weather.level[type] = level; - this._setWeather_createNodes(type, level); - }; - control.prototype._setWeather_createNodes = function (type, level) { - var number = - level * - parseInt( - (20 * core.bigmap.width * core.bigmap.height) / - (core.__SIZE__ * core.__SIZE__) - ); - if (!core.animateFrame.weather.nodes[type]) - core.animateFrame.weather.nodes[type] = []; - switch (type) { - case 'rain': - for (var a = 0; a < number; a++) { - core.animateFrame.weather.nodes.rain.push({ - x: Math.random() * core.bigmap.width * 32, - y: Math.random() * core.bigmap.height * 32, - l: Math.random() * 2.5, - xs: -4 + Math.random() * 4 + 2, - ys: Math.random() * 10 + 10 - }); - } - break; - case 'snow': - for (var a = 0; a < number; a++) { - core.animateFrame.weather.nodes.snow.push({ - x: Math.random() * core.bigmap.width * 32, - y: Math.random() * core.bigmap.height * 32, - r: Math.random() * 5 + 1, - d: Math.random() * Math.min(level, 200) - }); - } - break; - case 'fog': - if (core.animateFrame.weather.fog) { - core.animateFrame.weather.nodes[type] = [ - { - level: number, - x: 0, - y: -core.__PIXELS__ / 2, - dx: -Math.random() * 1.5, - dy: Math.random(), - delta: 0.001 - } - ]; - } - break; - case 'cloud': - if (core.animateFrame.weather.cloud) { - core.animateFrame.weather.nodes[type] = [ - { - level: number, - x: 0, - y: -core.__PIXELS__ / 2, - dx: -Math.random() * 1.5, - dy: Math.random(), - delta: 0.001 - } - ]; - } - break; - case 'sun': - if (core.animateFrame.weather.sun) { - // 直接绘制 - core.clearMap('weather' + type); - core.setAlpha('weather' + type, level / 10); - core.drawImage( - 'weather' + type, - core.animateFrame.weather.sun, - 0, - 0, - core.animateFrame.weather.sun.width, - core.animateFrame.weather.sun.height, - 0, - 0, - core.__PIXELS__, - core.__PIXELS__ - ); - core.setAlpha('weather' + type, 1); - } - break; - } - }; - core.registerAnimationFrame('weather', true, timestamp => { - var weather = core.animateFrame.weather; - if (!weather.type) return; - weather.type.forEach(one => { - if ( - timestamp - weather.time[one] <= 30 || - !core.dymCanvas['weather' + one] - ) - return; - core.control['_animationFrame_weather_' + one](); - weather.time[one] = timestamp; - }); - }); - // 雨 - control.prototype._animationFrame_weather_rain = function () { - var ctx = core.dymCanvas.weatherrain, - ox = core.bigmap.offsetX, - oy = core.bigmap.offsetY; - core.clearMap('weatherrain'); - ctx.strokeStyle = 'rgba(174,194,224,0.8)'; - ctx.lineWidth = 1; - ctx.lineCap = 'round'; - core.animateFrame.weather.nodes.rain.forEach(p => { - ctx.beginPath(); - ctx.moveTo(p.x - ox, p.y - oy); - ctx.lineTo(p.x + p.l * p.xs - ox, p.y + p.l * p.ys - oy); - ctx.stroke(); - p.x += p.xs; - p.y += p.ys; - if ( - p.x > core.bigmap.width * 32 || - p.y > core.bigmap.height * 32 - ) { - p.x = Math.random() * core.bigmap.width * 32; - p.y = -10; - } - }); - ctx.fill(); - }; - // 雪 - control.prototype._animationFrame_weather_snow = function () { - var ctx = core.dymCanvas.weathersnow, - ox = core.bigmap.offsetX, - oy = core.bigmap.offsetY; - core.clearMap('weathersnow'); - ctx.fillStyle = 'rgba(255, 255, 255, 0.8)'; - ctx.beginPath(); - if (!core.animateFrame.weather.data) - core.animateFrame.weather.data = {}; - core.animateFrame.weather.data.snow = - core.animateFrame.weather.data.snow || 0; - core.animateFrame.weather.data.snow += 0.01; - var angle = core.animateFrame.weather.data.snow; - core.animateFrame.weather.nodes.snow.forEach(p => { - ctx.moveTo(p.x - ox, p.y - oy); - ctx.arc(p.x - ox, p.y - oy, p.r, 0, Math.PI * 2, true); - // update - p.x += Math.sin(angle) * core.animateFrame.weather.level.snow; - p.y += Math.cos(angle + p.d) + 1 + p.r / 2; - if ( - p.x > core.bigmap.width * 32 + 5 || - p.x < -5 || - p.y > core.bigmap.height * 32 - ) { - if (Math.random() > 1 / 3) { - p.x = Math.random() * core.bigmap.width * 32; - p.y = -10; - } else { - if (Math.sin(angle) > 0) p.x = -5; - else p.x = core.bigmap.width * 32 + 5; - p.y = Math.random() * core.bigmap.height * 32; - } - } - }); - ctx.fill(); - }; - // 图片天气 - control.prototype.__animateFrame_weather_image = function ( - image, - type - ) { - if (!image) return; - var node = core.animateFrame.weather.nodes[type][0]; - core.setAlpha('weather' + type, node.level / 500); - var wind = 1.5; - var width = image.width, - height = image.height; - node.x += node.dx * wind; - node.y += (2 * node.dy - 1) * wind; - if (node.x + 3 * width <= core.__PIXELS__) { - node.x += 4 * width; - while (node.x > 0) node.x -= width; - } - node.dy += node.delta; - if (node.dy >= 1) { - node.delta = -0.001; - } else if (node.dy <= 0) { - node.delta = 0.001; - } - if (node.y + 3 * height <= core.__PIXELS__) { - node.y += 4 * height; - while (node.y > 0) node.y -= height; - } else if (node.y >= 0) { - node.y -= height; - } - for (var i = 0; i < 3; ++i) { - for (var j = 0; j < 3; ++j) { - if ( - node.x + (i + 1) * width <= 0 || - node.x + i * width >= core.__PIXELS__ || - node.y + (j + 1) * height <= 0 || - node.y + j * height >= core.__PIXELS__ - ) - continue; - core.drawImage( - 'weather' + type, - image, - node.x + i * width, - node.y + j * height - ); - } - } - core.setAlpha('weather' + type, 1); - }; - // 雾 - control.prototype._animationFrame_weather_fog = function () { - core.clearMap('weatherfog'); - this.__animateFrame_weather_image( - core.animateFrame.weather.fog, - 'fog' - ); - }; - // 云 - control.prototype._animationFrame_weather_cloud = function () { - core.clearMap('weathercloud'); - this.__animateFrame_weather_image( - core.animateFrame.weather.cloud, - 'cloud' - ); - }; - }, + weatherSuperimpose: function () {}, popupDamage: function () { // 伤害弹出 // 复写阻激夹域检测 @@ -9266,6 +8998,13 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { uiChange: function () { if (main.replayChecking) return; + function updateVueStatusBar() { + if (main.replayChecking) return; + core.plugin.statusBarStatus.value = + !core.plugin.statusBarStatus.value; + core.checkMarkedEnemy(); + } + ui.prototype.drawBook = function () { return (core.plugin.bookOpened.value = true); }; @@ -9286,8 +9025,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { core.clearRouteFolding(); core.control.noAutoEvents = true; // 更新vue状态栏 - core.plugin.statusBarStatus.value = - !core.plugin.statusBarStatus.value; + updateVueStatusBar(); }; control.prototype.showStatusBar = function () { diff --git a/src/App2.vue b/src/App2.vue index 3b52644..e3b1c0e 100644 --- a/src/App2.vue +++ b/src/App2.vue @@ -1,6 +1,7 @@ @@ -8,6 +9,7 @@ import { ref } from 'vue'; import StatusBar from './ui/statusBar.vue'; import { showStatusBar } from './plugin/uiController'; +import MarkedEnemy from './ui/markedEnemy.vue'; diff --git a/src/plugin/mark.ts b/src/plugin/mark.ts new file mode 100644 index 0000000..87f21fe --- /dev/null +++ b/src/plugin/mark.ts @@ -0,0 +1,127 @@ +import { reactive, ref } from 'vue'; +import { message } from 'ant-design-vue'; + +const markedEnemy = reactive([]); + +interface MarkInfo { + nextCritical: number; +} + +const markInfo: Partial> = {}; +const criticalReached: Partial>> = {}; +const enemyDamageInfo: Partial>> = {}; + +/** + * 标记一个怪物,标记后的怪物会在勇士刚好能打过怪物时、伤害刚好小于勇士生命值的2/3和1/3时、踩到临界时提示 + * @param id 标记的怪物id + */ +export function markEnemy(id: EnemyIds) { + if (hasMarkedEnemy(id)) return; + markedEnemy.push(id); + markInfo[id] = { + nextCritical: + core.nextCriticals(id, 1)[0]?.[0] ?? 0 + core.status.hero.atk + }; + criticalReached[id] = { 0: true }; + enemyDamageInfo[id] = { 1: false, 2: false, 3: false }; + getMarkInfo(id); + checkMarkedEnemy(); +} + +/** + * 是否标记过某个怪物 + */ +export function hasMarkedEnemy(id: EnemyIds) { + return markedEnemy.includes(id); +} + +/** + * 取消标记某个怪物 + */ +export function unmarkEnemy(id: EnemyIds) { + const index = markedEnemy.indexOf(id); + if (index === -1) return; + markedEnemy.splice(index, 1); + checkMarkedEnemy(); +} + +/** + * 获得所有被标记的怪物 + */ +export function getMarkedEnemy() { + return markedEnemy; +} + +/** + * 获取怪物的临界信息 + * @param id 怪物id + */ +export function getMarkInfo(id: EnemyIds) { + const reached = criticalReached[id]!; + const info = markInfo[id]!; + if (core.status.hero.atk >= info.nextCritical) { + if (!reached[info.nextCritical]) { + message.success({ + content: `踩到了${core.material.enemys[id].name}的临界!`, + class: 'antdv-message' + }); + } + reached[info.nextCritical] = true; + const n = core.nextCriticals(id, 1)[0]?.[0]; + const next = (n ?? 0) + core.status.hero.atk; + info.nextCritical = next; + } +} + +/** + * 检查被标记怪物的状态 + */ +export function checkMarkedEnemy() { + checkMarkedStatus.value = !checkMarkedStatus.value; + const toDelete: EnemyIds[] = []; + const hp = core.status.hero.hp; + getMarkedEnemy().forEach(v => { + getMarkInfo(v); + const damage = core.getDamageInfo(v)?.damage ?? -1; + if (damage === -1) return; + const info = enemyDamageInfo[v]!; + const name = core.material.enemys[v].name; + if (damage < hp / 3) { + if (!info[3]) { + message.success({ + content: `${name}的伤害已降至勇士生命值的1/3!`, + class: 'antdv-message' + }); + } + info[1] = true; + info[2] = true; + info[3] = true; + } else if (damage < (hp / 3) * 2) { + if (!info[2]) { + message.success({ + content: `${name}的伤害已降至勇士生命值的2/3!`, + class: 'antdv-message' + }); + } + info[1] = true; + info[2] = true; + info[3] = false; + } else if (damage < hp) { + if (!info[1]) { + message.success({ + content: `${name}的伤害已降至勇士生命值的2/3!`, + class: 'antdv-message' + }); + } + info[1] = true; + info[2] = false; + info[3] = false; + } + }); +} + +export const checkMarkedStatus = ref(false); + +export default function init() { + return { checkMarkedEnemy, checkStatus: checkMarkedStatus }; +} diff --git a/src/plugin/settings.ts b/src/plugin/settings.ts new file mode 100644 index 0000000..5b6c414 --- /dev/null +++ b/src/plugin/settings.ts @@ -0,0 +1,15 @@ +import { ref, watch } from 'vue'; + +/** + * 打开和关闭ui时是否展示动画 + */ +export const transition = ref(true); + +watch(transition, n => { + core.plugin.transition.value = n; + core.setLocalStorage('transition', n); +}); + +window.addEventListener('load', () => { + transition.value = core.getLocalStorage('transition'); +}); diff --git a/src/plugin/uiController.ts b/src/plugin/uiController.ts index ffa2149..170c133 100644 --- a/src/plugin/uiController.ts +++ b/src/plugin/uiController.ts @@ -3,12 +3,15 @@ import { Component, markRaw, ref, Ref, watch } from 'vue'; import Book from '../ui/book.vue'; import Toolbox from '../ui/toolbox.vue'; import Equipbox from '../ui/equipbox.vue'; -import StatusBar from '../ui/statusBar.vue'; +import Settings from '../ui/settings.vue'; +import Desc from '../ui/desc.vue'; export const bookOpened = ref(false); export const toolOpened = ref(false); export const equipOpened = ref(false); export const showStatusBar = ref(false); +export const settingsOpened = ref(false); +export const descOpened = ref(false); export const transition = ref(true); export const noClosePanel = ref(false); @@ -19,7 +22,9 @@ let app: HTMLDivElement; const UI_LIST: [Ref, Component][] = [ [bookOpened, Book], [toolOpened, Toolbox], - [equipOpened, Equipbox] + [equipOpened, Equipbox], + [settingsOpened, Settings], + [descOpened, Desc] ]; /** ui栈 */ @@ -48,7 +53,8 @@ export default function init() { bookOpened, toolOpened, equipOpened, - showStatusBar + showStatusBar, + settingsOpened }; } @@ -57,7 +63,7 @@ async function showApp() { if (transition.value) { app.style.transition = 'all 0.6s linear'; } else { - app.style.transition = ''; + app.style.transition = 'none'; } app.style.display = 'flex'; await sleep(50); diff --git a/src/plugin/use.ts b/src/plugin/use.ts index 0654438..bea32cf 100644 --- a/src/plugin/use.ts +++ b/src/plugin/use.ts @@ -100,10 +100,7 @@ export function useDrag( export function cancelGlobalDrag(fn: DragFn): void { const fns = dragFnMap.get(fn); dragFnMap.delete(fn); - if (!fns) - throw new ReferenceError( - 'The drag function to be canceled does not exist.' - ); + if (!fns) return; document.removeEventListener('mousemove', fns[0]); document.removeEventListener('touchmove', fns[1]); document.removeEventListener('mouseup', fns[0]); diff --git a/src/plugin/utils.ts b/src/plugin/utils.ts index c6ff82b..edd96dd 100644 --- a/src/plugin/utils.ts +++ b/src/plugin/utils.ts @@ -99,6 +99,7 @@ export function type( if (typeof toShow !== 'string') { throw new TypeError('Error str type in typing!'); } + if (toShow.startsWith('!!html')) return ref(toShow); if (avr) time *= toShow.length; const ani = new Animation(); const content = ref(''); diff --git a/src/source/cls.d.ts b/src/source/cls.d.ts index 81a40b5..839323b 100644 --- a/src/source/cls.d.ts +++ b/src/source/cls.d.ts @@ -482,6 +482,8 @@ interface IdToCls { E556: 'enemys'; E557: 'enemys'; I558: 'items'; + I559: 'items'; + I560: 'items'; X20037: 'tileset'; X20038: 'tileset'; X20039: 'tileset'; diff --git a/src/source/items.d.ts b/src/source/items.d.ts index 021279b..c0b673e 100644 --- a/src/source/items.d.ts +++ b/src/source/items.d.ts @@ -179,4 +179,6 @@ interface ItemDeclaration { I490: 'items'; I491: 'items'; I558: 'constants'; + I559: 'constants'; + I560: 'constants'; } \ No newline at end of file diff --git a/src/source/maps.d.ts b/src/source/maps.d.ts index 7667842..6ab18b5 100644 --- a/src/source/maps.d.ts +++ b/src/source/maps.d.ts @@ -482,6 +482,8 @@ interface IdToNumber { E556: 556; E557: 557; I558: 558; + I559: 559; + I560: 560; X20037: 20037; X20038: 20038; X20039: 20039; @@ -998,6 +1000,8 @@ interface NumberToId { 556: 'E556'; 557: 'E557'; 558: 'I558'; + 559: 'I559'; + 560: 'I560'; 20037: 'X20037'; 20038: 'X20038'; 20039: 'X20039'; diff --git a/src/types/enemy.d.ts b/src/types/enemy.d.ts index c2bd016..52b715b 100644 --- a/src/types/enemy.d.ts +++ b/src/types/enemy.d.ts @@ -46,6 +46,11 @@ type Enemy = { */ name: string; + /** + * 怪物说明 + */ + description: string; + /** * 在怪物手册中映射到的怪物ID。如果此项不为null,则在怪物手册中,将用目标ID来替换该怪物原本的ID。 * 常被运用在同一个怪物的多朝向上 diff --git a/src/types/plugin.d.ts b/src/types/plugin.d.ts index 82245fa..1d37702 100644 --- a/src/types/plugin.d.ts +++ b/src/types/plugin.d.ts @@ -30,7 +30,7 @@ interface PluginDeclaration extends PluginUtils { bookDetailPos: number; /** 怪物手册详细信息展示的怪物 */ - bookDetailEnemy: Enemy & DetailedEnemy; + bookDetailEnemy: DetailedEnemy; /** ui是否使用渐变 */ readonly transition: Ref; @@ -44,18 +44,24 @@ interface PluginDeclaration extends PluginUtils { /** 装备栏是否打开 */ readonly equipOpened: Ref; - /** 状态栏信息,取反后刷新状态栏 */ - readonly statusBarStatus: Ref; - /** 是否显示状态栏 */ readonly showStatusBar: Ref; + /** 设置界面是否打开 */ + readonly settingsOpened: Ref; + /** ui栈 */ readonly uiStack: Ref; /** 是否是移动设备 */ readonly isMobile: boolean; + /** 状态栏信息,取反后刷新状态栏 */ + readonly statusBarStatus: Ref; + + /** 检查标记的怪物,取反后更新显示信息 */ + readonly checkMarkedStatus: Ref; + /** * 向一个元素添加拖拽事件 * @param ele 目标元素 @@ -105,6 +111,11 @@ interface PluginDeclaration extends PluginUtils { * @param fn 要移除的函数 */ removeAnimate(fn: (time: number) => void); + + /** + * 检查被标记怪物的状态,是否需要更新 + */ + checkMarkedEnemy(); } interface PluginUtils { diff --git a/src/ui/book.vue b/src/ui/book.vue index 0cf31ae..202b8de 100644 --- a/src/ui/book.vue +++ b/src/ui/book.vue @@ -127,6 +127,8 @@ async function show() { async function exit() { noClosePanel.value = true; core.plugin.bookOpened.value = false; + if (core.plugin.transition.value) await sleep(650); + else await sleep(100); if (core.events.recoverEvents(core.status.event.interval)) { return; } else if (has(core.status.event.ui)) { @@ -134,7 +136,6 @@ async function exit() { // @ts-ignore core.ui._drawViewMaps(core.status.event.ui); } else core.ui.closePanel(); - await sleep(650); } function checkScroll() { @@ -202,7 +203,8 @@ function keydown(e: KeyboardEvent) { onMounted(async () => { const div = document.getElementById('book') as HTMLDivElement; div.style.opacity = '1'; - await sleep(600); + if (core.plugin.transition.value) await sleep(600); + else await sleep(100); document.addEventListener('keyup', keyup); document.addEventListener('keydown', keydown); }); diff --git a/src/ui/bookDetail.vue b/src/ui/bookDetail.vue index 0a9a7be..2aedef8 100644 --- a/src/ui/bookDetail.vue +++ b/src/ui/bookDetail.vue @@ -11,6 +11,7 @@ +

@@ -19,7 +20,12 @@ class="detial-more" v-if="panel === 'special'" > - + 怪物更多信息 怪物特殊属性
+
+ + 怪物特殊属性 +
@@ -54,6 +73,7 @@ import EnemyCritical from '../panel/enemyCritical.vue'; import { KeyCode } from '../plugin/keyCodes'; import { keycode } from '../plugin/utils'; import { sleep } from 'mutate-animate'; +import EnemyTarget from '../panel/enemyTarget.vue'; const enemy = core.plugin.bookDetailEnemy; const top = ref(core.plugin.bookDetailPos); @@ -104,7 +124,7 @@ onMounted(async () => { if (y > (parseFloat(style.height) * 4) / 5) moved = true; }, () => { - if (moved === false && panel.value !== 'critical') { + if (moved === false && panel.value === 'special') { close(); } moved = false; diff --git a/src/ui/desc.vue b/src/ui/desc.vue new file mode 100644 index 0000000..c9ead68 --- /dev/null +++ b/src/ui/desc.vue @@ -0,0 +1,14 @@ + + + + + diff --git a/src/ui/markedEnemy.vue b/src/ui/markedEnemy.vue new file mode 100644 index 0000000..89b146b --- /dev/null +++ b/src/ui/markedEnemy.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/src/ui/settings.vue b/src/ui/settings.vue new file mode 100644 index 0000000..25853a0 --- /dev/null +++ b/src/ui/settings.vue @@ -0,0 +1,106 @@ + + + + + diff --git a/src/ui/toolbox.vue b/src/ui/toolbox.vue index 581af2f..91a8706 100644 --- a/src/ui/toolbox.vue +++ b/src/ui/toolbox.vue @@ -149,7 +149,6 @@ watch(mode, n => { const descText = computed(() => { const s = selected.value; if (s === 'none') return ref('没有选择道具'); - if (all[s].text!.startsWith('!!html')) return ref(all[s].text); return type(all[s].text!, 25, hyper('sin', 'out'), true); });