diff --git a/_server/MotaAction.g4 b/_server/MotaAction.g4 index 1a2cabd..63c674d 100644 --- a/_server/MotaAction.g4 +++ b/_server/MotaAction.g4 @@ -871,6 +871,10 @@ action | disableShop_s | follow_s | unfollow_s + | setanimate_s + | deleteanimate_s + | playanimate_s + | clearanimate_s | animate_s | animate_1_s | stopAnimate_s @@ -2221,6 +2225,136 @@ var code = '{"type": "vibrate", "direction": "'+Vibrate_List_0+'", "time": '+Int return code; */; +setanimate_s + : '新建 帧动画/特效' '名称' EvalString '参照点偏移像素x' IntString? 'y' IntString? '动画大小 宽' IntString '高' IntString '总帧数' IntString BGNL?Newline + '图片序列(同一帧后面覆盖先前的,默认起始帧为0,结束帧为最后一帧)'BGNL?Newline + '(剪裁区域不填写为全图,绘制区域不填写为全画面)'BGNL?Newline + '(透明度100为不透明,默认为不透明,结束透明度默认与开始透明度相同)'BGNL?Newline + animateDrawableimage+? Newline + '音频序列(到达对应帧进行播放)'BGNL?Newline + animateDrawablesound+? Newline + +/* setanimate_s +tooltip : setanimate:设置帧动画/特效(此项仅储存,不播放) +helpUrl : /_docs/#/instruction +default : ["sword","","",192,192,60] +colour : this.soundColor +IntString_0 = IntString_0 ? (', "px": '+IntString_0+'') : ''; +IntString_1 = IntString_1 ? (', "py": '+IntString_1+'') : ''; +var imageList=animateDrawableimage_0?',"imageList": [\n'+animateDrawableimage_0.slice(0,-1)+'\n]':'' +var soundList=animateDrawablesound_0?',"soundList": [\n'+animateDrawablesound_0.slice(0,-1)+'\n]':'' +var code = '{"type": "setanimate", "name": "'+EvalString_0+'",'+IntString_0+IntString_1+' "width": '+IntString_2+', "height": '+IntString_3+', "allFarme": '+IntString_4+imageList+soundList+'},\n'; +return code; +*/; + +animateDrawableList + : animateDrawableimage + | animateDrawablesound + | animateDrawabletextEmpty; + +animateDrawableimage + : '图片' EvalString? '起始帧' IntString? '起始透明度' IntString? BGNL? Newline + '剪裁坐标cx' IntString? 'cy' IntString? '宽' IntString? '高' IntString? '绘制坐标x'IntString? 'y' IntString? '宽' IntString? '高' IntString?'旋转角度'IntString? BGNL? Newline + '结束帧' IntString? '结束透明度' IntString? '剪裁坐标cx' IntString? 'cy' IntString? '宽' IntString? '高' IntString? '绘制坐标x'IntString? 'y' IntString? '宽' IntString? '高' IntString?'旋转角度'IntString? Newline +/* animateDrawableimage +tooltip : 帧动画图片列表 +helpUrl : /_docs/#/instruction +default : ["","","","","","","","","","","","","","","","","","","","","","",""] +colour : this.subColor +allImages : ['EvalString_0'] +if (IntString_1&&(IntString_1 < 0||IntString_1>100)) throw new Error('透明度范围为0-100,0为透明,100为不透明,不填默认为不透明') +if (IntString_12&&(IntString_12 < 0||IntString_12>100)) throw new Error('透明度范围为0-100,0为透明,100为不透明,不填默认为不透明') +IntString_0 = IntString_0 ? (', "beforefarme": '+IntString_0+'') : ''; +IntString_1 = IntString_1 ? (', "globalAlpha": '+IntString_1+'') : ''; +IntString_2 = IntString_2 ? (', "cx": '+IntString_2+'') : ''; +IntString_3 = IntString_3 ? (', "cy": '+IntString_3+'') : ''; +IntString_4 = IntString_4 ? (', "cw": '+IntString_4+'') : ''; +IntString_5 = IntString_5 ? (', "ch": '+IntString_5+'') : ''; +IntString_6 = IntString_6 ? (', "x": '+IntString_6+'') : ''; +IntString_7 = IntString_7 ? (', "y": '+IntString_7+'') : ''; +IntString_8 = IntString_8 ? (', "w": '+IntString_8+'') : ''; +IntString_9 = IntString_9 ? (', "h": '+IntString_9+'') : ''; +IntString_10 = IntString_10 ? (', "angle": '+IntString_10+'') : ''; + +IntString_11 = IntString_11 ? (', "afterfarme": '+IntString_11+'') : ''; +IntString_12 = IntString_12 ? (', "aglobalAlpha": '+IntString_12+'') : ''; +IntString_13 = IntString_13 ? (', "acx": '+IntString_13+'') : ''; +IntString_14 = IntString_14 ? (', "acy": '+IntString_14+'') : ''; +IntString_15 = IntString_15? (', "acw": '+IntString_15+'') : ''; +IntString_16 = IntString_16 ? (', "ach": '+IntString_16+'') : ''; +IntString_17 = IntString_17 ? (', "ax": '+IntString_17+'') : ''; +IntString_18 = IntString_18 ? (', "ay": '+IntString_18+'') : ''; +IntString_19 = IntString_19 ? (', "aw": '+IntString_19+'') : ''; +IntString_20 = IntString_20 ? (', "ah": '+IntString_20+'') : ''; +IntString_21 = IntString_21 ? (', "aangle": '+IntString_21+'') : ''; +return '{ "image":"'+EvalString_0+'"'+IntString_0+IntString_1+IntString_2+IntString_3+IntString_4+IntString_5+IntString_6+IntString_7+IntString_8+IntString_9+IntString_10+IntString_11+IntString_12+IntString_13+IntString_14+IntString_15+IntString_16+IntString_17+IntString_18+IntString_19+IntString_20+IntString_21+'},' +*/; + +animateDrawablesound + : '音效' EvalString? '起始帧' IntString '是否停止其他音效'Bool Newline + +/* animateDrawablesound +tooltip : 帧动画配音 +helpUrl : /_docs/#/instruction +default : ["",0,false] +colour : this.subColor +allSounds : ['EvalString_0'] + +return '{ "sound":"'+EvalString_0+'","startfarme":'+IntString_0+',"stopbefore":'+Bool_0+'},' +*/; + +animateDrawabletextEmpty + : Newline + +/* animateDrawabletextEmpty +var code = []; +return code; +*/; + +deleteanimate_s + : '删除 帧动画/特效' '名称' EvalString Newline + +/* deleteanimate_s +tooltip : deleteanimate:删除储存的帧动画 +helpUrl : /_docs/#/instruction +default : [""] + +colour : this.soundColor + +var code = '{"type": "deleteanimate", "name": "'+EvalString_0+'"},\n'; +return code; +*/; + +playanimate_s + : '播放 帧动画/特效' '名称' EvalString '像素x' IntString? 'y' IntString? '跟随勇士' Bool 'x方向缩放' IntString? 'y方向缩放'IntString? Newline + +/* playanimate_s +tooltip : playanimate:播放帧动画,选择跟随勇士后x、y将失效改为勇士中心坐标 +helpUrl : /_docs/#/instruction +default : ["zone","","",false,"",""] + +colour : this.soundColor +IntString_0 = IntString_0 ? (', "x": '+IntString_0+'') : ''; +IntString_1 = IntString_1 ? (', "y": '+IntString_1+'') : ''; +IntString_2 = IntString_2 ? (', "scalex": '+IntString_2+'') : ''; +IntString_3 = IntString_3 ? (', "scaley": '+IntString_3+'') : ''; +var code = '{"type": "playanimate", "name": "'+EvalString_0+'"'+IntString_0+IntString_1+',"hero":'+Bool_0+IntString_2+IntString_3+'},\n'; +return code; +*/; + +clearanimate_s + : '清空正在播放的帧动画/特效' + +/* clearanimate_s +tooltip : clearanimate:清空正在播放的帧动画 +helpUrl : /_docs/#/instruction + +colour : this.soundColor + +var code = '{"type": "clearanimate"},\n'; +return code; +*/; + animate_s : '显示动画' EvalString '位置' 'x' PosString? 'y' PosString? '相对窗口坐标' Bool '不等待执行完毕' Bool Newline diff --git a/_server/MotaActionParser.js b/_server/MotaActionParser.js index 3a2358b..a6cd595 100644 --- a/_server/MotaActionParser.js +++ b/_server/MotaActionParser.js @@ -703,6 +703,85 @@ MotaActionParser = function () { this.next, ]); break; + case "setanimate": + var buildanimateDrawableimage = function (obj) { + obj = MotaActionFunctions.processanimateDrawableimage(obj || []); + var res = null; + for (var ii = obj.length - 1, one; (one = obj[ii]); ii--) { + res = MotaActionBlocks["animateDrawableimage"].xmlText([ + one[0], + one[1], + one[2], + one[3], + one[4], + one[5], + one[6], + one[7], + one[8], + one[9], + one[10], + one[11], + one[12], + one[13], + one[14], + one[15], + one[16], + one[17], + one[18], + one[19], + one[20], + one[21], + one[22], + res, + ]); + } + return res; + }; + var buildanimateDrawablesound = function (obj) { + obj = MotaActionFunctions.processanimateDrawablesound(obj || []); + var res = null; + for (var ii = obj.length - 1, one; (one = obj[ii]); ii--) { + res = MotaActionBlocks["animateDrawablesound"].xmlText([ + one[0], + one[1], + one[2], + res, + ]); + } + return res; + }; + this.next = MotaActionBlocks["setanimate_s"].xmlText([ + data.name, + data.px, + data.py, + data.width, + data.height, + data.allFarme, + buildanimateDrawableimage(data.imageList), + buildanimateDrawablesound(data.soundList), + this.next, + ]); + break; + case "clearanimate": + this.next = MotaActionBlocks["clearanimate_s"].xmlText([this.next]); + break; + case "deleteanimate": + this.next = MotaActionBlocks["deleteanimate_s"].xmlText([ + this.name, + this.next, + ]); + break; + case "playanimate": + this.next = MotaActionBlocks["playanimate_s"].xmlText([ + this.name, + this.x, + this.y, + this.hero, + this.scalex, + this.scaley, + this.next, + ]); + break; case "animationDrawable": var buildanimationDrawableimage = function (obj) { obj = MotaActionFunctions.processanimationDrawableimage(obj || []); @@ -2876,7 +2955,44 @@ MotaActionParser = function () { }); return list; }; - + MotaActionFunctions.processanimateDrawableimage = function (overList) { + var list = []; + overList.forEach(function (one) { + list.push([ + one.image, + one.beforefarme, + one.globalAlpha, + one.cx, + one.cy, + one.cw, + one.ch, + one.x, + one.y, + one.w, + one.h, + one.angle, + one.afterfarme, + one.aglobalAlpha, + one.acx, + one.acy, + one.acw, + one.ach, + one.ax, + one.ay, + one.aw, + one.ah, + one.aangle, + ]); + }); + return list; + }; + MotaActionFunctions.processanimateDrawablesound = function (overList) { + var list = []; + overList.forEach(function (one) { + list.push([one.sound, one.startfarme, one.stopbefore]); + }); + return list; + }; MotaActionFunctions.processMultiLoc = function (EvalString_0, EvalString_1) { var floorstr = ""; if (EvalString_0 && EvalString_1) { diff --git a/_server/config.json b/_server/config.json index 8a8228b..dd8cc79 100644 --- a/_server/config.json +++ b/_server/config.json @@ -1 +1 @@ -{"viewportLoc":[0,0],"editorLastFloorId":"yiqu2","lastUsed":[{"idnum":210,"id":"skeletonWarrior","images":"enemys","y":9,"recent":1735825145197,"frequent":4},{"idnum":21,"id":"yellowKey","images":"items","y":0,"recent":1735824906066,"frequent":14},{"idnum":81,"id":"yellowDoor","images":"animates","y":4,"recent":1735824901122,"frequent":26},{"idnum":214,"id":"zombieKnight","images":"enemys","y":13,"recent":1735824888165,"frequent":2},{"idnum":82,"id":"blueDoor","images":"animates","y":5,"recent":1735824878838,"frequent":4},{"idnum":32,"id":"bluePotion","images":"items","y":21,"recent":1735824871469,"frequent":2},{"idnum":28,"id":"blueGem","images":"items","y":17,"recent":1735824867878,"frequent":6},{"idnum":27,"id":"redGem","images":"items","y":16,"recent":1735824864181,"frequent":5},{"idnum":22,"id":"blueKey","images":"items","y":1,"recent":1735824852246,"frequent":4},{"idnum":140,"id":"autotile4","images":"autotile","y":0,"recent":1735824840165,"frequent":138},{"idnum":209,"id":"skeleton","images":"enemys","y":8,"recent":1735824813505,"frequent":2},{"idnum":94,"id":"rightPortal","images":"animates","y":25,"recent":1735824733893,"frequent":6},{"idnum":92,"id":"leftPortal","images":"animates","y":24,"recent":1735824084823,"frequent":2},{"idnum":91,"id":"upPortal","images":"animates","y":26,"recent":1735821889246,"frequent":2},{"idnum":85,"id":"specialDoor","images":"animates","y":8,"recent":1735820976103,"frequent":3},{"idnum":93,"id":"downPortal","images":"animates","y":23,"recent":1735820969951,"frequent":2},{"idnum":89,"id":"portal","images":"animates","y":17,"recent":1735820958612,"frequent":1},{"idnum":26,"id":"bigKey","images":"items","y":6,"recent":1735820920269,"frequent":1},{"idnum":34,"id":"yellowPotion","images":"items","y":23,"recent":1735820909149,"frequent":1},{"idnum":33,"id":"greenPotion","images":"items","y":22,"recent":1735820906301,"frequent":1},{"idnum":83,"id":"redDoor","images":"animates","y":6,"recent":1735820844323,"frequent":2},{"idnum":247,"id":"magicMaster","images":"enemys","y":46,"recent":1735820830425,"frequent":1},{"idnum":20160,"id":"X20160","images":"5.png","x":0,"y":20,"isTile":true,"recent":1735398503013,"frequent":2},{"idnum":20168,"id":"X20168","images":"5.png","x":0,"y":21,"isTile":true,"recent":1735398496973,"frequent":3},{"idnum":20176,"id":"X20176","images":"5.png","x":0,"y":22,"isTile":true,"recent":1735398485125,"frequent":1},{"idnum":71742,"id":"X71742","images":"11.png","x":6,"y":217,"isTile":true,"recent":1735398452693,"frequent":1},{"idnum":71750,"id":"X71750","images":"11.png","x":6,"y":218,"isTile":true,"recent":1735398448325,"frequent":1},{"idnum":71751,"id":"X71751","images":"11.png","x":7,"y":218,"isTile":true,"recent":1735398443645,"frequent":1},{"idnum":71783,"id":"X71783","images":"11.png","x":7,"y":222,"isTile":true,"recent":1735398426909,"frequent":7},{"idnum":71799,"id":"X71799","images":"11.png","x":7,"y":224,"isTile":true,"recent":1735398421365,"frequent":5},{"idnum":71826,"id":"X71826","images":"11.png","x":2,"y":228,"isTile":true,"recent":1735398415661,"frequent":2},{"idnum":71818,"id":"X71818","images":"11.png","x":2,"y":227,"isTile":true,"recent":1735398413269,"frequent":3},{"idnum":224,"id":"swordsman","images":"enemys","y":23,"recent":1735398341974,"frequent":6},{"idnum":71842,"id":"X71842","images":"11.png","x":2,"y":230,"isTile":true,"recent":1735398315069,"frequent":1},{"idnum":71834,"id":"X71834","images":"11.png","x":2,"y":229,"isTile":true,"recent":1735398312437,"frequent":1},{"idnum":110114,"id":"X110114","images":"C4.png","x":2,"y":14,"isTile":true,"recent":1735398246502,"frequent":6},{"idnum":110122,"id":"X110122","images":"C4.png","x":2,"y":15,"isTile":true,"recent":1735398239998,"frequent":1},{"idnum":110028,"id":"X110028","images":"C4.png","x":4,"y":3,"isTile":true,"recent":1735398198709,"frequent":2},{"idnum":110020,"id":"X110020","images":"C4.png","x":4,"y":2,"isTile":true,"recent":1735398191398,"frequent":2},{"idnum":71791,"id":"X71791","images":"11.png","x":7,"y":223,"isTile":true,"recent":1735398163774,"frequent":3},{"idnum":71785,"id":"X71785","images":"11.png","x":1,"y":223,"isTile":true,"recent":1735398120734,"frequent":2},{"idnum":71784,"id":"X71784","images":"11.png","x":0,"y":223,"isTile":true,"recent":1735398118318,"frequent":3},{"idnum":71793,"id":"X71793","images":"11.png","x":1,"y":224,"isTile":true,"recent":1735398115446,"frequent":2},{"idnum":71792,"id":"X71792","images":"11.png","x":0,"y":224,"isTile":true,"recent":1735398113142,"frequent":2},{"idnum":71787,"id":"X71787","images":"11.png","x":3,"y":223,"isTile":true,"recent":1735398102326,"frequent":1},{"idnum":71786,"id":"X71786","images":"11.png","x":2,"y":223,"isTile":true,"recent":1735398099430,"frequent":1},{"idnum":71795,"id":"X71795","images":"11.png","x":3,"y":224,"isTile":true,"recent":1735398097359,"frequent":1},{"idnum":71794,"id":"X71794","images":"11.png","x":2,"y":224,"isTile":true,"recent":1735398094982,"frequent":1},{"idnum":130006,"id":"X130006","images":"C2.png","x":6,"y":0,"isTile":true,"recent":1735398082894,"frequent":3},{"idnum":130011,"id":"X130011","images":"C2.png","x":3,"y":1,"isTile":true,"recent":1735398078792,"frequent":2},{"idnum":71817,"id":"X71817","images":"11.png","x":1,"y":227,"isTile":true,"recent":1735398027294,"frequent":3},{"idnum":71837,"id":"X71837","images":"11.png","x":5,"y":229,"isTile":true,"recent":1735398013126,"frequent":1},{"idnum":71829,"id":"X71829","images":"11.png","x":5,"y":228,"isTile":true,"recent":1735398008166,"frequent":1},{"idnum":71821,"id":"X71821","images":"11.png","x":5,"y":227,"isTile":true,"recent":1735398005430,"frequent":1},{"idnum":71836,"id":"X71836","images":"11.png","x":4,"y":229,"isTile":true,"recent":1735397997622,"frequent":1},{"idnum":71828,"id":"X71828","images":"11.png","x":4,"y":228,"isTile":true,"recent":1735397993455,"frequent":1},{"idnum":71820,"id":"X71820","images":"11.png","x":4,"y":227,"isTile":true,"recent":1735397989903,"frequent":1},{"idnum":30217,"id":"X30217","images":"4.png","x":1,"y":27,"isTile":true,"recent":1735397944838,"frequent":3},{"idnum":110012,"id":"X110012","images":"C4.png","x":4,"y":1,"isTile":true,"recent":1735397929366,"frequent":2},{"idnum":100485,"id":"X100485","images":"Outside_B.png","x":5,"y":20,"isTile":true,"recent":1735397919927,"frequent":2},{"idnum":100436,"id":"X100436","images":"Outside_B.png","x":4,"y":18,"isTile":true,"recent":1735397880486,"frequent":1},{"idnum":100437,"id":"X100437","images":"Outside_B.png","x":5,"y":18,"isTile":true,"recent":1735397877086,"frequent":1},{"idnum":100461,"id":"X100461","images":"Outside_B.png","x":5,"y":19,"isTile":true,"recent":1735397868606,"frequent":1},{"idnum":100460,"id":"X100460","images":"Outside_B.png","x":4,"y":19,"isTile":true,"recent":1735397843448,"frequent":2},{"idnum":100484,"id":"X100484","images":"Outside_B.png","x":4,"y":20,"isTile":true,"recent":1735397840545,"frequent":2},{"idnum":40136,"id":"X40136","images":"3.png","x":0,"y":17,"isTile":true,"recent":1735397799150,"frequent":1},{"idnum":40144,"id":"X40144","images":"3.png","x":0,"y":18,"isTile":true,"recent":1735397796038,"frequent":2},{"idnum":30227,"id":"X30227","images":"4.png","x":3,"y":28,"isTile":true,"recent":1735397775591,"frequent":2},{"idnum":30214,"id":"X30214","images":"4.png","x":6,"y":26,"isTile":true,"recent":1735397768303,"frequent":1},{"idnum":30218,"id":"X30218","images":"4.png","x":2,"y":27,"isTile":true,"recent":1735397761062,"frequent":1},{"idnum":120041,"id":"X120041","images":"C3.png","x":1,"y":5,"isTile":true,"recent":1735397710494,"frequent":1},{"idnum":120042,"id":"X120042","images":"C3.png","x":2,"y":5,"isTile":true,"recent":1735397702167,"frequent":2},{"idnum":120006,"id":"X120006","images":"C3.png","x":6,"y":0,"isTile":true,"recent":1735397659951,"frequent":5},{"idnum":120014,"id":"X120014","images":"C3.png","x":6,"y":1,"isTile":true,"recent":1735397644591,"frequent":4},{"idnum":120090,"id":"X120090","images":"C3.png","x":2,"y":11,"isTile":true,"recent":1735397629759,"frequent":3},{"idnum":120150,"id":"X120150","images":"C3.png","x":6,"y":18,"isTile":true,"recent":1735397613207,"frequent":3},{"idnum":120166,"id":"X120166","images":"C3.png","x":6,"y":20,"isTile":true,"recent":1735397574639,"frequent":1},{"idnum":140170,"id":"X140170","images":"C1.png","x":2,"y":21,"isTile":true,"recent":1735397516295,"frequent":1},{"idnum":110119,"id":"X110119","images":"C4.png","x":7,"y":14,"isTile":true,"recent":1735397434752,"frequent":3},{"idnum":80083,"id":"X80083","images":"6.png","x":3,"y":10,"isTile":true,"recent":1735397403120,"frequent":6},{"idnum":80082,"id":"X80082","images":"6.png","x":2,"y":10,"isTile":true,"recent":1735397393215,"frequent":2},{"idnum":71824,"id":"X71824","images":"11.png","x":0,"y":228,"isTile":true,"recent":1735397302354,"frequent":1},{"idnum":71816,"id":"X71816","images":"11.png","x":0,"y":227,"isTile":true,"recent":1735397300089,"frequent":1},{"idnum":71825,"id":"X71825","images":"11.png","x":1,"y":228,"isTile":true,"recent":1735397296728,"frequent":1},{"idnum":71841,"id":"X71841","images":"11.png","x":1,"y":230,"isTile":true,"recent":1735397274905,"frequent":1},{"idnum":71840,"id":"X71840","images":"11.png","x":0,"y":230,"isTile":true,"recent":1735397272160,"frequent":1},{"idnum":71833,"id":"X71833","images":"11.png","x":1,"y":229,"isTile":true,"recent":1735397269433,"frequent":1},{"idnum":71832,"id":"X71832","images":"11.png","x":0,"y":229,"isTile":true,"recent":1735397266704,"frequent":1},{"idnum":71815,"id":"X71815","images":"11.png","x":7,"y":226,"isTile":true,"recent":1735397232288,"frequent":1},{"idnum":71807,"id":"X71807","images":"11.png","x":7,"y":225,"isTile":true,"recent":1735397229624,"frequent":1},{"idnum":71827,"id":"X71827","images":"11.png","x":3,"y":228,"isTile":true,"recent":1735397220728,"frequent":1},{"idnum":71819,"id":"X71819","images":"11.png","x":3,"y":227,"isTile":true,"recent":1735397218496,"frequent":1},{"idnum":120173,"id":"X120173","images":"C3.png","x":5,"y":21,"isTile":true,"recent":1735397183385,"frequent":3},{"idnum":120174,"id":"X120174","images":"C3.png","x":6,"y":21,"isTile":true,"recent":1735397125953,"frequent":6},{"idnum":120134,"id":"X120134","images":"C3.png","x":6,"y":16,"isTile":true,"recent":1735396971049,"frequent":1},{"idnum":130173,"id":"X130173","images":"C2.png","x":5,"y":21,"isTile":true,"recent":1735396958897,"frequent":1},{"idnum":120109,"id":"X120109","images":"C3.png","x":5,"y":13,"isTile":true,"recent":1735396928298,"frequent":2},{"idnum":120117,"id":"X120117","images":"C3.png","x":5,"y":14,"isTile":true,"recent":1735396877690,"frequent":1},{"idnum":120125,"id":"X120125","images":"C3.png","x":5,"y":15,"isTile":true,"recent":1735396864194,"frequent":6},{"idnum":70169,"id":"X70169","images":"11.png","x":1,"y":21,"isTile":true,"recent":1735396825666,"frequent":3},{"idnum":70161,"id":"X70161","images":"11.png","x":1,"y":20,"isTile":true,"recent":1735396814418,"frequent":3},{"idnum":70145,"id":"X70145","images":"11.png","x":1,"y":18,"isTile":true,"recent":1735396802466,"frequent":14},{"idnum":70146,"id":"X70146","images":"11.png","x":2,"y":18,"isTile":true,"recent":1735396788810,"frequent":1},{"idnum":70144,"id":"X70144","images":"11.png","x":0,"y":18,"isTile":true,"recent":1735396782475,"frequent":4},{"idnum":100386,"id":"X100386","images":"Outside_B.png","x":2,"y":16,"isTile":true,"recent":1735396757386,"frequent":1},{"idnum":100362,"id":"X100362","images":"Outside_B.png","x":2,"y":15,"isTile":true,"recent":1735396754546,"frequent":1},{"idnum":100385,"id":"X100385","images":"Outside_B.png","x":1,"y":16,"isTile":true,"recent":1735396751066,"frequent":1},{"idnum":100384,"id":"X100384","images":"Outside_B.png","x":0,"y":16,"isTile":true,"recent":1735396747826,"frequent":1},{"idnum":100361,"id":"X100361","images":"Outside_B.png","x":1,"y":15,"isTile":true,"recent":1735396745106,"frequent":2},{"idnum":100360,"id":"X100360","images":"Outside_B.png","x":0,"y":15,"isTile":true,"recent":1735396742682,"frequent":3},{"idnum":90196,"id":"X90196","images":"12.png","x":4,"y":24,"isTile":true,"recent":1735396698234,"frequent":1},{"idnum":90195,"id":"X90195","images":"12.png","x":3,"y":24,"isTile":true,"recent":1735396695530,"frequent":1},{"idnum":90194,"id":"X90194","images":"12.png","x":2,"y":24,"isTile":true,"recent":1735396691098,"frequent":1},{"idnum":90187,"id":"X90187","images":"12.png","x":3,"y":23,"isTile":true,"recent":1735396687866,"frequent":3},{"idnum":90186,"id":"X90186","images":"12.png","x":2,"y":23,"isTile":true,"recent":1735396672410,"frequent":1},{"idnum":31,"id":"redPotion","images":"items","y":20,"recent":1735396611866,"frequent":7},{"idnum":221,"id":"yellowGateKeeper","images":"enemys","y":20,"recent":1735396537794,"frequent":4},{"idnum":222,"id":"blueGateKeeper","images":"enemys","y":21,"recent":1735396534626,"frequent":3},{"idnum":226,"id":"yellowKnight","images":"enemys","y":25,"recent":1735396460524,"frequent":1},{"idnum":225,"id":"soldier","images":"enemys","y":24,"recent":1735396456036,"frequent":1},{"idnum":326,"id":"tulipFairy","images":"enemys","y":72,"recent":1735396229196,"frequent":1},{"idnum":141,"id":"autotile8","images":"autotile","y":0,"recent":1735391328901,"frequent":2},{"idnum":30,"id":"yellowGem","images":"items","y":19,"recent":1735391294213,"frequent":1},{"idnum":44,"id":"shield5","images":"items","y":59,"recent":1735391193096,"frequent":1},{"idnum":138,"id":"blueTrader","images":"npcs","y":13,"recent":1735391190680,"frequent":1},{"idnum":43,"id":"sword5","images":"items","y":54,"recent":1735391188576,"frequent":1}]} \ No newline at end of file +{"viewportLoc":[0,0],"editorLastFloorId":"jiedao","lastUsed":[{"idnum":210,"id":"skeletonWarrior","images":"enemys","y":9,"recent":1735825145197,"frequent":4},{"idnum":21,"id":"yellowKey","images":"items","y":0,"recent":1735824906066,"frequent":14},{"idnum":81,"id":"yellowDoor","images":"animates","y":4,"recent":1735824901122,"frequent":26},{"idnum":214,"id":"zombieKnight","images":"enemys","y":13,"recent":1735824888165,"frequent":2},{"idnum":82,"id":"blueDoor","images":"animates","y":5,"recent":1735824878838,"frequent":4},{"idnum":32,"id":"bluePotion","images":"items","y":21,"recent":1735824871469,"frequent":2},{"idnum":28,"id":"blueGem","images":"items","y":17,"recent":1735824867878,"frequent":6},{"idnum":27,"id":"redGem","images":"items","y":16,"recent":1735824864181,"frequent":5},{"idnum":22,"id":"blueKey","images":"items","y":1,"recent":1735824852246,"frequent":4},{"idnum":140,"id":"autotile4","images":"autotile","y":0,"recent":1735824840165,"frequent":138},{"idnum":209,"id":"skeleton","images":"enemys","y":8,"recent":1735824813505,"frequent":2},{"idnum":94,"id":"rightPortal","images":"animates","y":25,"recent":1735824733893,"frequent":6},{"idnum":92,"id":"leftPortal","images":"animates","y":24,"recent":1735824084823,"frequent":2},{"idnum":91,"id":"upPortal","images":"animates","y":26,"recent":1735821889246,"frequent":2},{"idnum":85,"id":"specialDoor","images":"animates","y":8,"recent":1735820976103,"frequent":3},{"idnum":93,"id":"downPortal","images":"animates","y":23,"recent":1735820969951,"frequent":2},{"idnum":89,"id":"portal","images":"animates","y":17,"recent":1735820958612,"frequent":1},{"idnum":26,"id":"bigKey","images":"items","y":6,"recent":1735820920269,"frequent":1},{"idnum":34,"id":"yellowPotion","images":"items","y":23,"recent":1735820909149,"frequent":1},{"idnum":33,"id":"greenPotion","images":"items","y":22,"recent":1735820906301,"frequent":1},{"idnum":83,"id":"redDoor","images":"animates","y":6,"recent":1735820844323,"frequent":2},{"idnum":247,"id":"magicMaster","images":"enemys","y":46,"recent":1735820830425,"frequent":1},{"idnum":20160,"id":"X20160","images":"5.png","x":0,"y":20,"isTile":true,"recent":1735398503013,"frequent":2},{"idnum":20168,"id":"X20168","images":"5.png","x":0,"y":21,"isTile":true,"recent":1735398496973,"frequent":3},{"idnum":20176,"id":"X20176","images":"5.png","x":0,"y":22,"isTile":true,"recent":1735398485125,"frequent":1},{"idnum":71742,"id":"X71742","images":"11.png","x":6,"y":217,"isTile":true,"recent":1735398452693,"frequent":1},{"idnum":71750,"id":"X71750","images":"11.png","x":6,"y":218,"isTile":true,"recent":1735398448325,"frequent":1},{"idnum":71751,"id":"X71751","images":"11.png","x":7,"y":218,"isTile":true,"recent":1735398443645,"frequent":1},{"idnum":71783,"id":"X71783","images":"11.png","x":7,"y":222,"isTile":true,"recent":1735398426909,"frequent":7},{"idnum":71799,"id":"X71799","images":"11.png","x":7,"y":224,"isTile":true,"recent":1735398421365,"frequent":5},{"idnum":71826,"id":"X71826","images":"11.png","x":2,"y":228,"isTile":true,"recent":1735398415661,"frequent":2},{"idnum":71818,"id":"X71818","images":"11.png","x":2,"y":227,"isTile":true,"recent":1735398413269,"frequent":3},{"idnum":224,"id":"swordsman","images":"enemys","y":23,"recent":1735398341974,"frequent":6},{"idnum":71842,"id":"X71842","images":"11.png","x":2,"y":230,"isTile":true,"recent":1735398315069,"frequent":1},{"idnum":71834,"id":"X71834","images":"11.png","x":2,"y":229,"isTile":true,"recent":1735398312437,"frequent":1},{"idnum":110114,"id":"X110114","images":"C4.png","x":2,"y":14,"isTile":true,"recent":1735398246502,"frequent":6},{"idnum":110122,"id":"X110122","images":"C4.png","x":2,"y":15,"isTile":true,"recent":1735398239998,"frequent":1},{"idnum":110028,"id":"X110028","images":"C4.png","x":4,"y":3,"isTile":true,"recent":1735398198709,"frequent":2},{"idnum":110020,"id":"X110020","images":"C4.png","x":4,"y":2,"isTile":true,"recent":1735398191398,"frequent":2},{"idnum":71791,"id":"X71791","images":"11.png","x":7,"y":223,"isTile":true,"recent":1735398163774,"frequent":3},{"idnum":71785,"id":"X71785","images":"11.png","x":1,"y":223,"isTile":true,"recent":1735398120734,"frequent":2},{"idnum":71784,"id":"X71784","images":"11.png","x":0,"y":223,"isTile":true,"recent":1735398118318,"frequent":3},{"idnum":71793,"id":"X71793","images":"11.png","x":1,"y":224,"isTile":true,"recent":1735398115446,"frequent":2},{"idnum":71792,"id":"X71792","images":"11.png","x":0,"y":224,"isTile":true,"recent":1735398113142,"frequent":2},{"idnum":71787,"id":"X71787","images":"11.png","x":3,"y":223,"isTile":true,"recent":1735398102326,"frequent":1},{"idnum":71786,"id":"X71786","images":"11.png","x":2,"y":223,"isTile":true,"recent":1735398099430,"frequent":1},{"idnum":71795,"id":"X71795","images":"11.png","x":3,"y":224,"isTile":true,"recent":1735398097359,"frequent":1},{"idnum":71794,"id":"X71794","images":"11.png","x":2,"y":224,"isTile":true,"recent":1735398094982,"frequent":1},{"idnum":130006,"id":"X130006","images":"C2.png","x":6,"y":0,"isTile":true,"recent":1735398082894,"frequent":3},{"idnum":130011,"id":"X130011","images":"C2.png","x":3,"y":1,"isTile":true,"recent":1735398078792,"frequent":2},{"idnum":71817,"id":"X71817","images":"11.png","x":1,"y":227,"isTile":true,"recent":1735398027294,"frequent":3},{"idnum":71837,"id":"X71837","images":"11.png","x":5,"y":229,"isTile":true,"recent":1735398013126,"frequent":1},{"idnum":71829,"id":"X71829","images":"11.png","x":5,"y":228,"isTile":true,"recent":1735398008166,"frequent":1},{"idnum":71821,"id":"X71821","images":"11.png","x":5,"y":227,"isTile":true,"recent":1735398005430,"frequent":1},{"idnum":71836,"id":"X71836","images":"11.png","x":4,"y":229,"isTile":true,"recent":1735397997622,"frequent":1},{"idnum":71828,"id":"X71828","images":"11.png","x":4,"y":228,"isTile":true,"recent":1735397993455,"frequent":1},{"idnum":71820,"id":"X71820","images":"11.png","x":4,"y":227,"isTile":true,"recent":1735397989903,"frequent":1},{"idnum":30217,"id":"X30217","images":"4.png","x":1,"y":27,"isTile":true,"recent":1735397944838,"frequent":3},{"idnum":110012,"id":"X110012","images":"C4.png","x":4,"y":1,"isTile":true,"recent":1735397929366,"frequent":2},{"idnum":100485,"id":"X100485","images":"Outside_B.png","x":5,"y":20,"isTile":true,"recent":1735397919927,"frequent":2},{"idnum":100436,"id":"X100436","images":"Outside_B.png","x":4,"y":18,"isTile":true,"recent":1735397880486,"frequent":1},{"idnum":100437,"id":"X100437","images":"Outside_B.png","x":5,"y":18,"isTile":true,"recent":1735397877086,"frequent":1},{"idnum":100461,"id":"X100461","images":"Outside_B.png","x":5,"y":19,"isTile":true,"recent":1735397868606,"frequent":1},{"idnum":100460,"id":"X100460","images":"Outside_B.png","x":4,"y":19,"isTile":true,"recent":1735397843448,"frequent":2},{"idnum":100484,"id":"X100484","images":"Outside_B.png","x":4,"y":20,"isTile":true,"recent":1735397840545,"frequent":2},{"idnum":40136,"id":"X40136","images":"3.png","x":0,"y":17,"isTile":true,"recent":1735397799150,"frequent":1},{"idnum":40144,"id":"X40144","images":"3.png","x":0,"y":18,"isTile":true,"recent":1735397796038,"frequent":2},{"idnum":30227,"id":"X30227","images":"4.png","x":3,"y":28,"isTile":true,"recent":1735397775591,"frequent":2},{"idnum":30214,"id":"X30214","images":"4.png","x":6,"y":26,"isTile":true,"recent":1735397768303,"frequent":1},{"idnum":30218,"id":"X30218","images":"4.png","x":2,"y":27,"isTile":true,"recent":1735397761062,"frequent":1},{"idnum":120041,"id":"X120041","images":"C3.png","x":1,"y":5,"isTile":true,"recent":1735397710494,"frequent":1},{"idnum":120042,"id":"X120042","images":"C3.png","x":2,"y":5,"isTile":true,"recent":1735397702167,"frequent":2},{"idnum":120006,"id":"X120006","images":"C3.png","x":6,"y":0,"isTile":true,"recent":1735397659951,"frequent":5},{"idnum":120014,"id":"X120014","images":"C3.png","x":6,"y":1,"isTile":true,"recent":1735397644591,"frequent":4},{"idnum":120090,"id":"X120090","images":"C3.png","x":2,"y":11,"isTile":true,"recent":1735397629759,"frequent":3},{"idnum":120150,"id":"X120150","images":"C3.png","x":6,"y":18,"isTile":true,"recent":1735397613207,"frequent":3},{"idnum":120166,"id":"X120166","images":"C3.png","x":6,"y":20,"isTile":true,"recent":1735397574639,"frequent":1},{"idnum":140170,"id":"X140170","images":"C1.png","x":2,"y":21,"isTile":true,"recent":1735397516295,"frequent":1},{"idnum":110119,"id":"X110119","images":"C4.png","x":7,"y":14,"isTile":true,"recent":1735397434752,"frequent":3},{"idnum":80083,"id":"X80083","images":"6.png","x":3,"y":10,"isTile":true,"recent":1735397403120,"frequent":6},{"idnum":80082,"id":"X80082","images":"6.png","x":2,"y":10,"isTile":true,"recent":1735397393215,"frequent":2},{"idnum":71824,"id":"X71824","images":"11.png","x":0,"y":228,"isTile":true,"recent":1735397302354,"frequent":1},{"idnum":71816,"id":"X71816","images":"11.png","x":0,"y":227,"isTile":true,"recent":1735397300089,"frequent":1},{"idnum":71825,"id":"X71825","images":"11.png","x":1,"y":228,"isTile":true,"recent":1735397296728,"frequent":1},{"idnum":71841,"id":"X71841","images":"11.png","x":1,"y":230,"isTile":true,"recent":1735397274905,"frequent":1},{"idnum":71840,"id":"X71840","images":"11.png","x":0,"y":230,"isTile":true,"recent":1735397272160,"frequent":1},{"idnum":71833,"id":"X71833","images":"11.png","x":1,"y":229,"isTile":true,"recent":1735397269433,"frequent":1},{"idnum":71832,"id":"X71832","images":"11.png","x":0,"y":229,"isTile":true,"recent":1735397266704,"frequent":1},{"idnum":71815,"id":"X71815","images":"11.png","x":7,"y":226,"isTile":true,"recent":1735397232288,"frequent":1},{"idnum":71807,"id":"X71807","images":"11.png","x":7,"y":225,"isTile":true,"recent":1735397229624,"frequent":1},{"idnum":71827,"id":"X71827","images":"11.png","x":3,"y":228,"isTile":true,"recent":1735397220728,"frequent":1},{"idnum":71819,"id":"X71819","images":"11.png","x":3,"y":227,"isTile":true,"recent":1735397218496,"frequent":1},{"idnum":120173,"id":"X120173","images":"C3.png","x":5,"y":21,"isTile":true,"recent":1735397183385,"frequent":3},{"idnum":120174,"id":"X120174","images":"C3.png","x":6,"y":21,"isTile":true,"recent":1735397125953,"frequent":6},{"idnum":120134,"id":"X120134","images":"C3.png","x":6,"y":16,"isTile":true,"recent":1735396971049,"frequent":1},{"idnum":130173,"id":"X130173","images":"C2.png","x":5,"y":21,"isTile":true,"recent":1735396958897,"frequent":1},{"idnum":120109,"id":"X120109","images":"C3.png","x":5,"y":13,"isTile":true,"recent":1735396928298,"frequent":2},{"idnum":120117,"id":"X120117","images":"C3.png","x":5,"y":14,"isTile":true,"recent":1735396877690,"frequent":1},{"idnum":120125,"id":"X120125","images":"C3.png","x":5,"y":15,"isTile":true,"recent":1735396864194,"frequent":6},{"idnum":70169,"id":"X70169","images":"11.png","x":1,"y":21,"isTile":true,"recent":1735396825666,"frequent":3},{"idnum":70161,"id":"X70161","images":"11.png","x":1,"y":20,"isTile":true,"recent":1735396814418,"frequent":3},{"idnum":70145,"id":"X70145","images":"11.png","x":1,"y":18,"isTile":true,"recent":1735396802466,"frequent":14},{"idnum":70146,"id":"X70146","images":"11.png","x":2,"y":18,"isTile":true,"recent":1735396788810,"frequent":1},{"idnum":70144,"id":"X70144","images":"11.png","x":0,"y":18,"isTile":true,"recent":1735396782475,"frequent":4},{"idnum":100386,"id":"X100386","images":"Outside_B.png","x":2,"y":16,"isTile":true,"recent":1735396757386,"frequent":1},{"idnum":100362,"id":"X100362","images":"Outside_B.png","x":2,"y":15,"isTile":true,"recent":1735396754546,"frequent":1},{"idnum":100385,"id":"X100385","images":"Outside_B.png","x":1,"y":16,"isTile":true,"recent":1735396751066,"frequent":1},{"idnum":100384,"id":"X100384","images":"Outside_B.png","x":0,"y":16,"isTile":true,"recent":1735396747826,"frequent":1},{"idnum":100361,"id":"X100361","images":"Outside_B.png","x":1,"y":15,"isTile":true,"recent":1735396745106,"frequent":2},{"idnum":100360,"id":"X100360","images":"Outside_B.png","x":0,"y":15,"isTile":true,"recent":1735396742682,"frequent":3},{"idnum":90196,"id":"X90196","images":"12.png","x":4,"y":24,"isTile":true,"recent":1735396698234,"frequent":1},{"idnum":90195,"id":"X90195","images":"12.png","x":3,"y":24,"isTile":true,"recent":1735396695530,"frequent":1},{"idnum":90194,"id":"X90194","images":"12.png","x":2,"y":24,"isTile":true,"recent":1735396691098,"frequent":1},{"idnum":90187,"id":"X90187","images":"12.png","x":3,"y":23,"isTile":true,"recent":1735396687866,"frequent":3},{"idnum":90186,"id":"X90186","images":"12.png","x":2,"y":23,"isTile":true,"recent":1735396672410,"frequent":1},{"idnum":31,"id":"redPotion","images":"items","y":20,"recent":1735396611866,"frequent":7},{"idnum":221,"id":"yellowGateKeeper","images":"enemys","y":20,"recent":1735396537794,"frequent":4},{"idnum":222,"id":"blueGateKeeper","images":"enemys","y":21,"recent":1735396534626,"frequent":3},{"idnum":226,"id":"yellowKnight","images":"enemys","y":25,"recent":1735396460524,"frequent":1},{"idnum":225,"id":"soldier","images":"enemys","y":24,"recent":1735396456036,"frequent":1},{"idnum":326,"id":"tulipFairy","images":"enemys","y":72,"recent":1735396229196,"frequent":1},{"idnum":141,"id":"autotile8","images":"autotile","y":0,"recent":1735391328901,"frequent":2},{"idnum":30,"id":"yellowGem","images":"items","y":19,"recent":1735391294213,"frequent":1},{"idnum":44,"id":"shield5","images":"items","y":59,"recent":1735391193096,"frequent":1},{"idnum":138,"id":"blueTrader","images":"npcs","y":13,"recent":1735391190680,"frequent":1},{"idnum":43,"id":"sword5","images":"items","y":54,"recent":1735391188576,"frequent":1}]} \ No newline at end of file diff --git a/project/data.js b/project/data.js index 6f52790..dc2ae7c 100644 --- a/project/data.js +++ b/project/data.js @@ -57,7 +57,6 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = "dl.webp", "dlr.webp", "dr.webp", - "dragon.webp", "eve_010102.webp", "eve_010203.webp", "eve_010304.webp", @@ -406,14 +405,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = ], "font": "pala" }, - "splitImages": [ - { - "name": "dragon.webp", - "width": 384, - "height": 96, - "prefix": "dragon_" - } - ] + "splitImages": null }, "firstData": { "title": "秽翼的尤斯蒂娅", diff --git a/project/enemys.js b/project/enemys.js index db20c9f..931f40a 100644 --- a/project/enemys.js +++ b/project/enemys.js @@ -35,7 +35,7 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = "whiteHornSlime": {"name":"尖角怪","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0}, "redSwordsman": {"name":"剑王","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "poisonZombie": {"name":"绿兽人","hp":100,"atk":120,"def":0,"money":13,"exp":0,"point":0,"special":[12]}, - "octopus": {"name":"血影","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0,"bigImage":"dragon_1.webp"}, + "octopus": {"name":"血影","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0,"bigImage":null}, "princessEnemy": {"name":"假公主","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0}, "angel": {"name":"天使","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0}, "elemental": {"name":"元素生物","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0}, @@ -52,7 +52,7 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = "magicMaster": {"name":"黑暗大法师","hp":100,"atk":120,"def":0,"money":12,"exp":0,"point":0,"special":11,"value":0.3333333333333333,"add":true,"notBomb":true}, "devilWarrior": {"name":"魔神武士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0}, "fairyEnemy": {"name":"仙子","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0}, - "dragon": {"name":"魔龙","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0,"bigImage":"dragon_0.webp"}, + "dragon": {"name":"魔龙","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0,"bigImage":null}, "skeletonKnight": {"name":"骷髅武士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0}, "skeletonPresbyter": {"name":"骷髅巫师","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0}, "ironRock": {"name":"铁面人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0}, diff --git a/project/functions.js b/project/functions.js index 1ad24e3..0719015 100644 --- a/project/functions.js +++ b/project/functions.js @@ -1071,7 +1071,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = // TODO:增加自己的一些读档处理 core.ui.statusBar.clearItemInfo() core.ui.statusBar.update(); - + core.plugin.playing.clear() // 切换到对应的楼层 core.changeFloor(data.floorId, null, data.hero.loc, 0, function () { // TODO:可以在这里设置读档后播放BGM @@ -1387,68 +1387,68 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = }; }, "moveOneStep": function (callback) { - // 勇士每走一步后执行的操作。callback为行走完毕后的回调 - // 这个函数执行在“刚走完”的时候,即还没有检查该点的事件和领域伤害等。 - // 请注意:瞬间移动不会执行该函数。如果要控制能否瞬间移动有三种方法: - // 1. 将全塔属性中的cannotMoveDirectly这个开关勾上,即可在全塔中全程禁止使用瞬移。 - // 2, 将楼层属性中的cannotMoveDirectly这个开关勾上,即禁止在该层楼使用瞬移。 - // 3. 将flag:cannotMoveDirectly置为true,即可使用flag控制在某段剧情范围内禁止瞬移。 + // 勇士每走一步后执行的操作。callback为行走完毕后的回调 + // 这个函数执行在“刚走完”的时候,即还没有检查该点的事件和领域伤害等。 + // 请注意:瞬间移动不会执行该函数。如果要控制能否瞬间移动有三种方法: + // 1. 将全塔属性中的cannotMoveDirectly这个开关勾上,即可在全塔中全程禁止使用瞬移。 + // 2, 将楼层属性中的cannotMoveDirectly这个开关勾上,即禁止在该层楼使用瞬移。 + // 3. 将flag:cannotMoveDirectly置为true,即可使用flag控制在某段剧情范围内禁止瞬移。 - // 增加步数 - core.status.hero.steps++; - // 更新跟随者状态,并绘制 - core.updateFollowers(); - core.drawHero(); - // 检查中毒状态的扣血和死亡 - if (core.hasFlag('poison')) { - core.status.hero.statistics.poisonDamage += core.values.poisonDamage; - core.status.hero.hp -= core.values.poisonDamage; - if (core.status.hero.hp <= 0) { - core.status.hero.hp = 0; - core.updateStatusBar(false, true); - core.events.lose(); - return; - } else { - core.updateStatusBar(false, true); - } - } + // 增加步数 + core.status.hero.steps++; + // 更新跟随者状态,并绘制 + core.updateFollowers(); + core.drawHero(); + // 检查中毒状态的扣血和死亡 + if (core.hasFlag('poison')) { + core.status.hero.statistics.poisonDamage += core.values.poisonDamage; + core.status.hero.hp -= core.values.poisonDamage; + if (core.status.hero.hp <= 0) { + core.status.hero.hp = 0; + core.updateStatusBar(false, true); + core.events.lose(); + return; + } else { + core.updateStatusBar(false, true); + } + } - // 从v2.7开始,每一步行走不会再刷新状态栏。 - // 如果有特殊要求(如每走一步都加buff之类),可手动取消注释下面这一句: - // core.updateStatusBar(true, true); + // 从v2.7开始,每一步行走不会再刷新状态栏。 + // 如果有特殊要求(如每走一步都加buff之类),可手动取消注释下面这一句: + // core.updateStatusBar(true, true); - // 检查自动事件 - core.checkAutoEvents(); + // 检查自动事件 + core.checkAutoEvents(); - // ------ 检查目标点事件 ------ // - // 无事件的道具(如血瓶)需要优先于阻激夹域判定 - var nowx = core.getHeroLoc('x'), - nowy = core.getHeroLoc('y'); - var block = core.getBlock(nowx, nowy); - var hasTrigger = false; - if (block != null && block.event.trigger == 'getItem' && - !core.floors[core.status.floorId].afterGetItem[nowx + "," + nowy]) { - hasTrigger = true; - core.trigger(nowx, nowy, callback); - } - // 执行目标点的阻激夹域事件 - core.checkBlock(); + // ------ 检查目标点事件 ------ // + // 无事件的道具(如血瓶)需要优先于阻激夹域判定 + var nowx = core.getHeroLoc('x'), + nowy = core.getHeroLoc('y'); + var block = core.getBlock(nowx, nowy); + var hasTrigger = false; + if (block != null && block.event.trigger == 'getItem' && + !core.floors[core.status.floorId].afterGetItem[nowx + "," + nowy]) { + hasTrigger = true; + core.trigger(nowx, nowy, callback); + } + // 执行目标点的阻激夹域事件 + core.checkBlock(); - // 执行目标点的script和事件 - if (!hasTrigger) - core.trigger(nowx, nowy, callback); + // 执行目标点的script和事件 + if (!hasTrigger) + core.trigger(nowx, nowy, callback); - // 检查该点是否是滑冰 - if (core.onSki()) { - // 延迟到事件最后执行,因为这之前可能有阻激夹域动画 - core.insertAction({ "type": "moveAction" }, null, null, null, true); - } + // 检查该点是否是滑冰 + if (core.onSki()) { + // 延迟到事件最后执行,因为这之前可能有阻激夹域动画 + core.insertAction({ "type": "moveAction" }, null, null, null, true); + } - // ------ 检查目标点事件 END ------ // + // ------ 检查目标点事件 END ------ // - // 如需强行终止行走可以在这里条件判定: - // core.stopAutomaticRoute(); - }, + // 如需强行终止行走可以在这里条件判定: + // core.stopAutomaticRoute(); +}, "moveDirectly": function (x, y, ignoreSteps) { // 瞬间移动;x,y为要瞬间移动的点;ignoreSteps为减少的步数,可能之前已经被计算过 // 返回true代表成功瞬移,false代表没有成功瞬移 diff --git a/project/images/dragon.webp b/project/images/dragon.webp deleted file mode 100644 index a7efe4e..0000000 Binary files a/project/images/dragon.webp and /dev/null differ diff --git a/project/plugins.js b/project/plugins.js index 0d90fec..e08da62 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -1,183 +1,213 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { "init": function () { - this._afterLoadResources = function () { - // 本函数将在所有资源加载完毕后,游戏开启前被执行 - core.ui.statusBar.init(); - core.registerEvent("changeMouse", function (data) { - if (!main.replayChecking && !core.isReplaying()) - core.changeMouse( - data.icon, - data.div, - data.translate[0], - data.translate[1], - data.scale[0], - data.scale[1], - data.angel, - data.px, - data.py - ); - core.doAction(); - }); - core.registerEvent("removeMouse", function (data) { - if (!main.replayChecking && !core.isReplaying()) - core.removeMouse(data.div); - core.doAction(); - }); - core.registerEvent("addPop", function (data) { - if (!main.replayChecking && !core.isReplaying()) { - data.value = core.replaceText(data.value); - core.addPop( - data.value, - data.px, - data.py, - data.color, - data.boldColor, - data.left, - data.jump, - data.time, - data.show, - data.font, - data.speed - ); - } - core.doAction(); - }); - core.registerEvent("drawWarning", function (data) { - if (!main.replayChecking && !core.isReplaying()) { - data.text = core.replaceText(data.text); - data.text2 = core.replaceText(data.text2); - core.drawWarning( - data.x, - data.y, - data.size, - data?.text, - data?.text2, - data?.warning - ); - setTimeout(() => core.doAction(), 3100); - } else { - core.doAction(); - } - }); - core.registerEvent("playStereo", function (data) { - if (!main.replayChecking && !core.isReplaying()) - core.playStereo(data.name, data.left, data.right, data.split); - core.doAction(); - }); - core.registerEvent("moveStereo", function (data) { - if (!main.replayChecking && !core.isReplaying()) { - const id = core.playStereo( - data.name, - data.left, - data.right, - data.split - ); - core.moveStereo(id, data.leftTo, data.rightTo, data.time); - } - core.doAction(); - }); - core.registerEvent("over", function (data) { - let image = data.image ?? ""; - let time = data.time ?? 3000; - let sound = data.sound ?? ""; - let textColor = data.textColor ?? "#FFFFFF"; - let boldColor = data.boldColor ?? "#000000"; - let font = data.font ?? "bold 48px Verdana"; - let text = data.text ?? ""; - let hidetime = data.hidetime ?? 100; - if (!main.replayChecking && !core.isReplaying()) { - core.over( - image, - data.memory, - time, - hidetime, - sound, - textColor, - boldColor, - font, - text - ); - } else { - core.doAction(); - } - }); - core.registerEvent("changebg", function (data) { - if (!main.replayChecking && !core.isReplaying()) { - core.changebg( - data.img1, - data.memory1, - data.img2, - data.memory2, - data.time, - data.style - ); - } else { - core.doAction(); - } - }); - core.registerEvent("overlist", function (data) { - if (!main.replayChecking && !core.isReplaying()) { - core.overlist( - data.image, - data.memory, - data.hidetime || 30, - data.list || [ - { - text: "", - sound: "", - time: 50, - textColor: "#FFFFFF", - boldColor: "#000000", - font: "bold 48px Verdana", - frame: 0, - }, - ] - ); - } else { - core.doAction(); - } - }); - core.registerEvent("op", function (data) { - if (!main.replayChecking && !core.isReplaying()) { - core.openvideo(); - } else { - core.doAction(); - } - }); - core.registerEvent("animationDrawable", function (data) { - if (!main.replayChecking && !core.isReplaying()) { - core.animationDrawable( - data.allFarme, - data.color, - data.globalAlpha, - data.imageList, - data.soundList - ); - } else { - core.doAction(); - } - }); - core.registerEvent("cgtext", function (data) { - if (!main.replayChecking && !core.isReplaying()) { - core.ui.cgText.image = data.bg; - core.ui.cgText.memory = data.memory; - core.ui.cgText.head = core.clone(data.head); - core.ui.cgText.name = data.name; - core.ui.cgText.text = data.text; - core.ui.cgText.time = data.time; - core.ui.cgText.wait = data.wait; - core.ui.cgText.WindowSkin = data.WindowSkin; - core.ui.cgText.sound = data.sound || ""; - core.ui.cgText.bodyList = core.clone(data.bodyList); - main.dom.cgText.style.display = "block"; - core.ui.cgText.update(); - } else { - core.doAction(); - } - }); - }; - }, + this._afterLoadResources = function () { + // 本函数将在所有资源加载完毕后,游戏开启前被执行 + core.ui.statusBar.init(); + core.registerEvent("changeMouse", function (data) { + if (!main.replayChecking && !core.isReplaying()) + core.changeMouse( + data.icon, + data.div, + data.translate[0], + data.translate[1], + data.scale[0], + data.scale[1], + data.angel, + data.px, + data.py + ); + core.doAction(); + }); + core.registerEvent("removeMouse", function (data) { + if (!main.replayChecking && !core.isReplaying()) + core.removeMouse(data.div); + core.doAction(); + }); + core.registerEvent("addPop", function (data) { + if (!main.replayChecking && !core.isReplaying()) { + data.value = core.replaceText(data.value); + core.addPop( + data.value, + data.px, + data.py, + data.color, + data.boldColor, + data.left, + data.jump, + data.time, + data.show, + data.font, + data.speed + ); + } + core.doAction(); + }); + core.registerEvent("drawWarning", function (data) { + if (!main.replayChecking && !core.isReplaying()) { + data.text = core.replaceText(data.text); + data.text2 = core.replaceText(data.text2); + core.drawWarning( + data.x, + data.y, + data.size, + data?.text, + data?.text2, + data?.warning + ); + setTimeout(() => core.doAction(), 3100); + } else { + core.doAction(); + } + }); + core.registerEvent("playStereo", function (data) { + if (!main.replayChecking && !core.isReplaying()) + core.playStereo(data.name, data.left, data.right, data.split); + core.doAction(); + }); + core.registerEvent("moveStereo", function (data) { + if (!main.replayChecking && !core.isReplaying()) { + const id = core.playStereo( + data.name, + data.left, + data.right, + data.split + ); + core.moveStereo(id, data.leftTo, data.rightTo, data.time); + } + core.doAction(); + }); + core.registerEvent("over", function (data) { + let image = data.image ?? ""; + let time = data.time ?? 3000; + let sound = data.sound ?? ""; + let textColor = data.textColor ?? "#FFFFFF"; + let boldColor = data.boldColor ?? "#000000"; + let font = data.font ?? "bold 48px Verdana"; + let text = data.text ?? ""; + let hidetime = data.hidetime ?? 100; + if (!main.replayChecking && !core.isReplaying()) { + core.over( + image, + data.memory, + time, + hidetime, + sound, + textColor, + boldColor, + font, + text + ); + } else { + core.doAction(); + } + }); + core.registerEvent("changebg", function (data) { + if (!main.replayChecking && !core.isReplaying()) { + core.changebg( + data.img1, + data.memory1, + data.img2, + data.memory2, + data.time, + data.style + ); + } else { + core.doAction(); + } + }); + core.registerEvent("overlist", function (data) { + if (!main.replayChecking && !core.isReplaying()) { + core.overlist( + data.image, + data.memory, + data.hidetime || 30, + data.list || [{ + text: "", + sound: "", + time: 50, + textColor: "#FFFFFF", + boldColor: "#000000", + font: "bold 48px Verdana", + frame: 0, + }, ] + ); + } else { + core.doAction(); + } + }); + core.registerEvent("op", function (data) { + if (!main.replayChecking && !core.isReplaying()) { + core.openvideo(); + } else { + core.doAction(); + } + }); + core.registerEvent("animationDrawable", function (data) { + if (!main.replayChecking && !core.isReplaying()) { + core.animationDrawable( + data.allFarme, + data.color, + data.globalAlpha, + data.imageList, + data.soundList + ); + } else { + core.doAction(); + } + }); + core.registerEvent("setanimate", function (data) { + + data.px = data.px ?? 0; + data.py = data.py ?? 0; + core.setanimate(data.name, data.px, data.py, data.width, data.height, data.allFarme, data.imageList, data.soundList) + core.doAction(); + + + }); + core.registerEvent("clearanimate", function (data) { + core.plugin.playing.clear() + + core.doAction(); + + + }); + core.registerEvent("deleteanimate", function (data) { + core.deleteanimate(data.name) + core.doAction(); + }); + core.registerEvent("playanimate", function (data) { + if (!main.replayChecking && !core.isReplaying()) { + data.x = data.x ?? 0 + data.y = data.y ?? 0 + data.scalex = data.scalex ?? 1 + data.scaley = data.scaley ?? 1 + core.playanimate(data.name, data.x, data.y, data.hero, data.scalex, data.scaley) + core.doAction(); + } else { + core.doAction(); + } + }); + core.registerEvent("cgtext", function (data) { + if (!main.replayChecking && !core.isReplaying()) { + core.ui.cgText.image = data.bg; + core.ui.cgText.memory = data.memory; + core.ui.cgText.head = core.clone(data.head); + core.ui.cgText.name = data.name; + core.ui.cgText.text = data.text; + core.ui.cgText.time = data.time; + core.ui.cgText.wait = data.wait; + core.ui.cgText.WindowSkin = data.WindowSkin; + core.ui.cgText.sound = data.sound || ""; + core.ui.cgText.bodyList = core.clone(data.bodyList); + main.dom.cgText.style.display = "block"; + core.ui.cgText.update(); + } else { + core.doAction(); + } + }); + }; +}, "drawLight": function () { // 绘制灯光/漆黑层效果。调用方式 core.plugin.drawLight(...) // 【参数说明】 @@ -2632,6 +2662,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = ].style.height = innerSize; core.dom.gif.style.width = core.dom.gif.style.height = innerSize; core.dom.gif2.style.width = core.dom.gif2.style.height = innerSize; + core.dom.gameDraw.style.width = core.dom.gameDraw.style.height = innerSize; core.dom.gameDraw.style.top = @@ -2660,7 +2691,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = canvas.style.top = parseFloat(canvas.getAttribute("_top")) * core.domStyle.scale + "px"; } - // resize next main.dom.next.style.width = main.dom.next.style.height = 5 * core.domStyle.scale + "px"; @@ -2762,12 +2792,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = const totalWidthScaled = totalWidth * core.domStyle.scale, totalHeightScaled = totalHeight * core.domStyle.scale; - const gameDrawBox = isVertical ? - { - left: BORDER_WIDTH / 3, - top: BAR_HEIGHT_VERTICAL / 3 + BORDER_HEIGHT / 3, - } : - { left: BAR_WIDTH / 3 + BORDER_WIDTH / 3, top: BORDER_HEIGHT / 3 }; + const gameDrawBox = isVertical ? { + left: BORDER_WIDTH / 3, + top: BAR_HEIGHT_VERTICAL / 3 + BORDER_HEIGHT / 3, + } : { left: BAR_WIDTH / 3 + BORDER_WIDTH / 3, top: BORDER_HEIGHT / 3 }; const obj = { clientWidth: clientWidth, @@ -3402,15 +3430,13 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = this._update_infoWindow(); } _update_toolBox() { - const tools = core.isReplaying() ? - [ - [core.status.replay.pausing ? "play" : "pause", "stop", "rewind"], - ["speedDown", "speedUp", "save"], - ] : - [ - ["keyboard", "shop", "pack", "T332"], - ["settings", "save", "load", "T331"], - ]; + const tools = core.isReplaying() ? [ + [core.status.replay.pausing ? "play" : "pause", "stop", "rewind"], + ["speedDown", "speedUp", "save"], + ] : [ + ["keyboard", "shop", "pack", "T332"], + ["settings", "save", "load", "T331"], + ]; if (core.domStyle.isVertical) { core.clearMap( "outerUI", @@ -8618,21 +8644,21 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = }; }, "自定义常用事件": function () { - // editorBlocklyconfigPlus.js - // 自訂常見事件模板插件 - // 本插件引用了通用函數插件(Utility.js) - // 適用樣板:2.10.3 - // 請注意: - // 此插件對事件編輯器(editor_blocklyconfig)進行複寫,若還有其它針對事件編輯器做複寫的插件,請謹慎使用! - // 此插件對表格操作行為(editor_mode.doActionList)進行複寫,若還有其它對表格操作行為做複寫的插件,請謹慎使用! - // 使用方法: - // 現在在主頁下拉選單多了個常用事件模版,在那邊可以自由設定常用事件模板。 - // 設定完後按F5刷新,再到事件編輯器看就有你設定好的常用事件模板了。 + // editorBlocklyconfigPlus.js + // 自訂常見事件模板插件 + // 本插件引用了通用函數插件(Utility.js) + // 適用樣板:2.10.3 + // 請注意: + // 此插件對事件編輯器(editor_blocklyconfig)進行複寫,若還有其它針對事件編輯器做複寫的插件,請謹慎使用! + // 此插件對表格操作行為(editor_mode.doActionList)進行複寫,若還有其它對表格操作行為做複寫的插件,請謹慎使用! + // 使用方法: + // 現在在主頁下拉選單多了個常用事件模版,在那邊可以自由設定常用事件模板。 + // 設定完後按F5刷新,再到事件編輯器看就有你設定好的常用事件模板了。 - if (main.mode == "editor") { - //#region 配置表格初始化 - let TableFileName = "project/table/CommonEventTemplate_comment.js"; - let TableRow = ` + if (main.mode == "editor") { + //#region 配置表格初始化 + let TableFileName = "project/table/CommonEventTemplate_comment.js"; + let TableRow = ` var CommonEventTemplate_comment = {"_type": "object", "_data": { "CommonEventTemplate": { @@ -8675,241 +8701,221 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = } }} `; - if (!events_c12a15a8_c380_4b28_8144_256cba95f760.CommonEventTemplate) { - /** - * @type {{[EvnetName:actionParserJson]}} - */ - events_c12a15a8_c380_4b28_8144_256cba95f760.CommonEventTemplate = { - 检测音乐如果没有开启则系统提示开启: [ - { - type: "if", - condition: "!core.musicStatus.bgmStatus", - true: [ - "\t[系统提示]你当前音乐处于关闭状态,本塔开音乐游戏效果更佳", - ], - false: [], - }, - ], - 仿新新魔塔一次性商人: [ - { - type: "if", - condition: "switch:A", - true: [ - "\t[行商,trader]\b[this]这是购买我的道具后我给玩家的提示。", - { - type: "comment", - text: "下一条指令可视情况使用或不使用", - }, - { - type: "hide", - remove: true, - time: 250, - }, - ], - false: [ - { - type: "confirm", - text: "我有3把黄钥匙,\n你出50金币就卖给你。", - yes: [ - { - type: "if", - condition: "status:money>=50", - true: [ - { - type: "setValue", - name: "status:money", - operator: "-=", - value: "50", - }, - { - type: "setValue", - name: "item:yellowKey", - operator: "+=", - value: "3", - }, - { - type: "playSound", - name: "确定", - stop: true, - }, - { - type: "setValue", - name: "switch:A", - value: "true", - }, - ], - false: [ - { - type: "playSound", - name: "操作失败", - }, - "\t[行商,trader]\b[this]你的金币不足!", - ], - }, - ], - no: [], - }, - ], - }, - ], - 全地图选中一个点: [ - { - type: "comment", - text: "全地图选中一个点,需要用鼠标或触屏操作", - }, - { - type: "setValue", - name: "temp:X", - value: "status:x", - }, - { - type: "setValue", - name: "temp:Y", - value: "status:y", - }, - { - type: "tip", - text: "再次点击闪烁位置确认", - }, - { - type: "while", - condition: "true", - data: [ - { - type: "drawSelector", - image: "winskin.webp", - code: 1, - x: "32*temp:X", - y: "32*temp:Y", - width: 32, - height: 32, - }, - { - type: "wait", - }, - { - type: "if", - condition: "(flag:type === 1)", - true: [ - { - type: "if", - condition: "((temp:X===flag:x)&&(temp:Y===flag:y))", - true: [ - { - type: "break", - n: 1, - }, - ], - }, - { - type: "setValue", - name: "temp:X", - value: "flag:x", - }, - { - type: "setValue", - name: "temp:Y", - value: "flag:y", - }, - ], - }, - ], - }, - { - type: "drawSelector", - code: 1, - }, - { - type: "comment", - text: "流程进行到这里可以对[X,Y]点进行处理,比如", - }, - { - type: "closeDoor", - id: "yellowDoor", - loc: ["temp:X", "temp:Y"], - }, - ], - 多阶段Boss战斗: [ - { - type: "comment", - text: "多阶段boss,请直接作为战后事件使用", - }, - { - type: "setValue", - name: "switch:A", - operator: "+=", - value: "1", - }, - { - type: "switch", - condition: "switch:A", - caseList: [ - { - case: "1", - action: [ - { - type: "setBlock", - number: "redSlime", - }, - "\t[2阶段boss,redSlime]\b[this]你以为你已经打败我了吗?没听说过史莱姆有九条命吗?", - ], - }, - { - case: "2", - action: [ - { - type: "setBlock", - number: "blackSlime", - }, - "\t[3阶段boss,blackSlime]\b[this]不能消灭我的,只会让我更强大!", - ], - }, - { - case: "3", - action: [ - { - type: "setBlock", - number: "slimelord", - }, - "\t[4阶段boss,slimelord]\b[this]我还能打!", - ], - }, - { - case: "4", - action: ["\t[4阶段boss,slimelord]我一定会回来的!"], - }, - ], - }, - ], - }; - } - //#endregion + if (!events_c12a15a8_c380_4b28_8144_256cba95f760.CommonEventTemplate) { + /** + * @type {{[EvnetName:actionParserJson]}} + */ + events_c12a15a8_c380_4b28_8144_256cba95f760.CommonEventTemplate = { + 检测音乐如果没有开启则系统提示开启: [{ + type: "if", + condition: "!core.musicStatus.bgmStatus", + true: [ + "\t[系统提示]你当前音乐处于关闭状态,本塔开音乐游戏效果更佳", + ], + false: [], + }, ], + 仿新新魔塔一次性商人: [{ + type: "if", + condition: "switch:A", + true: [ + "\t[行商,trader]\b[this]这是购买我的道具后我给玩家的提示。", + { + type: "comment", + text: "下一条指令可视情况使用或不使用", + }, + { + type: "hide", + remove: true, + time: 250, + }, + ], + false: [{ + type: "confirm", + text: "我有3把黄钥匙,\n你出50金币就卖给你。", + yes: [{ + type: "if", + condition: "status:money>=50", + true: [{ + type: "setValue", + name: "status:money", + operator: "-=", + value: "50", + }, + { + type: "setValue", + name: "item:yellowKey", + operator: "+=", + value: "3", + }, + { + type: "playSound", + name: "确定", + stop: true, + }, + { + type: "setValue", + name: "switch:A", + value: "true", + }, + ], + false: [{ + type: "playSound", + name: "操作失败", + }, + "\t[行商,trader]\b[this]你的金币不足!", + ], + }, ], + no: [], + }, ], + }, ], + 全地图选中一个点: [{ + type: "comment", + text: "全地图选中一个点,需要用鼠标或触屏操作", + }, + { + type: "setValue", + name: "temp:X", + value: "status:x", + }, + { + type: "setValue", + name: "temp:Y", + value: "status:y", + }, + { + type: "tip", + text: "再次点击闪烁位置确认", + }, + { + type: "while", + condition: "true", + data: [{ + type: "drawSelector", + image: "winskin.webp", + code: 1, + x: "32*temp:X", + y: "32*temp:Y", + width: 32, + height: 32, + }, + { + type: "wait", + }, + { + type: "if", + condition: "(flag:type === 1)", + true: [{ + type: "if", + condition: "((temp:X===flag:x)&&(temp:Y===flag:y))", + true: [{ + type: "break", + n: 1, + }, ], + }, + { + type: "setValue", + name: "temp:X", + value: "flag:x", + }, + { + type: "setValue", + name: "temp:Y", + value: "flag:y", + }, + ], + }, + ], + }, + { + type: "drawSelector", + code: 1, + }, + { + type: "comment", + text: "流程进行到这里可以对[X,Y]点进行处理,比如", + }, + { + type: "closeDoor", + id: "yellowDoor", + loc: ["temp:X", "temp:Y"], + }, + ], + 多阶段Boss战斗: [{ + type: "comment", + text: "多阶段boss,请直接作为战后事件使用", + }, + { + type: "setValue", + name: "switch:A", + operator: "+=", + value: "1", + }, + { + type: "switch", + condition: "switch:A", + caseList: [{ + case: "1", + action: [{ + type: "setBlock", + number: "redSlime", + }, + "\t[2阶段boss,redSlime]\b[this]你以为你已经打败我了吗?没听说过史莱姆有九条命吗?", + ], + }, + { + case: "2", + action: [{ + type: "setBlock", + number: "blackSlime", + }, + "\t[3阶段boss,blackSlime]\b[this]不能消灭我的,只会让我更强大!", + ], + }, + { + case: "3", + action: [{ + type: "setBlock", + number: "slimelord", + }, + "\t[4阶段boss,slimelord]\b[this]我还能打!", + ], + }, + { + case: "4", + action: ["\t[4阶段boss,slimelord]我一定会回来的!"], + }, + ], + }, + ], + }; + } + //#endregion - // 新增模板選項 - let editModeSelect = document.getElementById("editModeSelect"); - let newEditModeOption = document.createElement("option"); - newEditModeOption.value = "CommonEventTemplate"; - newEditModeOption.text = "常見事件模板"; - editModeSelect.add(newEditModeOption); + // 新增模板選項 + let editModeSelect = document.getElementById("editModeSelect"); + let newEditModeOption = document.createElement("option"); + newEditModeOption.value = "CommonEventTemplate"; + newEditModeOption.text = "常見事件模板"; + editModeSelect.add(newEditModeOption); - //檢查可用的編輯模板ID - let leftIDNumber = 11 - 1; - let ExistLeftElement = document.querySelector(".main"); - while (ExistLeftElement) { - leftIDNumber++; - ExistLeftElement = document.getElementById(`left${leftIDNumber}`); - } + //檢查可用的編輯模板ID + let leftIDNumber = 11 - 1; + let ExistLeftElement = document.querySelector(".main"); + while (ExistLeftElement) { + leftIDNumber++; + ExistLeftElement = document.getElementById(`left${leftIDNumber}`); + } - //新增編輯模板 - let MainDiv = document.querySelector(".main"); + //新增編輯模板 + let MainDiv = document.querySelector(".main"); - let CommonEventTemplateMainDiv = document.createElement("div"); - CommonEventTemplateMainDiv.id = `left${leftIDNumber}`; - CommonEventTemplateMainDiv.className = "leftTab"; - CommonEventTemplateMainDiv.style.zIndex = "-1"; - CommonEventTemplateMainDiv.style.opacity = "0"; + let CommonEventTemplateMainDiv = document.createElement("div"); + CommonEventTemplateMainDiv.id = `left${leftIDNumber}`; + CommonEventTemplateMainDiv.className = "leftTab"; + CommonEventTemplateMainDiv.style.zIndex = "-1"; + CommonEventTemplateMainDiv.style.opacity = "0"; - CommonEventTemplateMainDiv.innerHTML = ` + CommonEventTemplateMainDiv.innerHTML = `