From 13e08b122fb231fce7b9f3b8ea951936ec52dc61 Mon Sep 17 00:00:00 2001 From: bdf1 Date: Sun, 13 Nov 2022 00:58:49 +1300 Subject: [PATCH] fix(mt0): fix some schemes in MT0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复0F梅障第二次展示不同的问题 修复0F仙子出现时缺少动画问题 修复0F仙子出现时莫名消失又突然出现的问题 显示新道具现在将强制显示在中间 --- project/floors/MT0.js | 958 ++++++++++++++++++++---------------------- project/plugins.js | 32 ++ 2 files changed, 499 insertions(+), 491 deletions(-) diff --git a/project/floors/MT0.js b/project/floors/MT0.js index e1c33a4..ad4af97 100644 --- a/project/floors/MT0.js +++ b/project/floors/MT0.js @@ -16,7 +16,7 @@ main.floors.MT0= [ 0,348, 4, 4, 4, 2, 0, 2, 23, 2, 4, 4, 4,352, 0], [ 0,348, 4, 4, 4, 2, 0, 2, 22, 2, 4, 4, 4,352, 0], [ 0,348, 4, 4, 4, 2, 0, 2, 21, 2, 2, 4, 4,352, 0], - [ 0,348, 4, 4, 4, 2, 0, 0,124,124, 2, 4, 4,352, 0], + [ 0,348, 4, 4, 4, 2, 0, 0, 0, 0, 2, 4, 4,352, 0], [ 0,348, 4, 4, 4, 2, 2, 2, 0, 2, 2, 4, 4,352, 0], [ 0,348, 4, 4, 4, 4, 4, 2, 0, 2, 4, 4, 4,352, 0], [ 0,348, 4, 4, 4, 4, 2, 2, 0, 2, 2, 2, 2,352, 0], @@ -27,12 +27,6 @@ main.floors.MT0= [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ], "firstArrive": [ - { - "type": "setValue", - "name": "item:I530", - "operator": "+=", - "value": "1" - }, { "type": "setValue", "name": "flag:juqing", @@ -68,471 +62,464 @@ main.floors.MT0= 10 ] }, - "\t[邵虎]............", - "\t[邵虎](梅花为底,淡蓝色的屏障)......", - "\t[邵虎]............", - "\t[邵虎](这是《古代密要》中的“梅障结界”)....", - "\t[邵虎](看来天塔里面不是那么简单啊)....", - "\t[邵虎](以我现在的能力怕是无法破解这层障壁了......还是先不要管它为好。)", + { + "type": "if", + "condition": "switch:A", + "true": [ + "\t[邵虎]..........现在还打不开它。" + ], + "false": [ + { + "type": "setValue", + "name": "switch:A", + "value": "true" + }, + "\t[邵虎]............", + "\t[邵虎](梅花为底,淡蓝色的屏障)......", + "\t[邵虎]............", + "\t[邵虎](这是《古代密要》中的“梅障结界”)....", + "\t[邵虎](看来天塔里面不是那么简单啊)....", + "\t[邵虎](以我现在的能力怕是无法破解这层障壁了......还是先不要管它为好。)" + ] + }, { "type": "hideImage", "code": 1, "time": 0 } ], - "8,6": { - "trigger": null, - "enable": false, - "noPass": null, - "displayDamage": true, - "data": [] - }, - "9,6": { - "trigger": null, - "enable": false, - "noPass": null, - "displayDamage": true, - "opacity": 1, - "filter": { - "blur": 0, - "hue": 0, - "grayscale": 0, - "invert": false, - "shadow": 0 + "9,6": [ + { + "type": "comment", + "text": "JS脚本判定0fFairy的值" }, - "data": [ - { - "type": "comment", - "text": "JS脚本判定0fFairy的值" - }, - { - "type": "function", - "function": "function(){\nif (core.getFlag(\"101\", 0) == 1 ) {\n\tcore.setFlag(\"0fFairy\", 1);\n}\nif (core.getFlag(\"110\", 0) == 1 ) {\n\tcore.setFlag(\"0fFairy\", 2);\n}\nif (core.getFlag(\"111\", 0) == 1 ) {\n\tcore.setFlag(\"0fFairy\", 3);\n}\nif (core.getFlag(\"140\", 0) == 1 ) {\n\tcore.setFlag(\"0fFairy\", 5);\n}\nif (core.getFlag(\"186\", 0) == 1 ) {\n\tcore.setFlag(\"0fFairy\", 6);\n}\nif (core.getFlag(\"221\", 0) == 1 ) {\n\tcore.setFlag(\"0fFairy\", 7);\n}\nif (core.getFlag(\"222\", 0) == 1 ) {\n\tcore.setFlag(\"0fFairy\", 8);\n}\nif (core.getFlag(\"243\", 0) == 1 ) {\n\tcore.setFlag(\"0fFairy\", 9);\n}\nif (core.getFlag(\"244\", 0) == 1 ) {\n\tcore.setFlag(\"0fFairy\", 10);\n}\n//变量:121时此事件消失。\n//变量:140时此事件复现。\n//变量:271时此事件消失。\n}" - }, - { - "type": "switch", - "condition": "flag:0fFairy", - "caseList": [ - { - "case": "1", - "action": [ - { - "type": "comment", - "text": "flag:101~虚伪的段脚" - }, - { - "type": "animate", - "name": "sangang", - "loc": [ - 9, - 6 - ] - }, - { - "type": "showImage2", - "code": 1, - "image": "xianzi.png", - "sloc": [ - 0, - 0, - null - ], - "loc": [ - 330, - 50, - 320, - 480 - ], - "opacity": 1, - "time": 0 - }, - "\t[守塔仙子]有什么事吗?", - "\t[守塔仙子]你.......小心一点。", - { - "type": "hideImage", - "code": 1, - "time": 0 - } - ] - }, - { - "case": "2", - "action": [ - { - "type": "comment", - "text": "flag:110~10层战斗完毕" - }, - { - "type": "animate", - "name": "sangang", - "loc": [ - 9, - 6 - ] - }, - { - "type": "setValue", - "name": "flag:juqing", - "value": "flag:juqing+1" - }, - { - "type": "showImage2", - "code": 1, - "image": "xianzi.png", - "sloc": [ - 0, - 0, - null - ], - "loc": [ - 330, - 50, - 320, - 480 - ], - "opacity": 1, - "time": 0 - }, - "\t[守塔仙子]啊......", - "\t[守塔仙子]你杀了守卫这附近的那个骷髅吗.....", - "\t[守塔仙子]是吗......那时候的.......", - "\t[守塔仙子]......(琥骑士.....)", - "\t[守塔仙子].......没什么........", - { - "type": "hideImage", - "code": 1, - "time": 0 - }, - { - "type": "setValue", - "name": "flag:111", - "value": "1" - } - ] - }, - { - "case": "3", - "action": [ - { - "type": "comment", - "text": "flag:111~仙子对话1" - }, - { - "type": "animate", - "name": "sangang", - "loc": [ - 9, - 6 - ] - }, - { - "type": "showImage2", - "code": 1, - "image": "xianzi.png", - "sloc": [ - 0, - 0, - null - ], - "loc": [ - 330, - 50, - 320, - 480 - ], - "opacity": 1, - "time": 0 - }, - "\t[守塔仙子]继续前进的话.....你小心点.......", - { - "type": "hideImage", - "code": 1, - "time": 0 - } - ] - }, - { - "case": "5", - "action": [ - { - "type": "comment", - "text": "flag:140~30层彻底结束" - }, - { - "type": "animate", - "name": "sangang", - "loc": [ - 9, - 6 - ] - }, - { - "type": "showImage2", - "code": 1, - "image": "xianzi.png", - "sloc": [ - 0, - 0, - null - ], - "loc": [ - 330, - 50, - 320, - 480 - ], - "opacity": 1, - "time": 0 - }, - "\t[守塔仙子]...........圣骑士,这是你的意思吗........", - { - "type": "hideImage", - "code": 1, - "time": 0 - } - ] - }, - { - "case": "6", - "action": [ - { - "type": "comment", - "text": "flag:186~48全剧终" - }, - { - "type": "animate", - "name": "sangang", - "loc": [ - 9, - 6 - ] - }, - { - "type": "showImage2", - "code": 1, - "image": "xianziwunai.png", - "sloc": [ - 0, - 0, - null - ], - "loc": [ - 330, - 50, - 320, - 480 - ], - "opacity": 1, - "time": 0 - }, - "\t[守塔仙子]杰克又往下扔垃圾,真是服了他了。", - { - "type": "hideImage", - "code": 1, - "time": 0 - } - ] - }, - { - "case": "7", - "action": [ - { - "type": "comment", - "text": "flag:221~57层over" - }, - { - "type": "animate", - "name": "sangang", - "loc": [ - 9, - 6 - ] - }, - { - "type": "showImage2", - "code": 1, - "image": "xianziwunai.png", - "sloc": [ - 0, - 0, - null - ], - "loc": [ - 330, - 50, - 320, - 480 - ], - "opacity": 1, - "time": 0 - }, - "\t[守塔仙子]杰克别瞎说了......蛮害羞的啊......", - { - "type": "hideImage", - "code": 1, - "time": 0 - } - ] - }, - { - "case": "8", - "action": [ - { - "type": "comment", - "text": "flag:222~60层群嘲" - }, - { - "type": "animate", - "name": "sangang", - "loc": [ - 9, - 6 - ] - }, - { - "type": "showImage2", - "code": 1, - "image": "xianzilianhong.png", - "sloc": [ - 0, - 0, - null - ], - "loc": [ - 330, - 50, - 320, - 480 - ], - "opacity": 1, - "time": 0 - }, - "\t[守塔仙子]杰克刚刚出去不知道干什么去了........奇怪,好慌张的样子。", - { - "type": "hideImage", - "code": 1, - "time": 0 - } - ] - }, - { - "case": "9", - "action": [ - { - "type": "comment", - "text": "flag:243~75" - }, - { - "type": "animate", - "name": "sangang", - "loc": [ - 9, - 6 - ] - }, - { - "type": "showImage2", - "code": 1, - "image": "xianzilianhong.png", - "sloc": [ - 0, - 0, - null - ], - "loc": [ - 330, - 50, - 320, - 480 - ], - "opacity": 1, - "time": 0 - }, - "\t[守塔仙子]杰克刚刚出去不知道干什么去了........奇怪,好慌张的样子。", - { - "type": "hideImage", - "code": 1, - "time": 0 - } - ] - }, - { - "case": "10", - "action": [ - { - "type": "comment", - "text": "flag:244~78层all over" - }, - { - "type": "animate", - "name": "sangang", - "loc": [ - 9, - 6 - ] - }, - { - "type": "showImage2", - "code": 1, - "image": "xianzi.png", - "sloc": [ - 0, - 0, - null - ], - "loc": [ - 330, - 50, - 320, - 480 - ], - "opacity": 1, - "time": 0 - }, - "\t[守塔仙子]杰克他刚刚来过哦,他不好意思见你呢!", - { - "type": "animate", - "name": "shenglvehao", - "loc": [ - 9, - 6 - ] - }, - { - "type": "showImage2", - "code": 1, - "image": "xianzileng.png", - "sloc": [ - 0, - 0, - null - ], - "loc": [ - 330, - 50, - 320, - 480 - ], - "opacity": 1, - "time": 0 - }, - "\t[守塔仙子]你.........千万要手下留情啊.........因为他毕竟是我的.......", - { - "type": "hideImage", - "code": 1, - "time": 0 - }, - { - "type": "animate", - "name": "wenhao", - "loc": "hero" - } - ] - } - ] - } - ] - }, + { + "type": "function", + "function": "function(){\nif (core.getFlag(\"101\", 0) == 1 ) {\n\tcore.setFlag(\"0fFairy\", 1);\n}\nif (core.getFlag(\"110\", 0) == 1 ) {\n\tcore.setFlag(\"0fFairy\", 2);\n}\nif (core.getFlag(\"111\", 0) == 1 ) {\n\tcore.setFlag(\"0fFairy\", 3);\n}\nif (core.getFlag(\"140\", 0) == 1 ) {\n\tcore.setFlag(\"0fFairy\", 5);\n}\nif (core.getFlag(\"186\", 0) == 1 ) {\n\tcore.setFlag(\"0fFairy\", 6);\n}\nif (core.getFlag(\"221\", 0) == 1 ) {\n\tcore.setFlag(\"0fFairy\", 7);\n}\nif (core.getFlag(\"222\", 0) == 1 ) {\n\tcore.setFlag(\"0fFairy\", 8);\n}\nif (core.getFlag(\"243\", 0) == 1 ) {\n\tcore.setFlag(\"0fFairy\", 9);\n}\nif (core.getFlag(\"244\", 0) == 1 ) {\n\tcore.setFlag(\"0fFairy\", 10);\n}\n//变量:121时此事件消失。\n//变量:140时此事件复现。\n//变量:271时此事件消失。\n}" + }, + { + "type": "switch", + "condition": "flag:0fFairy", + "caseList": [ + { + "case": "1", + "action": [ + { + "type": "comment", + "text": "flag:101~虚伪的段脚" + }, + { + "type": "animate", + "name": "sangang", + "loc": [ + 9, + 6 + ] + }, + { + "type": "showImage2", + "code": 1, + "image": "xianzi.png", + "sloc": [ + 0, + 0, + null + ], + "loc": [ + 330, + 50, + 320, + 480 + ], + "opacity": 1, + "time": 0 + }, + "\t[守塔仙子]有什么事吗?", + "\t[守塔仙子]你.......小心一点。", + { + "type": "hideImage", + "code": 1, + "time": 0 + } + ] + }, + { + "case": "2", + "action": [ + { + "type": "comment", + "text": "flag:110~10层战斗完毕" + }, + { + "type": "animate", + "name": "sangang", + "loc": [ + 9, + 6 + ] + }, + { + "type": "setValue", + "name": "flag:juqing", + "value": "flag:juqing+1" + }, + { + "type": "showImage2", + "code": 1, + "image": "xianzi.png", + "sloc": [ + 0, + 0, + null + ], + "loc": [ + 330, + 50, + 320, + 480 + ], + "opacity": 1, + "time": 0 + }, + "\t[守塔仙子]啊......", + "\t[守塔仙子]你杀了守卫这附近的那个骷髅吗.....", + "\t[守塔仙子]是吗......那时候的.......", + "\t[守塔仙子]......(琥骑士.....)", + "\t[守塔仙子].......没什么........", + { + "type": "hideImage", + "code": 1, + "time": 0 + }, + { + "type": "setValue", + "name": "flag:111", + "value": "1" + } + ] + }, + { + "case": "3", + "action": [ + { + "type": "comment", + "text": "flag:111~仙子对话1" + }, + { + "type": "animate", + "name": "sangang", + "loc": [ + 9, + 6 + ] + }, + { + "type": "showImage2", + "code": 1, + "image": "xianzi.png", + "sloc": [ + 0, + 0, + null + ], + "loc": [ + 330, + 50, + 320, + 480 + ], + "opacity": 1, + "time": 0 + }, + "\t[守塔仙子]继续前进的话.....你小心点.......", + { + "type": "hideImage", + "code": 1, + "time": 0 + } + ] + }, + { + "case": "5", + "action": [ + { + "type": "comment", + "text": "flag:140~30层彻底结束" + }, + { + "type": "animate", + "name": "sangang", + "loc": [ + 9, + 6 + ] + }, + { + "type": "showImage2", + "code": 1, + "image": "xianzi.png", + "sloc": [ + 0, + 0, + null + ], + "loc": [ + 330, + 50, + 320, + 480 + ], + "opacity": 1, + "time": 0 + }, + "\t[守塔仙子]...........圣骑士,这是你的意思吗........", + { + "type": "hideImage", + "code": 1, + "time": 0 + } + ] + }, + { + "case": "6", + "action": [ + { + "type": "comment", + "text": "flag:186~48全剧终" + }, + { + "type": "animate", + "name": "sangang", + "loc": [ + 9, + 6 + ] + }, + { + "type": "showImage2", + "code": 1, + "image": "xianziwunai.png", + "sloc": [ + 0, + 0, + null + ], + "loc": [ + 330, + 50, + 320, + 480 + ], + "opacity": 1, + "time": 0 + }, + "\t[守塔仙子]杰克又往下扔垃圾,真是服了他了。", + { + "type": "hideImage", + "code": 1, + "time": 0 + } + ] + }, + { + "case": "7", + "action": [ + { + "type": "comment", + "text": "flag:221~57层over" + }, + { + "type": "animate", + "name": "sangang", + "loc": [ + 9, + 6 + ] + }, + { + "type": "showImage2", + "code": 1, + "image": "xianziwunai.png", + "sloc": [ + 0, + 0, + null + ], + "loc": [ + 330, + 50, + 320, + 480 + ], + "opacity": 1, + "time": 0 + }, + "\t[守塔仙子]杰克别瞎说了......蛮害羞的啊......", + { + "type": "hideImage", + "code": 1, + "time": 0 + } + ] + }, + { + "case": "8", + "action": [ + { + "type": "comment", + "text": "flag:222~60层群嘲" + }, + { + "type": "animate", + "name": "sangang", + "loc": [ + 9, + 6 + ] + }, + { + "type": "showImage2", + "code": 1, + "image": "xianzilianhong.png", + "sloc": [ + 0, + 0, + null + ], + "loc": [ + 330, + 50, + 320, + 480 + ], + "opacity": 1, + "time": 0 + }, + "\t[守塔仙子]杰克刚刚出去不知道干什么去了........奇怪,好慌张的样子。", + { + "type": "hideImage", + "code": 1, + "time": 0 + } + ] + }, + { + "case": "9", + "action": [ + { + "type": "comment", + "text": "flag:243~75" + }, + { + "type": "animate", + "name": "sangang", + "loc": [ + 9, + 6 + ] + }, + { + "type": "showImage2", + "code": 1, + "image": "xianzilianhong.png", + "sloc": [ + 0, + 0, + null + ], + "loc": [ + 330, + 50, + 320, + 480 + ], + "opacity": 1, + "time": 0 + }, + "\t[守塔仙子]杰克刚刚出去不知道干什么去了........奇怪,好慌张的样子。", + { + "type": "hideImage", + "code": 1, + "time": 0 + } + ] + }, + { + "case": "10", + "action": [ + { + "type": "comment", + "text": "flag:244~78层all over" + }, + { + "type": "animate", + "name": "sangang", + "loc": [ + 9, + 6 + ] + }, + { + "type": "showImage2", + "code": 1, + "image": "xianzi.png", + "sloc": [ + 0, + 0, + null + ], + "loc": [ + 330, + 50, + 320, + 480 + ], + "opacity": 1, + "time": 0 + }, + "\t[守塔仙子]杰克他刚刚来过哦,他不好意思见你呢!", + { + "type": "animate", + "name": "shenglvehao", + "loc": [ + 9, + 6 + ] + }, + { + "type": "showImage2", + "code": 1, + "image": "xianzileng.png", + "sloc": [ + 0, + 0, + null + ], + "loc": [ + 330, + 50, + 320, + 480 + ], + "opacity": 1, + "time": 0 + }, + "\t[守塔仙子]你.........千万要手下留情啊.........因为他毕竟是我的.......", + { + "type": "hideImage", + "code": 1, + "time": 0 + }, + { + "type": "animate", + "name": "wenhao", + "loc": "hero" + } + ] + } + ] + } + ], "8,8": [ { "type": "choices", @@ -543,20 +530,12 @@ main.floors.MT0= "action": [ { "type": "hide", + "remove": true, "time": 500 }, { - "type": "hide", - "loc": [ - [ - 8, - 6 - ] - ], - "time": 500 - }, - { - "type": "show", + "type": "setBlock", + "number": "fairy", "loc": [ [ 9, @@ -630,7 +609,17 @@ main.floors.MT0= "stop": true }, { - "type": "show", + "type": "animate", + "name": "STzhanshen", + "loc": [ + 8, + 6 + ], + "async": true + }, + { + "type": "setBlock", + "number": "fairy", "loc": [ [ 8, @@ -856,23 +845,10 @@ main.floors.MT0= 6 ], "time": 500, + "keep": true, "steps": [ "right:1" ] - }, - { - "type": "show", - "loc": [ - [ - 9, - 6 - ] - ], - "time": 500 - }, - { - "type": "hide", - "time": 0 } ] } diff --git a/project/plugins.js b/project/plugins.js index be7669a..6d9f02c 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -496,6 +496,38 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = } return; } + ////// 获得某个物品 ////// + core.events.getItem = function (id, num, x, y, isGentleClick, callback) { + if (num == null) num = 1; + var itemCls = core.material.items[id].cls; + core.removeBlock(x, y); + core.items.getItemEffect(id, num); + var text = '获得 ' + core.material.items[id].name; + if (num > 1) text += "x" + num; + if (itemCls === 'items' && num == 1) text += core.items.getItemEffectTip(id); + core.drawTip(text, id); + + // --- 首次获得道具的提示 + if (!core.hasFlag("__itemHint__")) core.setFlag("__itemHint__", []); + var itemHint = core.getFlag("__itemHint__"); + if (core.flags.itemFirstText && itemHint.indexOf(id) < 0 && itemCls != 'items') { + var hint = core.material.items[id].text || "该道具暂无描述"; + try { + hint = core.replaceText(hint); + } catch (e) { } + if (!core.status.event.id || core.status.event.id == 'action') { + core.insertAction("\t[" + core.material.items[id].name + "," + id + "]\b[center]" + hint + "\n" + + (id.endsWith('Key') ? "(钥匙类道具,遇到对应的门时自动打开)" + : itemCls == 'tools' ? "(消耗类道具,请按T在道具栏使用)" + : itemCls == 'constants' ? "(永久类道具,请按T在道具栏使用)" + : itemCls == 'equips' ? "(装备类道具,请按Q在装备栏进行装备)" : "")); + } + itemHint.push(id); + } + + this.afterGetItem(id, x, y, isGentleClick); + if (callback) callback(); + } }, "drawLight": function () {