From 15320257e0307f0c101f0f5ff29a1706192255a5 Mon Sep 17 00:00:00 2001 From: oc Date: Thu, 4 Apr 2019 23:32:23 +0800 Subject: [PATCH 1/9] api --- _docs/script.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_docs/script.md b/_docs/script.md index 817a68a6..ce1d6b42 100644 --- a/_docs/script.md +++ b/_docs/script.md @@ -224,8 +224,8 @@ function () { ```js // 重写ui.js中的_drawBook_drawBackground函数 core.ui._drawBook_drawBackground = function () { - // core.__PIXEL__为定义的一个宏,对于13x13的值是416,对于15x15的值是480 - core.drawBackground(0, 0, core.__PIXEL__, core.__PIXEL__); + // core.__PIXELS__为定义的一个宏,对于13x13的值是416,对于15x15的值是480 + core.drawBackground(0, 0, core.__PIXELS__, core.__PIXELS__); } ``` From 6e66af683f736f6dd0ec331befecd424ced00067 Mon Sep 17 00:00:00 2001 From: oc Date: Fri, 5 Apr 2019 11:13:21 +0800 Subject: [PATCH 2/9] docs --- _docs/script.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/_docs/script.md b/_docs/script.md index ce1d6b42..96a48838 100644 --- a/_docs/script.md +++ b/_docs/script.md @@ -207,12 +207,23 @@ function () { 样板的功能毕竟是写死的,有时候我们也需要修改样板的一些行为。 在V2.6以前,需要直接打开libs目录下的对应文件并进行修改。但是开libs下的文件就会出现各种问题: + +- 不容易记得自己修改过什么,而且如果改错了很麻烦 + - 例如,直接修改了某函数加了新功能,结果过段时间发现不需要,想删掉,但是这时候已经很难找到自己改过了什么了。 + - 或者,如果代码改错了,不断往上面打补丁,也只会使得libs越来越乱,最后连自己做过什么都不记得。 - 不容易随着新样板接档进行迁移 -- 也不好找到自己改过什么,从而能整理成新的插件在别的塔使用 +- 不方便能整理成新的插件在别的塔使用(总不能让别的塔也去修改libs吧) - …… 好消息的是,从V2.6开始,我们再也不需要开文件了,而是可以直接在插件中对原始函数进行复写。 +函数复写的好处如下: + +- 不会影响系统原有代码。 + - 即使写错了或不需要了,也只用把插件中的函数注释或删除即可,不会对原来的系统代码产生任何影响。 +- 清晰明了。很容易方便知道自己修改过什么,尤其是可以和系统原有代码进行对比。 +- 方便整理成新的插件,给其他的塔使用。 + 如果我想对xxx文件中的yyy函数进行重写,其模式一般是:`core.xxx.yyy = function (参数列表) { ... }` 下面是几个例子,从简单到复杂。 @@ -300,7 +311,7 @@ core.events.openShop = function (shopId, needVisited) { var drawMap = core.maps.drawMap; // 先把原始函数用一个变量记录下来 core.maps.drawMap = function (floorId, callback) { console.log("drawMap..."); // 控制台打出一条信息 - drawMap.call(core.maps, floorId, callback); // 需要使用`call`来告知this是core.maps + return drawMap.call(core.maps, floorId, callback); // 需要使用`call`来告知this是core.maps } ``` From 3ee88eddea5fe32336651e7e74dbd6b3ac6dcd16 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Fri, 5 Apr 2019 20:20:35 +0800 Subject: [PATCH 3/9] fix bug --- libs/actions.js | 14 ++++++++++++-- libs/events.js | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/libs/actions.js b/libs/actions.js index bb0cce1f..c4388106 100644 --- a/libs/actions.js +++ b/libs/actions.js @@ -891,6 +891,7 @@ actions.prototype._clickAction = function (x, y) { core.doAction(); } } + return; } if (core.status.event.data.type == 'confirm') { @@ -904,6 +905,7 @@ actions.prototype._clickAction = function (x, y) { core.insertAction(core.status.event.ui.no); core.doAction(); } + return; } } @@ -911,10 +913,12 @@ actions.prototype._clickAction = function (x, y) { actions.prototype._keyDownAction = function (keycode) { if (core.status.event.data.type == 'choices') { this._keyDownChoices(keycode); + return; } if (core.status.event.data.type == 'confirm' && (keycode == 37 || keycode == 39)) { core.status.event.selection = 1 - core.status.event.selection; core.drawConfirmBox(core.status.event.ui.text); + return; } } @@ -984,6 +988,7 @@ actions.prototype._clickBook = function (x, y) { var index = this.HSIZE * page + parseInt(y / 2); core.ui.drawBook(index); core.ui.drawBookDetail(index); + return; } return; } @@ -1127,17 +1132,20 @@ actions.prototype._clickViewMaps = function (x, y) { index++; if (index < core.floorIds.length) core.ui.drawMaps(index); + return; } - else if (y >= this.HSIZE + 2 && (mh == this.SIZE || (x >= per && x <= this.LAST - per))) { + if (y >= this.HSIZE + 2 && (mh == this.SIZE || (x >= per && x <= this.LAST - per))) { index--; while (index >= 0 && index != now && core.status.maps[core.floorIds[index]].cannotViewMap) index--; if (index >= 0) core.ui.drawMaps(index); + return; } - else if (x >= per && x <= this.LAST - per && y >= this.HSIZE - 1 && y <= this.HSIZE + 1) { + if (x >= per && x <= this.LAST - per && y >= this.HSIZE - 1 && y <= this.HSIZE + 1) { core.clearMap('data'); core.ui.closePanel(); + return; } } @@ -1243,7 +1251,9 @@ actions.prototype._clickQuickShop = function (x, y) { // 离开 else if (y == topIndex + keys.length) core.ui.closePanel(); + return; } + return; } ////// 快捷商店界面时,放开某个键的操作 ////// diff --git a/libs/events.js b/libs/events.js index b5b1170f..8ecea618 100644 --- a/libs/events.js +++ b/libs/events.js @@ -377,7 +377,7 @@ events.prototype.openDoor = function (x, y, needKey, callback) { events.prototype._openDoor_check = function (id, x, y, needKey) { // 是否存在门或暗墙 if (!core.terrainExists(x, y, id) || !(id.endsWith("Door") || id.endsWith("Wall")) - || !core.material.icons.animates[id]) { + || core.material.icons.animates[id] == null) { core.clearContinueAutomaticRoute(); return false; } From a60b6ff3db37decd73e5d666103369460d7998ac Mon Sep 17 00:00:00 2001 From: oc Date: Fri, 5 Apr 2019 22:16:39 +0800 Subject: [PATCH 4/9] if_1_s --- _server/MotaAction.g4 | 34 ++++++++++++++++++++++++++++------ _server/editor_blockly.js | 1 + libs/control.js | 2 +- libs/events.js | 1 + libs/ui.js | 1 + 5 files changed, 32 insertions(+), 7 deletions(-) diff --git a/_server/MotaAction.g4 b/_server/MotaAction.g4 index a43d0c9a..a8741045 100644 --- a/_server/MotaAction.g4 +++ b/_server/MotaAction.g4 @@ -324,6 +324,7 @@ action | win_s | lose_s | if_s + | if_1_s | switch_s | while_s | break_s @@ -1588,6 +1589,20 @@ var code = ['{"type": "if", "condition": "',expression_0,'",\n', return code; */; +if_1_s + : '如果' ':' expression BGNL? Newline action+ BEND Newline + + +/* if_1_s +tooltip : if: 条件判断 +helpUrl : https://h5mota.com/games/template/docs/#/event?id=if%EF%BC%9A%E6%9D%A1%E4%BB%B6%E5%88%A4%E6%96%AD +colour : this.eventColor +var code = ['{"type": "if", "condition": "',expression_0,'",\n', + '"true": [\n',action_0,'],\n', +'},\n'].join(''); +return code; +*/; + switch_s : '多重分歧 条件判定' ':' expression BGNL? Newline switchCase+ BEND Newline @@ -2583,12 +2598,19 @@ ActionParser.prototype.parseAction = function() { data.text,this.next]); break; case "if": // 条件判断 - this.next = MotaActionBlocks['if_s'].xmlText([ - // MotaActionBlocks['evalString_e'].xmlText([data.condition]), - this.tryToUseEvFlag_e('evalString_e', [data.condition]), - this.insertActionList(data["true"]), - this.insertActionList(data["false"]), - this.next]); + if (data["false"]) { + this.next = MotaActionBlocks['if_s'].xmlText([ + this.tryToUseEvFlag_e('evalString_e', [data.condition]), + this.insertActionList(data["true"]), + this.insertActionList(data["false"]), + this.next]); + } + else { + this.next = MotaActionBlocks['if_1_s'].xmlText([ + this.tryToUseEvFlag_e('evalString_e', [data.condition]), + this.insertActionList(data["true"]), + this.next]); + } break; case "confirm": // 显示确认框 this.next = MotaActionBlocks['confirm_s'].xmlText([ diff --git a/_server/editor_blockly.js b/_server/editor_blockly.js index 1c81e65c..2a641312 100644 --- a/_server/editor_blockly.js +++ b/_server/editor_blockly.js @@ -111,6 +111,7 @@ editor_blockly = function () { ], '事件控制':[ MotaActionBlocks['if_s'].xmlText(), + MotaActionBlocks['if_1_s'].xmlText(), MotaActionFunctions.actionParser.parseList({"type": "switch", "condition": "判别值", "caseList": [ {"action": [{"type": "comment", "text": "当判别值是值的场合执行此事件"}]}, {"action": [], "nobreak": true}, diff --git a/libs/control.js b/libs/control.js index f0de8ee1..5f38acfd 100644 --- a/libs/control.js +++ b/libs/control.js @@ -323,6 +323,7 @@ control.prototype._showStartAnimate_resetDom = function () { core.dom.levelChooseButtons.style.display = 'none'; core.status.played = false; core.clearStatus(); + core.clearMap('all'); core.dom.musicBtn.style.display = 'block'; core.setMusicBtn(); // 重置音量 @@ -360,7 +361,6 @@ control.prototype.clearStatus = function() { } core.status = {}; core.clearStatusBar(); - core.clearMap('all'); core.deleteAllCanvas(); core.status.played = false; } diff --git a/libs/events.js b/libs/events.js index 8ecea618..814afc2b 100644 --- a/libs/events.js +++ b/libs/events.js @@ -1683,6 +1683,7 @@ events.prototype.load = function (fromUserAction) { if (!core.isPlaying()) { core.dom.startPanel.style.display = 'none'; core.clearStatus(); + core.clearMap('all'); core.status.event = {'id': 'load', 'data': null}; core.status.lockControl = true; core.ui.drawSLPanel(10*page+offset); diff --git a/libs/ui.js b/libs/ui.js index db1a09e9..9d63d8d0 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -1084,6 +1084,7 @@ ui.prototype.drawConfirmBox = function (text, yesCallback, noCallback) { // 处理自定义事件 if (core.status.event.id != 'action') { core.status.event.id = 'confirmBox'; + core.status.event.ui = text; core.status.event.data = {'yes': yesCallback, 'no': noCallback}; } From e7fc0cd846a7832648ef915a35d0e5ccf9438c3e Mon Sep 17 00:00:00 2001 From: YouWei Zhao Date: Fri, 5 Apr 2019 21:41:04 -0400 Subject: [PATCH 5/9] config table --- _server/editor_file.js | 6 +--- _server/editor_multi.js | 68 +++++++++++++++++++++++++++++++++++------ _server/editor_util.js | 20 +++++++++--- _server/refactoring.md | 2 +- editor-mobile.html | 14 ++++----- editor.html | 14 ++++----- 6 files changed, 91 insertions(+), 33 deletions(-) diff --git a/_server/editor_file.js b/_server/editor_file.js index 89b7f6c5..e074a1d5 100644 --- a/_server/editor_file.js +++ b/_server/editor_file.js @@ -941,11 +941,7 @@ editor_file = function (editor, callback) { return formatArrStr; } - var encode = function (str) { - return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) { - return String.fromCharCode(parseInt(p1, 16)) - })) - } + var encode = editor.util.encode64 var alertWhenCompress = function(){ if(editor.useCompress===true){ diff --git a/_server/editor_multi.js b/_server/editor_multi.js index 9ccd00c9..e68cf56a 100644 --- a/_server/editor_multi.js +++ b/_server/editor_multi.js @@ -11,14 +11,14 @@ editor_multi = function () { tabSize: 4, indentWithTabs: true, smartIndent: true, - mode: {name: "javascript", globalVars: true, localVars: true}, + mode: { name: "javascript", globalVars: true, localVars: true }, lineWrapping: true, continueComments: "Enter", gutters: ["CodeMirror-lint-markers"], lint: true, autocomplete: true, autoCloseBrackets: true, - highlightSelectionMatches: {showToken: /\w/, annotateScrollbar: true} + highlightSelectionMatches: { showToken: /\w/, annotateScrollbar: true } }); editor_multi.codeEditor = codeEditor; @@ -26,9 +26,9 @@ editor_multi = function () { codeEditor.on("keyup", function (cm, event) { if (codeEditor.getOption("autocomplete") && !event.ctrlKey && ( (event.keyCode >= 65 && event.keyCode <= 90) || - (!event.shiftKey && event.keyCode == 190) || (event.shiftKey && event.keyCode == 189))){ + (!event.shiftKey && event.keyCode == 190) || (event.shiftKey && event.keyCode == 189))) { try { - CodeMirror.commands.autocomplete(cm, null, {completeSingle: false}); + CodeMirror.commands.autocomplete(cm, null, { completeSingle: false }); } catch (e) { } } @@ -39,7 +39,7 @@ editor_multi = function () { editor_multi.lintAutocomplete = false; editor_multi.show = function () { - if (typeof(selectBox) !== typeof(undefined)) selectBox.isSelected(false); + if (typeof (selectBox) !== typeof (undefined)) selectBox.isSelected(false); var valueNow = codeEditor.getValue(); //try{eval('function _asdygakufyg_() { return '+valueNow+'\n}');editor_multi.lintAutocomplete=true;}catch(ee){} if (valueNow.slice(0, 8) === 'function') editor_multi.lintAutocomplete = true; @@ -60,7 +60,7 @@ editor_multi = function () { } editor_multi.indent = function (field) { - if (typeof(editor) !== typeof(undefined) && editor && editor.mode && editor.mode.indent) return editor.mode.indent(field); + if (typeof (editor) !== typeof (undefined) && editor && editor.mode && editor.mode.indent) return editor.mode.indent(field); return '\t'; } @@ -102,7 +102,7 @@ editor_multi = function () { eval('var tobj=' + (input.value || 'null')); var tmap = {}; var tstr = JSON.stringify(tobj, function (k, v) { - if (typeof(v) === typeof('') && v.slice(0, 8) === 'function') { + if (typeof (v) === typeof ('') && v.slice(0, 8) === 'function') { var id_ = editor.util.guid(); tmap[id_] = v.toString(); return id_; @@ -128,13 +128,21 @@ editor_multi = function () { editor_multi.id = ''; return; } - // ----- 自动格式化 - _format(); + if (editor_multi.id === 'callFromBlockly') { + // ----- 自动格式化 + _format(); editor_multi.id = ''; editor_multi.multiLineDone(); return; } + + if (editor_multi.id === 'importFile') { + editor_multi.id = ''; + editor_multi.writeFileDone(); + return; + } + var setvalue = function (value) { var thisTr = document.getElementById(editor_multi.id); editor_multi.id = ''; @@ -159,6 +167,8 @@ editor_multi = function () { editor_multi.hide(); input.onchange(); } + // ----- 自动格式化 + _format(); setvalue(codeEditor.getValue() || ''); } @@ -179,6 +189,46 @@ editor_multi = function () { multiLineArgs[2](newvalue, multiLineArgs[0], multiLineArgs[1]) } + var _fileValues = [''] + editor_multi.importFile = function (filename) { + editor_multi.id = 'importFile' + _fileValues[0] = filename + codeEditor.setValue('loading') + editor_multi.show(); + fs.readFile(filename, 'base64', function (e, d) { + if (e) { + codeEditor.setValue('加载文件失败:\n' + e) + editor_multi.id = '' + return; + } + var str = editor.util.decode64(d) + codeEditor.setValue(str) + _fileValues[1] = str + }) + } + + editor_multi.writeFileDone = function () { + fs.writeFile(_fileValues[0], editor.util.encode64(codeEditor.getValue() || ''), 'base64', function (err, data) { + if (err) printe('文件写入失败,请手动粘贴至' + _fileValues[0] + '\n' + err); + else editor_multi.hide(); + }); + } + + editor_multi.editCommentJs = function (mod) { + var dict = { + loc: '_server/comment.js', + enemyitem: '_server/comment.js', + floor: '_server/comment.js', + tower: '_server/data.comment.js', + functions: '_server/functions.comment.js', + commonevent: '_server/events.comment.js', + plugins: '_server/plugins.comment.js', + } + editor_multi.lintAutocomplete = true + editor_multi.setLint() + editor_multi.importFile(dict[mod]) + } + return editor_multi; } //editor_multi=editor_multi(); \ No newline at end of file diff --git a/_server/editor_util.js b/_server/editor_util.js index bab29837..83b745a5 100644 --- a/_server/editor_util.js +++ b/_server/editor_util.js @@ -59,7 +59,7 @@ editor_util_wrapper = function (editor) { // SOFTWARE. //-------------------------------------------- // https://github.com/carloscabo/colz/blob/master/public/js/colz.class.js - var round=Math.round; + var round = Math.round; var rgbToHsl = function (rgba) { var arg, r, g, b, h, s, l, d, max, min; @@ -141,9 +141,21 @@ editor_util_wrapper = function (editor) { } return [round(r * 255), round(g * 255), round(b * 255)]; } - editor_util.prototype.rgbToHsl=rgbToHsl - editor_util.prototype.hue2rgb=hue2rgb - editor_util.prototype.hslToRgb=hslToRgb + editor_util.prototype.rgbToHsl = rgbToHsl + editor_util.prototype.hue2rgb = hue2rgb + editor_util.prototype.hslToRgb = hslToRgb + + editor_util.prototype.encode64 = function (str) { + return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) { + return String.fromCharCode(parseInt(p1, 16)) + })) + } + + editor_util.prototype.decode64 = function (str) { + return decodeURIComponent(atob(str.replace(/-/g, '+').replace(/_/g, '/').replace(/\s/g, '')).split('').map(function (c) { + return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2) + }).join('')) + } editor.constructor.prototype.util = new editor_util(); } diff --git a/_server/refactoring.md b/_server/refactoring.md index 55b02bfe..c75dc64b 100644 --- a/_server/refactoring.md +++ b/_server/refactoring.md @@ -85,7 +85,7 @@ editor: { + [ ] 画地图也自动保存 -+ [ ] 修改系统的触发器(下拉菜单增加新项) ++ [x] 修改系统的触发器(下拉菜单增加新项) 在编辑器修改`comment.js`:现场发readFile请求读文件,然后开脚本编辑器进行编辑 + [ ] ? 删除注册项/修改图块ID diff --git a/editor-mobile.html b/editor-mobile.html index ebcc334c..e77a286f 100644 --- a/editor-mobile.html +++ b/editor-mobile.html @@ -97,7 +97,7 @@
-

地图选点   +

地图选点    

0,0

@@ -115,7 +115,7 @@
-

图块属性       +

图块属性        

@@ -141,7 +141,7 @@
-

楼层属性       +

楼层属性        

@@ -158,7 +158,7 @@
-

全塔属性     +

全塔属性      

@@ -226,7 +226,7 @@
-

脚本编辑   +

脚本编辑    

@@ -243,7 +243,7 @@
-

公共事件       +

公共事件        

@@ -260,7 +260,7 @@
-

插件编写       +

插件编写        

diff --git a/editor.html b/editor.html index 0b5c4187..58ea0a1c 100644 --- a/editor.html +++ b/editor.html @@ -93,7 +93,7 @@
-

地图选点   +

地图选点    

0,0

@@ -111,7 +111,7 @@
-

图块属性       +

图块属性        

@@ -137,7 +137,7 @@
-

楼层属性       +

楼层属性        

@@ -154,7 +154,7 @@
-

全塔属性     +

全塔属性      

@@ -222,7 +222,7 @@
-

脚本编辑   +

脚本编辑    

@@ -239,7 +239,7 @@
-

公共事件       +

公共事件        

@@ -256,7 +256,7 @@
-

插件编写       +

插件编写        

From f43a8728951f20c9273f55b68673d190f1e6674c Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Sat, 6 Apr 2019 13:23:21 +0800 Subject: [PATCH 6/9] update comments --- _docs/api.md | 9 +- _server/comment.js | 925 +++++++++++------------ _server/data.comment.js | 1349 +++++++++++++++++----------------- _server/editor_multi.js | 6 +- _server/editor_table.js | 2 +- _server/events.comment.js | 85 +-- _server/functions.comment.js | 426 +++++------ _server/plugins.comment.js | 57 +- libs/enemys.js | 6 +- 9 files changed, 1444 insertions(+), 1421 deletions(-) diff --git a/_docs/api.md b/_docs/api.md index 346f4bd6..ee5fbbaf 100644 --- a/_docs/api.md +++ b/_docs/api.md @@ -775,8 +775,9 @@ core.getCurrentEnemys(floorId) 另外值得注意的是,如果设置了某个怪物的displayIdInBook,则会返回对应的怪物。 -core.hasEnemyLeft(floorId) -检查某个楼层是否还有剩余的怪物。等价于 core.getCurrentEnemys(floorId).length > 0 +core.hasEnemyLeft(enemyId, floorId) +检查某个楼层是否还有剩余的(指定)怪物。floorId为楼层ID,可忽略表示当前楼层。 +enemyId如果不填或null则检查是否剩余任何怪物,否则只检查是否剩余指定的某类怪物。 ``` ## events.js @@ -1743,7 +1744,7 @@ config为绘制的配置项,目前可以包括如下几项: - align:文字对齐方式,仅在maxWidth设置时有效,默认为'left'。 - fontSize:字体大小,如果不设置则使用剧情文本设置中的正文字体大小。 - lineHeight:绘制的行距值,如果不设置则使用fontSize*1.3(即1.3被行距)。 - - time:打字机效果。如果此项不为0,则会用打字机效果逐个字进行绘制,并设置core.status.event.interval定时器。 + - time:打字机效果。若不为0,则会逐个字进行绘制,并设置core.status.event.interval定时器。 core.drawTextBox(content, showAll) @@ -1755,7 +1756,7 @@ showAll可选,如果为true则不会使用打字机效果而全部显示,主 core.drawScrollText(content, time, lineHeight, callback) -绘制一个滚动字幕。content为绘制内容,time为总滚动时间(默认为5000),lineHeight为行距比例(默认为1.4)。 +绘制一个滚动字幕。content为绘制内容,time为总时间(默认为5000),lineHeight为行距比例(默认为1.4)。 滚动字幕将绘制在UI上,支持所有的文字效果(如\n,${},\r,\\i等),但不支持\t和\b效果。 可以通过剧情文本设置中的align控制是否居中绘制,offset控制其距离左边的偏移量。 diff --git a/_server/comment.js b/_server/comment.js index d4c1ac53..ff09aa48 100644 --- a/_server/comment.js +++ b/_server/comment.js @@ -1,460 +1,467 @@ -var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = -{ - - "_type": "object", - "_data": { - "items": { - - "_type": "object", - "_data": { - "items": { - - "_type": "object", - "_data": { - "cls": { - "_leaf": true, - "_type": "select", - "_select": { - "values": [ - "keys", - "items", - "constants", - "tools", - "equips" - ] - }, - "_data": "只能取keys(钥匙) items(宝石、血瓶) constants(永久物品) tools(消耗道具) equips(装备)" - }, - "name": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "名称" - }, - "text": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "道具在道具栏中显示的描述" - }, - "equip": { - "_leaf": true, - "_type": "textarea", - "_data": "装备属性设置,仅对cls为equips有效。\n如果此项不为null,需要是一个对象,里面可含\"type\",\"atk\",\"def\",\"mdef\",\"animate\"五项,分别对应装备部位、攻防魔防和动画。\n具体详见文档(元件说明-装备)和已有的几个装备的写法。" - }, - "hideInReplay": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否回放时绘制道具栏。\n如果此项为true,则在回放录像时使用本道具将不会绘制道具栏页面,而是直接使用。\n此项建议在会频繁连续多次使用的道具开启(如开启技能,或者《镜子》那样的镜像切换等等)" - } - } - }, - "itemEffect": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_lint": true, - "_data": "即捡即用类物品的效果,仅对cls为items有效。" - }, - "itemEffectTip": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_lint": true, - "_data": "即捡即用类物品在获得时提示的文字,仅对cls为items有效。" - }, - "useItemEffect": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_lint": true, - "_data": "道具效果,仅对cls为tools或constants有效。" - }, - "canUseItemEffect": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_lint": true, - "_data": "当前能否使用该道具,仅对cls为tools或constants有效。" - }, - "canEquip":{ - "_leaf": true, - "_type": "textarea", - "_string": true, - "_lint": true, - "_data": "当前能否装备某个装备,仅对cls为equips有效。\n与canUseItemEffect不同,这里null代表可以装备。" - } - } - }, - "items_template" : {'cls': 'items', 'name': '新物品'}, - "enemys": { - - "_type": "object", - "_data": { - "name": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "名称" - }, - "displayIdInBook": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "在怪物手册中映射到的怪物ID。如果此项不为null,则在怪物手册中,将用目标ID来替换该怪物原本的ID。\n此项应被运用在同一个怪物的多朝向上。\n例如,如果想定义同一个怪物的向下和向左的行走图,则需要建立两个属性完全相同的怪物。\n但是这样会导致在怪物手册中同时存在向下和向左的两种怪物的显示。\n可以将朝向左的怪物的displayIdInBook项指定为朝向下的怪物ID,这样在怪物手册中则会归一化,只显示一个。" - }, - "hp": { - "_leaf": true, - "_type": "textarea", - "_data": "生命值" - }, - "atk": { - "_leaf": true, - "_type": "textarea", - "_data": "攻击力" - }, - "def": { - "_leaf": true, - "_type": "textarea", - "_data": "防御力" - }, - "money": { - "_leaf": true, - "_type": "textarea", - "_data": "金币" - }, - "experience": { - "_leaf": true, - "_type": "textarea", - "_data": "经验" - }, - "point": { - "_leaf": true, - "_type": "textarea", - "_data": "加点" - }, - "special": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval==null || thiseval instanceof Array || (thiseval==~~thiseval && thiseval>=0)", - "_data": "特殊属性\n\n0:无,1:先攻,2:魔攻,3:坚固,4:2连击,\n5:3连击,6:n连击,7:破甲,8:反击,9:净化,\n10:模仿,11:吸血,12:中毒,13:衰弱,14:诅咒,\n15:领域,16:夹击,17:仇恨,18:阻击,19:自爆,\n20:无敌,21:退化,22:固伤,23:重生,24:激光,25:光环\n\n多个属性例如用[1,4,11]表示先攻2连击吸血" - }, - "value": { - "_leaf": true, - "_type": "textarea", - "_data": "特殊属性的数值\n如:领域/阻激/激光怪的伤害值;吸血怪的吸血比例;光环怪增加生命的比例" - }, - "zoneSquare": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "领域怪是否九宫格伤害" - }, - "range": { - "_leaf": true, - "_type": "textarea", - "_range": "(thiseval==~~thiseval && thiseval>0)||thiseval==null", - "_data": "领域伤害的范围;不加默认为1" - }, - "notBomb": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "该怪物不可被炸" - }, - "n": { - "_leaf": true, - "_type": "textarea", - "_range": "(thiseval==~~thiseval && thiseval>0)||thiseval==null", - "_data": "多连击的连击数" - }, - "add": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "吸血后是否加到自身;光环是否叠加" - }, - "atkValue": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval==~~thiseval||thiseval==null", - "_data": "退化时勇士下降的攻击力点数;光环怪增加攻击的比例" - }, - "defValue": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval==~~thiseval||thiseval==null", - "_data": "退化时勇士下降的防御力点数;光环怪增加防御的比例" - }, - "damage": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval==~~thiseval||thiseval==null", - "_data": "战前扣血的点数" - } - } - }, - "enemys_template" : {'name': '新敌人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, - "maps": { - - "_type": "object", - "_data": { - "id": { - "_leaf": true, - "_type": "textarea", - "_range": "false", - "_data": "图块ID" - }, - "idnum": { - "_leaf": true, - "_type": "textarea", - "_range": "false", - "_data": "图块数字" - }, - "cls": { - "_leaf": true, - "_type": "textarea", - "_range": "false", - "_data": "图块类别" - }, - "trigger": { - "_leaf": true, - "_type": "select", - "_select": { - "values": [ - null, - "openDoor", - "passNet", - "changeLight", - "pushBox", - "custom" - ] - }, - "_data": "该图块的默认触发器" - }, - "noPass": { - "_leaf": true, - "_type": "select", - "_select": { - "values": [ - null, - true, - false - ] - }, - "_data": "该图块是否不可通行;true代表不可通行,false代表可通行,null代表使用系统缺省值" - }, - "canBreak": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "该图块是否可被破墙或地震" - }, - "cannotOut": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval==null||(thiseval instanceof Array)", - "_data": "该图块的不可出方向\n可以在这里定义在该图块时不能前往哪个方向,可以达到悬崖之类的效果\n例如 [\"up\", \"left\"] 代表在该图块时不能往上和左走\n此值对背景层、事件层、前景层上的图块均有效" - }, - "cannotIn": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval==null||(thiseval instanceof Array)", - "_data": "该图块的不可入方向\n可以在这里定义不能朝哪个方向进入该图块,可以达到悬崖之类的效果\n例如 [\"down\"] 代表不能从该图块的上方点朝向下进入此图块\n此值对背景层、事件层、前景层上的图块均有效" - }, - "animate": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval==~~thiseval||thiseval==null", - "_data": "该图块的全局动画帧数。\n如果此项为null,则对于除了npc48外,使用素材默认帧数;npc48默认是1帧(即静止)。" - }, - "faceIds": { - "_leaf": true, - "_type": "textarea", - "_data": "行走图朝向,仅对NPC有效。可以在这里定义同一个NPC的多个朝向行走图。\n比如 {\"up\":\"N333\",\"down\":\"N334\",\"left\":\"N335\",\"right\":\"N336\"} 就将该素材的上下左右朝向分别绑定到N333,N334,N335和N336四个图块。\n在勇士撞上NPC时,或NPC在移动时,会自动选择最合适的朝向图块(如果存在定义)来进行绘制。" - } - } - }, - "floors": { - - "_type": "object", - "_data": { - "floor": { - - "_type": "object", - "_data": { - "floorId": { - "_leaf": true, - "_type": "textarea", - "_range": "false", - "_data": "文件名和floorId需要保持完全一致 \n楼层唯一标识符仅能由字母、数字、下划线组成,且不能由数字开头 \n推荐用法:第20层就用MT20,第38层就用MT38,地下6层就用MT_6(用下划线代替负号),隐藏3层用MT3h(h表示隐藏),等等 \n楼层唯一标识符,需要和名字完全一致 \n这里不能更改floorId,请通过另存为来实现" - }, - "title": { - "_leaf": true, - "_type": "textarea", - "_data": "楼层中文名,将在切换楼层和浏览地图时显示" - }, - "name": { - "_leaf": true, - "_type": "textarea", - "_data": "显示在状态栏中的层数" - }, - "width": { - "_leaf": true, - "_type": "textarea", - "_range": "false", - "_data": "地图x方向大小,这里不能更改,仅能在新建地图时设置,null视为13" - }, - "height": { - "_leaf": true, - "_type": "textarea", - "_range": "false", - "_data": "地图y方向大小,这里不能更改,仅能在新建地图时设置,null视为13" - }, - "canFlyTo": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "该楼能否被楼传器飞到(不能的话在该楼也不允许使用楼传器)" - }, - "canUseQuickShop": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "该层是否允许使用快捷商店" - }, - "cannotViewMap": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "该层是否不允许被浏览地图看到;如果勾上则浏览地图会跳过该层" - }, - "cannotMoveDirectly": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "该层是否不允许瞬间移动;如果勾上则不可在此层进行瞬移" - }, - "firstArrive": { - "_leaf": true, - "_type": "event", - "_event": "firstArrive", - "_data": "第一次到该楼层触发的事件,可以双击进入事件编辑器。" - }, - "eachArrive": { - "_leaf": true, - "_type": "event", - "_event": "eachArrive", - "_data": "每次到该楼层触发的事件,可以双击进入事件编辑器;该事件会在firstArrive执行后再执行。" - }, - "parallelDo": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_lint": true, - "_data": "在该层楼时执行的并行事件处理。\n可以在这里写上任意需要自动执行的脚本,比如打怪自动开门等。\n详见文档-事件-并行事件处理。" - }, - "upFloor": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval==null||((thiseval instanceof Array) && thiseval.length==2)", - "_data": "该层上楼点,如[2,3]。\n如果此项不为null,则楼层转换时的stair:upFloor,以及楼传器的落点会被替换成该点而不是该层的上楼梯。" - }, - "downFloor": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval==null||((thiseval instanceof Array) && thiseval.length==2)", - "_data": "该层下楼点,如[2,3]。\n如果此项不为null,则楼层转换时的stair:downFloor,以及楼传器的落点会被替换成该点而不是该层的下楼梯。" - }, - "defaultGround": { - "_leaf": true, - "_type": "select", - "_select": { - "values": Object.keys(editor.core.icons.icons.terrains) - }, - "_data": "默认地面的图块ID,此项修改后需要刷新才能看到效果。" - }, - "images": { - "_leaf": true, - "_type": "textarea", - "_data": "背景/前景图;你可以选择若干张图片来作为背景/前景素材。详细用法请参见文档“自定义素材”中的说明。" - }, - "color": { - "_leaf": true, - "_type": "textarea", - "_data": "该层的默认画面色调。本项可不写(代表无色调),如果写需要是一个RGBA数组如[255,0,0,0.3]" - }, - "weather": { - "_leaf": true, - "_type": "textarea", - "_data": "该层的默认天气。本项可忽略表示晴天,如果写则第一项为\"rain\",\"snow\"或\"fog\"代表雨雪雾,第二项为1-10之间的数代表强度。\n如[\"rain\", 8]代表8级雨天。" - }, - "bgm": { - "_leaf": true, - "_type": "select", - "_select": { - "values": [null].concat(Object.keys(editor.core.material.bgms)) - }, - "_data": "到达该层后默认播放的BGM。本项可忽略,或者为一个定义过的背景音乐如\"bgm.mp3\"。" - }, - "item_ratio": { - "_leaf": true, - "_type": "textarea", - "_range": "(thiseval==~~thiseval && thiseval>=0)||thiseval==null", - "_data": "每一层的宝石/血瓶效果,即获得宝石和血瓶时框内\"ratio\"的值。" - }, - "underGround": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否是地下层;如果该项为true则同层传送将传送至上楼梯" - } - } - }, - "loc": { - - "_type": "object", - "_data": { - "events": { - "_leaf": true, - "_type": "event", - "_event": "event", - "_data": "该点的可能事件列表,可以双击进入事件编辑器。" - }, - "changeFloor": { - "_leaf": true, - "_type": "event", - "_event": "changeFloor", - "_data": "该点楼层转换事件;该事件不能和上面的events同时出现,否则会被覆盖" - }, - "afterBattle": { - "_leaf": true, - "_type": "event", - "_event": "afterBattle", - "_data": "该点战斗后可能触发的事件列表,可以双击进入事件编辑器。" - }, - "afterGetItem": { - "_leaf": true, - "_type": "event", - "_event": "afterGetItem", - "_data": "该点获得道具后可能触发的事件列表,可以双击进入事件编辑器。" - }, - "afterOpenDoor": { - "_leaf": true, - "_type": "event", - "_event": "afterOpenDoor", - "_data": "该点开完门后可能触发的事件列表,可以双击进入事件编辑器。" - }, - "cannotMove": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval==null||(thiseval instanceof Array)", - "_data": "该点不可通行的方向 \n 可以在这里定义该点不能前往哪个方向,可以达到悬崖之类的效果\n例如 [\"up\", \"left\"] 代表该点不能往上和左走" - } - } - } - } - } - } +/* + * 表格配置项。 + * 在这里可以对表格中的各项显示进行配置,包括表格项、提示内容等内容。具体写法照葫芦画瓢即可。 + * 本配置项包括:道具、怪物、图块属性、楼层属性等内容。 + */ + +var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { + "_type": "object", + "_data": { + // --------------------------- 【道具】相关的表格配置 --------------------------- // + "items": { + "_type": "object", + "_data": { + "items": { + "_type": "object", + "_data": { + "cls": { + "_leaf": true, + "_type": "select", + "_select": { + "values": [ + "keys", + "items", + "constants", + "tools", + "equips" + ] + }, + "_data": "只能取keys(钥匙) items(宝石、血瓶) constants(永久物品) tools(消耗道具) equips(装备)" + }, + "name": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "名称" + }, + "text": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "道具在道具栏中显示的描述" + }, + "equip": { + "_leaf": true, + "_type": "textarea", + "_data": "装备属性设置,仅对cls为equips有效。\n如果此项不为null,需要是一个对象,里面可含\"type\",\"atk\",\"def\",\"mdef\",\"animate\"五项,分别对应装备部位、攻防魔防和动画。\n具体详见文档(元件说明-装备)和已有的几个装备的写法。" + }, + "hideInReplay": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否回放时绘制道具栏。\n如果此项为true,则在回放录像时使用本道具将不会绘制道具栏页面,而是直接使用。\n此项建议在会频繁连续多次使用的道具开启(如开启技能,或者《镜子》那样的镜像切换等等)" + } + } + }, + "itemEffect": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_lint": true, + "_data": "即捡即用类物品的效果,仅对cls为items有效。" + }, + "itemEffectTip": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_lint": true, + "_data": "即捡即用类物品在获得时提示的文字,仅对cls为items有效。" + }, + "useItemEffect": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_lint": true, + "_data": "道具效果,仅对cls为tools或constants有效。" + }, + "canUseItemEffect": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_lint": true, + "_data": "当前能否使用该道具,仅对cls为tools或constants有效。" + }, + "canEquip": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_lint": true, + "_data": "当前能否装备某个装备,仅对cls为equips有效。\n与canUseItemEffect不同,这里null代表可以装备。" + } + } + }, + "items_template": { 'cls': 'items', 'name': '新物品' }, + + + // --------------------------- 【怪物】相关的表格配置 --------------------------- // + "enemys": { + "_type": "object", + "_data": { + "name": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "名称" + }, + "displayIdInBook": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "在怪物手册中映射到的怪物ID。如果此项不为null,则在怪物手册中,将用目标ID来替换该怪物原本的ID。\n此项应被运用在同一个怪物的多朝向上。\n例如,如果想定义同一个怪物的向下和向左的行走图,则需要建立两个属性完全相同的怪物。\n但是这样会导致在怪物手册中同时存在向下和向左的两种怪物的显示。\n可以将朝向左的怪物的displayIdInBook项指定为朝向下的怪物ID,这样在怪物手册中则会归一化,只显示一个。" + }, + "hp": { + "_leaf": true, + "_type": "textarea", + "_data": "生命值" + }, + "atk": { + "_leaf": true, + "_type": "textarea", + "_data": "攻击力" + }, + "def": { + "_leaf": true, + "_type": "textarea", + "_data": "防御力" + }, + "money": { + "_leaf": true, + "_type": "textarea", + "_data": "金币" + }, + "experience": { + "_leaf": true, + "_type": "textarea", + "_data": "经验" + }, + "point": { + "_leaf": true, + "_type": "textarea", + "_data": "加点" + }, + "special": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval==null || thiseval instanceof Array || (thiseval==~~thiseval && thiseval>=0)", + "_data": "特殊属性\n\n0:无,1:先攻,2:魔攻,3:坚固,4:2连击,\n5:3连击,6:n连击,7:破甲,8:反击,9:净化,\n10:模仿,11:吸血,12:中毒,13:衰弱,14:诅咒,\n15:领域,16:夹击,17:仇恨,18:阻击,19:自爆,\n20:无敌,21:退化,22:固伤,23:重生,24:激光,25:光环\n\n多个属性例如用[1,4,11]表示先攻2连击吸血" + }, + "value": { + "_leaf": true, + "_type": "textarea", + "_data": "特殊属性的数值\n如:领域/阻激/激光怪的伤害值;吸血怪的吸血比例;光环怪增加生命的比例" + }, + "zoneSquare": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "领域怪是否九宫格伤害" + }, + "range": { + "_leaf": true, + "_type": "textarea", + "_range": "(thiseval==~~thiseval && thiseval>0)||thiseval==null", + "_data": "领域伤害的范围;不加默认为1" + }, + "notBomb": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "该怪物不可被炸" + }, + "n": { + "_leaf": true, + "_type": "textarea", + "_range": "(thiseval==~~thiseval && thiseval>0)||thiseval==null", + "_data": "多连击的连击数" + }, + "add": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "吸血后是否加到自身;光环是否叠加" + }, + "atkValue": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval==~~thiseval||thiseval==null", + "_data": "退化时勇士下降的攻击力点数;光环怪增加攻击的比例" + }, + "defValue": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval==~~thiseval||thiseval==null", + "_data": "退化时勇士下降的防御力点数;光环怪增加防御的比例" + }, + "damage": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval==~~thiseval||thiseval==null", + "_data": "战前扣血的点数" + } + } + }, + "enemys_template": { 'name': '新敌人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0 }, + + + // --------------------------- 【图块属性】相关的表格配置 --------------------------- // + "maps": { + "_type": "object", + "_data": { + "id": { + "_leaf": true, + "_type": "textarea", + "_range": "false", + "_data": "图块ID" + }, + "idnum": { + "_leaf": true, + "_type": "textarea", + "_range": "false", + "_data": "图块数字" + }, + "cls": { + "_leaf": true, + "_type": "textarea", + "_range": "false", + "_data": "图块类别" + }, + "trigger": { + "_leaf": true, + "_type": "select", + "_select": { + "values": [ + null, + "openDoor", + "passNet", + "changeLight", + "pushBox", + "custom" + ] + }, + "_data": "该图块的默认触发器" + }, + "noPass": { + "_leaf": true, + "_type": "select", + "_select": { + "values": [ + null, + true, + false + ] + }, + "_data": "该图块是否不可通行;true代表不可通行,false代表可通行,null代表使用系统缺省值" + }, + "canBreak": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "该图块是否可被破墙或地震" + }, + "cannotOut": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval==null||(thiseval instanceof Array)", + "_data": "该图块的不可出方向\n可以在这里定义在该图块时不能前往哪个方向,可以达到悬崖之类的效果\n例如 [\"up\", \"left\"] 代表在该图块时不能往上和左走\n此值对背景层、事件层、前景层上的图块均有效" + }, + "cannotIn": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval==null||(thiseval instanceof Array)", + "_data": "该图块的不可入方向\n可以在这里定义不能朝哪个方向进入该图块,可以达到悬崖之类的效果\n例如 [\"down\"] 代表不能从该图块的上方点朝向下进入此图块\n此值对背景层、事件层、前景层上的图块均有效" + }, + "animate": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval==~~thiseval||thiseval==null", + "_data": "该图块的全局动画帧数。\n如果此项为null,则对于除了npc48外,使用素材默认帧数;npc48默认是1帧(即静止)。" + }, + "faceIds": { + "_leaf": true, + "_type": "textarea", + "_data": "行走图朝向,仅对NPC有效。可以在这里定义同一个NPC的多个朝向行走图。\n比如 {\"up\":\"N333\",\"down\":\"N334\",\"left\":\"N335\",\"right\":\"N336\"} 就将该素材的上下左右朝向分别绑定到N333,N334,N335和N336四个图块。\n在勇士撞上NPC时,或NPC在移动时,会自动选择最合适的朝向图块(如果存在定义)来进行绘制。" + } + } + }, + + + // --------------------------- 【楼层属性】相关的表格配置 --------------------------- // + "floors": { + "_type": "object", + "_data": { + "floor": { + "_type": "object", + "_data": { + "floorId": { + "_leaf": true, + "_type": "textarea", + "_range": "false", + "_data": "文件名和floorId需要保持完全一致 \n楼层唯一标识符仅能由字母、数字、下划线组成,且不能由数字开头 \n推荐用法:第20层就用MT20,第38层就用MT38,地下6层就用MT_6(用下划线代替负号),隐藏3层用MT3h(h表示隐藏),等等 \n楼层唯一标识符,需要和名字完全一致 \n这里不能更改floorId,请通过另存为来实现" + }, + "title": { + "_leaf": true, + "_type": "textarea", + "_data": "楼层中文名,将在切换楼层和浏览地图时显示" + }, + "name": { + "_leaf": true, + "_type": "textarea", + "_data": "显示在状态栏中的层数" + }, + "width": { + "_leaf": true, + "_type": "textarea", + "_range": "false", + "_data": "地图x方向大小,这里不能更改,仅能在新建地图时设置,null视为13" + }, + "height": { + "_leaf": true, + "_type": "textarea", + "_range": "false", + "_data": "地图y方向大小,这里不能更改,仅能在新建地图时设置,null视为13" + }, + "canFlyTo": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "该楼能否被楼传器飞到(不能的话在该楼也不允许使用楼传器)" + }, + "canUseQuickShop": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "该层是否允许使用快捷商店" + }, + "cannotViewMap": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "该层是否不允许被浏览地图看到;如果勾上则浏览地图会跳过该层" + }, + "cannotMoveDirectly": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "该层是否不允许瞬间移动;如果勾上则不可在此层进行瞬移" + }, + "firstArrive": { + "_leaf": true, + "_type": "event", + "_event": "firstArrive", + "_data": "第一次到该楼层触发的事件,可以双击进入事件编辑器。" + }, + "eachArrive": { + "_leaf": true, + "_type": "event", + "_event": "eachArrive", + "_data": "每次到该楼层触发的事件,可以双击进入事件编辑器;该事件会在firstArrive执行后再执行。" + }, + "parallelDo": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_lint": true, + "_data": "在该层楼时执行的并行事件处理。\n可以在这里写上任意需要自动执行的脚本,比如打怪自动开门等。\n详见文档-事件-并行事件处理。" + }, + "upFloor": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval==null||((thiseval instanceof Array) && thiseval.length==2)", + "_data": "该层上楼点,如[2,3]。\n如果此项不为null,则楼层转换时的stair:upFloor,以及楼传器的落点会被替换成该点而不是该层的上楼梯。" + }, + "downFloor": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval==null||((thiseval instanceof Array) && thiseval.length==2)", + "_data": "该层下楼点,如[2,3]。\n如果此项不为null,则楼层转换时的stair:downFloor,以及楼传器的落点会被替换成该点而不是该层的下楼梯。" + }, + "defaultGround": { + "_leaf": true, + "_type": "select", + "_select": { + "values": Object.keys(editor.core.icons.icons.terrains) + }, + "_data": "默认地面的图块ID,此项修改后需要刷新才能看到效果。" + }, + "images": { + "_leaf": true, + "_type": "textarea", + "_data": "背景/前景图;你可以选择若干张图片来作为背景/前景素材。详细用法请参见文档“自定义素材”中的说明。" + }, + "color": { + "_leaf": true, + "_type": "textarea", + "_data": "该层的默认画面色调。本项可不写(代表无色调),如果写需要是一个RGBA数组如[255,0,0,0.3]" + }, + "weather": { + "_leaf": true, + "_type": "textarea", + "_data": "该层的默认天气。本项可忽略表示晴天,如果写则第一项为\"rain\",\"snow\"或\"fog\"代表雨雪雾,第二项为1-10之间的数代表强度。\n如[\"rain\", 8]代表8级雨天。" + }, + "bgm": { + "_leaf": true, + "_type": "select", + "_select": { + "values": [null].concat(Object.keys(editor.core.material.bgms)) + }, + "_data": "到达该层后默认播放的BGM。本项可忽略,或者为一个定义过的背景音乐如\"bgm.mp3\"。" + }, + "item_ratio": { + "_leaf": true, + "_type": "textarea", + "_range": "(thiseval==~~thiseval && thiseval>=0)||thiseval==null", + "_data": "每一层的宝石/血瓶效果,即获得宝石和血瓶时框内\"ratio\"的值。" + }, + "underGround": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否是地下层;如果该项为true则同层传送将传送至上楼梯" + } + } + }, + "loc": { + "_type": "object", + "_data": { + "events": { + "_leaf": true, + "_type": "event", + "_event": "event", + "_data": "该点的可能事件列表,可以双击进入事件编辑器。" + }, + "changeFloor": { + "_leaf": true, + "_type": "event", + "_event": "changeFloor", + "_data": "该点楼层转换事件;该事件不能和上面的events同时出现,否则会被覆盖" + }, + "afterBattle": { + "_leaf": true, + "_type": "event", + "_event": "afterBattle", + "_data": "该点战斗后可能触发的事件列表,可以双击进入事件编辑器。" + }, + "afterGetItem": { + "_leaf": true, + "_type": "event", + "_event": "afterGetItem", + "_data": "该点获得道具后可能触发的事件列表,可以双击进入事件编辑器。" + }, + "afterOpenDoor": { + "_leaf": true, + "_type": "event", + "_event": "afterOpenDoor", + "_data": "该点开完门后可能触发的事件列表,可以双击进入事件编辑器。" + }, + "cannotMove": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval==null||(thiseval instanceof Array)", + "_data": "该点不可通行的方向 \n 可以在这里定义该点不能前往哪个方向,可以达到悬崖之类的效果\n例如 [\"up\", \"left\"] 代表该点不能往上和左走" + } + } + } + } + } + } } \ No newline at end of file diff --git a/_server/data.comment.js b/_server/data.comment.js index c4b8b951..026ab732 100644 --- a/_server/data.comment.js +++ b/_server/data.comment.js @@ -1,677 +1,674 @@ -var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = -{ - - "_type": "object", - "_data": { - "main": { - - "_type": "object", - "_data": { - "floorIds": { - "_leaf": true, - "_type": "textarea", - "_range": "editor.mode.checkFloorIds(thiseval)", - "_data": "在这里按顺序放所有的楼层;其顺序直接影响到楼层传送器、浏览地图和上/下楼器的顺序" - }, - "images": { - "_leaf": true, - "_type": "textarea", - "_range": "editor.mode.checkUnique(thiseval)", - "_data": "在此存放所有可能使用的图片(tilesets除外) \n图片可以被作为背景图(的一部分),也可以直接用自定义事件进行显示。 \n 图片名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好 \n 建议对于较大的图片,在网上使用在线的“图片压缩工具(http://compresspng.com/zh/)”来进行压缩,以节省流量 \n 依次向后添加" - }, - "tilesets": { - "_leaf": true, - "_type": "textarea", - "_range": "editor.mode.checkUnique(thiseval)", - "_data": "在此存放额外素材的图片名, \n可以自定导入任意张素材图片,无需PS,无需注册,即可直接在游戏中使用 \n 形式如[\"1.png\", \"2.png\"] ,将需要的素材图片放在images目录下 \n 素材的宽高必须都是32的倍数,且图片上的总图块数不超过1000(即最多有1000个32*32的图块在该图片上)" - }, - "animates": { - "_leaf": true, - "_type": "textarea", - "_range": "editor.mode.checkUnique(thiseval)", - "_data": "在此存放所有可能使用的动画,必须是animate格式,在这里不写后缀名 \n动画必须放在animates目录下;文件名不能使用中文,不能带空格或特殊字符 \n \"jianji\", \"thunder\" \n 根据需求自行添加" - }, - "bgms": { - "_leaf": true, - "_type": "textarea", - "_range": "editor.mode.checkUnique(thiseval)", - "_data": "在此存放所有的bgm,和文件名一致。 \n音频名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好" - }, - "sounds": { - "_leaf": true, - "_type": "textarea", - "_range": "editor.mode.checkUnique(thiseval)", - "_data": "在此存放所有的SE,和文件名一致 \n音频名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好" - }, - "startBackground": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "标题界面的背景,建议使用jpg格式以压缩背景图空间" - }, - "startLogoStyle": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "标题样式:可以改变颜色,也可以写\"display: none\"来隐藏标题" - }, - "levelChoose": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval instanceof Array && thiseval.length>=1 && thiseval[0] instanceof Array && thiseval[0].length==2", - "_data": "难度选择:每个数组的第一个是其在标题界面显示的难度,第二个是在游戏内部传输的字符串,会显示在状态栏,修改此处后需要在project/functions中作相应更改。\n如果需直接开始游戏将下面的startDirectly开关打开即可。" - }, - "equipName": { - "_leaf": true, - "_type": "textarea", - "_range": "(thiseval instanceof Array && thiseval.length<=6)||thiseval==null", - "_data": "装备位名称,为不超过6个的数组,此项的顺序与equiptype数值关联;例如可写[\"武器\",\"防具\",\"首饰\"]等等。" - }, - "startBgm": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "在标题界面应该播放的bgm内容" - }, - "statusLeftBackground": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "横屏时左侧状态栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图,推荐写法:\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"\n图片最好进行一些压缩等操作节省流量。" - }, - "statusTopBackground": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "竖屏时上方状态栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图,推荐写法:\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"\n图片最好进行一些压缩等操作节省流量。" - }, - "toolsBackground": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "竖屏时下方道具栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图,推荐写法:\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"\n图片最好进行一些压缩等操作节省流量。" - }, - "borderColor": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "边框颜色,包括游戏边界的边框和对话框边框等。" - }, - "statusBarColor": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "状态栏的文字颜色,默认是白色" - }, - "hardLabelColor": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "难度显示的颜色,默认是红色" - }, - "floorChangingBackground": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "楼层转换界面的背景样式;可以使用纯色(默认值black),也可以使用图片(参见状态栏的图片写法)" - }, - "floorChangingTextColor": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "楼层转换界面的文字颜色,默认是白色" - }, - "font": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "游戏中使用的字体,默认是Verdana" - } - } - }, - "firstData": { - - "_type": "object", - "_data": { - "title": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "游戏名,将显示在标题页面以及切换楼层的界面中" - }, - "name": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_range": "/^[a-zA-Z0-9_]{1,30}$/.test(thiseval)", - "_data": "游戏的唯一英文标识符。由英文、数字、下划线组成,不能超过30个字符。\n此项必须修改,其将直接影响到存档的定位!" - }, - "version": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "当前游戏版本;版本不一致的存档不能通用。" - }, - "floorId": { - "_leaf": true, - "_type": "select", - "_select": { - "values": data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main.floorIds - }, - "_range": "data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main.floorIds.indexOf(thiseval)!==-1", - "_data": "初始楼层的ID" - }, - "hero": { - - "_type": "object", - "_data": { - "name": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "勇士名;可以改成喜欢的" - }, - "lv": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval==~~thiseval &&thiseval>0", - "_data": "初始等级,该项必须为正整数" - }, - "hpmax": { - "_leaf": true, - "_type": "textarea", - "_data": "初始生命上限,只有在enableHPMax开启时才有效" - }, - "hp": { - "_leaf": true, - "_type": "textarea", - "_data": "初始生命值" - }, - "manamax": { - "_leaf": true, - "_type": "textarea", - "_data": "魔力上限;此项非负才会生效(null或小于0都不会生效)" - }, - "mana": { - "_leaf": true, - "_type": "textarea", - "_data": "初始魔力值,只在enableMana开启时才有效" - }, - "atk": { - "_leaf": true, - "_type": "textarea", - "_data": "初始攻击" - }, - "def": { - "_leaf": true, - "_type": "textarea", - "_data": "初始防御" - }, - "mdef": { - "_leaf": true, - "_type": "textarea", - "_data": "初始魔防" - }, - "money": { - "_leaf": true, - "_type": "textarea", - "_data": "初始金币" - }, - "experience": { - "_leaf": true, - "_type": "textarea", - "_data": "初始经验" - }, - "equipment": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval instanceof Array", - "_data": "初始装上的装备,此处建议请直接留空数组" - }, - "items": { - - "_type": "object", - "_data": { - "keys": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval instanceof Object && !(thiseval instanceof Array)", - "_data": "初始三种钥匙个数" - }, - "constants": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval instanceof Object && !(thiseval instanceof Array)", - "_data": "初始永久道具个数,例如初始送手册可以写 {\"book\": 1}" - }, - "tools": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval instanceof Object && !(thiseval instanceof Array)", - "_data": "初始消耗道具个数,例如初始有两破可以写 {\"pickaxe\": 2}" - }, - "equips": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval instanceof Object && !(thiseval instanceof Array)", - "_data": "初始装备个数,例如初始送铁剑可以写 {\"sword1\": 1}" - } - } - }, - "loc": { - - "_type": "object", - "_data": { - "direction": { - "_leaf": true, - "_type": "select", - "_data": "勇士初始方向", - "_select": { - "values": [ - "up", - "down", - "left", - "right" - ] - }, - }, - "x": { - "_leaf": true, - "_type": "textarea", - "_data": "勇士初始x坐标" - }, - "y": { - "_leaf": true, - "_type": "textarea", - "_data": "勇士初始y坐标" - } - } - }, - "flags": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval instanceof Object && !(thiseval instanceof Array)", - "_data": "游戏过程中的变量或flags" - }, - "steps": { - "_leaf": true, - "_type": "textarea", - "_data": "行走步数统计" - } - } - }, - "startCanvas": { - "_leaf": true, - "_type": "event", - "_event": "firstArrive", - "_range": "thiseval==null || thiseval instanceof Array", - "_data": "标题界面事件化,可以使用事件流的形式来绘制开始界面等。\n需要开启startUsingCanvas这个开关。\n详见文档-个性化-标题界面事件化。" - }, - "startText": { - "_leaf": true, - "_type": "event", - "_event": "firstArrive", - "_range": "thiseval==null || thiseval instanceof Array", - "_data": "游戏开始前剧情,可以执行任意自定义事件。\n双击进入事件编辑器。\n如果无剧情直接留一个空数组即可。" - }, - "shops": { - "_leaf": true, - "_type": "event", - "_event": "shop", - "_range": "thiseval instanceof Array", - "_data": "全局商店,是一个数组,可以双击进入事件编辑器。" - }, - "levelUp": { - "_leaf": true, - "_type": "event", - "_event": "level", - "_range": "thiseval==null || thiseval instanceof Array", - "_data": "经验升级所需要的数值,是一个数组,可以双击进行编辑。 \n 第一项为初始等级,仅title生效 \n 每一个里面可以含有三个参数 need, title, action \n need为所需要的经验数值,可以是个表达式。请确保need依次递增 \n title为该等级的名称,也可以省略代表使用系统默认值;本项将显示在状态栏中 \n action为本次升级所执行的事件,可由若干项组成" - } - } - }, - "values": { - - "_type": "object", - "_data": { - "lavaDamage": { - "_leaf": true, - "_type": "textarea", - "_data": "经过血网受到的伤害" - }, - "poisonDamage": { - "_leaf": true, - "_type": "textarea", - "_data": "中毒后每步受到的伤害" - }, - "weakValue": { - "_leaf": true, - "_type": "textarea", - "_data": "衰弱状态下攻防减少的数值\n如果此项不小于1,则作为实际下降的数值(比如10就是攻防各下降10)\n如果在0到1之间则为下降的比例(比如0.3就是下降30%的攻防)" - }, - "redJewel": { - "_leaf": true, - "_type": "textarea", - "_data": "红宝石加攻击的数值" - }, - "blueJewel": { - "_leaf": true, - "_type": "textarea", - "_data": "蓝宝石加防御的数值" - }, - "greenJewel": { - "_leaf": true, - "_type": "textarea", - "_data": "绿宝石加魔防的数值" - }, - "redPotion": { - "_leaf": true, - "_type": "textarea", - "_data": "红血瓶加血数值" - }, - "bluePotion": { - "_leaf": true, - "_type": "textarea", - "_data": "蓝血瓶加血数值" - }, - "yellowPotion": { - "_leaf": true, - "_type": "textarea", - "_data": "黄血瓶加血数值" - }, - "greenPotion": { - "_leaf": true, - "_type": "textarea", - "_data": "绿血瓶加血数值" - }, - "breakArmor": { - "_leaf": true, - "_type": "textarea", - "_data": "破甲的比例(战斗前,怪物附加角色防御的x倍作为伤害)" - }, - "counterAttack": { - "_leaf": true, - "_type": "textarea", - "_data": "反击的比例(战斗时,怪物每回合附加角色攻击的x倍作为伤害,无视角色防御)" - }, - "purify": { - "_leaf": true, - "_type": "textarea", - "_data": "净化的比例(战斗前,怪物附加勇士魔防的x倍作为伤害)" - }, - "hatred": { - "_leaf": true, - "_type": "textarea", - "_data": "仇恨属性中,每杀死一个怪物获得的仇恨值" - }, - "moveSpeed": { - "_leaf": true, - "_type": "textarea", - "_data": "行走速度,即勇士每走一格的时间,一般100比较合适" - }, - "animateSpeed": { - "_leaf": true, - "_type": "textarea", - "_data": "全局动画时间,即怪物振动频率,一般300比较合适" - }, - "floorChangeTime": { - "_leaf": true, - "_type": "textarea", - "_data": "默认楼层切换时间" - } - } - }, - "flags": { - - "_type": "object", - "_data": { - "enableFloor": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否在状态栏显示当前楼层" - }, - "enableName": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否在状态栏显示勇士名字" - }, - "enableLv": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否在状态栏显示当前等级" - }, - "enableHPMax": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否是否启用生命上限" - }, - "enableMana": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否开启魔力值" - }, - "enableMDef": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否在状态栏及战斗界面显示魔防(护盾)" - }, - "enableMoney": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否在状态栏、怪物手册及战斗界面显示金币" - }, - "enableExperience": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否在状态栏、怪物手册及战斗界面显示经验" - }, - "enableLevelUp": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否允许等级提升(进阶);如果上面enableExperience为false,则此项恒视为false" - }, - "levelUpLeftMode": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "进阶使用扣除模式,即在状态栏显示距离下个等级所需要的经验值;只有enableExperience和enableLevelUp均开启时才有效。" - }, - "enableKeys": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否在状态栏显示三色钥匙数量" - }, - "enablePZF": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否在状态栏显示破炸飞数量" - }, - "enableDebuff": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否在状态栏显示毒衰咒" - }, - "enableSkill": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否启用技能栏" - }, - "flyNearStair": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否需要在楼梯边使用传送器" - }, - "pickaxeFourDirections": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "使用破墙镐是否四个方向都破坏;如果false则只破坏面前的墙壁" - }, - "bombFourDirections": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "使用炸弹是否四个方向都会炸;如果false则只炸面前的怪物(即和圣锤等价)" - }, - "snowFourDirections": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "使用冰冻徽章是否四个方向都会消除熔岩;如果false则只消除面前的熔岩" - }, - "bigKeyIsBox": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "如果此项为true,则视为钥匙盒,红黄蓝钥匙+1;若为false,则视为大黄门钥匙" - }, - "equipment": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "剑和盾是否作为装备。如果此项为true,则作为装备,需要在装备栏使用,否则将直接加属性。" - }, - "equipboxButton": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "状态栏的装备按钮。若此项为true则将状态栏中的楼层转换器按钮换为装备栏按钮" - }, - "enableAddPoint": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否支持加点" - }, - "enableNegativeDamage": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否支持负伤害(回血)" - }, - "hatredDecrease": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否在和仇恨怪战斗后减一半的仇恨值,此项为false则和仇恨怪不会扣减仇恨值。" - }, - "betweenAttackCeil": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "夹击方式是向上取整还是向下取整。如果此项为true则为向上取整,为false则为向下取整" - }, - "useLoop": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否循环计算临界;如果此项为true则使用循环法(而不是回合数计算法)来算临界\n从V2.5.3开始,对于大数据的循环法将改为使用二分法进行计算" - }, - "startUsingCanvas": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否开始菜单canvas化;如果此项为true,则将使用canvas来绘制开始菜单" - }, - "startDirectly": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "点击“开始游戏”后是否立刻开始游戏而不显示难度选择界面" - }, - "statusCanvas": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否状态栏canvas化,即手动自定义绘制状态栏。\n如果此项开启,则可在脚本编辑的drawStatusBar中自定义绘制菜单栏。" - }, - "statusCanvasRowsOnMobile": { - "_leaf": true, - "_type": "textarea", - "_range": "thiseval==null || (thiseval>0 && thiseval<=4)", - "_data": "竖屏模式下,顶端状态栏canvas化后的行数。\n此项将决定竖屏的状态栏高度,如果设置则不小于1且不大于4。\n仅在statusCanvas开启时才有效" - }, - "displayEnemyDamage": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否地图怪物显伤;用户可以手动在菜单栏中开关" - }, - "displayCritical": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否地图显示临界;用户可以手动在菜单栏中开关" - }, - "displayExtraDamage": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否地图高级显伤(领域、夹击等);用户可以手动在菜单栏中开关" - }, - "enableGentleClick": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否允许轻触(获得面前物品)" - }, - "potionWhileRouting": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "寻路算法是否经过血瓶;如果该项为false,则寻路算法会自动尽量绕过血瓶" - }, - "ignoreChangeFloor": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "经过楼梯、传送门时是否能“穿透”。\n穿透的意思是,自动寻路得到的的路径中间经过了楼梯,行走时是否触发楼层转换事件" - }, - "canGoDeadZone": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否允许走到将死的领域上。如果此项为true,则可以走到将死的领域上" - }, - "enableMoveDirectly": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否允许瞬间移动" - }, - "enableDisabledShop": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否允许查看未开启状态的快捷商店内容;如果此项为真,则对于未开启状态的商店允许查看其内容(但不能购买)" - }, - "disableShopOnDamage": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否在经过领域/夹击/路障等伤害后禁用快捷商店。" - }, - "checkConsole": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "是否检查控制台的开启情况。" - } - } - } - } +/* + * 表格配置项。 + * 在这里可以对表格中的各项显示进行配置,包括表格项、提示内容等内容。具体写法照葫芦画瓢即可。 + * 本配置项包括:全塔属性的配置项。 + */ + +var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { + "_type": "object", + "_data": { + "main": { + "_type": "object", + "_data": { + "floorIds": { + "_leaf": true, + "_type": "textarea", + "_range": "editor.mode.checkFloorIds(thiseval)", + "_data": "在这里按顺序放所有的楼层;其顺序直接影响到楼层传送器、浏览地图和上/下楼器的顺序" + }, + "images": { + "_leaf": true, + "_type": "textarea", + "_range": "editor.mode.checkUnique(thiseval)", + "_data": "在此存放所有可能使用的图片(tilesets除外) \n图片可以被作为背景图(的一部分),也可以直接用自定义事件进行显示。 \n 图片名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好 \n 建议对于较大的图片,在网上使用在线的“图片压缩工具(http://compresspng.com/zh/)”来进行压缩,以节省流量 \n 依次向后添加" + }, + "tilesets": { + "_leaf": true, + "_type": "textarea", + "_range": "editor.mode.checkUnique(thiseval)", + "_data": "在此存放额外素材的图片名, \n可以自定导入任意张素材图片,无需PS,无需注册,即可直接在游戏中使用 \n 形式如[\"1.png\", \"2.png\"] ,将需要的素材图片放在images目录下 \n 素材的宽高必须都是32的倍数,且图片上的总图块数不超过1000(即最多有1000个32*32的图块在该图片上)" + }, + "animates": { + "_leaf": true, + "_type": "textarea", + "_range": "editor.mode.checkUnique(thiseval)", + "_data": "在此存放所有可能使用的动画,必须是animate格式,在这里不写后缀名 \n动画必须放在animates目录下;文件名不能使用中文,不能带空格或特殊字符 \n \"jianji\", \"thunder\" \n 根据需求自行添加" + }, + "bgms": { + "_leaf": true, + "_type": "textarea", + "_range": "editor.mode.checkUnique(thiseval)", + "_data": "在此存放所有的bgm,和文件名一致。 \n音频名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好" + }, + "sounds": { + "_leaf": true, + "_type": "textarea", + "_range": "editor.mode.checkUnique(thiseval)", + "_data": "在此存放所有的SE,和文件名一致 \n音频名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好" + }, + "startBackground": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "标题界面的背景,建议使用jpg格式以压缩背景图空间" + }, + "startLogoStyle": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "标题样式:可以改变颜色,也可以写\"display: none\"来隐藏标题" + }, + "levelChoose": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval instanceof Array && thiseval.length>=1 && thiseval[0] instanceof Array && thiseval[0].length==2", + "_data": "难度选择:每个数组的第一个是其在标题界面显示的难度,第二个是在游戏内部传输的字符串,会显示在状态栏,修改此处后需要在project/functions中作相应更改。\n如果需直接开始游戏将下面的startDirectly开关打开即可。" + }, + "equipName": { + "_leaf": true, + "_type": "textarea", + "_range": "(thiseval instanceof Array && thiseval.length<=6)||thiseval==null", + "_data": "装备位名称,为不超过6个的数组,此项的顺序与equiptype数值关联;例如可写[\"武器\",\"防具\",\"首饰\"]等等。" + }, + "startBgm": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "在标题界面应该播放的bgm内容" + }, + "statusLeftBackground": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "横屏时左侧状态栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图,推荐写法:\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"\n图片最好进行一些压缩等操作节省流量。" + }, + "statusTopBackground": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "竖屏时上方状态栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图,推荐写法:\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"\n图片最好进行一些压缩等操作节省流量。" + }, + "toolsBackground": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "竖屏时下方道具栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图,推荐写法:\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"\n图片最好进行一些压缩等操作节省流量。" + }, + "borderColor": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "边框颜色,包括游戏边界的边框和对话框边框等。" + }, + "statusBarColor": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "状态栏的文字颜色,默认是白色" + }, + "hardLabelColor": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "难度显示的颜色,默认是红色" + }, + "floorChangingBackground": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "楼层转换界面的背景样式;可以使用纯色(默认值black),也可以使用图片(参见状态栏的图片写法)" + }, + "floorChangingTextColor": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "楼层转换界面的文字颜色,默认是白色" + }, + "font": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "游戏中使用的字体,默认是Verdana" + } + } + }, + "firstData": { + "_type": "object", + "_data": { + "title": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "游戏名,将显示在标题页面以及切换楼层的界面中" + }, + "name": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_range": "/^[a-zA-Z0-9_]{1,30}$/.test(thiseval)", + "_data": "游戏的唯一英文标识符。由英文、数字、下划线组成,不能超过30个字符。\n此项必须修改,其将直接影响到存档的定位!" + }, + "version": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "当前游戏版本;版本不一致的存档不能通用。" + }, + "floorId": { + "_leaf": true, + "_type": "select", + "_select": { + "values": data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main.floorIds + }, + "_range": "data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main.floorIds.indexOf(thiseval)!==-1", + "_data": "初始楼层的ID" + }, + "hero": { + "_type": "object", + "_data": { + "name": { + "_leaf": true, + "_type": "textarea", + "_string": true, + "_data": "勇士名;可以改成喜欢的" + }, + "lv": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval==~~thiseval &&thiseval>0", + "_data": "初始等级,该项必须为正整数" + }, + "hpmax": { + "_leaf": true, + "_type": "textarea", + "_data": "初始生命上限,只有在enableHPMax开启时才有效" + }, + "hp": { + "_leaf": true, + "_type": "textarea", + "_data": "初始生命值" + }, + "manamax": { + "_leaf": true, + "_type": "textarea", + "_data": "魔力上限;此项非负才会生效(null或小于0都不会生效)" + }, + "mana": { + "_leaf": true, + "_type": "textarea", + "_data": "初始魔力值,只在enableMana开启时才有效" + }, + "atk": { + "_leaf": true, + "_type": "textarea", + "_data": "初始攻击" + }, + "def": { + "_leaf": true, + "_type": "textarea", + "_data": "初始防御" + }, + "mdef": { + "_leaf": true, + "_type": "textarea", + "_data": "初始魔防" + }, + "money": { + "_leaf": true, + "_type": "textarea", + "_data": "初始金币" + }, + "experience": { + "_leaf": true, + "_type": "textarea", + "_data": "初始经验" + }, + "equipment": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval instanceof Array", + "_data": "初始装上的装备,此处建议请直接留空数组" + }, + "items": { + "_type": "object", + "_data": { + "keys": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval instanceof Object && !(thiseval instanceof Array)", + "_data": "初始三种钥匙个数" + }, + "constants": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval instanceof Object && !(thiseval instanceof Array)", + "_data": "初始永久道具个数,例如初始送手册可以写 {\"book\": 1}" + }, + "tools": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval instanceof Object && !(thiseval instanceof Array)", + "_data": "初始消耗道具个数,例如初始有两破可以写 {\"pickaxe\": 2}" + }, + "equips": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval instanceof Object && !(thiseval instanceof Array)", + "_data": "初始装备个数,例如初始送铁剑可以写 {\"sword1\": 1}" + } + } + }, + "loc": { + "_type": "object", + "_data": { + "direction": { + "_leaf": true, + "_type": "select", + "_data": "勇士初始方向", + "_select": { + "values": [ + "up", + "down", + "left", + "right" + ] + }, + }, + "x": { + "_leaf": true, + "_type": "textarea", + "_data": "勇士初始x坐标" + }, + "y": { + "_leaf": true, + "_type": "textarea", + "_data": "勇士初始y坐标" + } + } + }, + "flags": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval instanceof Object && !(thiseval instanceof Array)", + "_data": "游戏过程中的变量或flags" + }, + "steps": { + "_leaf": true, + "_type": "textarea", + "_data": "行走步数统计" + } + } + }, + "startCanvas": { + "_leaf": true, + "_type": "event", + "_event": "firstArrive", + "_range": "thiseval==null || thiseval instanceof Array", + "_data": "标题界面事件化,可以使用事件流的形式来绘制开始界面等。\n需要开启startUsingCanvas这个开关。\n详见文档-个性化-标题界面事件化。" + }, + "startText": { + "_leaf": true, + "_type": "event", + "_event": "firstArrive", + "_range": "thiseval==null || thiseval instanceof Array", + "_data": "游戏开始前剧情,可以执行任意自定义事件。\n双击进入事件编辑器。\n如果无剧情直接留一个空数组即可。" + }, + "shops": { + "_leaf": true, + "_type": "event", + "_event": "shop", + "_range": "thiseval instanceof Array", + "_data": "全局商店,是一个数组,可以双击进入事件编辑器。" + }, + "levelUp": { + "_leaf": true, + "_type": "event", + "_event": "level", + "_range": "thiseval==null || thiseval instanceof Array", + "_data": "经验升级所需要的数值,是一个数组,可以双击进行编辑。 \n 第一项为初始等级,仅title生效 \n 每一个里面可以含有三个参数 need, title, action \n need为所需要的经验数值,可以是个表达式。请确保need依次递增 \n title为该等级的名称,也可以省略代表使用系统默认值;本项将显示在状态栏中 \n action为本次升级所执行的事件,可由若干项组成" + } + } + }, + "values": { + "_type": "object", + "_data": { + "lavaDamage": { + "_leaf": true, + "_type": "textarea", + "_data": "经过血网受到的伤害" + }, + "poisonDamage": { + "_leaf": true, + "_type": "textarea", + "_data": "中毒后每步受到的伤害" + }, + "weakValue": { + "_leaf": true, + "_type": "textarea", + "_data": "衰弱状态下攻防减少的数值\n如果此项不小于1,则作为实际下降的数值(比如10就是攻防各下降10)\n如果在0到1之间则为下降的比例(比如0.3就是下降30%的攻防)" + }, + "redJewel": { + "_leaf": true, + "_type": "textarea", + "_data": "红宝石加攻击的数值" + }, + "blueJewel": { + "_leaf": true, + "_type": "textarea", + "_data": "蓝宝石加防御的数值" + }, + "greenJewel": { + "_leaf": true, + "_type": "textarea", + "_data": "绿宝石加魔防的数值" + }, + "redPotion": { + "_leaf": true, + "_type": "textarea", + "_data": "红血瓶加血数值" + }, + "bluePotion": { + "_leaf": true, + "_type": "textarea", + "_data": "蓝血瓶加血数值" + }, + "yellowPotion": { + "_leaf": true, + "_type": "textarea", + "_data": "黄血瓶加血数值" + }, + "greenPotion": { + "_leaf": true, + "_type": "textarea", + "_data": "绿血瓶加血数值" + }, + "breakArmor": { + "_leaf": true, + "_type": "textarea", + "_data": "破甲的比例(战斗前,怪物附加角色防御的x倍作为伤害)" + }, + "counterAttack": { + "_leaf": true, + "_type": "textarea", + "_data": "反击的比例(战斗时,怪物每回合附加角色攻击的x倍作为伤害,无视角色防御)" + }, + "purify": { + "_leaf": true, + "_type": "textarea", + "_data": "净化的比例(战斗前,怪物附加勇士魔防的x倍作为伤害)" + }, + "hatred": { + "_leaf": true, + "_type": "textarea", + "_data": "仇恨属性中,每杀死一个怪物获得的仇恨值" + }, + "moveSpeed": { + "_leaf": true, + "_type": "textarea", + "_data": "行走速度,即勇士每走一格的时间,一般100比较合适" + }, + "animateSpeed": { + "_leaf": true, + "_type": "textarea", + "_data": "全局动画时间,即怪物振动频率,一般300比较合适" + }, + "floorChangeTime": { + "_leaf": true, + "_type": "textarea", + "_data": "默认楼层切换时间" + } + } + }, + "flags": { + "_type": "object", + "_data": { + "enableFloor": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否在状态栏显示当前楼层" + }, + "enableName": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否在状态栏显示勇士名字" + }, + "enableLv": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否在状态栏显示当前等级" + }, + "enableHPMax": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否是否启用生命上限" + }, + "enableMana": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否开启魔力值" + }, + "enableMDef": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否在状态栏及战斗界面显示魔防(护盾)" + }, + "enableMoney": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否在状态栏、怪物手册及战斗界面显示金币" + }, + "enableExperience": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否在状态栏、怪物手册及战斗界面显示经验" + }, + "enableLevelUp": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否允许等级提升(进阶);如果上面enableExperience为false,则此项恒视为false" + }, + "levelUpLeftMode": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "进阶使用扣除模式,即在状态栏显示距离下个等级所需要的经验值;只有enableExperience和enableLevelUp均开启时才有效。" + }, + "enableKeys": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否在状态栏显示三色钥匙数量" + }, + "enablePZF": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否在状态栏显示破炸飞数量" + }, + "enableDebuff": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否在状态栏显示毒衰咒" + }, + "enableSkill": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否启用技能栏" + }, + "flyNearStair": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否需要在楼梯边使用传送器" + }, + "pickaxeFourDirections": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "使用破墙镐是否四个方向都破坏;如果false则只破坏面前的墙壁" + }, + "bombFourDirections": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "使用炸弹是否四个方向都会炸;如果false则只炸面前的怪物(即和圣锤等价)" + }, + "snowFourDirections": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "使用冰冻徽章是否四个方向都会消除熔岩;如果false则只消除面前的熔岩" + }, + "bigKeyIsBox": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "如果此项为true,则视为钥匙盒,红黄蓝钥匙+1;若为false,则视为大黄门钥匙" + }, + "equipment": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "剑和盾是否作为装备。如果此项为true,则作为装备,需要在装备栏使用,否则将直接加属性。" + }, + "equipboxButton": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "状态栏的装备按钮。若此项为true则将状态栏中的楼层转换器按钮换为装备栏按钮" + }, + "enableAddPoint": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否支持加点" + }, + "enableNegativeDamage": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否支持负伤害(回血)" + }, + "hatredDecrease": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否在和仇恨怪战斗后减一半的仇恨值,此项为false则和仇恨怪不会扣减仇恨值。" + }, + "betweenAttackCeil": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "夹击方式是向上取整还是向下取整。如果此项为true则为向上取整,为false则为向下取整" + }, + "useLoop": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否循环计算临界;如果此项为true则使用循环法(而不是回合数计算法)来算临界\n从V2.5.3开始,对于大数据的循环法将改为使用二分法进行计算" + }, + "startUsingCanvas": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否开始菜单canvas化;如果此项为true,则将使用canvas来绘制开始菜单" + }, + "startDirectly": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "点击“开始游戏”后是否立刻开始游戏而不显示难度选择界面" + }, + "statusCanvas": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否状态栏canvas化,即手动自定义绘制状态栏。\n如果此项开启,则可在脚本编辑的drawStatusBar中自定义绘制菜单栏。" + }, + "statusCanvasRowsOnMobile": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval==null || (thiseval>0 && thiseval<=4)", + "_data": "竖屏模式下,顶端状态栏canvas化后的行数。\n此项将决定竖屏的状态栏高度,如果设置则不小于1且不大于4。\n仅在statusCanvas开启时才有效" + }, + "displayEnemyDamage": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否地图怪物显伤;用户可以手动在菜单栏中开关" + }, + "displayCritical": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否地图显示临界;用户可以手动在菜单栏中开关" + }, + "displayExtraDamage": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否地图高级显伤(领域、夹击等);用户可以手动在菜单栏中开关" + }, + "enableGentleClick": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否允许轻触(获得面前物品)" + }, + "potionWhileRouting": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "寻路算法是否经过血瓶;如果该项为false,则寻路算法会自动尽量绕过血瓶" + }, + "ignoreChangeFloor": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "经过楼梯、传送门时是否能“穿透”。\n穿透的意思是,自动寻路得到的的路径中间经过了楼梯,行走时是否触发楼层转换事件" + }, + "canGoDeadZone": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否允许走到将死的领域上。如果此项为true,则可以走到将死的领域上" + }, + "enableMoveDirectly": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否允许瞬间移动" + }, + "enableDisabledShop": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否允许查看未开启状态的快捷商店内容;如果此项为真,则对于未开启状态的商店允许查看其内容(但不能购买)" + }, + "disableShopOnDamage": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否在经过领域/夹击/路障等伤害后禁用快捷商店。" + }, + "checkConsole": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否检查控制台的开启情况。" + } + } + } + } } \ No newline at end of file diff --git a/_server/editor_multi.js b/_server/editor_multi.js index e68cf56a..df5307bb 100644 --- a/_server/editor_multi.js +++ b/_server/editor_multi.js @@ -138,6 +138,7 @@ editor_multi = function () { } if (editor_multi.id === 'importFile') { + _format(); editor_multi.id = ''; editor_multi.writeFileDone(); return; @@ -210,7 +211,10 @@ editor_multi = function () { editor_multi.writeFileDone = function () { fs.writeFile(_fileValues[0], editor.util.encode64(codeEditor.getValue() || ''), 'base64', function (err, data) { if (err) printe('文件写入失败,请手动粘贴至' + _fileValues[0] + '\n' + err); - else editor_multi.hide(); + else { + editor_multi.hide(); + printf(_fileValues[0] + " 写入成功,F5刷新后生效"); + } }); } diff --git a/_server/editor_table.js b/_server/editor_table.js index 33a1465f..a3b742cd 100644 --- a/_server/editor_table.js +++ b/_server/editor_table.js @@ -121,7 +121,7 @@ editor_table_wrapper = function (editor) { // 事实上能执行到这一步工程没崩掉打不开,就继续吧.. if (keysForTableOrder[ii] === voidMark) { if (typeof id_815975ad_ee6f_4684_aac7_397b7e392702 === "undefined") { - alert('comment和data不匹配,请在群 HTML5造塔技术交流群 959329661 内反馈') + // alert('comment和data不匹配,请在群 HTML5造塔技术交流群 959329661 内反馈') console.error('comment和data不匹配,请在群 HTML5造塔技术交流群 959329661 内反馈') id_815975ad_ee6f_4684_aac7_397b7e392702 = 1; } diff --git a/_server/events.comment.js b/_server/events.comment.js index a96301d7..4432901f 100644 --- a/_server/events.comment.js +++ b/_server/events.comment.js @@ -1,43 +1,46 @@ -var events_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = -{ - - "_type": "object", - "_data": { - "commonEvent": { +/* + * 表格配置项。 + * 在这里可以对表格中的各项显示进行配置,包括表格项、提示内容等内容。具体写法照葫芦画瓢即可。 + * 本配置项包括:公共事件。 + */ - "_type": "object", - "_data": function (key) { - var obj = { - "加点事件": { - "_leaf": true, - "_type": "event", - "_range": "thiseval instanceof Array", - "_event": "commonEvent", - "_data": "打败怪物后加点" - }, - "毒衰咒处理": { - "_leaf": true, - "_type": "event", - "_range": "thiseval instanceof Array", - "_event": "commonEvent", - "_data": "毒衰咒效果处理" - }, - "滑冰事件": { - "_leaf": true, - "_type": "event", - "_range": "thiseval instanceof Array", - "_event": "commonEvent", - "_data": "滑冰事件" - }, - } - if (obj[key]) return obj[key]; - return { - "_leaf": true, - "_type": "event", - "_event": "commonEvent", - "_data": "自定义公共事件,可以双击进入事件编辑器" - } - } - } - } +var events_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { + "_type": "object", + "_data": { + "commonEvent": { + "_type": "object", + "_data": function (key) { + var obj = { + "加点事件": { + "_leaf": true, + "_type": "event", + "_range": "thiseval instanceof Array", + "_event": "commonEvent", + "_data": "打败怪物后加点" + }, + "毒衰咒处理": { + "_leaf": true, + "_type": "event", + "_range": "thiseval instanceof Array", + "_event": "commonEvent", + "_data": "毒衰咒效果处理" + }, + "滑冰事件": { + "_leaf": true, + "_type": "event", + "_range": "thiseval instanceof Array", + "_event": "commonEvent", + "_data": "滑冰事件" + }, + } + if (obj[key]) return obj[key]; + return { + "_leaf": true, + "_type": "event", + "_event": "commonEvent", + "_data": "自定义公共事件,可以双击进入事件编辑器" + } + } + } + } } \ No newline at end of file diff --git a/_server/functions.comment.js b/_server/functions.comment.js index 1d295260..44396901 100644 --- a/_server/functions.comment.js +++ b/_server/functions.comment.js @@ -1,212 +1,216 @@ -var functions_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = -{ - - "_type": "object", - "_data": { - "events": { - "_type": "object", - "_data": { - "resetGame": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "重置整个游戏" - }, - "setInitData": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "设置初始属性" - }, - "win": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "游戏获胜事件" - }, - "lose": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "游戏失败事件" - }, - "changingFloor": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "切换楼层中" - }, - "afterChangeFloor": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "切换楼层后" - }, - "flyTo": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "楼层飞行" - }, - "beforeBattle": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "战前事件" - }, - "afterBattle": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "战后事件" - }, - "afterOpenDoor": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "开门后事件" - }, - "afterGetItem": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "获得道具后事件" - }, - "afterChangeLight": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "改变亮灯事件" - }, - "afterPushBox": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "推箱子事件" - }, - "afterUseBomb": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "炸弹事件" - }, - "canUseQuickShop": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "能否用快捷商店" - } - } - }, - "enemys": { - "_type": "object", - "_data": { - "getSpecials": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "怪物特殊属性定义" - }, - "getEnemyInfo": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "获得怪物真实属性" - }, - "getDamageInfo": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "获得战斗伤害信息" - }, - "updateEnemys": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "更新怪物数据" - } - } - }, - "actions": { - "_type": "object", - "_data": { - "onKeyUp": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "按键处理" - } - } - }, - "control": { - "_type": "object", - "_data": { - "saveData": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "存档操作" - }, - "loadData": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "读档操作" - }, - "updateStatusBar": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "更新状态栏" - }, - "updateCheckBlock": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "阻激夹域伤害" - }, - "moveOneStep": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "每一步后的操作" - }, - "moveDirectly": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "瞬间移动处理" - }, - "parallelDo": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "并行事件处理" - } - } - }, - "ui": { - "_type": "object", - "_data": { - "drawStatusBar": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "自绘状态栏" - }, - "drawStatistics": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "地图数据统计" - }, - "drawAbout": { - "_leaf": true, - "_type": "textarea", - "_lint": true, - "_data": "绘制关于界面" - } - } - } - } +/* + * 表格配置项。 + * 在这里可以对表格中的各项显示进行配置,包括表格项、提示内容等内容。具体写法照葫芦画瓢即可。 + * 本配置项包括:脚本编辑。 + */ + +var functions_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { + "_type": "object", + "_data": { + "events": { + "_type": "object", + "_data": { + "resetGame": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "重置整个游戏" + }, + "setInitData": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "设置初始属性" + }, + "win": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "游戏获胜事件" + }, + "lose": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "游戏失败事件" + }, + "changingFloor": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "切换楼层中" + }, + "afterChangeFloor": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "切换楼层后" + }, + "flyTo": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "楼层飞行" + }, + "beforeBattle": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "战前事件" + }, + "afterBattle": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "战后事件" + }, + "afterOpenDoor": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "开门后事件" + }, + "afterGetItem": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "获得道具后事件" + }, + "afterChangeLight": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "改变亮灯事件" + }, + "afterPushBox": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "推箱子事件" + }, + "afterUseBomb": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "炸弹事件" + }, + "canUseQuickShop": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "能否用快捷商店" + } + } + }, + "enemys": { + "_type": "object", + "_data": { + "getSpecials": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "怪物特殊属性定义" + }, + "getEnemyInfo": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "获得怪物真实属性" + }, + "getDamageInfo": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "获得战斗伤害信息" + }, + "updateEnemys": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "更新怪物数据" + } + } + }, + "actions": { + "_type": "object", + "_data": { + "onKeyUp": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "按键处理" + } + } + }, + "control": { + "_type": "object", + "_data": { + "saveData": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "存档操作" + }, + "loadData": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "读档操作" + }, + "updateStatusBar": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "更新状态栏" + }, + "updateCheckBlock": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "阻激夹域伤害" + }, + "moveOneStep": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "每一步后的操作" + }, + "moveDirectly": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "瞬间移动处理" + }, + "parallelDo": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "并行事件处理" + } + } + }, + "ui": { + "_type": "object", + "_data": { + "drawStatusBar": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "自绘状态栏" + }, + "drawStatistics": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "地图数据统计" + }, + "drawAbout": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "绘制关于界面" + } + } + } + } } \ No newline at end of file diff --git a/_server/plugins.comment.js b/_server/plugins.comment.js index e708c576..fc4f5144 100644 --- a/_server/plugins.comment.js +++ b/_server/plugins.comment.js @@ -1,27 +1,32 @@ -var plugins_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = -{ - "_type": "object", - "_data": function (key) { - var obj = { - "init": { - "_leaf": true, - "_type": "textarea", - "_range": "typeof(thiseval)=='string'", - "_data": "自定义插件" - }, - "drawLight": { - "_leaf": true, - "_type": "textarea", - "_range": "typeof(thiseval)=='string' || thiseval==null", - "_data": "绘制灯光效果" - }, - } - if (obj[key]) return obj[key]; - return { - "_leaf": true, - "_type": "textarea", - "_range": "typeof(thiseval)=='string' || thiseval==null", - "_data": "自定义插件" - } - } +/* + * 表格配置项。 + * 在这里可以对表格中的各项显示进行配置,包括表格项、提示内容等内容。具体写法照葫芦画瓢即可。 + * 本配置项包括:插件编写。 + */ + +var plugins_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { + "_type": "object", + "_data": function (key) { + var obj = { + "init": { + "_leaf": true, + "_type": "textarea", + "_range": "typeof(thiseval)=='string'", + "_data": "自定义插件" + }, + "drawLight": { + "_leaf": true, + "_type": "textarea", + "_range": "typeof(thiseval)=='string' || thiseval==null", + "_data": "绘制灯光效果" + }, + } + if (obj[key]) return obj[key]; + return { + "_leaf": true, + "_type": "textarea", + "_range": "typeof(thiseval)=='string' || thiseval==null", + "_data": "自定义插件" + } + } } \ No newline at end of file diff --git a/libs/enemys.js b/libs/enemys.js index 2b7e551d..51ef8552 100644 --- a/libs/enemys.js +++ b/libs/enemys.js @@ -359,6 +359,8 @@ enemys.prototype._getCurrentEnemys_sort = function (enemys) { }); } -enemys.prototype.hasEnemyLeft = function (floorId) { - return core.getCurrentEnemys(floorId).length > 0; +enemys.prototype.hasEnemyLeft = function (enemyId, floorId) { + return core.getCurrentEnemys(floorId).filter(function (enemy) { + return enemyId == null || enemy.id == enemyId; + }).length > 0; } \ No newline at end of file From 616b77a760ece42bc6d9032a5c34e6532e518984 Mon Sep 17 00:00:00 2001 From: YouWei Zhao Date: Sat, 6 Apr 2019 08:31:57 -0400 Subject: [PATCH 7/9] mv *comment.js --- _server/editor_file.js | 2 +- _server/editor_multi.js | 14 +++++++------- _server/refactoring.md | 2 +- _server/{ => table}/comment.js | 0 _server/{ => table}/data.comment.js | 0 _server/{ => table}/events.comment.js | 0 _server/{ => table}/functions.comment.js | 0 _server/{ => table}/maps.comment.js | 0 _server/{ => table}/plugins.comment.js | 0 9 files changed, 9 insertions(+), 9 deletions(-) rename _server/{ => table}/comment.js (100%) rename _server/{ => table}/data.comment.js (100%) rename _server/{ => table}/events.comment.js (100%) rename _server/{ => table}/functions.comment.js (100%) rename _server/{ => table}/maps.comment.js (100%) rename _server/{ => table}/plugins.comment.js (100%) diff --git a/_server/editor_file.js b/_server/editor_file.js index e074a1d5..467cd9dc 100644 --- a/_server/editor_file.js +++ b/_server/editor_file.js @@ -17,7 +17,7 @@ editor_file = function (editor, callback) { if (window.location.href.indexOf('_server') !== -1) script.src = key + '.js'; else - script.src = '_server/' + key + '.js'; + script.src = '_server/table/' + key + '.js'; document.body.appendChild(script); script.onload = function () { editor_file[value] = eval(key.replace('.', '_') + '_c456ea59_6018_45ef_8bcc_211a24c627dc'); diff --git a/_server/editor_multi.js b/_server/editor_multi.js index df5307bb..476536bb 100644 --- a/_server/editor_multi.js +++ b/_server/editor_multi.js @@ -220,13 +220,13 @@ editor_multi = function () { editor_multi.editCommentJs = function (mod) { var dict = { - loc: '_server/comment.js', - enemyitem: '_server/comment.js', - floor: '_server/comment.js', - tower: '_server/data.comment.js', - functions: '_server/functions.comment.js', - commonevent: '_server/events.comment.js', - plugins: '_server/plugins.comment.js', + loc: '_server/table/comment.js', + enemyitem: '_server/table/comment.js', + floor: '_server/table/comment.js', + tower: '_server/table/data.comment.js', + functions: '_server/table/functions.comment.js', + commonevent: '_server/table/events.comment.js', + plugins: '_server/table/plugins.comment.js', } editor_multi.lintAutocomplete = true editor_multi.setLint() diff --git a/_server/refactoring.md b/_server/refactoring.md index c75dc64b..d9e80082 100644 --- a/_server/refactoring.md +++ b/_server/refactoring.md @@ -16,7 +16,7 @@ + [ ] editor 执行初始化流程加组合各组件 + [ ] 原editor_mode 移除 + [ ] 原vm 移除 -+ [ ] \*comment.js 表格注释与结构, 移至comment/\*comment.js ++ [x] \*comment.js 表格注释与结构, 移至table/\*comment.js ## 对象结构 diff --git a/_server/comment.js b/_server/table/comment.js similarity index 100% rename from _server/comment.js rename to _server/table/comment.js diff --git a/_server/data.comment.js b/_server/table/data.comment.js similarity index 100% rename from _server/data.comment.js rename to _server/table/data.comment.js diff --git a/_server/events.comment.js b/_server/table/events.comment.js similarity index 100% rename from _server/events.comment.js rename to _server/table/events.comment.js diff --git a/_server/functions.comment.js b/_server/table/functions.comment.js similarity index 100% rename from _server/functions.comment.js rename to _server/table/functions.comment.js diff --git a/_server/maps.comment.js b/_server/table/maps.comment.js similarity index 100% rename from _server/maps.comment.js rename to _server/table/maps.comment.js diff --git a/_server/plugins.comment.js b/_server/table/plugins.comment.js similarity index 100% rename from _server/plugins.comment.js rename to _server/table/plugins.comment.js From 26ce1f904802a131218d8d0c8ebe613481d923e0 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Sun, 7 Apr 2019 14:50:21 +0800 Subject: [PATCH 8/9] 15x15 toolHeight --- libs/control.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/control.js b/libs/control.js index 5f38acfd..0a574875 100644 --- a/libs/control.js +++ b/libs/control.js @@ -2637,7 +2637,7 @@ control.prototype._resize_toolBar = function (obj) { } control.prototype._resize_tools = function (obj) { - var toolsHeight = 32 * core.domStyle.scale * (core.domStyle.isVertical ? 0.95 : 1); + var toolsHeight = 32 * core.domStyle.scale * (core.domStyle.isVertical && !obj.is15x15 ? 0.95 : 1); var toolsMarginLeft; if (core.domStyle.isVertical) toolsMarginLeft = (core.__HALF_SIZE__ - 3) * 3 * core.domStyle.scale; From 3dd292e85348f2ce32ab06e52c5e22cd3aaa0ae7 Mon Sep 17 00:00:00 2001 From: oc Date: Sun, 7 Apr 2019 23:35:08 +0800 Subject: [PATCH 9/9] font bold --- _docs/api.md | 6 +++--- libs/control.js | 11 +++++++---- libs/events.js | 1 + libs/ui.js | 11 ++++++----- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/_docs/api.md b/_docs/api.md index ee5fbbaf..a61be655 100644 --- a/_docs/api.md +++ b/_docs/api.md @@ -394,12 +394,12 @@ core.updateViewport() 根据大地图的偏移量来更新窗口的视野范围。 -core.nextX(n) / core.nextY(m) +core.nextX(n) / core.nextY(n) 获得勇士面对的第n个位置的横纵坐标。n可不填,默认为1。 -core.nearHero(x, y) -判定某个点是否和勇士的距离不大于1。 +core.nearHero(x, y, n) +判定某个点是否和勇士的距离不大于n。n可不填,默认为1。 core.gatherFollowers() diff --git a/libs/control.js b/libs/control.js index 0a574875..93b9bff4 100644 --- a/libs/control.js +++ b/libs/control.js @@ -856,17 +856,20 @@ control.prototype.updateViewport = function() { ////// 获得勇士面对位置的x坐标 ////// control.prototype.nextX = function(n) { - return core.getHeroLoc('x')+core.utils.scan[core.getHeroLoc('direction')].x*(n||1); + if (n == null) n = 1; + return core.getHeroLoc('x')+core.utils.scan[core.getHeroLoc('direction')].x*n; } ////// 获得勇士面对位置的y坐标 ////// control.prototype.nextY = function (n) { - return core.getHeroLoc('y')+core.utils.scan[core.getHeroLoc('direction')].y*(n||1); + if (n == null) n = 1; + return core.getHeroLoc('y')+core.utils.scan[core.getHeroLoc('direction')].y*n; } ////// 某个点是否在勇士旁边 ////// -control.prototype.nearHero = function (x, y) { - return Math.abs(x-core.getHeroLoc('x'))+Math.abs(y-core.getHeroLoc('y'))<=1; +control.prototype.nearHero = function (x, y, n) { + if (n == null) n = 1; + return Math.abs(x-core.getHeroLoc('x'))+Math.abs(y-core.getHeroLoc('y'))<=n; } ////// 聚集跟随者 ////// diff --git a/libs/events.js b/libs/events.js index 814afc2b..341bdcc8 100644 --- a/libs/events.js +++ b/libs/events.js @@ -431,6 +431,7 @@ events.prototype._sys_getItem = function (data, callback) { ////// 获得某个物品 ////// events.prototype.getItem = function (id, num, x, y, callback) { + if (num == null) num = 1; num = num || 1; var itemCls = core.material.items[id].cls; core.items.getItemEffect(id, num); diff --git a/libs/ui.js b/libs/ui.js index 9d63d8d0..2c310153 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -588,14 +588,15 @@ ui.prototype.drawTextContent = function (ctx, content, config) { ctx = core.getContextByName(ctx); if (!ctx) return; // 设置默认配置项 + var textAttribute = core.status.textAttribute || core.initStatus.textAttribute; config = core.clone(config || {}); config.left = config.left || 0; config.right = config.left + (config.maxWidth == null ? ctx.canvas.width : config.maxWidth); config.top = config.top || 0; - config.color = config.color || core.arrayToRGBA(core.status.textAttribute.text); - config.bold = config.bold || false; - config.align = config.align || core.status.textAttribute.align || "left"; - config.fontSize = config.fontSize || core.status.textAttribute.textfont; + config.color = config.color || core.arrayToRGBA(textAttribute.text); + if (config.bold == null) config.bold = textAttribute.bold; + config.align = config.align || textAttribute.align || "left"; + config.fontSize = config.fontSize || textAttribute.textfont; config.lineHeight = config.lineHeight || (config.fontSize * 1.3); config.time = config.time || 0; @@ -783,7 +784,7 @@ ui.prototype.drawTextBox = function(content, showAll) { var isWindowSkin = this.drawBackground(hPos.left, vPos.top, hPos.right, vPos.bottom, pInfo); var alpha = isWindowSkin ? 0.85 : textAttribute.background[3]; - // Step 4: 绘制标题、头像、 + // Step 4: 绘制标题、头像、动画 var content_top = this._drawTextBox_drawTitleAndIcon(titleInfo, hPos, vPos, alpha); // Step 5: 绘制正文