From aa6e89eeb84c05f5999856a74226889d0c198534 Mon Sep 17 00:00:00 2001 From: bdf1 Date: Sun, 1 Sep 2024 21:20:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=8E=E6=9C=9F=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=85=89=E6=98=8E=E8=8D=AF=E6=B0=B4=E9=AD=94=E5=8A=9B?= =?UTF-8?q?=E5=8F=98=E4=B8=BA602214=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=9B?= =?UTF-8?q?=E5=8A=A0=E5=BF=AB=E4=B8=B4=E7=95=8C=E7=9A=84=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=EF=BC=9B=E5=8A=A0=E5=85=A5=E6=9B=B4=E5=A4=9A=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=EF=BC=9B=E5=90=83=E9=9D=9E=E4=B8=80=E9=98=B6=E5=AE=9D=E7=9F=B3?= =?UTF-8?q?=E4=B9=9F=E4=BC=9A=E5=8F=91=E5=87=BA=E5=90=83=E5=AE=9D=E7=9F=B3?= =?UTF-8?q?=E7=9A=84=E5=A3=B0=E9=9F=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/floors/BH20.js | 2 +- project/floors/GM2.js | 7 +++- project/floors/GM3.js | 3 +- project/floors/NH10.js | 2 +- project/floors/SN10.js | 3 +- project/floors/SR10.js | 3 +- project/functions.js | 85 +++++++++++++++++++++++------------------- project/plugins.js | 38 ++++++++++++++++++- 8 files changed, 98 insertions(+), 45 deletions(-) diff --git a/project/floors/BH20.js b/project/floors/BH20.js index b86298d..60f2497 100644 --- a/project/floors/BH20.js +++ b/project/floors/BH20.js @@ -380,7 +380,7 @@ main.floors.BH20= "\t[莫析辉,hero]\b[hero]可恶,我以为打败了黑暗圣子,便已经无忧了,没想到 这个黑暗圣女如此强大……", "\t[希娜,N538]\b[this,5,4]……", "\t[希娜,N538]\b[this,5,4]父皇陨落,我先整合北寒帝国吧,然后集北寒帝国之力,助你对付黑暗神殿。", - "\t[莫析辉,hero]\b[hero]黛默琳已经扰乱了东凌帝国、南荒帝国、北寒帝国……糟了,下一步定是\r[red]\\c[30]西武帝国\\c[]\r[]。看来不能多留了,我得去西武帝国看看。", + "\t[莫析辉,hero]\b[hero]黛默琳已经扰乱了东凌帝国、南荒帝国、北寒帝国……糟了,下一步定是\r[red]\\c[30]西武帝国\\c[]\r[]。看来不能多留了,我得去西武帝国看看。西武帝国的入口在深入区的终点。", { "type": "setBlock", "number": "I416", diff --git a/project/floors/GM2.js b/project/floors/GM2.js index 7722d65..bcc8e54 100644 --- a/project/floors/GM2.js +++ b/project/floors/GM2.js @@ -160,7 +160,12 @@ main.floors.GM2= ], "floorId": "GM1", "remove": true - } + }, + { + "type": "openShop", + "id": "shop1" + }, + "\t[光明教皇,N464]\b[this,6,5]请你去一下你的圣子宫。" ], "eachArrive": [ { diff --git a/project/floors/GM3.js b/project/floors/GM3.js index 92c5ae0..b0992e3 100644 --- a/project/floors/GM3.js +++ b/project/floors/GM3.js @@ -91,7 +91,8 @@ main.floors.GM3= ] ], "remove": true - } + }, + "\t[葛尔丹,N566]\b[this,6,2]请你去一下左边的圣子寝殿。" ], "eachArrive": [], "parallelDo": "", diff --git a/project/floors/NH10.js b/project/floors/NH10.js index 0f4dd4d..c3775db 100644 --- a/project/floors/NH10.js +++ b/project/floors/NH10.js @@ -57,7 +57,7 @@ main.floors.NH10= "\t[莫析辉,hero]\b[hero]好。", "\t[默默,N481]\b[this,5,1]有光明神殿两位圣子、南荒帝国大皇子、北寒帝国希娜公主、还有光明神殿骑士队长大人、加上几位守护骑士、还有我们夜馨公会的,必定马到成功!", "\t[莫析辉,hero]\b[hero]那么,各位,行动起来!", - "\t[众人]破冰行动,开始!(\r[red]\\c[30]前往北寒帝国\\c[]\r[])", + "\t[众人]破冰行动,开始!(\r[red]\\c[30]前往北寒帝国,北寒帝国入口在北寒小道终点\\c[]\r[])", { "type": "hide", "loc": [ diff --git a/project/floors/SN10.js b/project/floors/SN10.js index ebda8f1..9494b6b 100644 --- a/project/floors/SN10.js +++ b/project/floors/SN10.js @@ -135,7 +135,8 @@ main.floors.SN10= "floorId": "GM2", "remove": true }, - "\t[莫析辉,hero]\b[hero]看来,我最近修为停滞的事情,也被教皇爷爷发觉了,也许,去骑士队锻炼锻炼,能够让我的修为有所增长呢。" + "\t[莫析辉,hero]\b[hero]看来,我最近修为停滞的事情,也被教皇爷爷发觉了,也许,去骑士队锻炼锻炼,能够让我的修为有所增长呢。", + "\t[莫析辉,hero]\b[hero]骑士队在光明神殿的右边,我觉得我需要去骑士队锻炼锻炼,能够让我的修为有所增长呢。" ], "eachArrive": [ { diff --git a/project/floors/SR10.js b/project/floors/SR10.js index d1d0e67..1725659 100644 --- a/project/floors/SR10.js +++ b/project/floors/SR10.js @@ -217,7 +217,8 @@ main.floors.SR10= "6,2": [ "\t[莫析辉,hero]\b[hero]奇怪,墨奈居然不在这里……喂,那个家伙,你知道黑暗圣子在哪里吗?", "\t[骷髅金将,E739]\b[this,6,6]吼!", - "\t[莫析辉,hero]\b[hero]看来是个没头脑的怪物,免得它伤及无辜,我还是先解决了它吧!" + "\t[莫析辉,hero]\b[hero]看来是个没头脑的怪物,免得它伤及无辜,我还是先解决了它吧!", + "打完后后续的剧情会让勇士回满血。" ] }, "autoEvent": { diff --git a/project/functions.js b/project/functions.js index 22a100c..b6c0f65 100644 --- a/project/functions.js +++ b/project/functions.js @@ -504,6 +504,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = core.playSound('heal.mp3'); else if (itemId.endsWith('Gem') && core.material.items[itemId].cls == 'items') core.playSound('宝石') + else if (['I342', 'I343', 'I344', 'I345', 'I346', 'I347', 'I348', 'I349', 'I350', 'I351', 'I352', 'I353', 'I354', 'I355', 'I356', 'I357', 'I358', 'I359', 'I360', 'I361', 'I362', 'I363', 'I364', 'I365', 'I366', 'I367', 'I368', 'I369', 'I370', 'I371', 'I372', 'I373', 'I374', 'I375', 'I376', 'I598', 'I599', 'I600', 'I601', 'I602', 'I603', 'I604', 'I605', 'I606', 'I607', 'I608', 'I609', 'I610', 'I611', 'I612', 'I613', 'I614', 'I615', 'I616', 'I617', 'I618', 'I619', 'I620', 'I621', 'I692', 'I693', 'I694', 'I695', 'I696', 'I697', 'I698', 'I699', 'I700', 'I701', 'I702', 'I703', 'I704', 'I705', 'I706', 'I707', 'I708', 'I709', 'I1097', 'I1098', 'I1099', 'I1100'].includes(itemId)) + core.playSound('宝石') else core.playSound('获得道具'); if (core.material.items[itemId].cls == 'equips' || itemId == 'I715' || itemId == 'I421') core.plugin.calcEquip(); @@ -1384,7 +1386,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = // 设置魔力值; status:manamax 只有在非负时才生效。 if (core.status.hero.manamax != null && core.getRealStatus('manamax') >= 0) { - core.status.hero.mana = Math.min(core.status.hero.mana, core.getRealStatus('manamax')); + core.status.hero.mana = Math.min(core.status.hero.mana, core.getRealStatus('manamax') + core.getRealStatus('hpmax')); core.setStatusBarInnerHTML('mana', core.status.hero.mana + "/" + core.getRealStatus('manamax')); } else { core.setStatusBarInnerHTML("mana", core.status.hero.mana); @@ -1855,48 +1857,55 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = } }, "drawStatistics": function () { - // 浏览地图时参与的统计项目 + // 浏览地图时参与的统计项目 - return [ - 'yellowDoor', 'blueDoor', 'redDoor', 'greenDoor', 'steelDoor', - 'yellowKey', 'blueKey', 'redKey', 'greenKey', 'steelKey', - 'redGem', 'blueGem', 'greenGem', 'yellowGem', - 'redPotion', 'bluePotion', 'greenPotion', 'yellowPotion', 'superPotion', - 'pickaxe', 'bomb', 'centerFly', 'icePickaxe', 'freezeBadge', - 'earthquake', 'upFly', 'downFly', 'jumpShoes', 'lifeWand', - 'poisonWine', 'weakWine', 'curseWine', 'superWine', - 'sword1', 'sword2', 'sword3', 'sword4', 'sword5', - 'shield1', 'shield2', 'shield3', 'shield4', 'shield5', - // 在这里可以增加新的ID来进行统计个数,只能增加道具ID - ]; - }, + return [ + 'yellowDoor', 'blueDoor', 'redDoor', 'greenDoor', 'steelDoor', + 'yellowKey', 'blueKey', 'redKey', 'greenKey', 'steelKey', + 'pickaxe', 'bomb', 'centerFly', 'icePickaxe', 'freezeBadge', + 'earthquake', 'upFly', 'downFly', 'jumpShoes', 'lifeWand', + 'poisonWine', 'weakWine', 'curseWine', 'superWine', + 'sword1', 'sword2', 'sword3', 'sword4', 'sword5', + 'shield1', 'shield2', 'shield3', 'shield4', 'shield5', + 'I692', 'I693', 'I694', 'I695', 'I696', 'I697', 'I698', 'I699', 'I700', 'I701', 'I702', 'I703' + + // 在这里可以增加新的ID来进行统计个数,只能增加道具ID + ]; +}, "drawAbout": function () { - // 绘制“关于”界面 - core.ui.closePanel(); - core.lockControl(); - core.status.event.id = 'about'; + // 绘制“关于”界面 + core.ui.closePanel(); + core.lockControl(); + core.status.event.id = 'about'; - var left = 48, - top = 36, - right = (core._PX_ || core.__PIXELS__) - 2 * left, - bottom = (core._PY_ || core.__PIXELS__) - 2 * top; + var left = 48, + top = 36, + right = (core._PX_ || core.__PIXELS__) - 2 * left, + bottom = (core._PY_ || core.__PIXELS__) - 2 * top; - core.setAlpha('ui', 0.85); - core.fillRect('ui', left, top, right, bottom, '#000000'); - core.setAlpha('ui', 1); - core.strokeRect('ui', left - 1, top - 1, right + 1, bottom + 1, '#FFFFFF', 2); + core.setAlpha('ui', 0.85); + core.fillRect('ui', left, top, right, bottom, '#000000'); + core.setAlpha('ui', 1); + core.strokeRect('ui', left - 1, top - 1, right + 1, bottom + 1, '#FFFFFF', 2); - var text_start = left + 24; + var text_start = left + 24; - // 名称 - core.setTextAlign('ui', 'left'); - var globalAttribute = core.status.globalAttribute || core.initStatus.globalAttribute; - core.fillText('ui', "HTML5 魔塔样板", text_start, top + 35, globalAttribute.selectColor, "bold 22px " + globalAttribute.font); - core.fillText('ui', "版本: " + main.__VERSION__, text_start, top + 80, "#FFFFFF", "bold 17px " + globalAttribute.font); - core.fillText('ui', "作者: 艾之葵", text_start, top + 112); - core.fillText('ui', 'HTML5魔塔交流群:539113091', text_start, top + 112 + 32); - // TODO: 写自己的“关于”页面,每次增加32像素即可 - core.playSound('打开界面'); - } + // 名称 + core.setTextAlign('ui', 'left'); + var globalAttribute = core.status.globalAttribute || core.initStatus.globalAttribute; + core.fillText('ui', "新圣骑士", text_start, top + 35, globalAttribute.selectColor, "bold 22px " + globalAttribute.font); + core.fillText('ui', "版本: " + main.__VERSION__, text_start, top + 72, "#FFFFFF", "bold 17px " + globalAttribute.font); + core.fillText('ui', "作者: bdf1 迷迭香", text_start, top + 100); + core.fillText('ui', 'HTML5魔塔交流群:', text_start, top + 100 + 28); + core.fillText('ui', '539113091 624253557', text_start, top + 100 + 56); + core.fillText('ui', 'HTML5魔塔技术群:959329661', text_start, top + 100 + 84); + core.fillText('ui', '迷迭香粉丝群:901012439', text_start, top + 100 + 112); + core.fillText('ui', '童元粉丝群:1026767730', text_start, top + 100 + 140); + core.fillText('ui', '蛋蛋粉丝群:598458601', text_start, top + 100 + 168); + core.fillText('ui', '本塔为第七届蓝海赛参赛塔', text_start, top + 100 + 196); + core.fillText('ui', '第七届蓝海赛总奖金 5,672 元', text_start, top + 100 + 224); + // TODO: 写自己的“关于”页面,每次增加32像素即可 + core.playSound('打开界面'); +} } } \ No newline at end of file diff --git a/project/plugins.js b/project/plugins.js index e3a121d..28fa977 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -3861,11 +3861,46 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = core.getItemDetail(floorId); // 宝石血瓶详细信息 this.drawDamage(ctx); }; + this.nextCriticals = function (enemy, number, x, y, floorId) { + if (typeof enemy == 'string') enemy = core.material.enemys[enemy]; + if (core.lhjnb[enemy]) return core.lhjnb[enemy]; + number = number || 1; + + var specialCriticals = core.enemys._nextCriticals_special(enemy, number, x, y, floorId); + if (specialCriticals != null) return core.lhjnb[enemy] = specialCriticals; + var info = core.enemys.getDamageInfo(enemy, null, x, y, floorId); + if (info == null) { // 如果未破防... + var overAtk = core.enemys._nextCriticals_overAtk(enemy, x, y, floorId); + if (overAtk == null) return core.lhjnb[enemy] = []; + if (typeof overAtk[1] == 'number') return core.lhjnb[enemy] = [[overAtk[0], -overAtk[1]]]; + info = overAtk[1]; + info.__over__ = true; + info.__overAtk__ = overAtk[0]; + } + + if (typeof info == 'number') return core.lhjnb[enemy] = [[0, 0]]; + if (info.damage <= 0 && !core.flags.enableNegativeDamage) { + return core.lhjnb[enemy] = [[info.__overAtk__ || 0, 0]]; + } + + if (core.flags.useLoop) { + if (core.status.hero.atk <= (main.criticalUseLoop || 1)) { + return core.lhjnb[enemy] = core.enemys._nextCriticals_useLoop(enemy, info, number, x, y, floorId); + } + else { + return core.lhjnb[enemy] = core.enemys._nextCriticals_useBinarySearch(enemy, info, number, x, y, floorId); + } + } + else { + return core.lhjnb[enemy] = core.enemys._nextCriticals_useTurn(enemy, info, number, x, y, floorId); + } + } core.control._updateDamage_damage = function (floorId, onMap) { core.status.damage.data = []; if (!core.flags.displayEnemyDamage && !core.flags.displayExtraDamage) return; core.extractBlocks(floorId); + core.lhjnb = {} core.status.maps[floorId].blocks.forEach(function (block) { var x = block.x, y = block.y; @@ -3877,10 +3912,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = return; } } + if (!block.disable && block.event.cls.indexOf('enemy') == 0 && block.event.displayDamage !== false) { if (core.flags.displayCritical) { - var critical = core.enemys.nextCriticals(block.event.id, 1, x, y, floorId); + var critical = core.plugin.nextCriticals(block.event.id, 1, x, y, floorId); critical = core.formatBigNumber((critical[0] || [])[0], true); if (critical == '???') critical = '?'; core.status.damage.data.push({ text: critical, px: 32 * x + 1, py: 32 * (y + 1) - 11, color: '#FFFFFF' });