From c192a2b62c8d07de73eab75e6083dc00603e6233 Mon Sep 17 00:00:00 2001 From: YouWei Zhao Date: Sat, 17 Mar 2018 17:40:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84comment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _server/README.md | 6 +- _server/css/editor_mode.css | 4 +- _server/editor_blockly.js | 18 +- _server/editor_file.js | 56 +-- _server/editor_mode.js | 15 +- _server/editor_multi.js | 3 +- project/comment.js | 430 ++++++++++++++++----- project/data.comment.js | 703 ++++++++++++++++++++++++++--------- project/functions.comment.js | 132 +++++-- 9 files changed, 1027 insertions(+), 340 deletions(-) diff --git a/_server/README.md b/_server/README.md index 65c4e897..2d6a8d08 100644 --- a/_server/README.md +++ b/_server/README.md @@ -125,7 +125,7 @@ $textarea(evalstr)$end 把选定`id_`的事件用blockly编辑 ``` js -editor_blockly.import(id_); +editor_blockly.import(id_,{type:'event'}); ``` 把文本区域的代码转换成图块 @@ -139,12 +139,12 @@ editor_blockly.parse(); 编辑选定`id_`的文本域 ``` js -editor_multi.import(id_) +editor_multi.import(id_,{lint:true}) ``` 编辑blockly方块的特定域 ``` js -editor_multi.multiLineEdit(value,b,f,callback) +editor_multi.multiLineEdit(value,b,f,{lint:true},callback) ``` ### fs.js diff --git a/_server/css/editor_mode.css b/_server/css/editor_mode.css index f43f4ef1..a638df42 100644 --- a/_server/css/editor_mode.css +++ b/_server/css/editor_mode.css @@ -172,7 +172,9 @@ div.etableInputDiv { } .etableInputDiv input[type="checkbox"] { - + position:relative; + top: 35%; + height: 30px; } .etableInputDiv select { diff --git a/_server/editor_blockly.js b/_server/editor_blockly.js index bbd2be2d..4a466143 100644 --- a/_server/editor_blockly.js +++ b/_server/editor_blockly.js @@ -352,26 +352,12 @@ editor_blockly.parse = function () { editor_blockly.id=''; -editor_blockly.import = function(id_){ +editor_blockly.import = function(id_,args){ var thisTr = document.getElementById(id_); if(!thisTr)return false; var input = thisTr.children[2].children[0].children[0]; var field = thisTr.children[0].getAttribute('title'); - var type = { - "['events']":'event', - "['changeFloor']":'changeFloor', - "['afterBattle']":'afterBattle', - "['afterGetItem']":'afterGetItem', - "['afterOpenDoor']":'afterOpenDoor', - - //"['firstData']['shops']":'shop', - "--shop--未完成数组的处理":'shop', - - "['firstArrive']":'firstArrive', - "['firstData']['startText']":'firstArrive', - - "--point--未完成数据转移":'point', - }[field]; + var type = args.type; if(!type)return false; editor_blockly.id=id_; codeAreaHL.setValue(input.value); diff --git a/_server/editor_file.js b/_server/editor_file.js index 0968d4f6..3abc3c09 100644 --- a/_server/editor_file.js +++ b/_server/editor_file.js @@ -149,10 +149,10 @@ editor_file = function(editor, callback){ saveSetting('maps',[["add","['"+idnum+"']",{'cls': info.images, 'id':id}]],tempcallback); saveSetting('icons',[["add","['"+info.images+"']['"+id+"']",info.y]],tempcallback); if(info.images==='items'){ - saveSetting('items',[["add","['items']['"+id+"']",editor_file.comment.items_template]],function(err){if(err){printe(err);throw(err)}}); + saveSetting('items',[["add","['items']['"+id+"']",editor_file.comment._data.items_template]],function(err){if(err){printe(err);throw(err)}}); } if(info.images==='enemys' || info.images==='enemy48'){ - saveSetting('enemys',[["add","['"+id+"']",editor_file.comment.enemys_template]],function(err){if(err){printe(err);throw(err)}}); + saveSetting('enemys',[["add","['"+id+"']",editor_file.comment._data.enemys_template]],function(err){if(err){printe(err);throw(err)}}); } callback(null); @@ -176,7 +176,7 @@ editor_file = function(editor, callback){ callback([ (function(){ var locObj_ ={}; - Object.keys(editor_file.comment.items).forEach(function(v){ + Object.keys(editor_file.comment._data.items._data).forEach(function(v){ if (isset(editor.core.items[v][id]) && v!=='items') locObj_[v]=editor.core.items[v][id]; else @@ -184,7 +184,7 @@ editor_file = function(editor, callback){ }); locObj_['items']=(function(){ var locObj=Object.assign({},editor.core.items.items[id]); - Object.keys(editor_file.comment.items.items).forEach(function(v){ + Object.keys(editor_file.comment._data.items._data.items._data).forEach(function(v){ if (!isset(editor.core.items.items[id][v])) locObj[v]=null; }); @@ -192,14 +192,14 @@ editor_file = function(editor, callback){ })(); return locObj_; })(), - editor_file.comment.items, + editor_file.comment._data.items, err]); }); } else { callback([ (function(){ var locObj_ ={}; - Object.keys(editor_file.comment.items).forEach(function(v){ + Object.keys(editor_file.comment._data.items._data).forEach(function(v){ if (isset(editor.core.items[v][id]) && v!=='items') locObj_[v]=editor.core.items[v][id]; else @@ -207,7 +207,7 @@ editor_file = function(editor, callback){ }); locObj_['items']=(function(){ var locObj=Object.assign({},editor.core.items.items[id]); - Object.keys(editor_file.comment.items.items).forEach(function(v){ + Object.keys(editor_file.comment._data.items._data.items._data).forEach(function(v){ if (!isset(editor.core.items.items[id][v])) locObj[v]=null; }); @@ -215,7 +215,7 @@ editor_file = function(editor, callback){ })(); return locObj_; })(), - editor_file.comment.items, + editor_file.comment._data.items, null]); } //只有items.cls是items的才有itemEffect和itemEffectTip,keys和constants和tools只有items @@ -238,7 +238,7 @@ editor_file = function(editor, callback){ callback([ (function(){ var locObj=Object.assign({},editor.core.enemys.enemys[id]); - Object.keys(editor_file.comment.enemys).forEach(function(v){ + Object.keys(editor_file.comment._data.enemys._data).forEach(function(v){ if (!isset(editor.core.enemys.enemys[id][v])) /* locObj[v]=editor.core.enemys.enemys[id][v]; else */ @@ -246,14 +246,14 @@ editor_file = function(editor, callback){ }); return locObj; })(), - editor_file.comment.enemys, + editor_file.comment._data.enemys, err]); }); } else { callback([ (function(){ var locObj=Object.assign({},editor.core.enemys.enemys[id]); - Object.keys(editor_file.comment.enemys).forEach(function(v){ + Object.keys(editor_file.comment._data.enemys._data).forEach(function(v){ if (!isset(editor.core.enemys.enemys[id][v])) /* locObj[v]=editor.core.enemys.enemys[id][v]; else */ @@ -261,7 +261,7 @@ editor_file = function(editor, callback){ }); return locObj; })(), - editor_file.comment.enemys, + editor_file.comment._data.enemys, null]); } } @@ -283,28 +283,28 @@ editor_file = function(editor, callback){ callback([ (function(){ var locObj=Object.assign({},editor.core.maps.blocksInfo[idnum]); - Object.keys(editor_file.comment.maps).forEach(function(v){ + Object.keys(editor_file.comment._data.maps._data).forEach(function(v){ if (!isset(editor.core.maps.blocksInfo[idnum][v])) locObj[v]=null; }); locObj.idnum = idnum; return locObj; })(), - editor_file.comment.maps, + editor_file.comment._data.maps, null]); }); } else { callback([ (function(){ var locObj=Object.assign({},editor.core.maps.blocksInfo[idnum]); - Object.keys(editor_file.comment.maps).forEach(function(v){ + Object.keys(editor_file.comment._data.maps._data).forEach(function(v){ if (!isset(editor.core.maps.blocksInfo[idnum][v])) locObj[v]=null; }); locObj.idnum = idnum; return locObj; })(), - editor_file.comment.maps, + editor_file.comment._data.maps, null]); } } @@ -328,7 +328,7 @@ editor_file = function(editor, callback){ callback([ (function(){ var locObj={}; - Object.keys(editor_file.comment.floors.loc).forEach(function(v){ + Object.keys(editor_file.comment._data.floors._data.loc._data).forEach(function(v){ if (isset(editor.currentFloorData[v][x+','+y])) locObj[v]=editor.currentFloorData[v][x+','+y]; else @@ -336,14 +336,14 @@ editor_file = function(editor, callback){ }); return locObj; })(), - editor_file.comment.floors.loc, + editor_file.comment._data.floors._data.loc, err]); }); } else { callback([ (function(){ var locObj={}; - Object.keys(editor_file.comment.floors.loc).forEach(function(v){ + Object.keys(editor_file.comment._data.floors._data.loc._data).forEach(function(v){ if (isset(editor.currentFloorData[v][x+','+y])) locObj[v]=editor.currentFloorData[v][x+','+y]; else @@ -351,7 +351,7 @@ editor_file = function(editor, callback){ }); return locObj; })(), - editor_file.comment.floors.loc, + editor_file.comment._data.floors._data.loc, null]); } @@ -373,38 +373,38 @@ editor_file = function(editor, callback){ callback([ (function(){ var locObj=Object.assign({},editor.currentFloorData); - Object.keys(editor_file.comment.floors.floor).forEach(function(v){ + Object.keys(editor_file.comment._data.floors._data.floor._data).forEach(function(v){ if (!isset(editor.currentFloorData[v])) /* locObj[v]=editor.currentFloorData[v]; else */ locObj[v]=null; }); - Object.keys(editor_file.comment.floors.loc).forEach(function(v){ + Object.keys(editor_file.comment._data.floors._data.loc._data).forEach(function(v){ delete(locObj[v]); }); delete(locObj.map); return locObj; })(), - editor_file.comment.floors.floor, + editor_file.comment._data.floors._data.floor, err]); }); } else { callback([ (function(){ var locObj=Object.assign({},editor.currentFloorData); - Object.keys(editor_file.comment.floors.floor).forEach(function(v){ + Object.keys(editor_file.comment._data.floors._data.floor._data).forEach(function(v){ if (!isset(editor.currentFloorData[v])) /* locObj[v]=editor.currentFloorData[v]; else */ locObj[v]=null; }); - Object.keys(editor_file.comment.floors.loc).forEach(function(v){ + Object.keys(editor_file.comment._data.floors._data.loc._data).forEach(function(v){ delete(locObj[v]); }); delete(locObj.map); return locObj; })(), - editor_file.comment.floors.floor, + editor_file.comment._data.floors._data.floor, null]); } } @@ -425,7 +425,7 @@ editor_file = function(editor, callback){ callback([ (function(){ var locObj=Object.assign({'main':{}},editor.core.data); - Object.keys(editor_file.dataComment.main).forEach(function(v){ + Object.keys(editor_file.dataComment._data.main._data).forEach(function(v){ if (isset(editor.main[v])) locObj.main[v]=editor.main[v]; else @@ -440,7 +440,7 @@ editor_file = function(editor, callback){ callback([ (function(){ var locObj=Object.assign({'main':{}},editor.core.data); - Object.keys(editor_file.dataComment.main).forEach(function(v){ + Object.keys(editor_file.dataComment._data.main._data).forEach(function(v){ if (isset(editor.main[v])) locObj.main[v]=editor.main[v]; else diff --git a/_server/editor_mode.js b/_server/editor_mode.js index 02b7fd88..b0a4d9d3 100644 --- a/_server/editor_mode.js +++ b/_server/editor_mode.js @@ -65,6 +65,7 @@ editor_mode.prototype.objToTable_ = function(obj,commentObj){ else cobj = Object.assign({},defaultcobj); } var args = {field:field,cfield:cfield,vobj:vobj,cobj:cobj} + if(cobj._leaf instanceof Function)cobj._leaf=cobj._leaf(args); for(var key in cobj){ if(key==='_data')continue; if(cobj[key] instanceof Function)cobj[key]=cobj[key](args); @@ -116,8 +117,8 @@ editor_mode.prototype.objToTable_ = function(obj,commentObj){ } } input.ondblclick = function(){ - if(cobj.type==='event')editor_blockly.import(guid,{type:cobj._event}); - if(cobj.type==='textarea')editor_multi.import(guid,{lint:cobj._lint}); + if(cobj._type==='event')editor_blockly.import(guid,{type:cobj._event}); + if(cobj._type==='textarea')editor_multi.import(guid,{lint:cobj._lint}); } }); @@ -366,7 +367,7 @@ editor_mode.prototype.loc = function(callback){ var objs=[]; editor.file.editLoc(editor_mode.pos.x,editor_mode.pos.y,[],function(objs_){objs=objs_;/*console.log(objs_)*/}); //只查询不修改时,内部实现不是异步的,所以可以这么写 - var tableinfo=editor_mode.objToTable(objs[0],objs[1]); + var tableinfo=editor_mode.objToTable_(objs[0],objs[1]); document.getElementById('table_3d846fc4_7644_44d1_aa04_433d266a73df').innerHTML=tableinfo.HTML; tableinfo.listen(tableinfo.guids); @@ -397,7 +398,7 @@ editor_mode.prototype.emenyitem = function(callback){ editor.file.editMapBlocksInfo(editor_mode.info.idnum,[],function(objs_){objs=objs_;/*console.log(objs_)*/}); } //只查询不修改时,内部实现不是异步的,所以可以这么写 - var tableinfo=editor_mode.objToTable(objs[0],objs[1]); + var tableinfo=editor_mode.objToTable_(objs[0],objs[1]); document.getElementById('table_a3f03d4c_55b8_4ef6_b362_b345783acd72').innerHTML=tableinfo.HTML; tableinfo.listen(tableinfo.guids); @@ -408,7 +409,7 @@ editor_mode.prototype.floor = function(callback){ var objs=[]; editor.file.editFloor([],function(objs_){objs=objs_;/*console.log(objs_)*/}); //只查询不修改时,内部实现不是异步的,所以可以这么写 - var tableinfo=editor_mode.objToTable(objs[0],objs[1]); + var tableinfo=editor_mode.objToTable_(objs[0],objs[1]); document.getElementById('table_4a3b1b09_b2fb_4bdf_b9ab_9f4cdac14c74').innerHTML=tableinfo.HTML; tableinfo.listen(tableinfo.guids); if (Boolean(callback))callback(); @@ -418,7 +419,7 @@ editor_mode.prototype.tower = function(callback){ var objs=[]; editor.file.editTower([],function(objs_){objs=objs_;/*console.log(objs_)*/}); //只查询不修改时,内部实现不是异步的,所以可以这么写 - var tableinfo=editor_mode.objToTable(objs[0],objs[1]); + var tableinfo=editor_mode.objToTable_(objs[0],objs[1]); document.getElementById('table_b6a03e4c_5968_4633_ac40_0dfdd2c9cde5').innerHTML=tableinfo.HTML; tableinfo.listen(tableinfo.guids); if (Boolean(callback))callback(); @@ -428,7 +429,7 @@ editor_mode.prototype.functions = function(callback){ var objs=[]; editor.file.editFunctions([],function(objs_){objs=objs_;/*console.log(objs_)*/}); //只查询不修改时,内部实现不是异步的,所以可以这么写 - var tableinfo=editor_mode.objToTable(objs[0],objs[1]); + var tableinfo=editor_mode.objToTable_(objs[0],objs[1]); document.getElementById('table_e260a2be_5690_476a_b04e_dacddede78b3').innerHTML=tableinfo.HTML; tableinfo.listen(tableinfo.guids); if (Boolean(callback))callback(); diff --git a/_server/editor_multi.js b/_server/editor_multi.js index d2797dda..b65ebd1f 100644 --- a/_server/editor_multi.js +++ b/_server/editor_multi.js @@ -45,7 +45,7 @@ editor_multi.indent = function(field){ return '\t'; } -editor_multi.import = function(id_){ +editor_multi.import = function(id_,args){ var thisTr = document.getElementById(id_); if(!thisTr)return false; var input = thisTr.children[2].children[0].children[0]; @@ -55,6 +55,7 @@ editor_multi.import = function(id_){ editor_multi.id=id_; editor_multi.isString=false; editor_multi.lintAutocomplete=false; + if(args.lint===true)editor_multi.lintAutocomplete=true; if(field.indexOf('Effect') !== -1)editor_multi.lintAutocomplete=true; if(input.value.slice(0,1)==='"'){ editor_multi.isString=true; diff --git a/project/comment.js b/project/comment.js index ddde608c..a7fafc1d 100644 --- a/project/comment.js +++ b/project/comment.js @@ -1,98 +1,344 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { - "items" : { - 'items':{ - 'cls': "只能取keys(钥匙) items(宝石、血瓶) constants(物品) tools(道具)\n$select({\"values\":[\"keys\",\"items\",\"constants\",\"tools\"]})$end", - 'name': '名称', - 'text': '道具在道具栏中显示的描述', - 'isEquipment': '物品是否属于装备(仅在core.flags.equipment时有效)\n$select({\"values\":[true,false]})$end' + "_leaf": false, + "_type": "object", + "_data": { + "items": { + "_leaf": false, + "_type": "object", + "_data": { + "items": { + "_leaf": false, + "_type": "object", + "_data": { + "cls": { + "_leaf": true, + "_type": "select", + "_select": { + "values": [ + "keys", + "items", + "constants", + "tools" + ] + }, + "_data": "只能取keys(钥匙) items(宝石、血瓶) constants(物品) tools(道具)" + }, + "name": { + "_leaf": true, + "_type": "textarea", + "_data": "名称" + }, + "text": { + "_leaf": true, + "_type": "textarea", + "_data": "道具在道具栏中显示的描述" + }, + "isEquipment": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "物品是否属于装备(仅在core.flags.equipment时有效)" + } + } + }, + "itemEffect": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "cls为items的即捡即用类物品的效果,执行时会对这里的字符串执行eval()" + }, + "itemEffectTip": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "cls为items的即捡即用类物品,在获得时左上角额外显示的文字,执行时会对这里的字符串执行eval()得到字符串" + }, + "useItemEffect": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "cls为tools或contants时的使用物品效果,执行时会对这里的字符串执行eval()" + }, + "canUseItemEffect": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "cls为tools或contants时能否使用物品的判断,执行时会return这里的字符串执行eval()后的结果" + } + } }, - 'itemEffect':'cls为items的即捡即用类物品的效果,执行时会对这里的字符串执行eval()', - 'itemEffectTip':'cls为items的即捡即用类物品,在获得时左上角额外显示的文字,执行时会对这里的字符串执行eval()得到字符串', - 'useItemEffect':'cls为tools或contants时的使用物品效果,执行时会对这里的字符串执行eval()', - 'canUseItemEffect':'cls为tools或contants时能否使用物品的判断,执行时会return这里的字符串执行eval()后的结果', - }, - "items_template" : {'cls': 'items', 'name': '新物品'}, - "enemys" : { - 'name': '名称', - 'hp': '生命值', - 'atk': '攻击力', - 'def': '防御力', - 'money': '金币', - 'experience': '经验', - 'point': '加点', - 'special': '特殊属性\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:重生\n\n多个属性例如用[1,4,11]表示先攻2连击吸血\n模仿怪的攻防设为0就好\n$leaf(true)$end', - 'value': '特殊属性的数值\n领域怪需要加value表示领域伤害的数值\n吸血怪需要在后面添加value代表吸血比例', - 'zoneSquare': '领域怪zoneSquare代表是否九宫格伤害', - 'range': 'range可选,代表领域伤害的范围;不加默认为1\n$range((thiseval==~~thiseval && thiseval>0)||thiseval==null)$end', - 'bomb':' 加入 "bomb": false 代表该怪物不可被炸弹或圣锤炸掉\n$select({\"values\":[true,false]})$end', - 'n': '多连击需要在后面指定n代表是几连击\n$range((thiseval==~~thiseval && thiseval>0)||thiseval==null)$end', - 'add': '代表吸血后是否加到自身\n$select({\"values\":[true,false]})$end', - 'atkValue':'退化时勇士下降的攻击力点数\n$range(thiseval==~~thiseval||thiseval==null)$end', - 'defValue':'退化时勇士下降的防御力点数\n$range(thiseval==~~thiseval||thiseval==null)$end', - 'damage':'战前扣血的点数\n$range(thiseval==~~thiseval||thiseval==null)$end' - }, - "enemys_template" : {'name': '新敌人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, - "maps" : { - "id" : "图块ID \n$range(false)$end", - "idnum" : "图块数字 \n$range(false)$end", - "cls" : "图块类别 \n$range(false)$end", - "trigger" : "图块的默认触发器 \n$select({\"values\":[null,\"openDoor\",\"passNet\",\"changeLight\",\"ski\",\"pushBox\"]})$end", - "noPass" : "图块默认可通行状态 \n$select({\"values\":[null,true,false]})$end" - }, - "floors" : { - 'floor' : { - "floorId": "文件名和floorId需要保持完全一致 \n楼层唯一标识符仅能由字母、数字、下划线组成,且不能由数字开头 \n推荐用法:第20层就用MT20,第38层就用MT38,地下6层就用MT_6(用下划线代替负号),隐藏3层用MT3h(h表示隐藏),等等 \n楼层唯一标识符,需要和名字完全一致 \n这里不能更改floorId,请通过另存为来实现\n$range(false)$end", - "title": "楼层中文名 ", - "name": "显示在状态栏中的层数 ", - "canFlyTo": "该楼能否被楼传器飞到(不能的话在该楼也不允许使用楼传器) \n$select({\"values\":[true,false]})$end", - "canUseQuickShop": "该层是否允许使用快捷商店 \n$select({\"values\":[true,false]})$end", - "defaultGround": "默认地面的图块ID(terrains中) \n$select({\"values\":Object.keys(editor.core.icons.icons.terrains)})$end", - "images": "背景/前景图;你可以选择一张图片来作为背景/前景素材。详细用法请参见文档“自定义素材”中的说明。 \n$leaf(true)$end", - "color": "该层的默认画面色调。本项可不写(代表无色调),如果写需要是一个RGBA数组。 \n$leaf(true)$end", - "weather": "该层的默认天气。本项可忽略表示晴天,如果写则第一项为\"rain\"或\"snow\"代表雨雪,第二项为1-10之间的数代表强度。 \n$leaf(true)$end", - "bgm": "到达该层后默认播放的BGM。本项可忽略。 ", - //"map": "地图数据,需要是13x13,建议使用地图生成器来生成 ", - "item_ratio": "每一层的宝石/血瓶效果,即获得宝石和血瓶时框内\"ratio\"的值。$range((thiseval==~~thiseval && thiseval>0)||thiseval==null)$end", - "firstArrive": "第一次到该楼层触发的事件 \n$leaf(true)$end", + "items_template" : {'cls': 'items', 'name': '新物品'}, + "enemys": { + "_leaf": false, + "_type": "object", + "_data": { + "name": { + "_leaf": true, + "_type": "textarea", + "_data": "名称" + }, + "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", + "_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:重生\n\n多个属性例如用[1,4,11]表示先攻2连击吸血\n模仿怪的攻防设为0就好" + }, + "value": { + "_leaf": true, + "_type": "textarea", + "_data": "特殊属性的数值\n领域怪需要加value表示领域伤害的数值\n吸血怪需要在后面添加value代表吸血比例" + }, + "zoneSquare": { + "_leaf": true, + "_type": "textarea", + "_data": "领域怪zoneSquare代表是否九宫格伤害" + }, + "range": { + "_leaf": true, + "_type": "textarea", + "_range": "(thiseval==~~thiseval && thiseval>0)||thiseval==null", + "_data": "range可选,代表领域伤害的范围;不加默认为1" + }, + "bomb": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "加入 \"bomb\": false 代表该怪物不可被炸弹或圣锤炸掉" + }, + "n": { + "_leaf": true, + "_type": "textarea", + "_range": "(thiseval==~~thiseval && thiseval>0)||thiseval==null", + "_data": "多连击需要在后面指定n代表是几连击" + }, + "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": "战前扣血的点数" + } + } }, - 'loc' : { - "events": "该楼的所有可能事件列表 \n$leaf(true)$end", - "changeFloor": "楼层转换事件;该事件不能和上面的events有冲突(同位置点),否则会被覆盖 \n$leaf(true)$end", - "afterBattle": "战斗后可能触发的事件列表 \n$leaf(true)$end", - "afterGetItem": "获得道具后可能触发的事件列表 \n$leaf(true)$end", - "afterOpenDoor": "开完门后可能触发的事件列表 \n$leaf(true)$end", - "cannotMove": "每个图块不可通行的方向 \n 可以在这里定义每个点不能前往哪个方向,例如悬崖边不能跳下去 \n'x,y': ['up', 'left'], // (x,y)点不能往上和左走\n$leaf(true)$end", + "enemys_template" : {'name': '新敌人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, + "maps": { + "_leaf": false, + "_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", + "ski", + "pushBox" + ] + }, + "_data": "图块的默认触发器" + }, + "noPass": { + "_leaf": true, + "_type": "select", + "_select": { + "values": [ + null, + true, + false + ] + }, + "_data": "图块默认可通行状态" + } + } + }, + "floors": { + "_leaf": false, + "_type": "object", + "_data": { + "floor": { + "_leaf": false, + "_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": "显示在状态栏中的层数" + }, + "canFlyTo": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "该楼能否被楼传器飞到(不能的话在该楼也不允许使用楼传器)" + }, + "canUseQuickShop": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "该层是否允许使用快捷商店" + }, + "defaultGround": { + "_leaf": true, + "_type": "select", + "_select": { + "values": Object.keys(editor.core.icons.icons.terrains) + }, + "_data": "默认地面的图块ID(terrains中)" + }, + "images": { + "_leaf": true, + "_type": "textarea", + "_data": "背景/前景图;你可以选择一张图片来作为背景/前景素材。详细用法请参见文档“自定义素材”中的说明。" + }, + "color": { + "_leaf": true, + "_type": "textarea", + "_data": "该层的默认画面色调。本项可不写(代表无色调),如果写需要是一个RGBA数组。" + }, + "weather": { + "_leaf": true, + "_type": "textarea", + "_data": "该层的默认天气。本项可忽略表示晴天,如果写则第一项为\"rain\"或\"snow\"代表雨雪,第二项为1-10之间的数代表强度。" + }, + "bgm": { + "_leaf": true, + "_type": "textarea", + "_data": "到达该层后默认播放的BGM。本项可忽略。" + }, + "item_ratio": { + "_leaf": true, + "_type": "textarea", + "_range": "(thiseval==~~thiseval && thiseval>0)||thiseval==null", + "_data": "每一层的宝石/血瓶效果,即获得宝石和血瓶时框内\"ratio\"的值。" + }, + "firstArrive": { + "_leaf": true, + "_type": "event", + "_event": "firstArrive", + "_data": "第一次到该楼层触发的事件" + } + } + }, + "loc": { + "_leaf": false, + "_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", + "_data": "每个图块不可通行的方向 \n 可以在这里定义每个点不能前往哪个方向,例如悬崖边不能跳下去 \n'x,y': ['up', 'left'], // (x,y)点不能往上和左走" + } + } + } + } } - }, - /* - 'floors_template' : { - "floorId": "tempfloor", - "title": "主塔 0 层", - "name": "0", - "canFlyTo": true, - "canUseQuickShop": true, - "defaultGround": "ground", - "map": [ - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] - ], - "firstArrive": [], - "events": {}, - "changeFloor": {}, - "afterBattle": {}, - "afterGetItem": {}, - "afterOpenDoor": {} - }, */ + } } \ No newline at end of file diff --git a/project/data.comment.js b/project/data.comment.js index 0a5abf32..40a8daa0 100644 --- a/project/data.comment.js +++ b/project/data.comment.js @@ -1,179 +1,540 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { - "main": { - "floorIds": " 在这里按顺序放所有的楼层;其顺序直接影响到楼层传送器的顺序和上楼器/下楼器的顺序 \n$leaf(true)$end", - "images": " 在此存放所有可能使用的图片 \n 图片可以被作为背景图(的一部分),也可以直接用自定义事件进行显示。 \n 图片名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好 \n 建议对于较大的图片,在网上使用在线的“图片压缩工具(http://compresspng.com/zh/)”来进行压缩,以节省流量 \n 依次向后添加 \n$leaf(true)$end", - "animates": " 在此存放所有可能使用的动画,必须是animate格式,在这里不写后缀名 \n 动画必须放在animates目录下;文件名不能使用中文,不能带空格或特殊字符 \n \"jianji\", \"thunder\" \n 根据需求自行添加 \n$leaf(true)$end", - "bgms": " 在此存放所有的bgm,和文件名一致。第一项为默认播放项 \n 音频名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好 \n$leaf(true)$end", - "sounds": " 在此存放所有的SE,和文件名一致 \n 音频名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好 \n$leaf(true)$end", - "bgmRemote" : " 是否使用远程的背景音乐;此项一般不要开启 \n$select({\"values\":[false]})$end", - "startBackground" : "标题界面的背景,建议使用jpg格式以压缩背景图空间", - "startLogoStyle" : "标题样式:可以改变颜色,也可以隐藏标题(如果背景图自带)", - "levelChoose" : " 难度选择:每个数组的第一个是其在标题界面显示的难度,第二个是在游戏内部传输的字符串,会显示在状态栏,修改此处后需要在project/functions中作相应更改 \n$leaf(true)$end" - }, - "firstData": { - "title": " 游戏名,将显示在标题页面以及切换楼层的界面中 ", - "name": " 游戏的唯一英文标识符。由英文、数字、下划线组成,不能超过20个字符。 ", - "version": " 当前游戏版本;版本不一致的存档不能通用。 ", - "floorId": " 初始楼层ID ", - "hero": { - "name": " 勇士初始数据 \n 勇士名;可以改成喜欢的 ", - "lv": " 初始等级,该项必须为正整数 \n$range(thiseval==~~thiseval &&thiseval>0)$end", - "hpmax": " 初始生命上限,只有在enableHPMax开启时才有效", - "hp": " 初始生命值 ", - "atk": " 初始攻击 ", - "def": " 初始防御 ", - "mdef": " 初始魔防 ", - "money": " 初始金币 ", - "experience": " 初始经验 ", - "items": { - "keys": " 初始道具个数 \n$leaf(true)$end"/* { - "yellowKey": " 初始道具个数 ", - "blueKey": "", - "redKey": "" - } */, - "constants": "\n$leaf(true)$end", - "tools": "\n$leaf(true)$end" - }, - "flyRange": " 初始可飞的楼层;一般留空数组即可 \n$leaf(true)$end", - "loc": { - "direction": " 勇士初始位置 ", - "x": "", - "y": "" - }, - "flags": " 游戏过程中的变量或flags \n$leaf(true)$end"/* { - "poison": " 游戏过程中的变量或flags \n 毒 ", - "weak": " 衰 ", - "curse": " 咒 " - } */, - "steps": " 行走步数统计 ", + "_leaf": false, + "_type": "object", + "_data": { + "main": { + "_leaf": false, + "_type": "object", + "_data": { + "floorIds": { + "_leaf": true, + "_type": "textarea", + "_data": "在这里按顺序放所有的楼层;其顺序直接影响到楼层传送器的顺序和上楼器/下楼器的顺序" + }, + "images": { + "_leaf": true, + "_type": "textarea", + "_data": "在此存放所有可能使用的图片 \n 图片可以被作为背景图(的一部分),也可以直接用自定义事件进行显示。 \n 图片名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好 \n 建议对于较大的图片,在网上使用在线的“图片压缩工具(http://compresspng.com/zh/)”来进行压缩,以节省流量 \n 依次向后添加" + }, + "animates": { + "_leaf": true, + "_type": "textarea", + "_data": "在此存放所有可能使用的动画,必须是animate格式,在这里不写后缀名 \n 动画必须放在animates目录下;文件名不能使用中文,不能带空格或特殊字符 \n \"jianji\", \"thunder\" \n 根据需求自行添加" + }, + "bgms": { + "_leaf": true, + "_type": "textarea", + "_data": "在此存放所有的bgm,和文件名一致。第一项为默认播放项 \n 音频名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好" + }, + "sounds": { + "_leaf": true, + "_type": "textarea", + "_data": "在此存放所有的SE,和文件名一致 \n 音频名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好" + }, + "bgmRemote": { + "_leaf": true, + "_type": "select", + "_select": { + "values": [ + false + ] + }, + "_data": "是否使用远程的背景音乐;此项一般不要开启" + }, + "startBackground": { + "_leaf": true, + "_type": "textarea", + "_data": "标题界面的背景,建议使用jpg格式以压缩背景图空间" + }, + "startLogoStyle": { + "_leaf": true, + "_type": "textarea", + "_data": "标题样式:可以改变颜色,也可以隐藏标题(如果背景图自带)" + }, + "levelChoose": { + "_leaf": true, + "_type": "textarea", + "_data": "难度选择:每个数组的第一个是其在标题界面显示的难度,第二个是在游戏内部传输的字符串,会显示在状态栏,修改此处后需要在project/functions中作相应更改" + } + } }, - "startText": " 游戏开始前剧情。如果无剧情直接留一个空数组即可。 \n$leaf(true)$end", - "shops": "全局商店\n$leaf(true)$end",/*{ - "moneyShop1": { - "name": " 定义全局商店(即快捷商店) \n 商店唯一ID \n 商店名称(标题) ", - "icon": " 商店图标,blueShop为蓝色商店,pinkShop为粉色商店 ", - "textInList": " 在快捷商店栏中显示的名称 ", - "use": " 商店所要使用的。只能是\"money\"或\"experience\"。 ", - "need": " 商店需要的金币/经验数值;可以是一个表达式,以times作为参数计算。 \n 这里用到的times为该商店的已经的访问次数。首次访问该商店时times的值为0。 \n 上面的例子是50层商店的计算公式。你也可以写任意其他的计算公式,只要以times作为参数即可。 \n 例如: \"need\": \"25\" 就是恒定需要25金币的商店; \"need\": \"20+2*times\" 就是第一次访问要20金币,以后每次递增2金币的商店。 \n 如果是对于每个选项有不同的计算公式,写 \"need\": \"-1\" 即可。可参见下面的经验商店。 ", - "text": " 显示的文字,需手动加换行符。可以使用${need}表示上面的need值。 ", - "choices": [ - { - "text": "", - "effect": " 商店的选项 \n 如果有多个effect以分号分开,参见下面的经验商店 " - }, - { - "text": "", - "effect": "" - }, - { - "text": "", - "effect": "" - }, - { - "text": "", - "effect": " effect只能对status和item进行操作,不能修改flag值。 \n 必须是X+=Y的形式,其中Y可以是一个表达式,以status:xxx或item:xxx为参数 \n 其他effect样例: \n \"item:yellowKey+=1\" 黄钥匙+1 \n \"item:pickaxe+=3\" 破墙镐+3 \n \"status:hp+=2*(status:atk+status:def)\" 将生命提升攻防和的数值的两倍 " + "firstData": { + "_leaf": false, + "_type": "object", + "_data": { + "title": { + "_leaf": true, + "_type": "textarea", + "_data": "游戏名,将显示在标题页面以及切换楼层的界面中" + }, + "name": { + "_leaf": true, + "_type": "textarea", + "_data": "游戏的唯一英文标识符。由英文、数字、下划线组成,不能超过20个字符。" + }, + "version": { + "_leaf": true, + "_type": "textarea", + "_data": "当前游戏版本;版本不一致的存档不能通用。" + }, + "floorId": { + "_leaf": true, + "_type": "textarea", + "_data": "初始楼层ID" + }, + "hero": { + "_leaf": false, + "_type": "object", + "_data": { + "name": { + "_leaf": true, + "_type": "textarea", + "_data": "勇士初始数据 \n 勇士名;可以改成喜欢的" + }, + "lv": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval==~~thiseval &&thiseval>0", + "_data": "初始等级,该项必须为正整数" + }, + "hpmax": { + "_leaf": true, + "_type": "textarea", + "_data": "初始生命上限,只有在enableHPMax开启时才有效" + }, + "hp": { + "_leaf": true, + "_type": "textarea", + "_data": "初始生命值" + }, + "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": "初始经验" + }, + "items": { + "_leaf": false, + "_type": "object", + "_data": { + "keys": { + "_leaf": true, + "_type": "textarea", + "_data": "初始道具个数" + }, + "constants": { + "_leaf": true, + "_type": "textarea", + "_data": "" + }, + "tools": { + "_leaf": true, + "_type": "textarea", + "_data": "" + } + } + }, + "flyRange": { + "_leaf": true, + "_type": "textarea", + "_data": "初始可飞的楼层;一般留空数组即可" + }, + "loc": { + "_leaf": false, + "_type": "object", + "_data": { + "direction": { + "_leaf": true, + "_type": "textarea", + "_data": "勇士初始位置" + }, + "x": { + "_leaf": true, + "_type": "textarea", + "_data": "" + }, + "y": { + "_leaf": true, + "_type": "textarea", + "_data": "" + } + } + }, + "flags": { + "_leaf": true, + "_type": "textarea", + "_data": "游戏过程中的变量或flags" + }, + "steps": { + "_leaf": true, + "_type": "textarea", + "_data": "行走步数统计" + } } - ] - }, - "expShop1": { - "name": " 商店唯一ID ", - "icon": "", - "textInList": "", - "use": " 该商店使用的是经验进行计算 ", - "need": " 如果是对于每个选项所需要的数值不同,这里直接写-1,然后下面选项里给定具体数值 ", - "text": "", - "choices": [ - { - "text": "", - "need": "", - "effect": " 在choices中写need,可以针对每个选项都有不同的需求。 \n 这里的need同样可以以times作为参数,比如 \"need\": \"100+20*times\" 多个effect直接以分号分开即可。如上面的意思是生命+1000,攻击+7,防御+7。 " - }, - { - "text": "", - "need": "", - "effect": "" - }, - { - "text": "", - "need": "", - "effect": "" - } - ] + }, + "startText": { + "_leaf": true, + "_type": "event", + "_event": "firstArrive", + "_data": "游戏开始前剧情。如果无剧情直接留一个空数组即可。" + }, + "shops": { + "_leaf": true, + "_type": "textarea", + "_data": "全局商店" + }, + "levelUp": { + "_leaf": true, + "_type": "textarea", + "_data": "经验升级所需要的数值,是一个数组 \n 第一项为初始等级,可以简单留空,也可以写name \n 每一个里面可以含有三个参数 need, name, effect \n need为所需要的经验数值,是一个正整数。请确保need所需的依次递增 \n name为该等级的名称,也可以省略代表使用系统默认值;本项将显示在状态栏中 \n effect为本次升级所执行的操作,可由若干项组成,由分号分开 \n 其中每一项写法和上面的商店完全相同,同样必须是X+=Y的形式,Y是一个表达式,同样可以使用status:xxx或item:xxx代表勇士的某项数值/道具个数" + } } - },*/ - "levelUp": " 经验升级所需要的数值,是一个数组 \n 第一项为初始等级,可以简单留空,也可以写name \n 每一个里面可以含有三个参数 need, name, effect \n need为所需要的经验数值,是一个正整数。请确保need所需的依次递增 \n name为该等级的名称,也可以省略代表使用系统默认值;本项将显示在状态栏中 \n effect为本次升级所执行的操作,可由若干项组成,由分号分开 \n 其中每一项写法和上面的商店完全相同,同样必须是X+=Y的形式,Y是一个表达式,同样可以使用status:xxx或item:xxx代表勇士的某项数值/道具个数 \n$leaf(true)$end"/* [ - " 经验升级所需要的数值,是一个数组 \n 第一项为初始等级,可以简单留空,也可以写name \n 每一个里面可以含有三个参数 need, name, effect \n need为所需要的经验数值,是一个正整数。请确保need所需的依次递增 \n name为该等级的名称,也可以省略代表使用系统默认值;本项将显示在状态栏中 \n effect为本次升级所执行的操作,可由若干项组成,由分号分开 \n 其中每一项写法和上面的商店完全相同,同样必须是X+=Y的形式,Y是一个表达式,同样可以使用status:xxx或item:xxx代表勇士的某项数值/道具个数 \n$leaf(true)$end", - { - "need": "", - "name": "", - "effect": " 先将生命提升攻防和的2倍;再将攻击+10,防御+10 " - }, - { - "need": "", - "effect": " effect也允许写一个function,代表本次升级将会执行的操作 \n 依次往下写需要的数值即可 " + }, + "values": { + "_leaf": false, + "_type": "object", + "_data": { + "lavaDamage": { + "_leaf": true, + "_type": "textarea", + "_data": "各种数值;一些数值可以在这里设置\n /****** 角色相关 ******/ \n 经过血网受到的伤害" + }, + "poisonDamage": { + "_leaf": true, + "_type": "textarea", + "_data": "中毒后每步受到的伤害" + }, + "weakValue": { + "_leaf": true, + "_type": "textarea", + "_data": "衰弱状态下攻防减少的数值" + }, + "redJewel": { + "_leaf": true, + "_type": "textarea", + "_data": "/****** 道具相关 ******/ \n 红宝石加攻击的数值" + }, + "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": "绿血瓶加血数值" + }, + "sword0": { + "_leaf": true, + "_type": "textarea", + "_data": "默认装备折断的剑的攻击力" + }, + "shield0": { + "_leaf": true, + "_type": "textarea", + "_data": "默认装备残破的盾的防御力" + }, + "sword1": { + "_leaf": true, + "_type": "textarea", + "_data": "铁剑加攻数值" + }, + "shield1": { + "_leaf": true, + "_type": "textarea", + "_data": "铁盾加防数值" + }, + "sword2": { + "_leaf": true, + "_type": "textarea", + "_data": "银剑加攻数值" + }, + "shield2": { + "_leaf": true, + "_type": "textarea", + "_data": "银盾加防数值" + }, + "sword3": { + "_leaf": true, + "_type": "textarea", + "_data": "骑士剑加攻数值" + }, + "shield3": { + "_leaf": true, + "_type": "textarea", + "_data": "骑士盾加防数值" + }, + "sword4": { + "_leaf": true, + "_type": "textarea", + "_data": "圣剑加攻数值" + }, + "shield4": { + "_leaf": true, + "_type": "textarea", + "_data": "圣盾加防数值" + }, + "sword5": { + "_leaf": true, + "_type": "textarea", + "_data": "神圣剑加攻数值" + }, + "shield5": { + "_leaf": true, + "_type": "textarea", + "_data": "神圣盾加防数值" + }, + "moneyPocket": { + "_leaf": true, + "_type": "textarea", + "_data": "金钱袋加金币的数值" + }, + "breakArmor": { + "_leaf": true, + "_type": "textarea", + "_data": "/****** 怪物相关 ******/ \n 破甲的比例(战斗前,怪物附加角色防御的x%作为伤害)" + }, + "counterAttack": { + "_leaf": true, + "_type": "textarea", + "_data": "反击的比例(战斗时,怪物每回合附加角色攻击的x%作为伤害,无视角色防御)" + }, + "purify": { + "_leaf": true, + "_type": "textarea", + "_data": "净化的比例(战斗前,怪物附加勇士魔防的x倍作为伤害)" + }, + "hatred": { + "_leaf": true, + "_type": "textarea", + "_data": "仇恨属性中,每杀死一个怪物获得的仇恨值" + }, + "animateSpeed": { + "_leaf": true, + "_type": "textarea", + "_data": "/****** 系统相关 ******/ \n 动画时间" + } } - ] */ - }, - "values": { - "lavaDamage": " 各种数值;一些数值可以在这里设置\n /****** 角色相关 ******/ \n 经过血网受到的伤害 ", - "poisonDamage": " 中毒后每步受到的伤害 ", - "weakValue": " 衰弱状态下攻防减少的数值 ", - "redJewel": " /****** 道具相关 ******/ \n 红宝石加攻击的数值 ", - "blueJewel": " 蓝宝石加防御的数值 ", - "greenJewel": " 绿宝石加魔防的数值 ", - "redPotion": " 红血瓶加血数值 ", - "bluePotion": " 蓝血瓶加血数值 ", - "yellowPotion": " 黄血瓶加血数值 ", - "greenPotion": " 绿血瓶加血数值 ", - "sword0": " 默认装备折断的剑的攻击力 \n$leaf(true)$end", - "shield0": " 默认装备残破的盾的防御力 \n$leaf(true)$end", - "sword1": " 铁剑加攻数值 \n$leaf(true)$end", - "shield1": " 铁盾加防数值 \n$leaf(true)$end", - "sword2": " 银剑加攻数值 \n$leaf(true)$end", - "shield2": " 银盾加防数值 \n$leaf(true)$end", - "sword3": " 骑士剑加攻数值 \n$leaf(true)$end", - "shield3": " 骑士盾加防数值 \n$leaf(true)$end", - "sword4": " 圣剑加攻数值 \n$leaf(true)$end", - "shield4": " 圣盾加防数值 \n$leaf(true)$end", - "sword5": " 神圣剑加攻数值 \n$leaf(true)$end", - "shield5": " 神圣盾加防数值 \n$leaf(true)$end", - "moneyPocket": " 金钱袋加金币的数值 ", - "breakArmor": " /****** 怪物相关 ******/ \n 破甲的比例(战斗前,怪物附加角色防御的x%作为伤害) ", - "counterAttack": " 反击的比例(战斗时,怪物每回合附加角色攻击的x%作为伤害,无视角色防御) ", - "purify": " 净化的比例(战斗前,怪物附加勇士魔防的x倍作为伤害) ", - "hatred": " 仇恨属性中,每杀死一个怪物获得的仇恨值 ", - "animateSpeed": " /****** 系统相关 ******/ \n 动画时间 " - }, - "flags": { - "enableFloor": " 系统FLAG,在游戏运行中中请不要修改它。 /****** 状态栏相关 ******/ \n 是否在状态栏显示当前楼层 \n$select({\"values\":[true,false]})$end", - "enableLv": " 是否在状态栏显示当前等级 \n$select({\"values\":[true,false]})$end", - "enableHPMax": " 是否是否启用生命上限 \n$select({\"values\":[true,false]})$end", - "enableMDef": " 是否在状态栏及战斗界面显示魔防(护盾) \n$select({\"values\":[true,false]})$end", - "enableMoney": " 是否在状态栏、怪物手册及战斗界面显示金币 \n$select({\"values\":[true,false]})$end", - "enableExperience": " 是否在状态栏、怪物手册及战斗界面显示经验 \n$select({\"values\":[true,false]})$end", - "enableLevelUp": " 是否允许等级提升(进阶);如果上面enableExperience为false,则此项恒视为false \n$select({\"values\":[true,false]})$end", - "enableDebuff": " 是否涉及毒衰咒;如果此项为false则不会在状态栏中显示毒衰咒的debuff ////// 上述的几个开关将直接影响状态栏的显示效果 ////// \n$select({\"values\":[true,false]})$end", - "flyNearStair": " /****** 道具相关 ******/ \n 是否需要在楼梯边使用传送器 \n$select({\"values\":[true,false]})$end", - "pickaxeFourDirections": " 使用破墙镐是否四个方向都破坏;如果false则只破坏面前的墙壁 \n$select({\"values\":[true,false]})$end", - "bombFourDirections": " 使用炸弹是否四个方向都会炸;如果false则只炸面前的怪物(即和圣锤等价) \n$select({\"values\":[true,false]})$end", - "bigKeyIsBox": " 如果此项为true,则视为钥匙盒,红黄蓝钥匙+1;若为false,则视为大黄门钥匙 \n$select({\"values\":[true,false]})$end", - "equipment": " 剑和盾是否直接作为装备。如果此项为true,则作为装备,需要在道具栏使用,否则将直接加属性。 \n$select({\"values\":[true,false]})$end", - "enableDeleteItem": " 是否允许删除(丢弃)道具 \n$select({\"values\":[true,false]})$end", - "enableAddPoint": " /****** 怪物相关 ******/ \n 是否支持加点 \n$select({\"values\":[true,false]})$end", - "enableNegativeDamage": "是否支持负伤害(回血) \n$select({\"values\":[true,false]})$end", - "hatredDecrease": " 是否在和仇恨怪战斗后减一半的仇恨值,此项为false则和仇恨怪不会扣减仇恨值。 \n$select({\"values\":[true,false]})$end", - "betweenAttackCeil": " 夹击方式是向上取整还是向下取整。如果此项为true则为向上取整,为false则为向下取整 \n$select({\"values\":[true,false]})$end", - "startDirectly": " /****** 系统相关 ******/ \n 点击“开始游戏”后是否立刻开始游戏而不显示难度选择界面 \n$select({\"values\":[true,false]})$end", - "canOpenBattleAnimate": " 是否允许用户开启战斗过程;如果此项为false,则下面两项均强制视为false \n$select({\"values\":[true,false]})$end", - "showBattleAnimateConfirm": " 是否在游戏开始时提供“是否开启战斗动画”的选项 \n$select({\"values\":[true,false]})$end", - "battleAnimate": " 是否默认显示战斗动画;用户可以手动在菜单栏中开关 \n$select({\"values\":[true,false]})$end", - "displayEnemyDamage": " 是否地图怪物显伤;用户可以手动在菜单栏中开关 \n$select({\"values\":[true,false]})$end", - "displayExtraDamage": " 是否地图高级显伤(领域、夹击等);用户可以手动在菜单栏中开关 \n$select({\"values\":[true,false]})$end", - "enableGentleClick": " 是否允许轻触(获得面前物品) \n$select({\"values\":[true,false]})$end", - "potionWhileRouting": " 寻路算法是否经过血瓶;如果该项为false,则寻路算法会自动尽量绕过血瓶 \n$select({\"values\":[true,false]})$end", - "enableViewMaps": " 是否支持在菜单栏中查看所有楼层的地图 \n$select({\"values\":[true,false]})$end", - "portalWithoutTrigger": " 经过楼梯、传送门时是否能“穿透”。穿透的意思是,自动寻路得到的的路径中间经过了楼梯,行走时是否触发楼层转换事件 \n$select({\"values\":[true,false]})$end", - "enableMoveDirectly": " 是否允许瞬间移动 \n$select({\"values\":[true,false]})$end" + }, + "flags": { + "_leaf": false, + "_type": "object", + "_data": { + "enableFloor": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "系统FLAG,在游戏运行中中请不要修改它。 /****** 状态栏相关 ******/ \n 是否在状态栏显示当前楼层" + }, + "enableLv": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否在状态栏显示当前等级" + }, + "enableHPMax": { + "_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" + }, + "enableDebuff": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否涉及毒衰咒;如果此项为false则不会在状态栏中显示毒衰咒的debuff ////// 上述的几个开关将直接影响状态栏的显示效果 //////" + }, + "flyNearStair": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "/****** 道具相关 ******/ \n 是否需要在楼梯边使用传送器" + }, + "pickaxeFourDirections": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "使用破墙镐是否四个方向都破坏;如果false则只破坏面前的墙壁" + }, + "bombFourDirections": { + "_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,则作为装备,需要在道具栏使用,否则将直接加属性。" + }, + "enableDeleteItem": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否允许删除(丢弃)道具" + }, + "enableAddPoint": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "/****** 怪物相关 ******/ \n 是否支持加点" + }, + "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则为向下取整" + }, + "startDirectly": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "/****** 系统相关 ******/ \n 点击“开始游戏”后是否立刻开始游戏而不显示难度选择界面" + }, + "canOpenBattleAnimate": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否允许用户开启战斗过程;如果此项为false,则下面两项均强制视为false" + }, + "showBattleAnimateConfirm": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否在游戏开始时提供“是否开启战斗动画”的选项" + }, + "battleAnimate": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否默认显示战斗动画;用户可以手动在菜单栏中开关" + }, + "displayEnemyDamage": { + "_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,则寻路算法会自动尽量绕过血瓶" + }, + "enableViewMaps": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否支持在菜单栏中查看所有楼层的地图" + }, + "portalWithoutTrigger": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "经过楼梯、传送门时是否能“穿透”。穿透的意思是,自动寻路得到的的路径中间经过了楼梯,行走时是否触发楼层转换事件" + }, + "enableMoveDirectly": { + "_leaf": true, + "_type": "checkbox", + "_bool": "bool", + "_data": "是否允许瞬间移动" + } + } + } } } \ No newline at end of file diff --git a/project/functions.comment.js b/project/functions.comment.js index 7a07aa1e..dd9466e7 100644 --- a/project/functions.comment.js +++ b/project/functions.comment.js @@ -1,25 +1,115 @@ functions_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { - "events" : { - "initGame": "游戏开始前的一些初始化操作", - "setInitData" : "不同难度分别设置初始属性", - "win" : "游戏获胜事件", - "lose" : "游戏失败事件", - "afterChangeFloor":"转换楼层结束的事件", - "addPoint":"加点事件", - "afterBattle" : "战斗结束后触发的事件", - "afterOpenDoor" : "开一个门后触发的事件", - "afterChangeLight" : "改变亮灯之后,可以触发的事件", - "afterPushBox" : "推箱子后的事件", - "afterUseBomb" : "使用炸弹/圣锤后的事件", - "beforeSaveData" : "即将存档前可以执行的操作", - "afterLoadData" : "读档事件后,载入事件前,可以执行的操作" - - }, - "ui" : { - "drawAbout" : "绘制“关于”界面" - }, - "plugins": { - "plugin": "自定义插件编写" + "_leaf": false, + "_type": "object", + "_data": { + "events": { + "_leaf": false, + "_type": "object", + "_data": { + "initGame": { + "_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": "游戏失败事件" + }, + "afterChangeFloor": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "转换楼层结束的事件" + }, + "addPoint": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "加点事件" + }, + "afterBattle": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "战斗结束后触发的事件" + }, + "afterOpenDoor": { + "_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": "使用炸弹/圣锤后的事件" + }, + "beforeSaveData": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "即将存档前可以执行的操作" + }, + "afterLoadData": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "读档事件后,载入事件前,可以执行的操作" + } + } + }, + "ui": { + "_leaf": false, + "_type": "object", + "_data": { + "drawAbout": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "绘制“关于”界面" + } + } + }, + "plugins": { + "_leaf": false, + "_type": "object", + "_data": { + "plugin": { + "_leaf": true, + "_type": "textarea", + "_lint": true, + "_data": "自定义插件编写" + } + } + } } } \ No newline at end of file