Merge pull request #92 from ckcz123/v2.0

V2.0
This commit is contained in:
Zhang Chen 2018-03-17 23:32:26 +08:00 committed by GitHub
commit a20d404b21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 1390 additions and 521 deletions

View File

@ -109,6 +109,7 @@
function getCompletions(token, context, keywords, options) { function getCompletions(token, context, keywords, options) {
var found = [], start = token.string, global = options && options.globalScope || window; var found = [], start = token.string, global = options && options.globalScope || window;
function maybeAdd(str) { function maybeAdd(str) {
if (str==null || str==undefined) return;
if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str); if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);
} }
function gatherCompletions(obj) { function gatherCompletions(obj) {

View File

@ -125,7 +125,7 @@ $textarea(evalstr)$end
把选定`id_`的事件用blockly编辑 把选定`id_`的事件用blockly编辑
``` js ``` js
editor_blockly.import(id_); editor_blockly.import(id_,{type:'event'});
``` ```
把文本区域的代码转换成图块 把文本区域的代码转换成图块
@ -139,12 +139,12 @@ editor_blockly.parse();
编辑选定`id_`的文本域 编辑选定`id_`的文本域
``` js ``` js
editor_multi.import(id_) editor_multi.import(id_,{lint:true})
``` ```
编辑blockly方块的特定域 编辑blockly方块的特定域
``` js ``` js
editor_multi.multiLineEdit(value,b,f,callback) editor_multi.multiLineEdit(value,b,f,{lint:true},callback)
``` ```
### fs.js ### fs.js

View File

@ -167,10 +167,20 @@ div.etableInputDiv {
border: none; border: none;
} }
.etableInputDiv input { .etableInputDiv input[type="text"] {
} }
.etableInputDiv input[type="checkbox"] {
width: 16px;
height: 16px;
position: absolute;
left: 50%;
top: 50%;
margin-left: -8px;
margin-top: -8px;
}
.etableInputDiv select { .etableInputDiv select {
} }

View File

@ -323,6 +323,10 @@ editor.prototype.guid = function() {
}); });
} }
editor.prototype.HTMLescape = function(str_) {
return String(str_).split('').map(function(v){return '&#'+v.charCodeAt(0)+';'}).join('');
}
editor.prototype.listen = function() { editor.prototype.listen = function() {
var uc = eui.getContext('2d'); var uc = eui.getContext('2d');

View File

@ -213,7 +213,7 @@ var workspace = Blockly.inject(blocklyDiv,{
toolbox: document.getElementById('toolbox'), toolbox: document.getElementById('toolbox'),
zoom:{ zoom:{
controls: true, controls: true,
wheel: true,//false wheel: false,//滚轮改为上下(shift:左右)翻滚
startScale: 1.0, startScale: 1.0,
maxScale: 3, maxScale: 3,
minScale: 0.3, minScale: 0.3,
@ -230,6 +230,15 @@ window.addEventListener('resize', onresize, false);
onresize(); onresize();
Blockly.svgResize(workspace); Blockly.svgResize(workspace);
//Blockly.bindEventWithChecks_(workspace.svgGroup_,"wheel",workspace,function(e){});
document.getElementById('blocklyDiv').onmousewheel = function(e){
//console.log(e);
e.preventDefault();
var hvScroll = e.shiftKey?'hScroll':'vScroll';
workspace.scrollbar[hvScroll].handlePosition_+=( ((e.deltaY||0)+(e.detail||0)) <0?20:-20);
workspace.scrollbar[hvScroll].onScroll_();
workspace.setScale(workspace.scale);
}
var doubleClickCheck=[[0,'abc']]; var doubleClickCheck=[[0,'abc']];
function omitedcheckUpdateFunction(event) { function omitedcheckUpdateFunction(event) {
@ -344,26 +353,12 @@ editor_blockly.parse = function () {
editor_blockly.id=''; editor_blockly.id='';
editor_blockly.import = function(id_){ editor_blockly.import = function(id_,args){
var thisTr = document.getElementById(id_); var thisTr = document.getElementById(id_);
if(!thisTr)return false; if(!thisTr)return false;
var input = thisTr.children[2].children[0].children[0]; var input = thisTr.children[2].children[0].children[0];
var field = thisTr.children[0].getAttribute('title'); var field = thisTr.children[0].getAttribute('title');
var type = { var type = args.type;
"['events']":'event',
"['changeFloor']":'changeFloor',
"['afterBattle']":'afterBattle',
"['afterGetItem']":'afterGetItem',
"['afterOpenDoor']":'afterOpenDoor',
//"['firstData']['shops']":'shop',
"--shop--未完成数组的处理":'shop',
"['firstArrive']":'firstArrive',
"['firstData']['startText']":'firstArrive',
"--point--未完成数据转移":'point',
}[field];
if(!type)return false; if(!type)return false;
editor_blockly.id=id_; editor_blockly.id=id_;
codeAreaHL.setValue(input.value); codeAreaHL.setValue(input.value);
@ -430,7 +425,7 @@ editor_blockly.doubleClickBlock = function (blockId){
if(f){ if(f){
var value = b.getFieldValue(f); var value = b.getFieldValue(f);
//多行编辑 //多行编辑
editor_multi.multiLineEdit(value,b,f,function(newvalue,b,f){ editor_multi.multiLineEdit(value,b,f,{'lint':f==='RawEvalString_0'},function(newvalue,b,f){
if(textStringDict[b.type]!=='RawEvalString_0'){} if(textStringDict[b.type]!=='RawEvalString_0'){}
b.setFieldValue(newvalue.split('\n').join('\\n'),f); b.setFieldValue(newvalue.split('\n').join('\\n'),f);
}); });

View File

@ -149,10 +149,10 @@ editor_file = function(editor, callback){
saveSetting('maps',[["add","['"+idnum+"']",{'cls': info.images, 'id':id}]],tempcallback); saveSetting('maps',[["add","['"+idnum+"']",{'cls': info.images, 'id':id}]],tempcallback);
saveSetting('icons',[["add","['"+info.images+"']['"+id+"']",info.y]],tempcallback); saveSetting('icons',[["add","['"+info.images+"']['"+id+"']",info.y]],tempcallback);
if(info.images==='items'){ 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'){ 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); callback(null);
@ -176,7 +176,7 @@ editor_file = function(editor, callback){
callback([ callback([
(function(){ (function(){
var locObj_ ={}; 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') if (isset(editor.core.items[v][id]) && v!=='items')
locObj_[v]=editor.core.items[v][id]; locObj_[v]=editor.core.items[v][id];
else else
@ -184,7 +184,7 @@ editor_file = function(editor, callback){
}); });
locObj_['items']=(function(){ locObj_['items']=(function(){
var locObj=Object.assign({},editor.core.items.items[id]); 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])) if (!isset(editor.core.items.items[id][v]))
locObj[v]=null; locObj[v]=null;
}); });
@ -192,14 +192,14 @@ editor_file = function(editor, callback){
})(); })();
return locObj_; return locObj_;
})(), })(),
editor_file.comment.items, editor_file.comment._data.items,
err]); err]);
}); });
} else { } else {
callback([ callback([
(function(){ (function(){
var locObj_ ={}; 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') if (isset(editor.core.items[v][id]) && v!=='items')
locObj_[v]=editor.core.items[v][id]; locObj_[v]=editor.core.items[v][id];
else else
@ -207,7 +207,7 @@ editor_file = function(editor, callback){
}); });
locObj_['items']=(function(){ locObj_['items']=(function(){
var locObj=Object.assign({},editor.core.items.items[id]); 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])) if (!isset(editor.core.items.items[id][v]))
locObj[v]=null; locObj[v]=null;
}); });
@ -215,7 +215,7 @@ editor_file = function(editor, callback){
})(); })();
return locObj_; return locObj_;
})(), })(),
editor_file.comment.items, editor_file.comment._data.items,
null]); null]);
} }
//只有items.cls是items的才有itemEffect和itemEffectTip,keys和constants和tools只有items //只有items.cls是items的才有itemEffect和itemEffectTip,keys和constants和tools只有items
@ -238,7 +238,7 @@ editor_file = function(editor, callback){
callback([ callback([
(function(){ (function(){
var locObj=Object.assign({},editor.core.enemys.enemys[id]); 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])) if (!isset(editor.core.enemys.enemys[id][v]))
/* locObj[v]=editor.core.enemys.enemys[id][v]; /* locObj[v]=editor.core.enemys.enemys[id][v];
else */ else */
@ -246,14 +246,14 @@ editor_file = function(editor, callback){
}); });
return locObj; return locObj;
})(), })(),
editor_file.comment.enemys, editor_file.comment._data.enemys,
err]); err]);
}); });
} else { } else {
callback([ callback([
(function(){ (function(){
var locObj=Object.assign({},editor.core.enemys.enemys[id]); 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])) if (!isset(editor.core.enemys.enemys[id][v]))
/* locObj[v]=editor.core.enemys.enemys[id][v]; /* locObj[v]=editor.core.enemys.enemys[id][v];
else */ else */
@ -261,7 +261,7 @@ editor_file = function(editor, callback){
}); });
return locObj; return locObj;
})(), })(),
editor_file.comment.enemys, editor_file.comment._data.enemys,
null]); null]);
} }
} }
@ -283,28 +283,28 @@ editor_file = function(editor, callback){
callback([ callback([
(function(){ (function(){
var locObj=Object.assign({},editor.core.maps.blocksInfo[idnum]); 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])) if (!isset(editor.core.maps.blocksInfo[idnum][v]))
locObj[v]=null; locObj[v]=null;
}); });
locObj.idnum = idnum; locObj.idnum = idnum;
return locObj; return locObj;
})(), })(),
editor_file.comment.maps, editor_file.comment._data.maps,
null]); null]);
}); });
} else { } else {
callback([ callback([
(function(){ (function(){
var locObj=Object.assign({},editor.core.maps.blocksInfo[idnum]); 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])) if (!isset(editor.core.maps.blocksInfo[idnum][v]))
locObj[v]=null; locObj[v]=null;
}); });
locObj.idnum = idnum; locObj.idnum = idnum;
return locObj; return locObj;
})(), })(),
editor_file.comment.maps, editor_file.comment._data.maps,
null]); null]);
} }
} }
@ -328,7 +328,7 @@ editor_file = function(editor, callback){
callback([ callback([
(function(){ (function(){
var locObj={}; 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])) if (isset(editor.currentFloorData[v][x+','+y]))
locObj[v]=editor.currentFloorData[v][x+','+y]; locObj[v]=editor.currentFloorData[v][x+','+y];
else else
@ -336,14 +336,14 @@ editor_file = function(editor, callback){
}); });
return locObj; return locObj;
})(), })(),
editor_file.comment.floors.loc, editor_file.comment._data.floors._data.loc,
err]); err]);
}); });
} else { } else {
callback([ callback([
(function(){ (function(){
var locObj={}; 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])) if (isset(editor.currentFloorData[v][x+','+y]))
locObj[v]=editor.currentFloorData[v][x+','+y]; locObj[v]=editor.currentFloorData[v][x+','+y];
else else
@ -351,7 +351,7 @@ editor_file = function(editor, callback){
}); });
return locObj; return locObj;
})(), })(),
editor_file.comment.floors.loc, editor_file.comment._data.floors._data.loc,
null]); null]);
} }
@ -373,38 +373,38 @@ editor_file = function(editor, callback){
callback([ callback([
(function(){ (function(){
var locObj=Object.assign({},editor.currentFloorData); 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])) if (!isset(editor.currentFloorData[v]))
/* locObj[v]=editor.currentFloorData[v]; /* locObj[v]=editor.currentFloorData[v];
else */ else */
locObj[v]=null; 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[v]);
}); });
delete(locObj.map); delete(locObj.map);
return locObj; return locObj;
})(), })(),
editor_file.comment.floors.floor, editor_file.comment._data.floors._data.floor,
err]); err]);
}); });
} else { } else {
callback([ callback([
(function(){ (function(){
var locObj=Object.assign({},editor.currentFloorData); 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])) if (!isset(editor.currentFloorData[v]))
/* locObj[v]=editor.currentFloorData[v]; /* locObj[v]=editor.currentFloorData[v];
else */ else */
locObj[v]=null; 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[v]);
}); });
delete(locObj.map); delete(locObj.map);
return locObj; return locObj;
})(), })(),
editor_file.comment.floors.floor, editor_file.comment._data.floors._data.floor,
null]); null]);
} }
} }
@ -425,7 +425,7 @@ editor_file = function(editor, callback){
callback([ callback([
(function(){ (function(){
var locObj=Object.assign({'main':{}},editor.core.data); 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])) if (isset(editor.main[v]))
locObj.main[v]=editor.main[v]; locObj.main[v]=editor.main[v];
else else
@ -440,7 +440,7 @@ editor_file = function(editor, callback){
callback([ callback([
(function(){ (function(){
var locObj=Object.assign({'main':{}},editor.core.data); 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])) if (isset(editor.main[v]))
locObj.main[v]=editor.main[v]; locObj.main[v]=editor.main[v];
else else
@ -542,7 +542,7 @@ editor_file = function(editor, callback){
eval("icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1"+value[1]+'='+JSON.stringify(value[2])); eval("icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1"+value[1]+'='+JSON.stringify(value[2]));
}); });
var datastr='icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 = \n'; var datastr='icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 = \n';
datastr+=JSON.stringify(icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1,null,4); datastr+=JSON.stringify(icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1,null,'\t');
fs.writeFile('project/icons.js',encode(datastr),'base64',function(err, data){ fs.writeFile('project/icons.js',encode(datastr),'base64',function(err, data){
callback(err); callback(err);
}); });
@ -556,7 +556,7 @@ editor_file = function(editor, callback){
//datastr+=JSON.stringify(maps_90f36752_8815_4be8_b32b_d7fad1d0542e,null,4); //datastr+=JSON.stringify(maps_90f36752_8815_4be8_b32b_d7fad1d0542e,null,4);
var emap={}; var emap={};
var estr = JSON.stringify(maps_90f36752_8815_4be8_b32b_d7fad1d0542e,function(k,v){if(v.id!=null){var id_ = editor.guid();emap[id_]=JSON.stringify(v);return id_;}else return v},4); var estr = JSON.stringify(maps_90f36752_8815_4be8_b32b_d7fad1d0542e,function(k,v){if(v.id!=null){var id_ = editor.guid();emap[id_]=JSON.stringify(v);return id_;}else return v},'\t');
for(var id_ in emap){ for(var id_ in emap){
estr = estr.replace('"'+id_+'"',emap[id_]) estr = estr.replace('"'+id_+'"',emap[id_])
} }
@ -572,7 +572,7 @@ editor_file = function(editor, callback){
eval("items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a"+value[1]+'='+JSON.stringify(value[2])); eval("items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a"+value[1]+'='+JSON.stringify(value[2]));
}); });
var datastr='items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = \n'; var datastr='items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = \n';
datastr+=JSON.stringify(items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a,null,4); datastr+=JSON.stringify(items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a,null,'\t');
fs.writeFile('project/items.js',encode(datastr),'base64',function(err, data){ fs.writeFile('project/items.js',encode(datastr),'base64',function(err, data){
callback(err); callback(err);
}); });
@ -584,7 +584,7 @@ editor_file = function(editor, callback){
}); });
var datastr='enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = \n'; var datastr='enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = \n';
var emap={}; var emap={};
var estr = JSON.stringify(enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80,function(k,v){if(v.hp!=null){var id_ = editor.guid();emap[id_]=JSON.stringify(v);return id_;}else return v},4); var estr = JSON.stringify(enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80,function(k,v){if(v.hp!=null){var id_ = editor.guid();emap[id_]=JSON.stringify(v);return id_;}else return v},'\t');
for(var id_ in emap){ for(var id_ in emap){
estr = estr.replace('"'+id_+'"',emap[id_]) estr = estr.replace('"'+id_+'"',emap[id_])
} }
@ -598,8 +598,10 @@ editor_file = function(editor, callback){
actionList.forEach(function (value) { actionList.forEach(function (value) {
eval("data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d"+value[1]+'='+JSON.stringify(value[2])); eval("data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d"+value[1]+'='+JSON.stringify(value[2]));
}); });
if (data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main.floorIds.indexOf(data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.firstData.floorId)<0)
data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.firstData.floorId = data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main.floorIds[0];
var datastr='data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = \n'; var datastr='data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = \n';
datastr+=JSON.stringify(data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d,null,4); datastr+=JSON.stringify(data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d,null,'\t');
fs.writeFile('project/data.js',encode(datastr),'base64',function(err, data){ fs.writeFile('project/data.js',encode(datastr),'base64',function(err, data){
callback(err); callback(err);
}); });

View File

@ -34,6 +34,141 @@ editor_mode.prototype.init_dom_ids = function(callback){
} }
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
editor_mode.prototype.objToTable_ = function(obj,commentObj){
var outstr=["\n<tr><td>条目</td><td>注释</td><td>值</td></tr>\n"];
var guids=[];
var defaultcobj={
_type:'textarea',
_data:'',
_string:function(args){//object~[field,cfield,vobj,cobj]
var thiseval = args.vobj;
return (typeof(thiseval) === typeof('')) && thiseval[0]==='"';
},
_leaf:function(args){//object~[field,cfield,vobj,cobj]
var thiseval = args.vobj;
if (thiseval == null || thiseval == undefined)return true;//null,undefined
if (typeof(thiseval) === typeof(''))return true;//字符串
if (Object.keys(thiseval).length === 0)return true;//数字,true,false,空数组,空对象
return false;
},
}
var recursionParse = function(pfield,pcfield,pvobj,pcobj) {
for(var ii in pvobj){
var field = pfield+"['"+ii+"']";
var cfield = pcfield+"['_data']['"+ii+"']";
var vobj = pvobj[ii];
var cobj = null;
if(pcobj && pcobj['_data'] && pcobj['_data'][ii]){
cobj = Object.assign({},defaultcobj,pcobj['_data'][ii]);
} else {
if(pcobj && (pcobj['_data'] instanceof Function))cobj = Object.assign({},defaultcobj,pcobj['_data'](ii));
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);
}
if (cobj._leaf) {
var leafnode = editor_mode.objToTr_(obj,commentObj,field,cfield,vobj,cobj);
outstr.push(leafnode[0]);
guids.push(leafnode[1]);
} else {
outstr.push(["<tr><td>----</td><td>----</td><td>",field,"</td></tr>\n"].join(''));
recursionParse(field,cfield,vobj,cobj);
}
}
}
recursionParse("","",obj,commentObj);
var checkRange = function(evalstr,thiseval){
if(evalstr){
return eval(evalstr);
}
return true;
}
var listen = function(guids) {
guids.forEach(function(guid){
// tr>td[title=field]
// >td[title=comment,cobj=cobj:json]
// >td>div>input[value=thiseval]
var thisTr = document.getElementById(guid);
var input = thisTr.children[2].children[0].children[0];
var field = thisTr.children[0].getAttribute('title');
var cobj = JSON.parse(thisTr.children[1].getAttribute('cobj'));
input.onchange = function(){
var node = thisTr.parentNode;
while (!editor_mode._ids.hasOwnProperty(node.getAttribute('id'))) {
node = node.parentNode;
}
editor_mode.onmode(editor_mode._ids[node.getAttribute('id')]);
var thiseval=null;
if(input.checked!=null)input.value=input.checked;
try{
thiseval = JSON.parse(input.value);
}catch(ee){
printe(field+' : '+ee);
throw ee;
}
if(checkRange(cobj._range,thiseval)){
editor_mode.addAction(['change',field,thiseval]);
} else {
printe(field+' : 输入的值不合要求,请鼠标放置在注释上查看说明');
}
}
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});
}
});
}
return {"HTML":outstr.join(''),"guids":guids,"listen":listen};
}
editor_mode.prototype.objToTr_ = function(obj,commentObj,field,cfield,vobj,cobj){
var guid = editor.guid();
var thiseval = vobj;
var comment = cobj._data;
var charlength=10;
var shortField = field.split("']").slice(-2)[0].split("['").slice(-1)[0];
shortField = (shortField.length<charlength?shortField:shortField.slice(0,charlength)+'...');
var commentHTMLescape=editor.HTMLescape(comment);
var shortCommentHTMLescape=(comment.length<charlength?commentHTMLescape:editor.HTMLescape(comment.slice(0,charlength))+'...');
var cobjstr = Object.assign({},cobj);
delete cobjstr._data;
cobjstr = editor.HTMLescape(JSON.stringify(cobjstr));
var outstr=['<tr id="',guid,'"><td title="',field,'">',shortField,'</td>',
'<td title="',commentHTMLescape,'" cobj="',cobjstr,'">',shortCommentHTMLescape,'</td>',
'<td><div class="etableInputDiv">',editor_mode.objToTd_(obj,commentObj,field,cfield,vobj,cobj),'</div></td></tr>\n',
];
return [outstr.join(''),guid];
}
editor_mode.prototype.objToTd_ = function(obj,commentObj,field,cfield,vobj,cobj){
var thiseval = vobj;
if(cobj._select){
var values = cobj._select.values;
var outstr = ['<select>\n',"<option value='",JSON.stringify(thiseval),"'>",JSON.stringify(thiseval),'</option>\n'];
values.forEach(function(v){
outstr.push(["<option value='",JSON.stringify(v),"'>",JSON.stringify(v),'</option>\n'].join(''))
});
outstr.push('</select>');
return outstr.join('');
} else if(cobj._input){
return ["<input type='text' spellcheck='false' value='",JSON.stringify(thiseval),"'/>\n"].join('');
} else if(cobj._bool){
return ["<input type='checkbox' ",(thiseval?'checked ':''),"/>\n"].join('');
} else {
var num = 0;//editor_mode.indent(field);
return ["<textarea spellcheck='false' >",JSON.stringify(thiseval,null,num),'</textarea>\n'].join('');
}
}
editor_mode.prototype.objToTable = function(obj,commentObj){ editor_mode.prototype.objToTable = function(obj,commentObj){
var outstr=["\n<tr><td>条目</td><td>注释</td><td>值</td></tr>\n"]; var outstr=["\n<tr><td>条目</td><td>注释</td><td>值</td></tr>\n"];
@ -127,8 +262,8 @@ editor_mode.prototype.objToTr = function(obj,commentObj,field){
var shortField = field.split("']").slice(-2)[0].split("['").slice(-1)[0]; var shortField = field.split("']").slice(-2)[0].split("['").slice(-1)[0];
shortField = (shortField.length<charlength?shortField:shortField.slice(0,charlength)+'...'); shortField = (shortField.length<charlength?shortField:shortField.slice(0,charlength)+'...');
var commentHTMLescape=comment.split('').map(function(v){return '&#'+v.charCodeAt(0)+';'}).join(''); var commentHTMLescape=editor.HTMLescape(comment);
var shortCommentHTMLescape=(comment.length<charlength?commentHTMLescape:comment.slice(0,charlength).split('').map(function(v){return '&#'+v.charCodeAt(0)+';'}).join('')+'...'); var shortCommentHTMLescape=(comment.length<charlength?commentHTMLescape:editor.HTMLescape(comment.slice(0,charlength))+'...');
var outstr=['<tr id="',guid,'"><td title="',field,'">',shortField,'</td>', var outstr=['<tr id="',guid,'"><td title="',field,'">',shortField,'</td>',
'<td title="',commentHTMLescape,'">',shortCommentHTMLescape,'</td>', '<td title="',commentHTMLescape,'">',shortCommentHTMLescape,'</td>',
@ -157,7 +292,7 @@ editor_mode.prototype.objToTd = function(thiseval,comment,field){
} }
editor_mode.prototype.indent = function(field){ editor_mode.prototype.indent = function(field){
var num = 4; var num = '\t';
if(field.indexOf("['main']")===0)return 0; if(field.indexOf("['main']")===0)return 0;
if(field.indexOf("['flyRange']")!==-1)return 0; if(field.indexOf("['flyRange']")!==-1)return 0;
if(field==="['special']")return 0; if(field==="['special']")return 0;
@ -232,7 +367,7 @@ editor_mode.prototype.loc = function(callback){
var objs=[]; var objs=[];
editor.file.editLoc(editor_mode.pos.x,editor_mode.pos.y,[],function(objs_){objs=objs_;/*console.log(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; document.getElementById('table_3d846fc4_7644_44d1_aa04_433d266a73df').innerHTML=tableinfo.HTML;
tableinfo.listen(tableinfo.guids); tableinfo.listen(tableinfo.guids);
@ -263,7 +398,7 @@ editor_mode.prototype.emenyitem = function(callback){
editor.file.editMapBlocksInfo(editor_mode.info.idnum,[],function(objs_){objs=objs_;/*console.log(objs_)*/}); 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; document.getElementById('table_a3f03d4c_55b8_4ef6_b362_b345783acd72').innerHTML=tableinfo.HTML;
tableinfo.listen(tableinfo.guids); tableinfo.listen(tableinfo.guids);
@ -274,7 +409,7 @@ editor_mode.prototype.floor = function(callback){
var objs=[]; var objs=[];
editor.file.editFloor([],function(objs_){objs=objs_;/*console.log(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; document.getElementById('table_4a3b1b09_b2fb_4bdf_b9ab_9f4cdac14c74').innerHTML=tableinfo.HTML;
tableinfo.listen(tableinfo.guids); tableinfo.listen(tableinfo.guids);
if (Boolean(callback))callback(); if (Boolean(callback))callback();
@ -284,7 +419,7 @@ editor_mode.prototype.tower = function(callback){
var objs=[]; var objs=[];
editor.file.editTower([],function(objs_){objs=objs_;/*console.log(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; document.getElementById('table_b6a03e4c_5968_4633_ac40_0dfdd2c9cde5').innerHTML=tableinfo.HTML;
tableinfo.listen(tableinfo.guids); tableinfo.listen(tableinfo.guids);
if (Boolean(callback))callback(); if (Boolean(callback))callback();
@ -294,7 +429,7 @@ editor_mode.prototype.functions = function(callback){
var objs=[]; var objs=[];
editor.file.editFunctions([],function(objs_){objs=objs_;/*console.log(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; document.getElementById('table_e260a2be_5690_476a_b04e_dacddede78b3').innerHTML=tableinfo.HTML;
tableinfo.listen(tableinfo.guids); tableinfo.listen(tableinfo.guids);
if (Boolean(callback))callback(); if (Boolean(callback))callback();

View File

@ -9,39 +9,62 @@ var codeEditor = CodeMirror.fromTextArea(document.getElementById("multiLineCode"
tabSize: 4, tabSize: 4,
indentWithTabs: true, indentWithTabs: true,
smartIndent: true, smartIndent: true,
mode: {name: "javascript", json: true, globalVars: true}, mode: {name: "javascript", globalVars: true, localVars: true},
lineWrapping: true, lineWrapping: true,
continueComments: "Enter", continueComments: "Enter",
gutters: ["CodeMirror-lint-markers"], gutters: ["CodeMirror-lint-markers"],
lint: true, lint: true,
autocomplete: true,
extraKeys: {"Ctrl-Q": "toggleComment"}, extraKeys: {"Ctrl-Q": "toggleComment"},
}); });
codeEditor.on("keyup", function (cm, event) { codeEditor.on("keyup", function (cm, event) {
if ((event.keyCode >= 65 && event.keyCode<=90) || (event.keyCode>=49 && event.keyCode<=57) || event.keyCode==190) { if (codeEditor.getOption("autocomplete") && (event.keyCode >= 65 && event.keyCode<=90) || (event.keyCode>=49 && event.keyCode<=57) || event.keyCode==190) {
try {
CodeMirror.commands.autocomplete(cm, null, {completeSingle: false}); CodeMirror.commands.autocomplete(cm, null, {completeSingle: false});
} catch (e) {}
} }
}); });
editor_multi.id=''; editor_multi.id='';
editor_multi.isString=false; editor_multi.isString=false;
editor_multi.lintAutocomplete=false;
editor_multi.show = function(){document.getElementById('left7').style='';} editor_multi.show = function(){
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;
editor_multi.setLint();
document.getElementById('left7').style='';
}
editor_multi.hide = function(){document.getElementById('left7').style='z-index:-1;opacity: 0;';} editor_multi.hide = function(){document.getElementById('left7').style='z-index:-1;opacity: 0;';}
editor_multi.setLint = function() {
codeEditor.setOption("lint", editor_multi.lintAutocomplete);
codeEditor.setOption("autocomplete", editor_multi.lintAutocomplete);
document.getElementById("lintCheckbox").checked = editor_multi.lintAutocomplete;
}
editor_multi.toggerLint = function() {
editor_multi.lintAutocomplete = document.getElementById("lintCheckbox").checked;
editor_multi.setLint();
}
editor_multi.indent = function(field){ editor_multi.indent = function(field){
if(editor && editor.mode && editor.mode.indent)return editor.mode.indent(field); if(editor && editor.mode && editor.mode.indent)return editor.mode.indent(field);
return 4; return '\t';
} }
editor_multi.import = function(id_){ editor_multi.import = function(id_,args){
var thisTr = document.getElementById(id_); var thisTr = document.getElementById(id_);
if(!thisTr)return false; if(!thisTr)return false;
var input = thisTr.children[2].children[0].children[0]; var input = thisTr.children[2].children[0].children[0];
var field = thisTr.children[0].getAttribute('title'); var field = thisTr.children[0].getAttribute('title');
var comment = thisTr.children[1].getAttribute('title');
if(!input.type || input.type!=='textarea')return false; if(!input.type || input.type!=='textarea')return false;
editor_multi.id=id_; editor_multi.id=id_;
editor_multi.isString=false; 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)==='"'){ if(input.value.slice(0,1)==='"'){
editor_multi.isString=true; editor_multi.isString=true;
codeEditor.setValue(JSON.parse(input.value)||''); codeEditor.setValue(JSON.parse(input.value)||'');
@ -97,12 +120,13 @@ editor_multi.confirm = function (){
} }
var multiLineArgs=[null,null,null]; var multiLineArgs=[null,null,null];
editor_multi.multiLineEdit = function(value,b,f,callback){ editor_multi.multiLineEdit = function(value,b,f,args,callback){
editor_multi.id='callFromBlockly'; editor_multi.id='callFromBlockly';
codeEditor.setValue(value.split('\\n').join('\n')||''); codeEditor.setValue(value.split('\\n').join('\n')||'');
multiLineArgs[0]=b; multiLineArgs[0]=b;
multiLineArgs[1]=f; multiLineArgs[1]=f;
multiLineArgs[2]=callback; multiLineArgs[2]=callback;
editor_multi.lintAutocomplete=Boolean(args.lint);
editor_multi.show(); editor_multi.show();
} }
editor_multi.multiLineDone = function(){ editor_multi.multiLineDone = function(){

View File

@ -74,8 +74,8 @@
<h3 class="leftTabHeader">图块属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">save</button></h3> <h3 class="leftTabHeader">图块属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">save</button></h3>
<div class="leftTabContent"> <div class="leftTabContent">
<div id='newIdIdnum'><!-- id and idnum --> <div id='newIdIdnum'><!-- id and idnum -->
<input placeholder="输入新id"/> <input placeholder="输入新id(唯一标识符)"/>
<input placeholder="输入新idnum"/> <input placeholder="输入新idnum数字1000以内"/>
<button>save</button> <button>save</button>
</div> </div>
<div><!-- enemy and item --> <div><!-- enemy and item -->
@ -142,6 +142,8 @@
<div id="left7" style="z-index:-1;opacity: 0;"><!-- 多行文本编辑器 --> <div id="left7" style="z-index:-1;opacity: 0;"><!-- 多行文本编辑器 -->
<button onclick="editor_multi.confirm()">confirm</button> <button onclick="editor_multi.confirm()">confirm</button>
<button onclick="editor_multi.cancel()">cancel</button> <button onclick="editor_multi.cancel()">cancel</button>
<input type="checkbox" onclick="editor_multi.toggerLint()" id="lintCheckbox" style="vertical-align: bottom;margin-left:6px" />
<span style="vertical-align: bottom; margin-left: -3px">Lint</span>
<textarea id="multiLineCode" name="multiLineCode"></textarea> <textarea id="multiLineCode" name="multiLineCode"></textarea>
</div> </div>
<div id="left8" class='leftTab' style="z-index:-1;opacity: 0;"><!-- functions --> <div id="left8" class='leftTab' style="z-index:-1;opacity: 0;"><!-- functions -->

View File

@ -22,7 +22,7 @@ utils.prototype.replaceText = function (text) {
utils.prototype.calValue = function (value) { utils.prototype.calValue = function (value) {
value=value.replace(/status:([\w\d_]+)/g, "core.getStatus('$1')"); value=value.replace(/status:([\w\d_]+)/g, "core.getStatus('$1')");
value=value.replace(/item:([\w\d_]+)/g, "core.itemCount('$1')"); value=value.replace(/item:([\w\d_]+)/g, "core.itemCount('$1')");
value=value.replace(/flag:([\w\d_]+)/g, "core.getFlag('$1', false)"); value=value.replace(/flag:([\w\d_]+)/g, "core.getFlag('$1', 0)");
return eval(value); return eval(value);
} }

View File

@ -1,98 +1,344 @@
comment_c456ea59_6018_45ef_8bcc_211a24c627dc = comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
{ {
"items" : { "_leaf": false,
'items':{ "_type": "object",
'cls': "只能取keys(钥匙) items(宝石、血瓶) constants(物品) tools(道具)\n$select({\"values\":[\"keys\",\"items\",\"constants\",\"tools\"]})$end", "_data": {
'name': '名称', "items": {
'text': '道具在道具栏中显示的描述', "_leaf": false,
'isEquipment': '物品是否属于装备(仅在core.flags.equipment时有效)\n$select({\"values\":[true,false]})$end' "_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()', "items_template" : {'cls': 'items', 'name': '新物品'},
'itemEffectTip':'cls为items的即捡即用类物品,在获得时左上角额外显示的文字,执行时会对这里的字符串执行eval()得到字符串', "enemys": {
'useItemEffect':'cls为tools或contants时的使用物品效果,执行时会对这里的字符串执行eval()', "_leaf": false,
'canUseItemEffect':'cls为tools或contants时能否使用物品的判断,执行时会return这里的字符串执行eval()后的结果', "_type": "object",
}, "_data": {
"items_template" : {'cls': 'items', 'name': '新物品'}, "name": {
"enemys" : { "_leaf": true,
'name': '名称', "_type": "textarea",
'hp': '生命值', "_data": "名称"
'atk': '攻击力', },
'def': '防御力', "hp": {
'money': '金币', "_leaf": true,
'experience': '经验', "_type": "textarea",
'point': '加点', "_data": "生命值"
'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代表吸血比例', "atk": {
'zoneSquare': '领域怪zoneSquare代表是否九宫格伤害', "_leaf": true,
'range': 'range可选代表领域伤害的范围不加默认为1\n$range((thiseval==~~thiseval && thiseval>0)||thiseval==null)$end', "_type": "textarea",
'bomb':' 加入 "bomb": false 代表该怪物不可被炸弹或圣锤炸掉\n$select({\"values\":[true,false]})$end', "_data": "攻击力"
'n': '多连击需要在后面指定n代表是几连击\n$range((thiseval==~~thiseval && thiseval>0)||thiseval==null)$end', },
'add': '代表吸血后是否加到自身\n$select({\"values\":[true,false]})$end', "def": {
'atkValue':'退化时勇士下降的攻击力点数\n$range(thiseval==~~thiseval||thiseval==null)$end', "_leaf": true,
'defValue':'退化时勇士下降的防御力点数\n$range(thiseval==~~thiseval||thiseval==null)$end', "_type": "textarea",
'damage':'战前扣血的点数\n$range(thiseval==~~thiseval||thiseval==null)$end' "_data": "防御力"
}, },
"enemys_template" : {'name': '新敌人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, "money": {
"maps" : { "_leaf": true,
"id" : "图块ID \n$range(false)$end", "_type": "textarea",
"idnum" : "图块数字 \n$range(false)$end", "_data": "金币"
"cls" : "图块类别 \n$range(false)$end", },
"trigger" : "图块的默认触发器 \n$select({\"values\":[null,\"openDoor\",\"passNet\",\"changeLight\",\"ski\",\"pushBox\"]})$end", "experience": {
"noPass" : "图块默认可通行状态 \n$select({\"values\":[null,true,false]})$end" "_leaf": true,
}, "_type": "textarea",
"floors" : { "_data": "经验"
'floor' : { },
"floorId": "文件名和floorId需要保持完全一致 \n楼层唯一标识符仅能由字母、数字、下划线组成且不能由数字开头 \n推荐用法第20层就用MT20第38层就用MT38地下6层就用MT_6用下划线代替负号隐藏3层用MT3hh表示隐藏等等 \n楼层唯一标识符需要和名字完全一致 \n这里不能更改floorId,请通过另存为来实现\n$range(false)$end", "point": {
"title": "楼层中文名 ", "_leaf": true,
"name": "显示在状态栏中的层数 ", "_type": "textarea",
"canFlyTo": "该楼能否被楼传器飞到(不能的话在该楼也不允许使用楼传器) \n$select({\"values\":[true,false]})$end", "_data": "加点"
"canUseQuickShop": "该层是否允许使用快捷商店 \n$select({\"values\":[true,false]})$end", },
"defaultGround": "默认地面的图块IDterrains中 \n$select({\"values\":Object.keys(editor.core.icons.icons.terrains)})$end", "special": {
"images": "背景/前景图;你可以选择一张图片来作为背景/前景素材。详细用法请参见文档“自定义素材”中的说明。 \n$leaf(true)$end", "_leaf": true,
"color": "该层的默认画面色调。本项可不写代表无色调如果写需要是一个RGBA数组。 \n$leaf(true)$end", "_type": "textarea",
"weather": "该层的默认天气。本项可忽略表示晴天,如果写则第一项为\"rain\"或\"snow\"代表雨雪第二项为1-10之间的数代表强度。 \n$leaf(true)$end", "_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就好"
"bgm": "到达该层后默认播放的BGM。本项可忽略。 ", },
//"map": "地图数据需要是13x13建议使用地图生成器来生成 ", "value": {
"item_ratio": "每一层的宝石/血瓶效果,即获得宝石和血瓶时框内\"ratio\"的值。$range((thiseval==~~thiseval && thiseval>0)||thiseval==null)$end", "_leaf": true,
"firstArrive": "第一次到该楼层触发的事件 \n$leaf(true)$end", "_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' : { "enemys_template" : {'name': '新敌人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
"events": "该楼的所有可能事件列表 \n$leaf(true)$end", "maps": {
"changeFloor": "楼层转换事件该事件不能和上面的events有冲突同位置点否则会被覆盖 \n$leaf(true)$end", "_leaf": false,
"afterBattle": "战斗后可能触发的事件列表 \n$leaf(true)$end", "_type": "object",
"afterGetItem": "获得道具后可能触发的事件列表 \n$leaf(true)$end", "_data": {
"afterOpenDoor": "开完门后可能触发的事件列表 \n$leaf(true)$end", "id": {
"cannotMove": "每个图块不可通行的方向 \n 可以在这里定义每个点不能前往哪个方向,例如悬崖边不能跳下去 \n'x,y': ['up', 'left'], // (x,y)点不能往上和左走\n$leaf(true)$end", "_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层用MT3hh表示隐藏等等 \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": "默认地面的图块IDterrains中"
},
"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": {}
}, */
} }

View File

@ -1,179 +1,540 @@
data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
{ {
"main": { "_leaf": false,
"floorIds": " 在这里按顺序放所有的楼层;其顺序直接影响到楼层传送器的顺序和上楼器/下楼器的顺序 \n$leaf(true)$end", "_type": "object",
"images": " 在此存放所有可能使用的图片 \n 图片可以被作为背景图(的一部分),也可以直接用自定义事件进行显示。 \n 图片名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好 \n 建议对于较大的图片,在网上使用在线的“图片压缩工具(http://compresspng.com/zh/)”来进行压缩,以节省流量 \n 依次向后添加 \n$leaf(true)$end", "_data": {
"animates": " 在此存放所有可能使用的动画必须是animate格式在这里不写后缀名 \n 动画必须放在animates目录下文件名不能使用中文不能带空格或特殊字符 \n \"jianji\", \"thunder\" \n 根据需求自行添加 \n$leaf(true)$end", "main": {
"bgms": " 在此存放所有的bgm和文件名一致。第一项为默认播放项 \n 音频名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好 \n$leaf(true)$end", "_leaf": false,
"sounds": " 在此存放所有的SE和文件名一致 \n 音频名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好 \n$leaf(true)$end", "_type": "object",
"bgmRemote" : " 是否使用远程的背景音乐;此项一般不要开启 \n$select({\"values\":[false]})$end", "_data": {
"startBackground" : "标题界面的背景,建议使用jpg格式以压缩背景图空间", "floorIds": {
"startLogoStyle" : "标题样式:可以改变颜色,也可以隐藏标题(如果背景图自带)", "_leaf": true,
"levelChoose" : " 难度选择:每个数组的第一个是其在标题界面显示的难度,第二个是在游戏内部传输的字符串,会显示在状态栏,修改此处后需要在project/functions中作相应更改 \n$leaf(true)$end" "_type": "textarea",
}, "_data": "在这里按顺序放所有的楼层;其顺序直接影响到楼层传送器的顺序和上楼器/下楼器的顺序"
"firstData": { },
"title": " 游戏名,将显示在标题页面以及切换楼层的界面中 ", "images": {
"name": " 游戏的唯一英文标识符。由英文、数字、下划线组成不能超过20个字符。 ", "_leaf": true,
"version": " 当前游戏版本;版本不一致的存档不能通用。 ", "_type": "textarea",
"floorId": " 初始楼层ID ", "_data": "在此存放所有可能使用的图片 \n 图片可以被作为背景图(的一部分),也可以直接用自定义事件进行显示。 \n 图片名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好 \n 建议对于较大的图片,在网上使用在线的“图片压缩工具(http://compresspng.com/zh/)”来进行压缩,以节省流量 \n 依次向后添加"
"hero": { },
"name": " 勇士初始数据 \n 勇士名;可以改成喜欢的 ", "animates": {
"lv": " 初始等级,该项必须为正整数 \n$range(thiseval==~~thiseval &&thiseval>0)$end", "_leaf": true,
"hpmax": " 初始生命上限只有在enableHPMax开启时才有效", "_type": "textarea",
"hp": " 初始生命值 ", "_data": "在此存放所有可能使用的动画必须是animate格式在这里不写后缀名 \n 动画必须放在animates目录下文件名不能使用中文不能带空格或特殊字符 \n \"jianji\", \"thunder\" \n 根据需求自行添加"
"atk": " 初始攻击 ", },
"def": " 初始防御 ", "bgms": {
"mdef": " 初始魔防 ", "_leaf": true,
"money": " 初始金币 ", "_type": "textarea",
"experience": " 初始经验 ", "_data": "在此存放所有的bgm和文件名一致。第一项为默认播放项 \n 音频名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好"
"items": { },
"keys": " 初始道具个数 \n$leaf(true)$end"/* { "sounds": {
"yellowKey": " 初始道具个数 ", "_leaf": true,
"blueKey": "", "_type": "textarea",
"redKey": "" "_data": "在此存放所有的SE和文件名一致 \n 音频名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好"
} */, },
"constants": "\n$leaf(true)$end", "bgmRemote": {
"tools": "\n$leaf(true)$end" "_leaf": true,
}, "_type": "select",
"flyRange": " 初始可飞的楼层;一般留空数组即可 \n$leaf(true)$end", "_select": {
"loc": { "values": [
"direction": " 勇士初始位置 ", false
"x": "", ]
"y": "" },
}, "_data": "是否使用远程的背景音乐;此项一般不要开启"
"flags": " 游戏过程中的变量或flags \n$leaf(true)$end"/* { },
"poison": " 游戏过程中的变量或flags \n 毒 ", "startBackground": {
"weak": " 衰 ", "_leaf": true,
"curse": " 咒 " "_type": "textarea",
} */, "_data": "标题界面的背景,建议使用jpg格式以压缩背景图空间"
"steps": " 行走步数统计 ", },
"startLogoStyle": {
"_leaf": true,
"_type": "textarea",
"_data": "标题样式:可以改变颜色,也可以隐藏标题(如果背景图自带)"
},
"levelChoose": {
"_leaf": true,
"_type": "textarea",
"_data": "难度选择:每个数组的第一个是其在标题界面显示的难度,第二个是在游戏内部传输的字符串,会显示在状态栏,修改此处后需要在project/functions中作相应更改"
}
}
}, },
"startText": " 游戏开始前剧情。如果无剧情直接留一个空数组即可。 \n$leaf(true)$end", "firstData": {
"shops": "全局商店\n$leaf(true)$end",/*{ "_leaf": false,
"moneyShop1": { "_type": "object",
"name": " 定义全局商店(即快捷商店) \n 商店唯一ID \n 商店名称(标题) ", "_data": {
"icon": " 商店图标blueShop为蓝色商店pinkShop为粉色商店 ", "title": {
"textInList": " 在快捷商店栏中显示的名称 ", "_leaf": true,
"use": " 商店所要使用的。只能是\"money\"或\"experience\"。 ", "_type": "textarea",
"need": " 商店需要的金币/经验数值可以是一个表达式以times作为参数计算。 \n 这里用到的times为该商店的已经的访问次数。首次访问该商店时times的值为0。 \n 上面的例子是50层商店的计算公式。你也可以写任意其他的计算公式只要以times作为参数即可。 \n 例如: \"need\": \"25\" 就是恒定需要25金币的商店 \"need\": \"20+2*times\" 就是第一次访问要20金币以后每次递增2金币的商店。 \n 如果是对于每个选项有不同的计算公式,写 \"need\": \"-1\" 即可。可参见下面的经验商店。 ", "_data": "游戏名,将显示在标题页面以及切换楼层的界面中"
"text": " 显示的文字,需手动加换行符。可以使用${need}表示上面的need值。 ", },
"choices": [ "name": {
{ "_leaf": true,
"text": "", "_type": "textarea",
"effect": " 商店的选项 \n 如果有多个effect以分号分开参见下面的经验商店 " "_data": "游戏的唯一英文标识符。由英文、数字、下划线组成不能超过20个字符。"
}, },
{ "version": {
"text": "", "_leaf": true,
"effect": "" "_type": "textarea",
}, "_data": "当前游戏版本;版本不一致的存档不能通用。"
{ },
"text": "", "floorId": {
"effect": "" "_leaf": true,
}, "_type": "textarea",
{ "_data": "初始楼层ID"
"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)\" 将生命提升攻防和的数值的两倍 " "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": "行走步数统计"
}
} }
] },
}, "startText": {
"expShop1": { "_leaf": true,
"name": " 商店唯一ID ", "_type": "event",
"icon": "", "_event": "firstArrive",
"textInList": "", "_data": "游戏开始前剧情。如果无剧情直接留一个空数组即可。"
"use": " 该商店使用的是经验进行计算 ", },
"need": " 如果是对于每个选项所需要的数值不同,这里直接写-1然后下面选项里给定具体数值 ", "shops": {
"text": "", "_leaf": true,
"choices": [ "_type": "textarea",
{ "_data": "全局商店"
"text": "", },
"need": "", "levelUp": {
"effect": " 在choices中写need可以针对每个选项都有不同的需求。 \n 这里的need同样可以以times作为参数比如 \"need\": \"100+20*times\" 多个effect直接以分号分开即可。如上面的意思是生命+1000攻击+7防御+7。 " "_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代表勇士的某项数值/道具个数"
"text": "", }
"need": "",
"effect": ""
},
{
"text": "",
"need": "",
"effect": ""
}
]
} }
},*/ },
"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"/* [ "values": {
" 经验升级所需要的数值,是一个数组 \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", "_leaf": false,
{ "_type": "object",
"need": "", "_data": {
"name": "", "lavaDamage": {
"effect": " 先将生命提升攻防和的2倍再将攻击+10防御+10 " "_leaf": true,
}, "_type": "textarea",
{ "_data": "各种数值;一些数值可以在这里设置\n /****** 角色相关 ******/ \n 经过血网受到的伤害"
"need": "", },
"effect": " effect也允许写一个function代表本次升级将会执行的操作 \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 动画时间"
}
} }
] */ },
}, "flags": {
"values": { "_leaf": false,
"lavaDamage": " 各种数值;一些数值可以在这里设置\n /****** 角色相关 ******/ \n 经过血网受到的伤害 ", "_type": "object",
"poisonDamage": " 中毒后每步受到的伤害 ", "_data": {
"weakValue": " 衰弱状态下攻防减少的数值 ", "enableFloor": {
"redJewel": " /****** 道具相关 ******/ \n 红宝石加攻击的数值 ", "_leaf": true,
"blueJewel": " 蓝宝石加防御的数值 ", "_type": "checkbox",
"greenJewel": " 绿宝石加魔防的数值 ", "_bool": "bool",
"redPotion": " 红血瓶加血数值 ", "_data": "系统FLAG在游戏运行中中请不要修改它。 /****** 状态栏相关 ******/ \n 是否在状态栏显示当前楼层"
"bluePotion": " 蓝血瓶加血数值 ", },
"yellowPotion": " 黄血瓶加血数值 ", "enableLv": {
"greenPotion": " 绿血瓶加血数值 ", "_leaf": true,
"sword0": " 默认装备折断的剑的攻击力 \n$leaf(true)$end", "_type": "checkbox",
"shield0": " 默认装备残破的盾的防御力 \n$leaf(true)$end", "_bool": "bool",
"sword1": " 铁剑加攻数值 \n$leaf(true)$end", "_data": "是否在状态栏显示当前等级"
"shield1": " 铁盾加防数值 \n$leaf(true)$end", },
"sword2": " 银剑加攻数值 \n$leaf(true)$end", "enableHPMax": {
"shield2": " 银盾加防数值 \n$leaf(true)$end", "_leaf": true,
"sword3": " 骑士剑加攻数值 \n$leaf(true)$end", "_type": "checkbox",
"shield3": " 骑士盾加防数值 \n$leaf(true)$end", "_bool": "bool",
"sword4": " 圣剑加攻数值 \n$leaf(true)$end", "_data": "是否是否启用生命上限"
"shield4": " 圣盾加防数值 \n$leaf(true)$end", },
"sword5": " 神圣剑加攻数值 \n$leaf(true)$end", "enableMDef": {
"shield5": " 神圣盾加防数值 \n$leaf(true)$end", "_leaf": true,
"moneyPocket": " 金钱袋加金币的数值 ", "_type": "checkbox",
"breakArmor": " /****** 怪物相关 ******/ \n 破甲的比例战斗前怪物附加角色防御的x%作为伤害) ", "_bool": "bool",
"counterAttack": " 反击的比例战斗时怪物每回合附加角色攻击的x%作为伤害,无视角色防御) ", "_data": "是否在状态栏及战斗界面显示魔防(护盾)"
"purify": " 净化的比例战斗前怪物附加勇士魔防的x倍作为伤害 ", },
"hatred": " 仇恨属性中,每杀死一个怪物获得的仇恨值 ", "enableMoney": {
"animateSpeed": " /****** 系统相关 ******/ \n 动画时间 " "_leaf": true,
}, "_type": "checkbox",
"flags": { "_bool": "bool",
"enableFloor": " 系统FLAG在游戏运行中中请不要修改它。 /****** 状态栏相关 ******/ \n 是否在状态栏显示当前楼层 \n$select({\"values\":[true,false]})$end", "_data": "是否在状态栏、怪物手册及战斗界面显示金币"
"enableLv": " 是否在状态栏显示当前等级 \n$select({\"values\":[true,false]})$end", },
"enableHPMax": " 是否是否启用生命上限 \n$select({\"values\":[true,false]})$end", "enableExperience": {
"enableMDef": " 是否在状态栏及战斗界面显示魔防(护盾) \n$select({\"values\":[true,false]})$end", "_leaf": true,
"enableMoney": " 是否在状态栏、怪物手册及战斗界面显示金币 \n$select({\"values\":[true,false]})$end", "_type": "checkbox",
"enableExperience": " 是否在状态栏、怪物手册及战斗界面显示经验 \n$select({\"values\":[true,false]})$end", "_bool": "bool",
"enableLevelUp": " 是否允许等级提升进阶如果上面enableExperience为false则此项恒视为false \n$select({\"values\":[true,false]})$end", "_data": "是否在状态栏、怪物手册及战斗界面显示经验"
"enableDebuff": " 是否涉及毒衰咒如果此项为false则不会在状态栏中显示毒衰咒的debuff ////// 上述的几个开关将直接影响状态栏的显示效果 ////// \n$select({\"values\":[true,false]})$end", },
"flyNearStair": " /****** 道具相关 ******/ \n 是否需要在楼梯边使用传送器 \n$select({\"values\":[true,false]})$end", "enableLevelUp": {
"pickaxeFourDirections": " 使用破墙镐是否四个方向都破坏如果false则只破坏面前的墙壁 \n$select({\"values\":[true,false]})$end", "_leaf": true,
"bombFourDirections": " 使用炸弹是否四个方向都会炸如果false则只炸面前的怪物即和圣锤等价 \n$select({\"values\":[true,false]})$end", "_type": "checkbox",
"bigKeyIsBox": " 如果此项为true则视为钥匙盒红黄蓝钥匙+1若为false则视为大黄门钥匙 \n$select({\"values\":[true,false]})$end", "_bool": "bool",
"equipment": " 剑和盾是否直接作为装备。如果此项为true则作为装备需要在道具栏使用否则将直接加属性。 \n$select({\"values\":[true,false]})$end", "_data": "是否允许等级提升进阶如果上面enableExperience为false则此项恒视为false"
"enableDeleteItem": " 是否允许删除(丢弃)道具 \n$select({\"values\":[true,false]})$end", },
"enableAddPoint": " /****** 怪物相关 ******/ \n 是否支持加点 \n$select({\"values\":[true,false]})$end", "enableDebuff": {
"enableNegativeDamage": "是否支持负伤害(回血) \n$select({\"values\":[true,false]})$end", "_leaf": true,
"hatredDecrease": " 是否在和仇恨怪战斗后减一半的仇恨值此项为false则和仇恨怪不会扣减仇恨值。 \n$select({\"values\":[true,false]})$end", "_type": "checkbox",
"betweenAttackCeil": " 夹击方式是向上取整还是向下取整。如果此项为true则为向上取整为false则为向下取整 \n$select({\"values\":[true,false]})$end", "_bool": "bool",
"startDirectly": " /****** 系统相关 ******/ \n 点击“开始游戏”后是否立刻开始游戏而不显示难度选择界面 \n$select({\"values\":[true,false]})$end", "_data": "是否涉及毒衰咒如果此项为false则不会在状态栏中显示毒衰咒的debuff ////// 上述的几个开关将直接影响状态栏的显示效果 //////"
"canOpenBattleAnimate": " 是否允许用户开启战斗过程如果此项为false则下面两项均强制视为false \n$select({\"values\":[true,false]})$end", },
"showBattleAnimateConfirm": " 是否在游戏开始时提供“是否开启战斗动画”的选项 \n$select({\"values\":[true,false]})$end", "flyNearStair": {
"battleAnimate": " 是否默认显示战斗动画;用户可以手动在菜单栏中开关 \n$select({\"values\":[true,false]})$end", "_leaf": true,
"displayEnemyDamage": " 是否地图怪物显伤;用户可以手动在菜单栏中开关 \n$select({\"values\":[true,false]})$end", "_type": "checkbox",
"displayExtraDamage": " 是否地图高级显伤(领域、夹击等);用户可以手动在菜单栏中开关 \n$select({\"values\":[true,false]})$end", "_bool": "bool",
"enableGentleClick": " 是否允许轻触(获得面前物品) \n$select({\"values\":[true,false]})$end", "_data": "/****** 道具相关 ******/ \n 是否需要在楼梯边使用传送器"
"potionWhileRouting": " 寻路算法是否经过血瓶如果该项为false则寻路算法会自动尽量绕过血瓶 \n$select({\"values\":[true,false]})$end", },
"enableViewMaps": " 是否支持在菜单栏中查看所有楼层的地图 \n$select({\"values\":[true,false]})$end", "pickaxeFourDirections": {
"portalWithoutTrigger": " 经过楼梯、传送门时是否能“穿透”。穿透的意思是,自动寻路得到的的路径中间经过了楼梯,行走时是否触发楼层转换事件 \n$select({\"values\":[true,false]})$end", "_leaf": true,
"enableMoveDirectly": " 是否允许瞬间移动 \n$select({\"values\":[true,false]})$end" "_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": "是否允许瞬间移动"
}
}
}
} }
} }

View File

@ -1,168 +1,167 @@
data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
{ {
"main" : { "main" : {
"floorIds" : [ "floorIds" : [
"sample0", "sample1", "sample2" "sample0", "sample1", "sample2"
], ],
"images" : [ "images" : [
"bg.jpg", "bg.jpg",
], ],
"animates" : [ "animates" : [
"hand", "sword", "zone", "yongchang", "hand", "sword", "zone", "yongchang",
], ],
"bgms" : [ "bgms" : [
'bgm.mp3', 'qianjin.mid', 'star.mid', 'bgm.mp3', 'qianjin.mid', 'star.mid',
], ],
"sounds" : [ "sounds" : [
'floor.mp3', 'attack.ogg', 'door.ogg', 'item.ogg', 'zone.ogg' 'floor.mp3', 'attack.ogg', 'door.ogg', 'item.ogg', 'zone.ogg'
], ],
"bgmRemote" : false, "bgmRemote" : false,
"startBackground" : "bg.jpg", "startBackground" : "bg.jpg",
"startLogoStyle" : "color: black", "startLogoStyle" : "color: black",
"levelChoose" : [["简单","Easy"],["普通","Normal"],["困难","Hard"],["噩梦","Hell"]], "levelChoose" : [["简单","Easy"],["普通","Normal"],["困难","Hard"],["噩梦","Hell"]],
}, },
"firstData" : { "firstData" : {
"title": "魔塔样板", "title": "魔塔样板",
"name": "template", "name": "template",
"version": "Ver 2.0", "version": "Ver 2.0",
"floorId": "sample0", "floorId": "sample0",
"hero": { "hero": {
"name": "阳光", "name": "阳光",
'lv': 1, 'lv': 1,
"hpmax": 9999, "hpmax": 9999,
"hp": 1000, "hp": 1000,
"atk": 100, "atk": 100,
"def": 100, "def": 100,
"mdef": 100, "mdef": 100,
"money": 100, "money": 100,
"experience": 0, "experience": 0,
"items": { "items": {
"keys": { "keys": {
"yellowKey": 0, "yellowKey": 0,
"blueKey": 0, "blueKey": 0,
"redKey": 0 "redKey": 0
}, },
"constants": {}, "constants": {},
"tools": {} "tools": {}
}, },
"flyRange": [], "flyRange": [],
"loc": {"direction": "up", "x": 6, "y": 10}, "loc": {"direction": "up", "x": 6, "y": 10},
"flags": { "flags": {
"poison": false, "poison": false,
"weak": false, "weak": false,
"curse": false, "curse": false,
}, },
"steps": 0, "steps": 0,
}, },
"startText": [ "startText": [
"Hi欢迎来到 HTML5 魔塔样板!\n\n本样板由艾之葵制作可以让你在不会写任何代码\n的情况下也能做出属于自己的H5魔塔", "Hi欢迎来到 HTML5 魔塔样板!\n\n本样板由艾之葵制作可以让你在不会写任何代码\n的情况下也能做出属于自己的H5魔塔",
"这里游戏开始时的剧情。\n定义在data.js的startText处。\n\n你可以在这里写上自己的内容。", "这里游戏开始时的剧情。\n定义在data.js的startText处。\n\n你可以在这里写上自己的内容。",
"赶快来试一试吧!" "赶快来试一试吧!"
], ],
"shops": [ "shops": [
{ {
"id": "moneyShop1", "id": "moneyShop1",
"name": "贪婪之神", "name": "贪婪之神",
"icon": "blueShop", "icon": "blueShop",
"textInList": "1F金币商店", "textInList": "1F金币商店",
"use": "money", "use": "money",
"need": "20+10*times*(times+1)", "need": "20+10*times*(times+1)",
"text": "勇敢的武士啊,给我${need}金币就可以:", "text": "勇敢的武士啊,给我${need}金币就可以:",
"choices": [ "choices": [
{"text": "生命+800", "effect": "status:hp+=800"}, {"text": "生命+800", "effect": "status:hp+=800"},
{"text": "攻击+4", "effect": "status:atk+=4"}, {"text": "攻击+4", "effect": "status:atk+=4"},
{"text": "防御+4", "effect": "status:def+=4"}, {"text": "防御+4", "effect": "status:def+=4"},
{"text": "魔防+10", "effect": "status:mdef+=10"} {"text": "魔防+10", "effect": "status:mdef+=10"}
] ]
}, },
{ {
"id": "expShop1", "id": "expShop1",
"name": "经验之神", "name": "经验之神",
"icon": "pinkShop", "icon": "pinkShop",
"textInList": "1F经验商店", "textInList": "1F经验商店",
"use": "experience", "use": "experience",
"need": "-1", "need": "-1",
"text": "勇敢的武士啊,给我若干经验就可以:", "text": "勇敢的武士啊,给我若干经验就可以:",
"choices": [ "choices": [
{"text": "等级+1", "need": "100", "effect": "status:lv+=1;status:hp+=1000;status:atk+=7;status:def+=7"}, {"text": "等级+1", "need": "100", "effect": "status:lv+=1;status:hp+=1000;status:atk+=7;status:def+=7"},
{"text": "攻击+5", "need": "30", "effect": "status:atk+=5"}, {"text": "攻击+5", "need": "30", "effect": "status:atk+=5"},
{"text": "防御+5", "need": "30", "effect": "status:def+=5"}, {"text": "防御+5", "need": "30", "effect": "status:def+=5"},
] ]
} }
], ],
"levelUp": [ "levelUp": [
{}, {},
{"need": 20, "name": "第二级", "effect": "status:hp+=2*(status:atk+status:def);status:atk+=10;status:def+=10"}, {"need": 20, "name": "第二级", "effect": "status:hp+=2*(status:atk+status:def);status:atk+=10;status:def+=10"},
{"need": 40, "effect": function () { {"need": 40, "effect": function () {
core.insertAction("恭喜升级!"); core.insertAction("恭喜升级!");
core.status.hero.hp *= 2; core.status.hero.hp *= 2;
core.status.hero.atk += 100; core.status.hero.atk += 100;
core.status.hero.def += 100; core.status.hero.def += 100;
}}, }},
] ]
}, },
"values" : { "values" : {
"lavaDamage": 100, "lavaDamage": 100,
"poisonDamage": 10, "poisonDamage": 10,
"weakValue": 20, "weakValue": 20,
"redJewel": 3, "redJewel": 3,
"blueJewel": 3, "blueJewel": 3,
"greenJewel": 5, "greenJewel": 5,
"redPotion": 100, "redPotion": 100,
"bluePotion": 250, "bluePotion": 250,
"yellowPotion": 500, "yellowPotion": 500,
"greenPotion": 800, "greenPotion": 800,
"sword0": 0, "sword0": 0,
"shield0": 0, "shield0": 0,
"sword1": 10, "sword1": 10,
"shield1": 10, "shield1": 10,
"sword2": 20, "sword2": 20,
"shield2": 20, "shield2": 20,
"sword3": 40, "sword3": 40,
"shield3": 40, "shield3": 40,
"sword4": 80, "sword4": 80,
"shield4": 80, "shield4": 80,
"sword5": 160, "sword5": 160,
"shield5": 160, "shield5": 160,
"moneyPocket": 500, "moneyPocket": 500,
/****** 怪物相关 ******/ 'breakArmor': 0.9,
'breakArmor': 0.9, 'counterAttack': 0.1,
'counterAttack': 0.1, 'purify': 3,
'purify': 3, 'hatred': 2,
'hatred': 2, 'animateSpeed': 300,
'animateSpeed': 300, },
},
"flags" : { "flags" : {
"enableFloor": true, "enableFloor": true,
"enableLv": false, "enableLv": false,
"enableHPMax": false, "enableHPMax": false,
"enableMDef": true, "enableMDef": true,
"enableMoney": true, "enableMoney": true,
"enableExperience": false, "enableExperience": false,
"enableLevelUp": false, "enableLevelUp": false,
"enableDebuff": false, "enableDebuff": false,
"flyNearStair": true, "flyNearStair": true,
"pickaxeFourDirections": true, "pickaxeFourDirections": true,
"bombFourDirections": true, "bombFourDirections": true,
"bigKeyIsBox": false, "bigKeyIsBox": false,
"equipment": true, "equipment": true,
"enableDeleteItem": true, "enableDeleteItem": true,
"enableAddPoint": false, "enableAddPoint": false,
"enableNegativeDamage": true, "enableNegativeDamage": true,
"hatredDecrease": true, "hatredDecrease": true,
"betweenAttackCeil": false, "betweenAttackCeil": false,
"startDirectly": false, "startDirectly": false,
"canOpenBattleAnimate": true, "canOpenBattleAnimate": true,
"showBattleAnimateConfirm": true, "showBattleAnimateConfirm": true,
"battleAnimate": true, "battleAnimate": true,
"displayEnemyDamage": true, "displayEnemyDamage": true,
"displayExtraDamage": true, "displayExtraDamage": true,
"enableGentleClick": true, "enableGentleClick": true,
"potionWhileRouting": false, "potionWhileRouting": false,
"enableViewMaps": true, "enableViewMaps": true,
"portalWithoutTrigger": true, "portalWithoutTrigger": true,
"enableMoveDirectly": true, "enableMoveDirectly": true,
} }
} }

View File

@ -1,25 +1,115 @@
functions_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = functions_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
{ {
"events" : { "_leaf": false,
"initGame": "游戏开始前的一些初始化操作", "_type": "object",
"setInitData" : "不同难度分别设置初始属性", "_data": {
"win" : "游戏获胜事件", "events": {
"lose" : "游戏失败事件", "_leaf": false,
"afterChangeFloor":"转换楼层结束的事件", "_type": "object",
"addPoint":"加点事件", "_data": {
"afterBattle" : "战斗结束后触发的事件", "initGame": {
"afterOpenDoor" : "开一个门后触发的事件", "_leaf": true,
"afterChangeLight" : "改变亮灯之后,可以触发的事件", "_type": "textarea",
"afterPushBox" : "推箱子后的事件", "_lint": true,
"afterUseBomb" : "使用炸弹/圣锤后的事件", "_data": "游戏开始前的一些初始化操作"
"beforeSaveData" : "即将存档前可以执行的操作", },
"afterLoadData" : "读档事件后,载入事件前,可以执行的操作" "setInitData": {
"_leaf": true,
}, "_type": "textarea",
"ui" : { "_lint": true,
"drawAbout" : "绘制“关于”界面" "_data": "不同难度分别设置初始属性"
}, },
"plugins": { "win": {
"plugin": "自定义插件编写" "_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": "自定义插件编写"
}
}
}
} }
} }