diff --git a/public/_server/table/comment.js b/public/_server/table/comment.js index 12b6744..a2b804e 100644 --- a/public/_server/table/comment.js +++ b/public/_server/table/comment.js @@ -261,6 +261,12 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { "_docs": "极昼", "_data": "极昼" }, + "melt": { + "_leaf": true, + "_type": "textarea", + "_docs": "融化", + "_data": "融化" + }, "value": { "_leaf": true, "_type": "textarea", diff --git a/public/libs/maps.js b/public/libs/maps.js index 6e1e8a8..f45173b 100644 --- a/public/libs/maps.js +++ b/public/libs/maps.js @@ -2620,6 +2620,11 @@ maps.prototype._drawThumbnail_drawTempCanvas = function ( } options.ctx = tempCanvas; + tempCanvas.imageSmoothingEnabled = core.getLocalStorage( + 'antiAliasing', + true + ); + // 地图过大的缩略图不绘制显伤 if (width * height > core.bigmap.threshold) options.damage = false; diff --git a/public/project/enemys.js b/public/project/enemys.js index 6358c71..1e15db7 100644 --- a/public/project/enemys.js +++ b/public/project/enemys.js @@ -149,8 +149,18 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = "E597": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E598": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "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":[]}, + "E600": {"name":"寒冰巨石","hp":3000,"atk":2250,"def":0,"money":2,"exp":100,"point":0,"special":[3]}, "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}, - "E603": {"name":"极昼蝠","hp":8000,"atk":1750,"def":1000,"money":1,"exp":65,"point":0,"special":[23],"day":100} + "E603": {"name":"极昼蝠","hp":8000,"atk":1750,"def":1000,"money":1,"exp":65,"point":0,"special":[23],"day":100}, + "E605": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, + "E606": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, + "E607": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, + "E608": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, + "E609": {"name":"具形雪人","hp":7500,"atk":2250,"def":1000,"money":2,"exp":90,"point":0,"special":[25],"melt":15}, + "E610": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, + "E611": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, + "E612": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, + "E613": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, + "E614": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]} } \ No newline at end of file diff --git a/public/project/floors/MT36.js b/public/project/floors/MT36.js index 3a42368..e7e237f 100644 --- a/public/project/floors/MT36.js +++ b/public/project/floors/MT36.js @@ -45,7 +45,7 @@ main.floors.MT36= [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,70176,70177,70177,70177,70177], [604, 0, 0, 0, 0, 0, 0, 0, 0, 0,70184,70185,70185,70185, 94], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,70208,70209,70209,70209,70209], - [604, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [604, 0, 0, 0, 0, 0,600, 0, 0, 0, 0, 0, 0, 0, 0], [587, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [587, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], diff --git a/public/project/functions.js b/public/project/functions.js index 91004e5..dedd1d0 100644 --- a/public/project/functions.js +++ b/public/project/functions.js @@ -393,6 +393,12 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = { core.declineStudiedSkill(); } + // 如果是融化怪,需要特殊标记一下 + if (core.hasSpecial(special, 25) && core.has(x) && core.has(y)) { + flags[`melt_${floorId}`] ??= {}; + flags[`melt_${floorId}`][`${x},${y}`] = enemy.melt; + } + // 获得金币 const money = enemy.money; core.status.hero.money += money; @@ -709,19 +715,9 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = { ], [ 25, - '光环', - function (enemy) { - return ( - '同楼层所有怪物生命提升' + - (enemy.value || 0) + - '%,攻击提升' + - (enemy.atkValue || 0) + - '%,防御提升' + - (enemy.defValue || 0) + - '%,' + - (enemy.add ? '可叠加' : '不可叠加') - ); - }, + '融化', + enemy => + `战斗后该怪物会融化,在怪物位置产生一个3*3的范围光环,光环内怪物的攻防增加${enemy.melt}%`, '#e6e099', 1 ], @@ -810,96 +806,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = { var guards = []; - // 光环和支援检查 - if (!core.status.checkBlock) core.status.checkBlock = {}; - - if (core.status.checkBlock.needCache) { - // 从V2.5.4开始,对光环效果增加缓存,以解决多次重复计算的问题,从而大幅提升运行效率。 - var hp_buff = 0, - atk_buff = 0, - def_buff = 0; - // 检查光环和支援的缓存 - var index = - x != null && y != null ? x + ',' + y : 'floor' + enemy.id; - core.status.checkBlock.cache ??= {}; - var cache = core.status.checkBlock.cache[index]; - if (!cache) { - // 没有该点的缓存,则遍历每个图块 - core.extractBlocks(floorId); - core.status.maps[floorId].blocks.forEach(function (block) { - if (block.disable) return; - // 获得该图块的ID - var id = block.event.id, - e = core.material.enemys[id]; - var dx = Math.abs(block.x - x), - dy = Math.abs(block.y - y); - // 检查【支援】技能,数字26 - if ( - e && - core.hasSpecial(e.special, 26) && - // 检查支援条件,坐标存在,距离为1,且不能是自己 - // 其他类型的支援怪,比如十字之类的话.... 看着做是一样的 - x != null && - y != null && - Math.abs(block.x - x) <= 1 && - Math.abs(block.y - y) <= 1 && - !(x == block.x && y == block.y) - ) { - // 记录怪物的x,y,ID - guards.push([block.x, block.y, id]); - } - - // 抱团 - if ( - e && - core.hasSpecial(mon_special, 8) && - core.hasSpecial(e.special, 8) && - !(dx == 0 && dy == 0) && - dx < 3 && - dy < 3 - ) { - atk_buff += enemy.together || 0; - def_buff += enemy.together || 0; - } - - // 冰封光环 - if ( - e && - core.hasSpecial(e.special, 21) && - x != null && - y != null && - dx < 4 && - dy < 4 - ) { - iceDecline += e.iceHalo; - } - - // TODO:如果有其他类型光环怪物在这里仿照添加检查 - // 注:新增新的类光环属性(需要遍历全图的)需要在特殊属性定义那里的第五项写1,参见光环和支援的特殊属性定义。 - }); - core.status.checkBlock.cache[index] = { - hp_buff: hp_buff, - atk_buff: atk_buff, - def_buff: def_buff, - guards: guards, - iceHalo: iceDecline - }; - } else { - // 直接使用缓存数据 - hp_buff = cache.hp_buff; - atk_buff = cache.atk_buff; - def_buff = cache.def_buff; - guards = cache.guards; - iceDecline = cache.iceHalo; - } - - // 增加比例;如果要增加数值可以直接在这里修改 - mon_hp *= 1 + hp_buff / 100; - mon_atk *= 1 + atk_buff / 100; - mon_def *= 1 + def_buff / 100; - } - - return { + const info = { hp: Math.floor(mon_hp), atk: Math.floor(mon_atk), def: Math.floor(mon_def), @@ -910,6 +817,114 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = { guards: guards, // 返回支援情况 iceDecline }; + + // 光环和支援检查 + core.status.checkBlock ??= {}; + + if (!core.status.checkBlock.needCache) return info; + + var hp_buff = 0, + atk_buff = 0, + def_buff = 0; + // 检查光环和支援的缓存 + var index = + x != null && y != null ? x + ',' + y : 'floor' + enemy.id; + core.status.checkBlock.cache ??= {}; + var cache = core.status.checkBlock.cache[index]; + if (!cache) { + // 没有该点的缓存,则遍历每个图块 + core.extractBlocks(floorId); + core.status.maps[floorId].blocks.forEach(function (block) { + if (block.disable) return; + // 获得该图块的ID + var id = block.event.id, + e = core.material.enemys[id]; + var dx = Math.abs(block.x - x), + dy = Math.abs(block.y - y); + // 检查【支援】技能,数字26 + if ( + e && + core.hasSpecial(e.special, 26) && + // 检查支援条件,坐标存在,距离为1,且不能是自己 + // 其他类型的支援怪,比如十字之类的话.... 看着做是一样的 + x != null && + y != null && + Math.abs(block.x - x) <= 1 && + Math.abs(block.y - y) <= 1 && + !(x == block.x && y == block.y) + ) { + // 记录怪物的x,y,ID + guards.push([block.x, block.y, id]); + } + + // 抱团 + if ( + e && + core.hasSpecial(mon_special, 8) && + core.hasSpecial(e.special, 8) && + !(dx == 0 && dy == 0) && + dx < 3 && + dy < 3 + ) { + atk_buff += enemy.together || 0; + def_buff += enemy.together || 0; + } + + // 冰封光环 + if ( + e && + core.hasSpecial(e.special, 21) && + x != null && + y != null && + dx < 4 && + dy < 4 + ) { + iceDecline += e.iceHalo; + } + + // TODO:如果有其他类型光环怪物在这里仿照添加检查 + // 注:新增新的类光环属性(需要遍历全图的)需要在特殊属性定义那里的第五项写1,参见光环和支援的特殊属性定义。 + }); + + // 融化怪要在这里判断 + if ( + core.has(flags[`melt_${floorId}`]) && + core.has(x) && + core.has(y) + ) { + for (const [loc, per] of Object.entries( + flags[`melt_${floorId}`] + )) { + const [mx, my] = loc.split(',').map(v => parseInt(v)); + if (Math.abs(mx - x) <= 1 && Math.abs(my - y) <= 1) { + atk_buff += per; + def_buff += per; + } + } + } + + core.status.checkBlock.cache[index] = { + hp_buff: hp_buff, + atk_buff: atk_buff, + def_buff: def_buff, + guards: guards, + iceHalo: iceDecline + }; + } else { + // 直接使用缓存数据 + hp_buff = cache.hp_buff; + atk_buff = cache.atk_buff; + def_buff = cache.def_buff; + guards = cache.guards; + iceDecline = cache.iceHalo; + } + + // 增加比例;如果要增加数值可以直接在这里修改 + mon_hp *= 1 + hp_buff / 100; + mon_atk *= 1 + atk_buff / 100; + mon_def *= 1 + def_buff / 100; + + return info; }, getDamageInfo: function (enemy, hero, x, y, floorId) { // 获得战斗伤害信息(实际伤害计算函数) @@ -925,14 +940,10 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = { // 勇士位置应该在这里进行计算,四个位置依次遍历,去重 let toMap = []; if ( - x !== null && - x !== void 0 && - y !== null && - y !== void 0 && - (hero?.x === null || hero?.x === void 0) && - (hero?.y === null || hero?.y === void 0) && - floorId !== null && - floorId !== void 0 && + core.has(x) && + core.has(y) && + !(core.has(hero?.x) && core.has(hero?.y)) && + core.has(floorId) && flags.autoLocate && flags.chapter >= 2 ) { @@ -1741,6 +1752,15 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = { } } + // 融化怪 + if (core.has(flags[`melt_${floorId}`])) { + Object.keys(flags[`melt_${floorId}`]).forEach(v => { + needCache = true; + halo[v] ??= []; + halo[v].push('square:3:#d9a8ff'); + }); + } + core.flags.canGoDeadZone = canGoDeadZone; core.status.checkBlock = { damage: damage, diff --git a/public/project/icons.js b/public/project/icons.js index 24bb91b..ac9e464 100644 --- a/public/project/icons.js +++ b/public/project/icons.js @@ -367,7 +367,17 @@ var icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 = "E600": 145, "E601": 146, "E602": 147, - "E603": 148 + "E603": 148, + "E605": 149, + "E606": 150, + "E607": 151, + "E608": 152, + "E609": 153, + "E610": 154, + "E611": 155, + "E612": 156, + "E613": 157, + "E614": 158 }, "enemy48": { "angel": 0, diff --git a/public/project/maps.js b/public/project/maps.js index 4c7da55..af03f38 100644 --- a/public/project/maps.js +++ b/public/project/maps.js @@ -532,6 +532,16 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e = "602": {"cls":"enemys","id":"E602"}, "603": {"cls":"enemys","id":"E603"}, "604": {"cls":"terrains","id":"T604"}, + "605": {"cls":"enemys","id":"E605"}, + "606": {"cls":"enemys","id":"E606"}, + "607": {"cls":"enemys","id":"E607"}, + "608": {"cls":"enemys","id":"E608"}, + "609": {"cls":"enemys","id":"E609"}, + "610": {"cls":"enemys","id":"E610"}, + "611": {"cls":"enemys","id":"E611"}, + "612": {"cls":"enemys","id":"E612"}, + "613": {"cls":"enemys","id":"E613"}, + "614": {"cls":"enemys","id":"E614"}, "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/enemys.png b/public/project/materials/enemys.png index 7a51db6..f96992f 100644 Binary files a/public/project/materials/enemys.png and b/public/project/materials/enemys.png differ diff --git a/public/project/plugins.js b/public/project/plugins.js index 01c3b04..c45a92e 100644 --- a/public/project/plugins.js +++ b/public/project/plugins.js @@ -575,6 +575,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { delete flags[`jump_${floorId}`]; delete flags[`inte_${floorId}`]; delete flags[`loop_${floorId}`]; + delete flags[`melt_${floorId}`]; + delete flags[`night_${floorId}`]; } // 恢复楼层 @@ -4710,5 +4712,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { right: 'left' }[dir]; }; + + this.has = function (v) { + return v !== null && v !== void 0; + }; } }; diff --git a/src/data/settings.json b/src/data/settings.json index 68a61b2..e45b501 100644 --- a/src/data/settings.json +++ b/src/data/settings.json @@ -56,10 +56,7 @@ "antiAliasing": { "text": "抗锯齿", "desc": [ - "是否开启抗锯齿。开启后,画面会变得不那么锐利,观感更加舒适;关闭后,可以更好地展现出像素感。", - "
", - "
", - "此项只对游戏画面起作用,对浏览地图和楼传均不起作用。" + "是否开启抗锯齿。开启后,画面会变得不那么锐利,观感更加舒适;关闭后,可以更好地展现出像素感,同时部分像素错误也不会出现。" ] }, "showStudied": { diff --git a/src/panel/enemyCritical.vue b/src/panel/enemyCritical.vue index eb300be..34445b1 100644 --- a/src/panel/enemyCritical.vue +++ b/src/panel/enemyCritical.vue @@ -144,6 +144,7 @@ const nowDamage = computed(() => { }); function generateChart(ele: HTMLCanvasElement, data: [number, number][]) { + Chart.defaults.color = '#aaa'; const config: ChartConfiguration = { type: 'line', data: generateData(data), diff --git a/src/plugin/settings.ts b/src/plugin/settings.ts index 4e778f8..8e734e4 100644 --- a/src/plugin/settings.ts +++ b/src/plugin/settings.ts @@ -86,6 +86,7 @@ watch(autoSkill, n => { watch(antiAliasing, n => { core.setLocalStorage('antiAliasing', n); for (const canvas of core.dom.gameCanvas) { + if (core.domStyle.hdCanvas.includes(canvas.id)) continue; if (n) { canvas.classList.remove('no-anti-aliasing'); } else { diff --git a/src/plugin/ui/fixed.ts b/src/plugin/ui/fixed.ts index 25e4ad7..2ff0a38 100644 --- a/src/plugin/ui/fixed.ts +++ b/src/plugin/ui/fixed.ts @@ -32,6 +32,9 @@ export default function init() { if (!e) return; show(ev); }); + data.addEventListener('mousedown', ev => { + showFixed.value = false; + }); return { showFixed diff --git a/src/source/cls.d.ts b/src/source/cls.d.ts index 0830efe..4e1ec20 100644 --- a/src/source/cls.d.ts +++ b/src/source/cls.d.ts @@ -531,6 +531,16 @@ interface IdToCls { E602: 'enemys'; E603: 'enemys'; T604: 'terrains'; + E605: 'enemys'; + E606: 'enemys'; + E607: 'enemys'; + E608: 'enemys'; + E609: 'enemys'; + E610: 'enemys'; + E611: 'enemys'; + E612: 'enemys'; + E613: 'enemys'; + E614: 'enemys'; X20037: 'tileset'; X20038: 'tileset'; X20039: 'tileset'; diff --git a/src/source/maps.d.ts b/src/source/maps.d.ts index 55fde03..7c75a2c 100644 --- a/src/source/maps.d.ts +++ b/src/source/maps.d.ts @@ -531,6 +531,16 @@ interface IdToNumber { E602: 602; E603: 603; T604: 604; + E605: 605; + E606: 606; + E607: 607; + E608: 608; + E609: 609; + E610: 610; + E611: 611; + E612: 612; + E613: 613; + E614: 614; X20037: 20037; X20038: 20038; X20039: 20039; @@ -1116,6 +1126,16 @@ interface NumberToId { 602: 'E602'; 603: 'E603'; 604: 'T604'; + 605: 'E605'; + 606: 'E606'; + 607: 'E607'; + 608: 'E608'; + 609: 'E609'; + 610: 'E610'; + 611: 'E611'; + 612: 'E612'; + 613: 'E613'; + 614: 'E614'; 20037: 'X20037'; 20038: 'X20038'; 20039: 'X20039'; diff --git a/src/types/plugin.d.ts b/src/types/plugin.d.ts index 05ade6c..9474b1e 100644 --- a/src/types/plugin.d.ts +++ b/src/types/plugin.d.ts @@ -134,6 +134,12 @@ interface PluginUtils { * @param dir 方向 */ backDir(dir: Dir): Dir; + + /** + * 判断一个值是否不是undefined和null + * @param value 要判断的值 + */ + has(value: T): value is NonNullable; } interface PluginUis {