Merge pull request #343 from ckcz123/v2.0

V2.0
This commit is contained in:
Zhang Chen 2019-04-07 23:37:08 +08:00 committed by GitHub
commit c5ff01c261
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 1620 additions and 1488 deletions

View File

@ -394,12 +394,12 @@ core.updateViewport()
根据大地图的偏移量来更新窗口的视野范围。
core.nextX(n) / core.nextY(m)
core.nextX(n) / core.nextY(n)
获得勇士面对的第n个位置的横纵坐标。n可不填默认为1。
core.nearHero(x, y)
判定某个点是否和勇士的距离不大于1。
core.nearHero(x, y, n)
判定某个点是否和勇士的距离不大于n。n可不填默认为1。
core.gatherFollowers()
@ -775,8 +775,9 @@ core.getCurrentEnemys(floorId)
另外值得注意的是如果设置了某个怪物的displayIdInBook则会返回对应的怪物。
core.hasEnemyLeft(floorId)
检查某个楼层是否还有剩余的怪物。等价于 core.getCurrentEnemys(floorId).length > 0
core.hasEnemyLeft(enemyId, floorId)
检查某个楼层是否还有剩余的指定怪物。floorId为楼层ID可忽略表示当前楼层。
enemyId如果不填或null则检查是否剩余任何怪物否则只检查是否剩余指定的某类怪物。
```
## events.js
@ -1743,7 +1744,7 @@ config为绘制的配置项目前可以包括如下几项
- align文字对齐方式仅在maxWidth设置时有效默认为'left'。
- fontSize字体大小如果不设置则使用剧情文本设置中的正文字体大小。
- lineHeight绘制的行距值如果不设置则使用fontSize*1.3即1.3被行距)。
- time打字机效果。如果此项不为0则会用打字机效果逐个字进行绘制并设置core.status.event.interval定时器。
- time打字机效果。若不为0则会逐个字进行绘制并设置core.status.event.interval定时器。
core.drawTextBox(content, showAll)
@ -1755,7 +1756,7 @@ showAll可选如果为true则不会使用打字机效果而全部显示
core.drawScrollText(content, time, lineHeight, callback)
绘制一个滚动字幕。content为绘制内容time为总滚动时间默认为5000lineHeight为行距比例默认为1.4)。
绘制一个滚动字幕。content为绘制内容time为总时间默认为5000lineHeight为行距比例默认为1.4)。
滚动字幕将绘制在UI上支持所有的文字效果如\n${}\r\\i等但不支持\t和\b效果。
可以通过剧情文本设置中的align控制是否居中绘制offset控制其距离左边的偏移量。

View File

@ -207,12 +207,23 @@ function () {
样板的功能毕竟是写死的,有时候我们也需要修改样板的一些行为。
在V2.6以前需要直接打开libs目录下的对应文件并进行修改。但是开libs下的文件就会出现各种问题
- 不容易记得自己修改过什么,而且如果改错了很麻烦
- 例如,直接修改了某函数加了新功能,结果过段时间发现不需要,想删掉,但是这时候已经很难找到自己改过了什么了。
- 或者如果代码改错了不断往上面打补丁也只会使得libs越来越乱最后连自己做过什么都不记得。
- 不容易随着新样板接档进行迁移
- 也不好找到自己改过什么,从而能整理成新的插件在别的塔使用
- 不方便能整理成新的插件在别的塔使用总不能让别的塔也去修改libs吧
- ……
好消息的是从V2.6开始,我们再也不需要开文件了,而是可以直接在插件中对原始函数进行复写。
函数复写的好处如下:
- 不会影响系统原有代码。
- 即使写错了或不需要了,也只用把插件中的函数注释或删除即可,不会对原来的系统代码产生任何影响。
- 清晰明了。很容易方便知道自己修改过什么,尤其是可以和系统原有代码进行对比。
- 方便整理成新的插件,给其他的塔使用。
如果我想对xxx文件中的yyy函数进行重写其模式一般是`core.xxx.yyy = function (参数列表) { ... }`
下面是几个例子,从简单到复杂。
@ -224,8 +235,8 @@ function () {
```js
// 重写ui.js中的_drawBook_drawBackground函数
core.ui._drawBook_drawBackground = function () {
// core.__PIXEL__为定义的一个宏对于13x13的值是416对于15x15的值是480
core.drawBackground(0, 0, core.__PIXEL__, core.__PIXEL__);
// core.__PIXELS__为定义的一个宏对于13x13的值是416对于15x15的值是480
core.drawBackground(0, 0, core.__PIXELS__, core.__PIXELS__);
}
```
@ -300,7 +311,7 @@ core.events.openShop = function (shopId, needVisited) {
var drawMap = core.maps.drawMap; // 先把原始函数用一个变量记录下来
core.maps.drawMap = function (floorId, callback) {
console.log("drawMap..."); // 控制台打出一条信息
drawMap.call(core.maps, floorId, callback); // 需要使用`call`来告知this是core.maps
return drawMap.call(core.maps, floorId, callback); // 需要使用`call`来告知this是core.maps
}
```

View File

@ -324,6 +324,7 @@ action
| win_s
| lose_s
| if_s
| if_1_s
| switch_s
| while_s
| break_s
@ -1588,6 +1589,20 @@ var code = ['{"type": "if", "condition": "',expression_0,'",\n',
return code;
*/;
if_1_s
: '如果' ':' expression BGNL? Newline action+ BEND Newline
/* if_1_s
tooltip : if: 条件判断
helpUrl : https://h5mota.com/games/template/docs/#/event?id=if%EF%BC%9A%E6%9D%A1%E4%BB%B6%E5%88%A4%E6%96%AD
colour : this.eventColor
var code = ['{"type": "if", "condition": "',expression_0,'",\n',
'"true": [\n',action_0,'],\n',
'},\n'].join('');
return code;
*/;
switch_s
: '多重分歧 条件判定' ':' expression BGNL? Newline switchCase+ BEND Newline
@ -2583,12 +2598,19 @@ ActionParser.prototype.parseAction = function() {
data.text,this.next]);
break;
case "if": // 条件判断
this.next = MotaActionBlocks['if_s'].xmlText([
// MotaActionBlocks['evalString_e'].xmlText([data.condition]),
this.tryToUseEvFlag_e('evalString_e', [data.condition]),
this.insertActionList(data["true"]),
this.insertActionList(data["false"]),
this.next]);
if (data["false"]) {
this.next = MotaActionBlocks['if_s'].xmlText([
this.tryToUseEvFlag_e('evalString_e', [data.condition]),
this.insertActionList(data["true"]),
this.insertActionList(data["false"]),
this.next]);
}
else {
this.next = MotaActionBlocks['if_1_s'].xmlText([
this.tryToUseEvFlag_e('evalString_e', [data.condition]),
this.insertActionList(data["true"]),
this.next]);
}
break;
case "confirm": // 显示确认框
this.next = MotaActionBlocks['confirm_s'].xmlText([

View File

@ -1,460 +0,0 @@
var comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
{
"_type": "object",
"_data": {
"items": {
"_type": "object",
"_data": {
"items": {
"_type": "object",
"_data": {
"cls": {
"_leaf": true,
"_type": "select",
"_select": {
"values": [
"keys",
"items",
"constants",
"tools",
"equips"
]
},
"_data": "只能取keys(钥匙) items(宝石、血瓶) constants(永久物品) tools(消耗道具) equips(装备)"
},
"name": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "名称"
},
"text": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "道具在道具栏中显示的描述"
},
"equip": {
"_leaf": true,
"_type": "textarea",
"_data": "装备属性设置仅对cls为equips有效。\n如果此项不为null需要是一个对象里面可含\"type\"\"atk\"\"def\"\"mdef\"\"animate\"五项,分别对应装备部位、攻防魔防和动画。\n具体详见文档元件说明-装备)和已有的几个装备的写法。"
},
"hideInReplay": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否回放时绘制道具栏。\n如果此项为true则在回放录像时使用本道具将不会绘制道具栏页面而是直接使用。\n此项建议在会频繁连续多次使用的道具开启如开启技能或者《镜子》那样的镜像切换等等"
}
}
},
"itemEffect": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_data": "即捡即用类物品的效果仅对cls为items有效。"
},
"itemEffectTip": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_data": "即捡即用类物品在获得时提示的文字仅对cls为items有效。"
},
"useItemEffect": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_data": "道具效果仅对cls为tools或constants有效。"
},
"canUseItemEffect": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_data": "当前能否使用该道具仅对cls为tools或constants有效。"
},
"canEquip":{
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_data": "当前能否装备某个装备仅对cls为equips有效。\n与canUseItemEffect不同这里null代表可以装备。"
}
}
},
"items_template" : {'cls': 'items', 'name': '新物品'},
"enemys": {
"_type": "object",
"_data": {
"name": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "名称"
},
"displayIdInBook": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "在怪物手册中映射到的怪物ID。如果此项不为null则在怪物手册中将用目标ID来替换该怪物原本的ID。\n此项应被运用在同一个怪物的多朝向上。\n例如如果想定义同一个怪物的向下和向左的行走图则需要建立两个属性完全相同的怪物。\n但是这样会导致在怪物手册中同时存在向下和向左的两种怪物的显示。\n可以将朝向左的怪物的displayIdInBook项指定为朝向下的怪物ID这样在怪物手册中则会归一化只显示一个。"
},
"hp": {
"_leaf": true,
"_type": "textarea",
"_data": "生命值"
},
"atk": {
"_leaf": true,
"_type": "textarea",
"_data": "攻击力"
},
"def": {
"_leaf": true,
"_type": "textarea",
"_data": "防御力"
},
"money": {
"_leaf": true,
"_type": "textarea",
"_data": "金币"
},
"experience": {
"_leaf": true,
"_type": "textarea",
"_data": "经验"
},
"point": {
"_leaf": true,
"_type": "textarea",
"_data": "加点"
},
"special": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==null || thiseval instanceof Array || (thiseval==~~thiseval && thiseval>=0)",
"_data": "特殊属性\n\n0:无,1:先攻,2:魔攻,3:坚固,4:2连击,\n5:3连击,6:n连击,7:破甲,8:反击,9:净化,\n10:模仿,11:吸血,12:中毒,13:衰弱,14:诅咒,\n15:领域,16:夹击,17:仇恨,18:阻击,19:自爆,\n20:无敌,21:退化,22:固伤,23:重生,24:激光,25:光环\n\n多个属性例如用[1,4,11]表示先攻2连击吸血"
},
"value": {
"_leaf": true,
"_type": "textarea",
"_data": "特殊属性的数值\n如领域/阻激/激光怪的伤害值;吸血怪的吸血比例;光环怪增加生命的比例"
},
"zoneSquare": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "领域怪是否九宫格伤害"
},
"range": {
"_leaf": true,
"_type": "textarea",
"_range": "(thiseval==~~thiseval && thiseval>0)||thiseval==null",
"_data": "领域伤害的范围不加默认为1"
},
"notBomb": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "该怪物不可被炸"
},
"n": {
"_leaf": true,
"_type": "textarea",
"_range": "(thiseval==~~thiseval && thiseval>0)||thiseval==null",
"_data": "多连击的连击数"
},
"add": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "吸血后是否加到自身;光环是否叠加"
},
"atkValue": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==~~thiseval||thiseval==null",
"_data": "退化时勇士下降的攻击力点数;光环怪增加攻击的比例"
},
"defValue": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==~~thiseval||thiseval==null",
"_data": "退化时勇士下降的防御力点数;光环怪增加防御的比例"
},
"damage": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==~~thiseval||thiseval==null",
"_data": "战前扣血的点数"
}
}
},
"enemys_template" : {'name': '新敌人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
"maps": {
"_type": "object",
"_data": {
"id": {
"_leaf": true,
"_type": "textarea",
"_range": "false",
"_data": "图块ID"
},
"idnum": {
"_leaf": true,
"_type": "textarea",
"_range": "false",
"_data": "图块数字"
},
"cls": {
"_leaf": true,
"_type": "textarea",
"_range": "false",
"_data": "图块类别"
},
"trigger": {
"_leaf": true,
"_type": "select",
"_select": {
"values": [
null,
"openDoor",
"passNet",
"changeLight",
"pushBox",
"custom"
]
},
"_data": "该图块的默认触发器"
},
"noPass": {
"_leaf": true,
"_type": "select",
"_select": {
"values": [
null,
true,
false
]
},
"_data": "该图块是否不可通行true代表不可通行false代表可通行null代表使用系统缺省值"
},
"canBreak": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "该图块是否可被破墙或地震"
},
"cannotOut": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==null||(thiseval instanceof Array)",
"_data": "该图块的不可出方向\n可以在这里定义在该图块时不能前往哪个方向可以达到悬崖之类的效果\n例如 [\"up\", \"left\"] 代表在该图块时不能往上和左走\n此值对背景层、事件层、前景层上的图块均有效"
},
"cannotIn": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==null||(thiseval instanceof Array)",
"_data": "该图块的不可入方向\n可以在这里定义不能朝哪个方向进入该图块可以达到悬崖之类的效果\n例如 [\"down\"] 代表不能从该图块的上方点朝向下进入此图块\n此值对背景层、事件层、前景层上的图块均有效"
},
"animate": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==~~thiseval||thiseval==null",
"_data": "该图块的全局动画帧数。\n如果此项为null则对于除了npc48外使用素材默认帧数npc48默认是1帧即静止。"
},
"faceIds": {
"_leaf": true,
"_type": "textarea",
"_data": "行走图朝向仅对NPC有效。可以在这里定义同一个NPC的多个朝向行走图。\n比如 {\"up\":\"N333\",\"down\":\"N334\",\"left\":\"N335\",\"right\":\"N336\"} 就将该素材的上下左右朝向分别绑定到N333,N334,N335和N336四个图块。\n在勇士撞上NPC时或NPC在移动时会自动选择最合适的朝向图块如果存在定义来进行绘制。"
}
}
},
"floors": {
"_type": "object",
"_data": {
"floor": {
"_type": "object",
"_data": {
"floorId": {
"_leaf": true,
"_type": "textarea",
"_range": "false",
"_data": "文件名和floorId需要保持完全一致 \n楼层唯一标识符仅能由字母、数字、下划线组成且不能由数字开头 \n推荐用法第20层就用MT20第38层就用MT38地下6层就用MT_6用下划线代替负号隐藏3层用MT3hh表示隐藏等等 \n楼层唯一标识符需要和名字完全一致 \n这里不能更改floorId,请通过另存为来实现"
},
"title": {
"_leaf": true,
"_type": "textarea",
"_data": "楼层中文名,将在切换楼层和浏览地图时显示"
},
"name": {
"_leaf": true,
"_type": "textarea",
"_data": "显示在状态栏中的层数"
},
"width": {
"_leaf": true,
"_type": "textarea",
"_range": "false",
"_data": "地图x方向大小,这里不能更改,仅能在新建地图时设置,null视为13"
},
"height": {
"_leaf": true,
"_type": "textarea",
"_range": "false",
"_data": "地图y方向大小,这里不能更改,仅能在新建地图时设置,null视为13"
},
"canFlyTo": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "该楼能否被楼传器飞到(不能的话在该楼也不允许使用楼传器)"
},
"canUseQuickShop": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "该层是否允许使用快捷商店"
},
"cannotViewMap": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "该层是否不允许被浏览地图看到;如果勾上则浏览地图会跳过该层"
},
"cannotMoveDirectly": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "该层是否不允许瞬间移动;如果勾上则不可在此层进行瞬移"
},
"firstArrive": {
"_leaf": true,
"_type": "event",
"_event": "firstArrive",
"_data": "第一次到该楼层触发的事件,可以双击进入事件编辑器。"
},
"eachArrive": {
"_leaf": true,
"_type": "event",
"_event": "eachArrive",
"_data": "每次到该楼层触发的事件可以双击进入事件编辑器该事件会在firstArrive执行后再执行。"
},
"parallelDo": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_data": "在该层楼时执行的并行事件处理。\n可以在这里写上任意需要自动执行的脚本比如打怪自动开门等。\n详见文档-事件-并行事件处理。"
},
"upFloor": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==null||((thiseval instanceof Array) && thiseval.length==2)",
"_data": "该层上楼点,如[2,3]。\n如果此项不为null则楼层转换时的stair:upFloor以及楼传器的落点会被替换成该点而不是该层的上楼梯。"
},
"downFloor": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==null||((thiseval instanceof Array) && thiseval.length==2)",
"_data": "该层下楼点,如[2,3]。\n如果此项不为null则楼层转换时的stair:downFloor以及楼传器的落点会被替换成该点而不是该层的下楼梯。"
},
"defaultGround": {
"_leaf": true,
"_type": "select",
"_select": {
"values": Object.keys(editor.core.icons.icons.terrains)
},
"_data": "默认地面的图块ID此项修改后需要刷新才能看到效果。"
},
"images": {
"_leaf": true,
"_type": "textarea",
"_data": "背景/前景图;你可以选择若干张图片来作为背景/前景素材。详细用法请参见文档“自定义素材”中的说明。"
},
"color": {
"_leaf": true,
"_type": "textarea",
"_data": "该层的默认画面色调。本项可不写代表无色调如果写需要是一个RGBA数组如[255,0,0,0.3]"
},
"weather": {
"_leaf": true,
"_type": "textarea",
"_data": "该层的默认天气。本项可忽略表示晴天,如果写则第一项为\"rain\"\"snow\"或\"fog\"代表雨雪雾第二项为1-10之间的数代表强度。\n如[\"rain\", 8]代表8级雨天。"
},
"bgm": {
"_leaf": true,
"_type": "select",
"_select": {
"values": [null].concat(Object.keys(editor.core.material.bgms))
},
"_data": "到达该层后默认播放的BGM。本项可忽略或者为一个定义过的背景音乐如\"bgm.mp3\"。"
},
"item_ratio": {
"_leaf": true,
"_type": "textarea",
"_range": "(thiseval==~~thiseval && thiseval>=0)||thiseval==null",
"_data": "每一层的宝石/血瓶效果,即获得宝石和血瓶时框内\"ratio\"的值。"
},
"underGround": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否是地下层如果该项为true则同层传送将传送至上楼梯"
}
}
},
"loc": {
"_type": "object",
"_data": {
"events": {
"_leaf": true,
"_type": "event",
"_event": "event",
"_data": "该点的可能事件列表,可以双击进入事件编辑器。"
},
"changeFloor": {
"_leaf": true,
"_type": "event",
"_event": "changeFloor",
"_data": "该点楼层转换事件该事件不能和上面的events同时出现否则会被覆盖"
},
"afterBattle": {
"_leaf": true,
"_type": "event",
"_event": "afterBattle",
"_data": "该点战斗后可能触发的事件列表,可以双击进入事件编辑器。"
},
"afterGetItem": {
"_leaf": true,
"_type": "event",
"_event": "afterGetItem",
"_data": "该点获得道具后可能触发的事件列表,可以双击进入事件编辑器。"
},
"afterOpenDoor": {
"_leaf": true,
"_type": "event",
"_event": "afterOpenDoor",
"_data": "该点开完门后可能触发的事件列表,可以双击进入事件编辑器。"
},
"cannotMove": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==null||(thiseval instanceof Array)",
"_data": "该点不可通行的方向 \n 可以在这里定义该点不能前往哪个方向,可以达到悬崖之类的效果\n例如 [\"up\", \"left\"] 代表该点不能往上和左走"
}
}
}
}
}
}
}

View File

@ -1,677 +0,0 @@
var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
{
"_type": "object",
"_data": {
"main": {
"_type": "object",
"_data": {
"floorIds": {
"_leaf": true,
"_type": "textarea",
"_range": "editor.mode.checkFloorIds(thiseval)",
"_data": "在这里按顺序放所有的楼层;其顺序直接影响到楼层传送器、浏览地图和上/下楼器的顺序"
},
"images": {
"_leaf": true,
"_type": "textarea",
"_range": "editor.mode.checkUnique(thiseval)",
"_data": "在此存放所有可能使用的图片tilesets除外 \n图片可以被作为背景图的一部分也可以直接用自定义事件进行显示。 \n 图片名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好 \n 建议对于较大的图片,在网上使用在线的“图片压缩工具(http://compresspng.com/zh/)”来进行压缩,以节省流量 \n 依次向后添加"
},
"tilesets": {
"_leaf": true,
"_type": "textarea",
"_range": "editor.mode.checkUnique(thiseval)",
"_data": "在此存放额外素材的图片名, \n可以自定导入任意张素材图片无需PS无需注册即可直接在游戏中使用 \n 形式如[\"1.png\", \"2.png\"] ,将需要的素材图片放在images目录下 \n 素材的宽高必须都是32的倍数且图片上的总图块数不超过1000即最多有1000个32*32的图块在该图片上"
},
"animates": {
"_leaf": true,
"_type": "textarea",
"_range": "editor.mode.checkUnique(thiseval)",
"_data": "在此存放所有可能使用的动画必须是animate格式在这里不写后缀名 \n动画必须放在animates目录下文件名不能使用中文不能带空格或特殊字符 \n \"jianji\", \"thunder\" \n 根据需求自行添加"
},
"bgms": {
"_leaf": true,
"_type": "textarea",
"_range": "editor.mode.checkUnique(thiseval)",
"_data": "在此存放所有的bgm和文件名一致。 \n音频名不能使用中文不能带空格或特殊字符可以直接改名拼音就好"
},
"sounds": {
"_leaf": true,
"_type": "textarea",
"_range": "editor.mode.checkUnique(thiseval)",
"_data": "在此存放所有的SE和文件名一致 \n音频名不能使用中文不能带空格或特殊字符可以直接改名拼音就好"
},
"startBackground": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "标题界面的背景建议使用jpg格式以压缩背景图空间"
},
"startLogoStyle": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "标题样式:可以改变颜色,也可以写\"display: none\"来隐藏标题"
},
"levelChoose": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Array && thiseval.length>=1 && thiseval[0] instanceof Array && thiseval[0].length==2",
"_data": "难度选择每个数组的第一个是其在标题界面显示的难度第二个是在游戏内部传输的字符串会显示在状态栏修改此处后需要在project/functions中作相应更改。\n如果需直接开始游戏将下面的startDirectly开关打开即可。"
},
"equipName": {
"_leaf": true,
"_type": "textarea",
"_range": "(thiseval instanceof Array && thiseval.length<=6)||thiseval==null",
"_data": "装备位名称为不超过6个的数组此项的顺序与equiptype数值关联例如可写[\"武器\",\"防具\",\"首饰\"]等等。"
},
"startBgm": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "在标题界面应该播放的bgm内容"
},
"statusLeftBackground": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "横屏时左侧状态栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图推荐写法\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"\n图片最好进行一些压缩等操作节省流量。"
},
"statusTopBackground": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "竖屏时上方状态栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图推荐写法\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"\n图片最好进行一些压缩等操作节省流量。"
},
"toolsBackground": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "竖屏时下方道具栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图推荐写法\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"\n图片最好进行一些压缩等操作节省流量。"
},
"borderColor": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "边框颜色,包括游戏边界的边框和对话框边框等。"
},
"statusBarColor": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "状态栏的文字颜色,默认是白色"
},
"hardLabelColor": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "难度显示的颜色,默认是红色"
},
"floorChangingBackground": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "楼层转换界面的背景样式可以使用纯色默认值black也可以使用图片参见状态栏的图片写法"
},
"floorChangingTextColor": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "楼层转换界面的文字颜色,默认是白色"
},
"font": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "游戏中使用的字体默认是Verdana"
}
}
},
"firstData": {
"_type": "object",
"_data": {
"title": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "游戏名,将显示在标题页面以及切换楼层的界面中"
},
"name": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_range": "/^[a-zA-Z0-9_]{1,30}$/.test(thiseval)",
"_data": "游戏的唯一英文标识符。由英文、数字、下划线组成不能超过30个字符。\n此项必须修改其将直接影响到存档的定位"
},
"version": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "当前游戏版本;版本不一致的存档不能通用。"
},
"floorId": {
"_leaf": true,
"_type": "select",
"_select": {
"values": data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main.floorIds
},
"_range": "data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main.floorIds.indexOf(thiseval)!==-1",
"_data": "初始楼层的ID"
},
"hero": {
"_type": "object",
"_data": {
"name": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "勇士名;可以改成喜欢的"
},
"lv": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==~~thiseval &&thiseval>0",
"_data": "初始等级,该项必须为正整数"
},
"hpmax": {
"_leaf": true,
"_type": "textarea",
"_data": "初始生命上限只有在enableHPMax开启时才有效"
},
"hp": {
"_leaf": true,
"_type": "textarea",
"_data": "初始生命值"
},
"manamax": {
"_leaf": true,
"_type": "textarea",
"_data": "魔力上限此项非负才会生效null或小于0都不会生效"
},
"mana": {
"_leaf": true,
"_type": "textarea",
"_data": "初始魔力值只在enableMana开启时才有效"
},
"atk": {
"_leaf": true,
"_type": "textarea",
"_data": "初始攻击"
},
"def": {
"_leaf": true,
"_type": "textarea",
"_data": "初始防御"
},
"mdef": {
"_leaf": true,
"_type": "textarea",
"_data": "初始魔防"
},
"money": {
"_leaf": true,
"_type": "textarea",
"_data": "初始金币"
},
"experience": {
"_leaf": true,
"_type": "textarea",
"_data": "初始经验"
},
"equipment": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Array",
"_data": "初始装上的装备,此处建议请直接留空数组"
},
"items": {
"_type": "object",
"_data": {
"keys": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Object && !(thiseval instanceof Array)",
"_data": "初始三种钥匙个数"
},
"constants": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Object && !(thiseval instanceof Array)",
"_data": "初始永久道具个数,例如初始送手册可以写 {\"book\": 1}"
},
"tools": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Object && !(thiseval instanceof Array)",
"_data": "初始消耗道具个数,例如初始有两破可以写 {\"pickaxe\": 2}"
},
"equips": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Object && !(thiseval instanceof Array)",
"_data": "初始装备个数,例如初始送铁剑可以写 {\"sword1\": 1}"
}
}
},
"loc": {
"_type": "object",
"_data": {
"direction": {
"_leaf": true,
"_type": "select",
"_data": "勇士初始方向",
"_select": {
"values": [
"up",
"down",
"left",
"right"
]
},
},
"x": {
"_leaf": true,
"_type": "textarea",
"_data": "勇士初始x坐标"
},
"y": {
"_leaf": true,
"_type": "textarea",
"_data": "勇士初始y坐标"
}
}
},
"flags": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Object && !(thiseval instanceof Array)",
"_data": "游戏过程中的变量或flags"
},
"steps": {
"_leaf": true,
"_type": "textarea",
"_data": "行走步数统计"
}
}
},
"startCanvas": {
"_leaf": true,
"_type": "event",
"_event": "firstArrive",
"_range": "thiseval==null || thiseval instanceof Array",
"_data": "标题界面事件化,可以使用事件流的形式来绘制开始界面等。\n需要开启startUsingCanvas这个开关。\n详见文档-个性化-标题界面事件化。"
},
"startText": {
"_leaf": true,
"_type": "event",
"_event": "firstArrive",
"_range": "thiseval==null || thiseval instanceof Array",
"_data": "游戏开始前剧情,可以执行任意自定义事件。\n双击进入事件编辑器。\n如果无剧情直接留一个空数组即可。"
},
"shops": {
"_leaf": true,
"_type": "event",
"_event": "shop",
"_range": "thiseval instanceof Array",
"_data": "全局商店,是一个数组,可以双击进入事件编辑器。"
},
"levelUp": {
"_leaf": true,
"_type": "event",
"_event": "level",
"_range": "thiseval==null || thiseval instanceof Array",
"_data": "经验升级所需要的数值,是一个数组,可以双击进行编辑。 \n 第一项为初始等级仅title生效 \n 每一个里面可以含有三个参数 need, title, action \n need为所需要的经验数值可以是个表达式。请确保need依次递增 \n title为该等级的名称也可以省略代表使用系统默认值本项将显示在状态栏中 \n action为本次升级所执行的事件可由若干项组成"
}
}
},
"values": {
"_type": "object",
"_data": {
"lavaDamage": {
"_leaf": true,
"_type": "textarea",
"_data": "经过血网受到的伤害"
},
"poisonDamage": {
"_leaf": true,
"_type": "textarea",
"_data": "中毒后每步受到的伤害"
},
"weakValue": {
"_leaf": true,
"_type": "textarea",
"_data": "衰弱状态下攻防减少的数值\n如果此项不小于1则作为实际下降的数值比如10就是攻防各下降10\n如果在0到1之间则为下降的比例比如0.3就是下降30%的攻防)"
},
"redJewel": {
"_leaf": true,
"_type": "textarea",
"_data": "红宝石加攻击的数值"
},
"blueJewel": {
"_leaf": true,
"_type": "textarea",
"_data": "蓝宝石加防御的数值"
},
"greenJewel": {
"_leaf": true,
"_type": "textarea",
"_data": "绿宝石加魔防的数值"
},
"redPotion": {
"_leaf": true,
"_type": "textarea",
"_data": "红血瓶加血数值"
},
"bluePotion": {
"_leaf": true,
"_type": "textarea",
"_data": "蓝血瓶加血数值"
},
"yellowPotion": {
"_leaf": true,
"_type": "textarea",
"_data": "黄血瓶加血数值"
},
"greenPotion": {
"_leaf": true,
"_type": "textarea",
"_data": "绿血瓶加血数值"
},
"breakArmor": {
"_leaf": true,
"_type": "textarea",
"_data": "破甲的比例战斗前怪物附加角色防御的x倍作为伤害"
},
"counterAttack": {
"_leaf": true,
"_type": "textarea",
"_data": "反击的比例战斗时怪物每回合附加角色攻击的x倍作为伤害无视角色防御"
},
"purify": {
"_leaf": true,
"_type": "textarea",
"_data": "净化的比例战斗前怪物附加勇士魔防的x倍作为伤害"
},
"hatred": {
"_leaf": true,
"_type": "textarea",
"_data": "仇恨属性中,每杀死一个怪物获得的仇恨值"
},
"moveSpeed": {
"_leaf": true,
"_type": "textarea",
"_data": "行走速度即勇士每走一格的时间一般100比较合适"
},
"animateSpeed": {
"_leaf": true,
"_type": "textarea",
"_data": "全局动画时间即怪物振动频率一般300比较合适"
},
"floorChangeTime": {
"_leaf": true,
"_type": "textarea",
"_data": "默认楼层切换时间"
}
}
},
"flags": {
"_type": "object",
"_data": {
"enableFloor": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏显示当前楼层"
},
"enableName": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏显示勇士名字"
},
"enableLv": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏显示当前等级"
},
"enableHPMax": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否是否启用生命上限"
},
"enableMana": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否开启魔力值"
},
"enableMDef": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏及战斗界面显示魔防(护盾)"
},
"enableMoney": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏、怪物手册及战斗界面显示金币"
},
"enableExperience": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏、怪物手册及战斗界面显示经验"
},
"enableLevelUp": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否允许等级提升进阶如果上面enableExperience为false则此项恒视为false"
},
"levelUpLeftMode": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "进阶使用扣除模式即在状态栏显示距离下个等级所需要的经验值只有enableExperience和enableLevelUp均开启时才有效。"
},
"enableKeys": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏显示三色钥匙数量"
},
"enablePZF": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏显示破炸飞数量"
},
"enableDebuff": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏显示毒衰咒"
},
"enableSkill": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否启用技能栏"
},
"flyNearStair": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否需要在楼梯边使用传送器"
},
"pickaxeFourDirections": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "使用破墙镐是否四个方向都破坏如果false则只破坏面前的墙壁"
},
"bombFourDirections": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "使用炸弹是否四个方向都会炸如果false则只炸面前的怪物即和圣锤等价"
},
"snowFourDirections": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "使用冰冻徽章是否四个方向都会消除熔岩如果false则只消除面前的熔岩"
},
"bigKeyIsBox": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "如果此项为true则视为钥匙盒红黄蓝钥匙+1若为false则视为大黄门钥匙"
},
"equipment": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "剑和盾是否作为装备。如果此项为true则作为装备需要在装备栏使用否则将直接加属性。"
},
"equipboxButton": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "状态栏的装备按钮。若此项为true则将状态栏中的楼层转换器按钮换为装备栏按钮"
},
"enableAddPoint": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否支持加点"
},
"enableNegativeDamage": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否支持负伤害(回血)"
},
"hatredDecrease": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在和仇恨怪战斗后减一半的仇恨值此项为false则和仇恨怪不会扣减仇恨值。"
},
"betweenAttackCeil": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "夹击方式是向上取整还是向下取整。如果此项为true则为向上取整为false则为向下取整"
},
"useLoop": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否循环计算临界如果此项为true则使用循环法而不是回合数计算法来算临界\n从V2.5.3开始,对于大数据的循环法将改为使用二分法进行计算"
},
"startUsingCanvas": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否开始菜单canvas化如果此项为true则将使用canvas来绘制开始菜单"
},
"startDirectly": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "点击“开始游戏”后是否立刻开始游戏而不显示难度选择界面"
},
"statusCanvas": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否状态栏canvas化即手动自定义绘制状态栏。\n如果此项开启则可在脚本编辑的drawStatusBar中自定义绘制菜单栏。"
},
"statusCanvasRowsOnMobile": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==null || (thiseval>0 && thiseval<=4)",
"_data": "竖屏模式下顶端状态栏canvas化后的行数。\n此项将决定竖屏的状态栏高度如果设置则不小于1且不大于4。\n仅在statusCanvas开启时才有效"
},
"displayEnemyDamage": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否地图怪物显伤;用户可以手动在菜单栏中开关"
},
"displayCritical": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否地图显示临界;用户可以手动在菜单栏中开关"
},
"displayExtraDamage": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否地图高级显伤(领域、夹击等);用户可以手动在菜单栏中开关"
},
"enableGentleClick": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否允许轻触(获得面前物品)"
},
"potionWhileRouting": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "寻路算法是否经过血瓶如果该项为false则寻路算法会自动尽量绕过血瓶"
},
"ignoreChangeFloor": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "经过楼梯、传送门时是否能“穿透”。\n穿透的意思是自动寻路得到的的路径中间经过了楼梯行走时是否触发楼层转换事件"
},
"canGoDeadZone": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否允许走到将死的领域上。如果此项为true则可以走到将死的领域上"
},
"enableMoveDirectly": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否允许瞬间移动"
},
"enableDisabledShop": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否允许查看未开启状态的快捷商店内容;如果此项为真,则对于未开启状态的商店允许查看其内容(但不能购买)"
},
"disableShopOnDamage": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在经过领域/夹击/路障等伤害后禁用快捷商店。"
},
"checkConsole": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否检查控制台的开启情况。"
}
}
}
}
}

View File

@ -111,6 +111,7 @@ editor_blockly = function () {
],
'事件控制':[
MotaActionBlocks['if_s'].xmlText(),
MotaActionBlocks['if_1_s'].xmlText(),
MotaActionFunctions.actionParser.parseList({"type": "switch", "condition": "判别值", "caseList": [
{"action": [{"type": "comment", "text": "当判别值是值的场合执行此事件"}]},
{"action": [], "nobreak": true},

View File

@ -17,7 +17,7 @@ editor_file = function (editor, callback) {
if (window.location.href.indexOf('_server') !== -1)
script.src = key + '.js';
else
script.src = '_server/' + key + '.js';
script.src = '_server/table/' + key + '.js';
document.body.appendChild(script);
script.onload = function () {
editor_file[value] = eval(key.replace('.', '_') + '_c456ea59_6018_45ef_8bcc_211a24c627dc');
@ -941,11 +941,7 @@ editor_file = function (editor, callback) {
return formatArrStr;
}
var encode = function (str) {
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) {
return String.fromCharCode(parseInt(p1, 16))
}))
}
var encode = editor.util.encode64
var alertWhenCompress = function(){
if(editor.useCompress===true){

View File

@ -11,14 +11,14 @@ editor_multi = function () {
tabSize: 4,
indentWithTabs: true,
smartIndent: true,
mode: {name: "javascript", globalVars: true, localVars: true},
mode: { name: "javascript", globalVars: true, localVars: true },
lineWrapping: true,
continueComments: "Enter",
gutters: ["CodeMirror-lint-markers"],
lint: true,
autocomplete: true,
autoCloseBrackets: true,
highlightSelectionMatches: {showToken: /\w/, annotateScrollbar: true}
highlightSelectionMatches: { showToken: /\w/, annotateScrollbar: true }
});
editor_multi.codeEditor = codeEditor;
@ -26,9 +26,9 @@ editor_multi = function () {
codeEditor.on("keyup", function (cm, event) {
if (codeEditor.getOption("autocomplete") && !event.ctrlKey && (
(event.keyCode >= 65 && event.keyCode <= 90) ||
(!event.shiftKey && event.keyCode == 190) || (event.shiftKey && event.keyCode == 189))){
(!event.shiftKey && event.keyCode == 190) || (event.shiftKey && event.keyCode == 189))) {
try {
CodeMirror.commands.autocomplete(cm, null, {completeSingle: false});
CodeMirror.commands.autocomplete(cm, null, { completeSingle: false });
} catch (e) {
}
}
@ -39,7 +39,7 @@ editor_multi = function () {
editor_multi.lintAutocomplete = false;
editor_multi.show = function () {
if (typeof(selectBox) !== typeof(undefined)) selectBox.isSelected(false);
if (typeof (selectBox) !== typeof (undefined)) selectBox.isSelected(false);
var valueNow = codeEditor.getValue();
//try{eval('function _asdygakufyg_() { return '+valueNow+'\n}');editor_multi.lintAutocomplete=true;}catch(ee){}
if (valueNow.slice(0, 8) === 'function') editor_multi.lintAutocomplete = true;
@ -60,7 +60,7 @@ editor_multi = function () {
}
editor_multi.indent = function (field) {
if (typeof(editor) !== typeof(undefined) && editor && editor.mode && editor.mode.indent) return editor.mode.indent(field);
if (typeof (editor) !== typeof (undefined) && editor && editor.mode && editor.mode.indent) return editor.mode.indent(field);
return '\t';
}
@ -102,7 +102,7 @@ editor_multi = function () {
eval('var tobj=' + (input.value || 'null'));
var tmap = {};
var tstr = JSON.stringify(tobj, function (k, v) {
if (typeof(v) === typeof('') && v.slice(0, 8) === 'function') {
if (typeof (v) === typeof ('') && v.slice(0, 8) === 'function') {
var id_ = editor.util.guid();
tmap[id_] = v.toString();
return id_;
@ -128,13 +128,22 @@ editor_multi = function () {
editor_multi.id = '';
return;
}
// ----- 自动格式化
_format();
if (editor_multi.id === 'callFromBlockly') {
// ----- 自动格式化
_format();
editor_multi.id = '';
editor_multi.multiLineDone();
return;
}
if (editor_multi.id === 'importFile') {
_format();
editor_multi.id = '';
editor_multi.writeFileDone();
return;
}
var setvalue = function (value) {
var thisTr = document.getElementById(editor_multi.id);
editor_multi.id = '';
@ -159,6 +168,8 @@ editor_multi = function () {
editor_multi.hide();
input.onchange();
}
// ----- 自动格式化
_format();
setvalue(codeEditor.getValue() || '');
}
@ -179,6 +190,49 @@ editor_multi = function () {
multiLineArgs[2](newvalue, multiLineArgs[0], multiLineArgs[1])
}
var _fileValues = ['']
editor_multi.importFile = function (filename) {
editor_multi.id = 'importFile'
_fileValues[0] = filename
codeEditor.setValue('loading')
editor_multi.show();
fs.readFile(filename, 'base64', function (e, d) {
if (e) {
codeEditor.setValue('加载文件失败:\n' + e)
editor_multi.id = ''
return;
}
var str = editor.util.decode64(d)
codeEditor.setValue(str)
_fileValues[1] = str
})
}
editor_multi.writeFileDone = function () {
fs.writeFile(_fileValues[0], editor.util.encode64(codeEditor.getValue() || ''), 'base64', function (err, data) {
if (err) printe('文件写入失败,请手动粘贴至' + _fileValues[0] + '\n' + err);
else {
editor_multi.hide();
printf(_fileValues[0] + " 写入成功F5刷新后生效");
}
});
}
editor_multi.editCommentJs = function (mod) {
var dict = {
loc: '_server/table/comment.js',
enemyitem: '_server/table/comment.js',
floor: '_server/table/comment.js',
tower: '_server/table/data.comment.js',
functions: '_server/table/functions.comment.js',
commonevent: '_server/table/events.comment.js',
plugins: '_server/table/plugins.comment.js',
}
editor_multi.lintAutocomplete = true
editor_multi.setLint()
editor_multi.importFile(dict[mod])
}
return editor_multi;
}
//editor_multi=editor_multi();

View File

@ -121,7 +121,7 @@ editor_table_wrapper = function (editor) {
// 事实上能执行到这一步工程没崩掉打不开,就继续吧..
if (keysForTableOrder[ii] === voidMark) {
if (typeof id_815975ad_ee6f_4684_aac7_397b7e392702 === "undefined") {
alert('comment和data不匹配,请在群 HTML5造塔技术交流群 959329661 内反馈')
// alert('comment和data不匹配,请在群 HTML5造塔技术交流群 959329661 内反馈')
console.error('comment和data不匹配,请在群 HTML5造塔技术交流群 959329661 内反馈')
id_815975ad_ee6f_4684_aac7_397b7e392702 = 1;
}

View File

@ -59,7 +59,7 @@ editor_util_wrapper = function (editor) {
// SOFTWARE.
//--------------------------------------------
// https://github.com/carloscabo/colz/blob/master/public/js/colz.class.js
var round=Math.round;
var round = Math.round;
var rgbToHsl = function (rgba) {
var arg, r, g, b, h, s, l, d, max, min;
@ -141,9 +141,21 @@ editor_util_wrapper = function (editor) {
}
return [round(r * 255), round(g * 255), round(b * 255)];
}
editor_util.prototype.rgbToHsl=rgbToHsl
editor_util.prototype.hue2rgb=hue2rgb
editor_util.prototype.hslToRgb=hslToRgb
editor_util.prototype.rgbToHsl = rgbToHsl
editor_util.prototype.hue2rgb = hue2rgb
editor_util.prototype.hslToRgb = hslToRgb
editor_util.prototype.encode64 = function (str) {
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) {
return String.fromCharCode(parseInt(p1, 16))
}))
}
editor_util.prototype.decode64 = function (str) {
return decodeURIComponent(atob(str.replace(/-/g, '+').replace(/_/g, '/').replace(/\s/g, '')).split('').map(function (c) {
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)
}).join(''))
}
editor.constructor.prototype.util = new editor_util();
}

View File

@ -1,43 +0,0 @@
var events_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
{
"_type": "object",
"_data": {
"commonEvent": {
"_type": "object",
"_data": function (key) {
var obj = {
"加点事件": {
"_leaf": true,
"_type": "event",
"_range": "thiseval instanceof Array",
"_event": "commonEvent",
"_data": "打败怪物后加点"
},
"毒衰咒处理": {
"_leaf": true,
"_type": "event",
"_range": "thiseval instanceof Array",
"_event": "commonEvent",
"_data": "毒衰咒效果处理"
},
"滑冰事件": {
"_leaf": true,
"_type": "event",
"_range": "thiseval instanceof Array",
"_event": "commonEvent",
"_data": "滑冰事件"
},
}
if (obj[key]) return obj[key];
return {
"_leaf": true,
"_type": "event",
"_event": "commonEvent",
"_data": "自定义公共事件,可以双击进入事件编辑器"
}
}
}
}
}

View File

@ -1,212 +0,0 @@
var functions_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
{
"_type": "object",
"_data": {
"events": {
"_type": "object",
"_data": {
"resetGame": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "重置整个游戏"
},
"setInitData": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "设置初始属性"
},
"win": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "游戏获胜事件"
},
"lose": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "游戏失败事件"
},
"changingFloor": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "切换楼层中"
},
"afterChangeFloor": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "切换楼层后"
},
"flyTo": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "楼层飞行"
},
"beforeBattle": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "战前事件"
},
"afterBattle": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "战后事件"
},
"afterOpenDoor": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "开门后事件"
},
"afterGetItem": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "获得道具后事件"
},
"afterChangeLight": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "改变亮灯事件"
},
"afterPushBox": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "推箱子事件"
},
"afterUseBomb": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "炸弹事件"
},
"canUseQuickShop": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "能否用快捷商店"
}
}
},
"enemys": {
"_type": "object",
"_data": {
"getSpecials": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "怪物特殊属性定义"
},
"getEnemyInfo": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "获得怪物真实属性"
},
"getDamageInfo": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "获得战斗伤害信息"
},
"updateEnemys": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "更新怪物数据"
}
}
},
"actions": {
"_type": "object",
"_data": {
"onKeyUp": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "按键处理"
}
}
},
"control": {
"_type": "object",
"_data": {
"saveData": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "存档操作"
},
"loadData": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "读档操作"
},
"updateStatusBar": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "更新状态栏"
},
"updateCheckBlock": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "阻激夹域伤害"
},
"moveOneStep": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "每一步后的操作"
},
"moveDirectly": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "瞬间移动处理"
},
"parallelDo": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "并行事件处理"
}
}
},
"ui": {
"_type": "object",
"_data": {
"drawStatusBar": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "自绘状态栏"
},
"drawStatistics": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "地图数据统计"
},
"drawAbout": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "绘制关于界面"
}
}
}
}
}

View File

@ -1,27 +0,0 @@
var plugins_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
{
"_type": "object",
"_data": function (key) {
var obj = {
"init": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string'",
"_data": "自定义插件"
},
"drawLight": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "绘制灯光效果"
},
}
if (obj[key]) return obj[key];
return {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "自定义插件"
}
}
}

View File

@ -16,7 +16,7 @@
+ [ ] editor 执行初始化流程加组合各组件
+ [ ] 原editor_mode 移除
+ [ ] 原vm 移除
+ [ ] \*comment.js 表格注释与结构, 移至comment/\*comment.js
+ [x] \*comment.js 表格注释与结构, 移至table/\*comment.js
## 对象结构
@ -85,7 +85,7 @@ editor: {
+ [ ] 画地图也自动保存
+ [ ] 修改系统的触发器(下拉菜单增加新项)
+ [x] 修改系统的触发器(下拉菜单增加新项)
在编辑器修改`comment.js`现场发readFile请求读文件然后开脚本编辑器进行编辑
+ [ ] ? 删除注册项/修改图块ID

467
_server/table/comment.js Normal file
View File

@ -0,0 +1,467 @@
/*
* 表格配置项
* 在这里可以对表格中的各项显示进行配置包括表格项提示内容等内容具体写法照葫芦画瓢即可
* 本配置项包括道具怪物图块属性楼层属性等内容
*/
var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "object",
"_data": {
// --------------------------- 【道具】相关的表格配置 --------------------------- //
"items": {
"_type": "object",
"_data": {
"items": {
"_type": "object",
"_data": {
"cls": {
"_leaf": true,
"_type": "select",
"_select": {
"values": [
"keys",
"items",
"constants",
"tools",
"equips"
]
},
"_data": "只能取keys(钥匙) items(宝石、血瓶) constants(永久物品) tools(消耗道具) equips(装备)"
},
"name": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "名称"
},
"text": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "道具在道具栏中显示的描述"
},
"equip": {
"_leaf": true,
"_type": "textarea",
"_data": "装备属性设置仅对cls为equips有效。\n如果此项不为null需要是一个对象里面可含\"type\"\"atk\"\"def\"\"mdef\"\"animate\"五项,分别对应装备部位、攻防魔防和动画。\n具体详见文档元件说明-装备)和已有的几个装备的写法。"
},
"hideInReplay": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否回放时绘制道具栏。\n如果此项为true则在回放录像时使用本道具将不会绘制道具栏页面而是直接使用。\n此项建议在会频繁连续多次使用的道具开启如开启技能或者《镜子》那样的镜像切换等等"
}
}
},
"itemEffect": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_data": "即捡即用类物品的效果仅对cls为items有效。"
},
"itemEffectTip": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_data": "即捡即用类物品在获得时提示的文字仅对cls为items有效。"
},
"useItemEffect": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_data": "道具效果仅对cls为tools或constants有效。"
},
"canUseItemEffect": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_data": "当前能否使用该道具仅对cls为tools或constants有效。"
},
"canEquip": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_data": "当前能否装备某个装备仅对cls为equips有效。\n与canUseItemEffect不同这里null代表可以装备。"
}
}
},
"items_template": { 'cls': 'items', 'name': '新物品' },
// --------------------------- 【怪物】相关的表格配置 --------------------------- //
"enemys": {
"_type": "object",
"_data": {
"name": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "名称"
},
"displayIdInBook": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "在怪物手册中映射到的怪物ID。如果此项不为null则在怪物手册中将用目标ID来替换该怪物原本的ID。\n此项应被运用在同一个怪物的多朝向上。\n例如如果想定义同一个怪物的向下和向左的行走图则需要建立两个属性完全相同的怪物。\n但是这样会导致在怪物手册中同时存在向下和向左的两种怪物的显示。\n可以将朝向左的怪物的displayIdInBook项指定为朝向下的怪物ID这样在怪物手册中则会归一化只显示一个。"
},
"hp": {
"_leaf": true,
"_type": "textarea",
"_data": "生命值"
},
"atk": {
"_leaf": true,
"_type": "textarea",
"_data": "攻击力"
},
"def": {
"_leaf": true,
"_type": "textarea",
"_data": "防御力"
},
"money": {
"_leaf": true,
"_type": "textarea",
"_data": "金币"
},
"experience": {
"_leaf": true,
"_type": "textarea",
"_data": "经验"
},
"point": {
"_leaf": true,
"_type": "textarea",
"_data": "加点"
},
"special": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==null || thiseval instanceof Array || (thiseval==~~thiseval && thiseval>=0)",
"_data": "特殊属性\n\n0:无,1:先攻,2:魔攻,3:坚固,4:2连击,\n5:3连击,6:n连击,7:破甲,8:反击,9:净化,\n10:模仿,11:吸血,12:中毒,13:衰弱,14:诅咒,\n15:领域,16:夹击,17:仇恨,18:阻击,19:自爆,\n20:无敌,21:退化,22:固伤,23:重生,24:激光,25:光环\n\n多个属性例如用[1,4,11]表示先攻2连击吸血"
},
"value": {
"_leaf": true,
"_type": "textarea",
"_data": "特殊属性的数值\n如领域/阻激/激光怪的伤害值;吸血怪的吸血比例;光环怪增加生命的比例"
},
"zoneSquare": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "领域怪是否九宫格伤害"
},
"range": {
"_leaf": true,
"_type": "textarea",
"_range": "(thiseval==~~thiseval && thiseval>0)||thiseval==null",
"_data": "领域伤害的范围不加默认为1"
},
"notBomb": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "该怪物不可被炸"
},
"n": {
"_leaf": true,
"_type": "textarea",
"_range": "(thiseval==~~thiseval && thiseval>0)||thiseval==null",
"_data": "多连击的连击数"
},
"add": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "吸血后是否加到自身;光环是否叠加"
},
"atkValue": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==~~thiseval||thiseval==null",
"_data": "退化时勇士下降的攻击力点数;光环怪增加攻击的比例"
},
"defValue": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==~~thiseval||thiseval==null",
"_data": "退化时勇士下降的防御力点数;光环怪增加防御的比例"
},
"damage": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==~~thiseval||thiseval==null",
"_data": "战前扣血的点数"
}
}
},
"enemys_template": { 'name': '新敌人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0 },
// --------------------------- 【图块属性】相关的表格配置 --------------------------- //
"maps": {
"_type": "object",
"_data": {
"id": {
"_leaf": true,
"_type": "textarea",
"_range": "false",
"_data": "图块ID"
},
"idnum": {
"_leaf": true,
"_type": "textarea",
"_range": "false",
"_data": "图块数字"
},
"cls": {
"_leaf": true,
"_type": "textarea",
"_range": "false",
"_data": "图块类别"
},
"trigger": {
"_leaf": true,
"_type": "select",
"_select": {
"values": [
null,
"openDoor",
"passNet",
"changeLight",
"pushBox",
"custom"
]
},
"_data": "该图块的默认触发器"
},
"noPass": {
"_leaf": true,
"_type": "select",
"_select": {
"values": [
null,
true,
false
]
},
"_data": "该图块是否不可通行true代表不可通行false代表可通行null代表使用系统缺省值"
},
"canBreak": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "该图块是否可被破墙或地震"
},
"cannotOut": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==null||(thiseval instanceof Array)",
"_data": "该图块的不可出方向\n可以在这里定义在该图块时不能前往哪个方向可以达到悬崖之类的效果\n例如 [\"up\", \"left\"] 代表在该图块时不能往上和左走\n此值对背景层、事件层、前景层上的图块均有效"
},
"cannotIn": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==null||(thiseval instanceof Array)",
"_data": "该图块的不可入方向\n可以在这里定义不能朝哪个方向进入该图块可以达到悬崖之类的效果\n例如 [\"down\"] 代表不能从该图块的上方点朝向下进入此图块\n此值对背景层、事件层、前景层上的图块均有效"
},
"animate": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==~~thiseval||thiseval==null",
"_data": "该图块的全局动画帧数。\n如果此项为null则对于除了npc48外使用素材默认帧数npc48默认是1帧即静止。"
},
"faceIds": {
"_leaf": true,
"_type": "textarea",
"_data": "行走图朝向仅对NPC有效。可以在这里定义同一个NPC的多个朝向行走图。\n比如 {\"up\":\"N333\",\"down\":\"N334\",\"left\":\"N335\",\"right\":\"N336\"} 就将该素材的上下左右朝向分别绑定到N333,N334,N335和N336四个图块。\n在勇士撞上NPC时或NPC在移动时会自动选择最合适的朝向图块如果存在定义来进行绘制。"
}
}
},
// --------------------------- 【楼层属性】相关的表格配置 --------------------------- //
"floors": {
"_type": "object",
"_data": {
"floor": {
"_type": "object",
"_data": {
"floorId": {
"_leaf": true,
"_type": "textarea",
"_range": "false",
"_data": "文件名和floorId需要保持完全一致 \n楼层唯一标识符仅能由字母、数字、下划线组成且不能由数字开头 \n推荐用法第20层就用MT20第38层就用MT38地下6层就用MT_6用下划线代替负号隐藏3层用MT3hh表示隐藏等等 \n楼层唯一标识符需要和名字完全一致 \n这里不能更改floorId,请通过另存为来实现"
},
"title": {
"_leaf": true,
"_type": "textarea",
"_data": "楼层中文名,将在切换楼层和浏览地图时显示"
},
"name": {
"_leaf": true,
"_type": "textarea",
"_data": "显示在状态栏中的层数"
},
"width": {
"_leaf": true,
"_type": "textarea",
"_range": "false",
"_data": "地图x方向大小,这里不能更改,仅能在新建地图时设置,null视为13"
},
"height": {
"_leaf": true,
"_type": "textarea",
"_range": "false",
"_data": "地图y方向大小,这里不能更改,仅能在新建地图时设置,null视为13"
},
"canFlyTo": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "该楼能否被楼传器飞到(不能的话在该楼也不允许使用楼传器)"
},
"canUseQuickShop": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "该层是否允许使用快捷商店"
},
"cannotViewMap": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "该层是否不允许被浏览地图看到;如果勾上则浏览地图会跳过该层"
},
"cannotMoveDirectly": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "该层是否不允许瞬间移动;如果勾上则不可在此层进行瞬移"
},
"firstArrive": {
"_leaf": true,
"_type": "event",
"_event": "firstArrive",
"_data": "第一次到该楼层触发的事件,可以双击进入事件编辑器。"
},
"eachArrive": {
"_leaf": true,
"_type": "event",
"_event": "eachArrive",
"_data": "每次到该楼层触发的事件可以双击进入事件编辑器该事件会在firstArrive执行后再执行。"
},
"parallelDo": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_data": "在该层楼时执行的并行事件处理。\n可以在这里写上任意需要自动执行的脚本比如打怪自动开门等。\n详见文档-事件-并行事件处理。"
},
"upFloor": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==null||((thiseval instanceof Array) && thiseval.length==2)",
"_data": "该层上楼点,如[2,3]。\n如果此项不为null则楼层转换时的stair:upFloor以及楼传器的落点会被替换成该点而不是该层的上楼梯。"
},
"downFloor": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==null||((thiseval instanceof Array) && thiseval.length==2)",
"_data": "该层下楼点,如[2,3]。\n如果此项不为null则楼层转换时的stair:downFloor以及楼传器的落点会被替换成该点而不是该层的下楼梯。"
},
"defaultGround": {
"_leaf": true,
"_type": "select",
"_select": {
"values": Object.keys(editor.core.icons.icons.terrains)
},
"_data": "默认地面的图块ID此项修改后需要刷新才能看到效果。"
},
"images": {
"_leaf": true,
"_type": "textarea",
"_data": "背景/前景图;你可以选择若干张图片来作为背景/前景素材。详细用法请参见文档“自定义素材”中的说明。"
},
"color": {
"_leaf": true,
"_type": "textarea",
"_data": "该层的默认画面色调。本项可不写代表无色调如果写需要是一个RGBA数组如[255,0,0,0.3]"
},
"weather": {
"_leaf": true,
"_type": "textarea",
"_data": "该层的默认天气。本项可忽略表示晴天,如果写则第一项为\"rain\"\"snow\"或\"fog\"代表雨雪雾第二项为1-10之间的数代表强度。\n如[\"rain\", 8]代表8级雨天。"
},
"bgm": {
"_leaf": true,
"_type": "select",
"_select": {
"values": [null].concat(Object.keys(editor.core.material.bgms))
},
"_data": "到达该层后默认播放的BGM。本项可忽略或者为一个定义过的背景音乐如\"bgm.mp3\"。"
},
"item_ratio": {
"_leaf": true,
"_type": "textarea",
"_range": "(thiseval==~~thiseval && thiseval>=0)||thiseval==null",
"_data": "每一层的宝石/血瓶效果,即获得宝石和血瓶时框内\"ratio\"的值。"
},
"underGround": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否是地下层如果该项为true则同层传送将传送至上楼梯"
}
}
},
"loc": {
"_type": "object",
"_data": {
"events": {
"_leaf": true,
"_type": "event",
"_event": "event",
"_data": "该点的可能事件列表,可以双击进入事件编辑器。"
},
"changeFloor": {
"_leaf": true,
"_type": "event",
"_event": "changeFloor",
"_data": "该点楼层转换事件该事件不能和上面的events同时出现否则会被覆盖"
},
"afterBattle": {
"_leaf": true,
"_type": "event",
"_event": "afterBattle",
"_data": "该点战斗后可能触发的事件列表,可以双击进入事件编辑器。"
},
"afterGetItem": {
"_leaf": true,
"_type": "event",
"_event": "afterGetItem",
"_data": "该点获得道具后可能触发的事件列表,可以双击进入事件编辑器。"
},
"afterOpenDoor": {
"_leaf": true,
"_type": "event",
"_event": "afterOpenDoor",
"_data": "该点开完门后可能触发的事件列表,可以双击进入事件编辑器。"
},
"cannotMove": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==null||(thiseval instanceof Array)",
"_data": "该点不可通行的方向 \n 可以在这里定义该点不能前往哪个方向,可以达到悬崖之类的效果\n例如 [\"up\", \"left\"] 代表该点不能往上和左走"
}
}
}
}
}
}
}

View File

@ -0,0 +1,674 @@
/*
* 表格配置项
* 在这里可以对表格中的各项显示进行配置包括表格项提示内容等内容具体写法照葫芦画瓢即可
* 本配置项包括全塔属性的配置项
*/
var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "object",
"_data": {
"main": {
"_type": "object",
"_data": {
"floorIds": {
"_leaf": true,
"_type": "textarea",
"_range": "editor.mode.checkFloorIds(thiseval)",
"_data": "在这里按顺序放所有的楼层;其顺序直接影响到楼层传送器、浏览地图和上/下楼器的顺序"
},
"images": {
"_leaf": true,
"_type": "textarea",
"_range": "editor.mode.checkUnique(thiseval)",
"_data": "在此存放所有可能使用的图片tilesets除外 \n图片可以被作为背景图的一部分也可以直接用自定义事件进行显示。 \n 图片名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好 \n 建议对于较大的图片,在网上使用在线的“图片压缩工具(http://compresspng.com/zh/)”来进行压缩,以节省流量 \n 依次向后添加"
},
"tilesets": {
"_leaf": true,
"_type": "textarea",
"_range": "editor.mode.checkUnique(thiseval)",
"_data": "在此存放额外素材的图片名, \n可以自定导入任意张素材图片无需PS无需注册即可直接在游戏中使用 \n 形式如[\"1.png\", \"2.png\"] ,将需要的素材图片放在images目录下 \n 素材的宽高必须都是32的倍数且图片上的总图块数不超过1000即最多有1000个32*32的图块在该图片上"
},
"animates": {
"_leaf": true,
"_type": "textarea",
"_range": "editor.mode.checkUnique(thiseval)",
"_data": "在此存放所有可能使用的动画必须是animate格式在这里不写后缀名 \n动画必须放在animates目录下文件名不能使用中文不能带空格或特殊字符 \n \"jianji\", \"thunder\" \n 根据需求自行添加"
},
"bgms": {
"_leaf": true,
"_type": "textarea",
"_range": "editor.mode.checkUnique(thiseval)",
"_data": "在此存放所有的bgm和文件名一致。 \n音频名不能使用中文不能带空格或特殊字符可以直接改名拼音就好"
},
"sounds": {
"_leaf": true,
"_type": "textarea",
"_range": "editor.mode.checkUnique(thiseval)",
"_data": "在此存放所有的SE和文件名一致 \n音频名不能使用中文不能带空格或特殊字符可以直接改名拼音就好"
},
"startBackground": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "标题界面的背景建议使用jpg格式以压缩背景图空间"
},
"startLogoStyle": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "标题样式:可以改变颜色,也可以写\"display: none\"来隐藏标题"
},
"levelChoose": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Array && thiseval.length>=1 && thiseval[0] instanceof Array && thiseval[0].length==2",
"_data": "难度选择每个数组的第一个是其在标题界面显示的难度第二个是在游戏内部传输的字符串会显示在状态栏修改此处后需要在project/functions中作相应更改。\n如果需直接开始游戏将下面的startDirectly开关打开即可。"
},
"equipName": {
"_leaf": true,
"_type": "textarea",
"_range": "(thiseval instanceof Array && thiseval.length<=6)||thiseval==null",
"_data": "装备位名称为不超过6个的数组此项的顺序与equiptype数值关联例如可写[\"武器\",\"防具\",\"首饰\"]等等。"
},
"startBgm": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "在标题界面应该播放的bgm内容"
},
"statusLeftBackground": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "横屏时左侧状态栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图推荐写法\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"\n图片最好进行一些压缩等操作节省流量。"
},
"statusTopBackground": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "竖屏时上方状态栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图推荐写法\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"\n图片最好进行一些压缩等操作节省流量。"
},
"toolsBackground": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "竖屏时下方道具栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图推荐写法\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"\n图片最好进行一些压缩等操作节省流量。"
},
"borderColor": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "边框颜色,包括游戏边界的边框和对话框边框等。"
},
"statusBarColor": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "状态栏的文字颜色,默认是白色"
},
"hardLabelColor": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "难度显示的颜色,默认是红色"
},
"floorChangingBackground": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "楼层转换界面的背景样式可以使用纯色默认值black也可以使用图片参见状态栏的图片写法"
},
"floorChangingTextColor": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "楼层转换界面的文字颜色,默认是白色"
},
"font": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "游戏中使用的字体默认是Verdana"
}
}
},
"firstData": {
"_type": "object",
"_data": {
"title": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "游戏名,将显示在标题页面以及切换楼层的界面中"
},
"name": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_range": "/^[a-zA-Z0-9_]{1,30}$/.test(thiseval)",
"_data": "游戏的唯一英文标识符。由英文、数字、下划线组成不能超过30个字符。\n此项必须修改其将直接影响到存档的定位"
},
"version": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "当前游戏版本;版本不一致的存档不能通用。"
},
"floorId": {
"_leaf": true,
"_type": "select",
"_select": {
"values": data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main.floorIds
},
"_range": "data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main.floorIds.indexOf(thiseval)!==-1",
"_data": "初始楼层的ID"
},
"hero": {
"_type": "object",
"_data": {
"name": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "勇士名;可以改成喜欢的"
},
"lv": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==~~thiseval &&thiseval>0",
"_data": "初始等级,该项必须为正整数"
},
"hpmax": {
"_leaf": true,
"_type": "textarea",
"_data": "初始生命上限只有在enableHPMax开启时才有效"
},
"hp": {
"_leaf": true,
"_type": "textarea",
"_data": "初始生命值"
},
"manamax": {
"_leaf": true,
"_type": "textarea",
"_data": "魔力上限此项非负才会生效null或小于0都不会生效"
},
"mana": {
"_leaf": true,
"_type": "textarea",
"_data": "初始魔力值只在enableMana开启时才有效"
},
"atk": {
"_leaf": true,
"_type": "textarea",
"_data": "初始攻击"
},
"def": {
"_leaf": true,
"_type": "textarea",
"_data": "初始防御"
},
"mdef": {
"_leaf": true,
"_type": "textarea",
"_data": "初始魔防"
},
"money": {
"_leaf": true,
"_type": "textarea",
"_data": "初始金币"
},
"experience": {
"_leaf": true,
"_type": "textarea",
"_data": "初始经验"
},
"equipment": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Array",
"_data": "初始装上的装备,此处建议请直接留空数组"
},
"items": {
"_type": "object",
"_data": {
"keys": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Object && !(thiseval instanceof Array)",
"_data": "初始三种钥匙个数"
},
"constants": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Object && !(thiseval instanceof Array)",
"_data": "初始永久道具个数,例如初始送手册可以写 {\"book\": 1}"
},
"tools": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Object && !(thiseval instanceof Array)",
"_data": "初始消耗道具个数,例如初始有两破可以写 {\"pickaxe\": 2}"
},
"equips": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Object && !(thiseval instanceof Array)",
"_data": "初始装备个数,例如初始送铁剑可以写 {\"sword1\": 1}"
}
}
},
"loc": {
"_type": "object",
"_data": {
"direction": {
"_leaf": true,
"_type": "select",
"_data": "勇士初始方向",
"_select": {
"values": [
"up",
"down",
"left",
"right"
]
},
},
"x": {
"_leaf": true,
"_type": "textarea",
"_data": "勇士初始x坐标"
},
"y": {
"_leaf": true,
"_type": "textarea",
"_data": "勇士初始y坐标"
}
}
},
"flags": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Object && !(thiseval instanceof Array)",
"_data": "游戏过程中的变量或flags"
},
"steps": {
"_leaf": true,
"_type": "textarea",
"_data": "行走步数统计"
}
}
},
"startCanvas": {
"_leaf": true,
"_type": "event",
"_event": "firstArrive",
"_range": "thiseval==null || thiseval instanceof Array",
"_data": "标题界面事件化,可以使用事件流的形式来绘制开始界面等。\n需要开启startUsingCanvas这个开关。\n详见文档-个性化-标题界面事件化。"
},
"startText": {
"_leaf": true,
"_type": "event",
"_event": "firstArrive",
"_range": "thiseval==null || thiseval instanceof Array",
"_data": "游戏开始前剧情,可以执行任意自定义事件。\n双击进入事件编辑器。\n如果无剧情直接留一个空数组即可。"
},
"shops": {
"_leaf": true,
"_type": "event",
"_event": "shop",
"_range": "thiseval instanceof Array",
"_data": "全局商店,是一个数组,可以双击进入事件编辑器。"
},
"levelUp": {
"_leaf": true,
"_type": "event",
"_event": "level",
"_range": "thiseval==null || thiseval instanceof Array",
"_data": "经验升级所需要的数值,是一个数组,可以双击进行编辑。 \n 第一项为初始等级仅title生效 \n 每一个里面可以含有三个参数 need, title, action \n need为所需要的经验数值可以是个表达式。请确保need依次递增 \n title为该等级的名称也可以省略代表使用系统默认值本项将显示在状态栏中 \n action为本次升级所执行的事件可由若干项组成"
}
}
},
"values": {
"_type": "object",
"_data": {
"lavaDamage": {
"_leaf": true,
"_type": "textarea",
"_data": "经过血网受到的伤害"
},
"poisonDamage": {
"_leaf": true,
"_type": "textarea",
"_data": "中毒后每步受到的伤害"
},
"weakValue": {
"_leaf": true,
"_type": "textarea",
"_data": "衰弱状态下攻防减少的数值\n如果此项不小于1则作为实际下降的数值比如10就是攻防各下降10\n如果在0到1之间则为下降的比例比如0.3就是下降30%的攻防)"
},
"redJewel": {
"_leaf": true,
"_type": "textarea",
"_data": "红宝石加攻击的数值"
},
"blueJewel": {
"_leaf": true,
"_type": "textarea",
"_data": "蓝宝石加防御的数值"
},
"greenJewel": {
"_leaf": true,
"_type": "textarea",
"_data": "绿宝石加魔防的数值"
},
"redPotion": {
"_leaf": true,
"_type": "textarea",
"_data": "红血瓶加血数值"
},
"bluePotion": {
"_leaf": true,
"_type": "textarea",
"_data": "蓝血瓶加血数值"
},
"yellowPotion": {
"_leaf": true,
"_type": "textarea",
"_data": "黄血瓶加血数值"
},
"greenPotion": {
"_leaf": true,
"_type": "textarea",
"_data": "绿血瓶加血数值"
},
"breakArmor": {
"_leaf": true,
"_type": "textarea",
"_data": "破甲的比例战斗前怪物附加角色防御的x倍作为伤害"
},
"counterAttack": {
"_leaf": true,
"_type": "textarea",
"_data": "反击的比例战斗时怪物每回合附加角色攻击的x倍作为伤害无视角色防御"
},
"purify": {
"_leaf": true,
"_type": "textarea",
"_data": "净化的比例战斗前怪物附加勇士魔防的x倍作为伤害"
},
"hatred": {
"_leaf": true,
"_type": "textarea",
"_data": "仇恨属性中,每杀死一个怪物获得的仇恨值"
},
"moveSpeed": {
"_leaf": true,
"_type": "textarea",
"_data": "行走速度即勇士每走一格的时间一般100比较合适"
},
"animateSpeed": {
"_leaf": true,
"_type": "textarea",
"_data": "全局动画时间即怪物振动频率一般300比较合适"
},
"floorChangeTime": {
"_leaf": true,
"_type": "textarea",
"_data": "默认楼层切换时间"
}
}
},
"flags": {
"_type": "object",
"_data": {
"enableFloor": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏显示当前楼层"
},
"enableName": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏显示勇士名字"
},
"enableLv": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏显示当前等级"
},
"enableHPMax": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否是否启用生命上限"
},
"enableMana": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否开启魔力值"
},
"enableMDef": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏及战斗界面显示魔防(护盾)"
},
"enableMoney": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏、怪物手册及战斗界面显示金币"
},
"enableExperience": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏、怪物手册及战斗界面显示经验"
},
"enableLevelUp": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否允许等级提升进阶如果上面enableExperience为false则此项恒视为false"
},
"levelUpLeftMode": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "进阶使用扣除模式即在状态栏显示距离下个等级所需要的经验值只有enableExperience和enableLevelUp均开启时才有效。"
},
"enableKeys": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏显示三色钥匙数量"
},
"enablePZF": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏显示破炸飞数量"
},
"enableDebuff": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在状态栏显示毒衰咒"
},
"enableSkill": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否启用技能栏"
},
"flyNearStair": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否需要在楼梯边使用传送器"
},
"pickaxeFourDirections": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "使用破墙镐是否四个方向都破坏如果false则只破坏面前的墙壁"
},
"bombFourDirections": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "使用炸弹是否四个方向都会炸如果false则只炸面前的怪物即和圣锤等价"
},
"snowFourDirections": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "使用冰冻徽章是否四个方向都会消除熔岩如果false则只消除面前的熔岩"
},
"bigKeyIsBox": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "如果此项为true则视为钥匙盒红黄蓝钥匙+1若为false则视为大黄门钥匙"
},
"equipment": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "剑和盾是否作为装备。如果此项为true则作为装备需要在装备栏使用否则将直接加属性。"
},
"equipboxButton": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "状态栏的装备按钮。若此项为true则将状态栏中的楼层转换器按钮换为装备栏按钮"
},
"enableAddPoint": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否支持加点"
},
"enableNegativeDamage": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否支持负伤害(回血)"
},
"hatredDecrease": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在和仇恨怪战斗后减一半的仇恨值此项为false则和仇恨怪不会扣减仇恨值。"
},
"betweenAttackCeil": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "夹击方式是向上取整还是向下取整。如果此项为true则为向上取整为false则为向下取整"
},
"useLoop": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否循环计算临界如果此项为true则使用循环法而不是回合数计算法来算临界\n从V2.5.3开始,对于大数据的循环法将改为使用二分法进行计算"
},
"startUsingCanvas": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否开始菜单canvas化如果此项为true则将使用canvas来绘制开始菜单"
},
"startDirectly": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "点击“开始游戏”后是否立刻开始游戏而不显示难度选择界面"
},
"statusCanvas": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否状态栏canvas化即手动自定义绘制状态栏。\n如果此项开启则可在脚本编辑的drawStatusBar中自定义绘制菜单栏。"
},
"statusCanvasRowsOnMobile": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==null || (thiseval>0 && thiseval<=4)",
"_data": "竖屏模式下顶端状态栏canvas化后的行数。\n此项将决定竖屏的状态栏高度如果设置则不小于1且不大于4。\n仅在statusCanvas开启时才有效"
},
"displayEnemyDamage": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否地图怪物显伤;用户可以手动在菜单栏中开关"
},
"displayCritical": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否地图显示临界;用户可以手动在菜单栏中开关"
},
"displayExtraDamage": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否地图高级显伤(领域、夹击等);用户可以手动在菜单栏中开关"
},
"enableGentleClick": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否允许轻触(获得面前物品)"
},
"potionWhileRouting": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "寻路算法是否经过血瓶如果该项为false则寻路算法会自动尽量绕过血瓶"
},
"ignoreChangeFloor": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "经过楼梯、传送门时是否能“穿透”。\n穿透的意思是自动寻路得到的的路径中间经过了楼梯行走时是否触发楼层转换事件"
},
"canGoDeadZone": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否允许走到将死的领域上。如果此项为true则可以走到将死的领域上"
},
"enableMoveDirectly": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否允许瞬间移动"
},
"enableDisabledShop": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否允许查看未开启状态的快捷商店内容;如果此项为真,则对于未开启状态的商店允许查看其内容(但不能购买)"
},
"disableShopOnDamage": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在经过领域/夹击/路障等伤害后禁用快捷商店。"
},
"checkConsole": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否检查控制台的开启情况。"
}
}
}
}
}

View File

@ -0,0 +1,46 @@
/*
* 表格配置项
* 在这里可以对表格中的各项显示进行配置包括表格项提示内容等内容具体写法照葫芦画瓢即可
* 本配置项包括公共事件
*/
var events_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "object",
"_data": {
"commonEvent": {
"_type": "object",
"_data": function (key) {
var obj = {
"加点事件": {
"_leaf": true,
"_type": "event",
"_range": "thiseval instanceof Array",
"_event": "commonEvent",
"_data": "打败怪物后加点"
},
"毒衰咒处理": {
"_leaf": true,
"_type": "event",
"_range": "thiseval instanceof Array",
"_event": "commonEvent",
"_data": "毒衰咒效果处理"
},
"滑冰事件": {
"_leaf": true,
"_type": "event",
"_range": "thiseval instanceof Array",
"_event": "commonEvent",
"_data": "滑冰事件"
},
}
if (obj[key]) return obj[key];
return {
"_leaf": true,
"_type": "event",
"_event": "commonEvent",
"_data": "自定义公共事件,可以双击进入事件编辑器"
}
}
}
}
}

View File

@ -0,0 +1,216 @@
/*
* 表格配置项
* 在这里可以对表格中的各项显示进行配置包括表格项提示内容等内容具体写法照葫芦画瓢即可
* 本配置项包括脚本编辑
*/
var functions_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "object",
"_data": {
"events": {
"_type": "object",
"_data": {
"resetGame": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "重置整个游戏"
},
"setInitData": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "设置初始属性"
},
"win": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "游戏获胜事件"
},
"lose": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "游戏失败事件"
},
"changingFloor": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "切换楼层中"
},
"afterChangeFloor": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "切换楼层后"
},
"flyTo": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "楼层飞行"
},
"beforeBattle": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "战前事件"
},
"afterBattle": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "战后事件"
},
"afterOpenDoor": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "开门后事件"
},
"afterGetItem": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "获得道具后事件"
},
"afterChangeLight": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "改变亮灯事件"
},
"afterPushBox": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "推箱子事件"
},
"afterUseBomb": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "炸弹事件"
},
"canUseQuickShop": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "能否用快捷商店"
}
}
},
"enemys": {
"_type": "object",
"_data": {
"getSpecials": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "怪物特殊属性定义"
},
"getEnemyInfo": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "获得怪物真实属性"
},
"getDamageInfo": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "获得战斗伤害信息"
},
"updateEnemys": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "更新怪物数据"
}
}
},
"actions": {
"_type": "object",
"_data": {
"onKeyUp": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "按键处理"
}
}
},
"control": {
"_type": "object",
"_data": {
"saveData": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "存档操作"
},
"loadData": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "读档操作"
},
"updateStatusBar": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "更新状态栏"
},
"updateCheckBlock": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "阻激夹域伤害"
},
"moveOneStep": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "每一步后的操作"
},
"moveDirectly": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "瞬间移动处理"
},
"parallelDo": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "并行事件处理"
}
}
},
"ui": {
"_type": "object",
"_data": {
"drawStatusBar": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "自绘状态栏"
},
"drawStatistics": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "地图数据统计"
},
"drawAbout": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "绘制关于界面"
}
}
}
}
}

View File

@ -0,0 +1,32 @@
/*
* 表格配置项
* 在这里可以对表格中的各项显示进行配置包括表格项提示内容等内容具体写法照葫芦画瓢即可
* 本配置项包括插件编写
*/
var plugins_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "object",
"_data": function (key) {
var obj = {
"init": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string'",
"_data": "自定义插件"
},
"drawLight": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "绘制灯光效果"
},
}
if (obj[key]) return obj[key];
return {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "自定义插件"
}
}
}

View File

@ -97,7 +97,7 @@
</div>
</div>
<div id="left2" class='leftTab' style="z-index:-1;opacity: 0;"><!-- loc -->
<h3 class="leftTabHeader">地图选点&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>
<h3 class="leftTabHeader">地图选点&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('loc')">配置表格</button>
</h3>
<div class="leftTabContent">
<p id='pos_a6771a78_a099_417c_828f_0a24851ebfce' style="margin-left: 15px">0,0</p>
@ -115,7 +115,7 @@
</div>
</div>
<div id="left3" class='leftTab' style="z-index:-1;opacity: 0;"><!-- enemyitem -->
<h3 class="leftTabHeader">图块属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>
<h3 class="leftTabHeader">图块属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('enemyitem')">配置表格</button>
</h3>
<div class="leftTabContent">
<div id='newIdIdnum'><!-- id and idnum -->
@ -141,7 +141,7 @@
</div>
</div>
<div id="left4" class='leftTab' style="z-index:-1;opacity: 0;"><!-- floor -->
<h3 class="leftTabHeader">楼层属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>
<h3 class="leftTabHeader">楼层属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('floor')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>
@ -158,7 +158,7 @@
</div>
</div>
<div id="left5" class='leftTab' style="z-index:-1;opacity: 0;"><!-- tower -->
<h3 class="leftTabHeader">全塔属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>
<h3 class="leftTabHeader">全塔属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('tower')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>
@ -226,7 +226,7 @@
<textarea id="multiLineCode" name="multiLineCode"></textarea>
</div>
<div id="left8" class='leftTab' style="z-index:-1;opacity: 0;"><!-- functions -->
<h3 class="leftTabHeader">脚本编辑&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>
<h3 class="leftTabHeader">脚本编辑&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('functions')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>
@ -243,7 +243,7 @@
</div>
</div>
<div id="left9" class='leftTab' style="z-index:-1;opacity: 0;"><!-- commonevent -->
<h3 class="leftTabHeader">公共事件&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>
<h3 class="leftTabHeader">公共事件&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('commonevent')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>
@ -260,7 +260,7 @@
</div>
</div>
<div id="left10" class='leftTab' style="z-index:-1;opacity: 0;"><!-- plugins -->
<h3 class="leftTabHeader">插件编写&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>
<h3 class="leftTabHeader">插件编写&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('plugins')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>

View File

@ -93,7 +93,7 @@
</div>
</div>
<div id="left2" class='leftTab' style="z-index:-1;opacity: 0;"><!-- loc -->
<h3 class="leftTabHeader">地图选点&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>
<h3 class="leftTabHeader">地图选点&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('loc')">配置表格</button>
</h3>
<div class="leftTabContent">
<p id='pos_a6771a78_a099_417c_828f_0a24851ebfce' style="margin-left: 15px">0,0</p>
@ -111,7 +111,7 @@
</div>
</div>
<div id="left3" class='leftTab' style="z-index:-1;opacity: 0;"><!-- enemyitem -->
<h3 class="leftTabHeader">图块属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>
<h3 class="leftTabHeader">图块属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('enemyitem')">配置表格</button>
</h3>
<div class="leftTabContent">
<div id='newIdIdnum'><!-- id and idnum -->
@ -137,7 +137,7 @@
</div>
</div>
<div id="left4" class='leftTab' style="z-index:-1;opacity: 0;"><!-- floor -->
<h3 class="leftTabHeader">楼层属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>
<h3 class="leftTabHeader">楼层属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('floor')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>
@ -154,7 +154,7 @@
</div>
</div>
<div id="left5" class='leftTab' style="z-index:-1;opacity: 0;"><!-- tower -->
<h3 class="leftTabHeader">全塔属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>
<h3 class="leftTabHeader">全塔属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('tower')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>
@ -222,7 +222,7 @@
<textarea id="multiLineCode" name="multiLineCode"></textarea>
</div>
<div id="left8" class='leftTab' style="z-index:-1;opacity: 0;"><!-- functions -->
<h3 class="leftTabHeader">脚本编辑&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>
<h3 class="leftTabHeader">脚本编辑&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('functions')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>
@ -239,7 +239,7 @@
</div>
</div>
<div id="left9" class='leftTab' style="z-index:-1;opacity: 0;"><!-- commonevent -->
<h3 class="leftTabHeader">公共事件&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>
<h3 class="leftTabHeader">公共事件&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('commonevent')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>
@ -256,7 +256,7 @@
</div>
</div>
<div id="left10" class='leftTab' style="z-index:-1;opacity: 0;"><!-- plugins -->
<h3 class="leftTabHeader">插件编写&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>
<h3 class="leftTabHeader">插件编写&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('plugins')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>

View File

@ -891,6 +891,7 @@ actions.prototype._clickAction = function (x, y) {
core.doAction();
}
}
return;
}
if (core.status.event.data.type == 'confirm') {
@ -904,6 +905,7 @@ actions.prototype._clickAction = function (x, y) {
core.insertAction(core.status.event.ui.no);
core.doAction();
}
return;
}
}
@ -911,10 +913,12 @@ actions.prototype._clickAction = function (x, y) {
actions.prototype._keyDownAction = function (keycode) {
if (core.status.event.data.type == 'choices') {
this._keyDownChoices(keycode);
return;
}
if (core.status.event.data.type == 'confirm' && (keycode == 37 || keycode == 39)) {
core.status.event.selection = 1 - core.status.event.selection;
core.drawConfirmBox(core.status.event.ui.text);
return;
}
}
@ -984,6 +988,7 @@ actions.prototype._clickBook = function (x, y) {
var index = this.HSIZE * page + parseInt(y / 2);
core.ui.drawBook(index);
core.ui.drawBookDetail(index);
return;
}
return;
}
@ -1127,17 +1132,20 @@ actions.prototype._clickViewMaps = function (x, y) {
index++;
if (index < core.floorIds.length)
core.ui.drawMaps(index);
return;
}
else if (y >= this.HSIZE + 2 && (mh == this.SIZE || (x >= per && x <= this.LAST - per))) {
if (y >= this.HSIZE + 2 && (mh == this.SIZE || (x >= per && x <= this.LAST - per))) {
index--;
while (index >= 0 && index != now && core.status.maps[core.floorIds[index]].cannotViewMap)
index--;
if (index >= 0)
core.ui.drawMaps(index);
return;
}
else if (x >= per && x <= this.LAST - per && y >= this.HSIZE - 1 && y <= this.HSIZE + 1) {
if (x >= per && x <= this.LAST - per && y >= this.HSIZE - 1 && y <= this.HSIZE + 1) {
core.clearMap('data');
core.ui.closePanel();
return;
}
}
@ -1243,7 +1251,9 @@ actions.prototype._clickQuickShop = function (x, y) {
// 离开
else if (y == topIndex + keys.length)
core.ui.closePanel();
return;
}
return;
}
////// 快捷商店界面时,放开某个键的操作 //////

View File

@ -323,6 +323,7 @@ control.prototype._showStartAnimate_resetDom = function () {
core.dom.levelChooseButtons.style.display = 'none';
core.status.played = false;
core.clearStatus();
core.clearMap('all');
core.dom.musicBtn.style.display = 'block';
core.setMusicBtn();
// 重置音量
@ -360,7 +361,6 @@ control.prototype.clearStatus = function() {
}
core.status = {};
core.clearStatusBar();
core.clearMap('all');
core.deleteAllCanvas();
core.status.played = false;
}
@ -856,17 +856,20 @@ control.prototype.updateViewport = function() {
////// 获得勇士面对位置的x坐标 //////
control.prototype.nextX = function(n) {
return core.getHeroLoc('x')+core.utils.scan[core.getHeroLoc('direction')].x*(n||1);
if (n == null) n = 1;
return core.getHeroLoc('x')+core.utils.scan[core.getHeroLoc('direction')].x*n;
}
////// 获得勇士面对位置的y坐标 //////
control.prototype.nextY = function (n) {
return core.getHeroLoc('y')+core.utils.scan[core.getHeroLoc('direction')].y*(n||1);
if (n == null) n = 1;
return core.getHeroLoc('y')+core.utils.scan[core.getHeroLoc('direction')].y*n;
}
////// 某个点是否在勇士旁边 //////
control.prototype.nearHero = function (x, y) {
return Math.abs(x-core.getHeroLoc('x'))+Math.abs(y-core.getHeroLoc('y'))<=1;
control.prototype.nearHero = function (x, y, n) {
if (n == null) n = 1;
return Math.abs(x-core.getHeroLoc('x'))+Math.abs(y-core.getHeroLoc('y'))<=n;
}
////// 聚集跟随者 //////
@ -2637,7 +2640,7 @@ control.prototype._resize_toolBar = function (obj) {
}
control.prototype._resize_tools = function (obj) {
var toolsHeight = 32 * core.domStyle.scale * (core.domStyle.isVertical ? 0.95 : 1);
var toolsHeight = 32 * core.domStyle.scale * (core.domStyle.isVertical && !obj.is15x15 ? 0.95 : 1);
var toolsMarginLeft;
if (core.domStyle.isVertical)
toolsMarginLeft = (core.__HALF_SIZE__ - 3) * 3 * core.domStyle.scale;

View File

@ -359,6 +359,8 @@ enemys.prototype._getCurrentEnemys_sort = function (enemys) {
});
}
enemys.prototype.hasEnemyLeft = function (floorId) {
return core.getCurrentEnemys(floorId).length > 0;
enemys.prototype.hasEnemyLeft = function (enemyId, floorId) {
return core.getCurrentEnemys(floorId).filter(function (enemy) {
return enemyId == null || enemy.id == enemyId;
}).length > 0;
}

View File

@ -377,7 +377,7 @@ events.prototype.openDoor = function (x, y, needKey, callback) {
events.prototype._openDoor_check = function (id, x, y, needKey) {
// 是否存在门或暗墙
if (!core.terrainExists(x, y, id) || !(id.endsWith("Door") || id.endsWith("Wall"))
|| !core.material.icons.animates[id]) {
|| core.material.icons.animates[id] == null) {
core.clearContinueAutomaticRoute();
return false;
}
@ -431,6 +431,7 @@ events.prototype._sys_getItem = function (data, callback) {
////// 获得某个物品 //////
events.prototype.getItem = function (id, num, x, y, callback) {
if (num == null) num = 1;
num = num || 1;
var itemCls = core.material.items[id].cls;
core.items.getItemEffect(id, num);
@ -1683,6 +1684,7 @@ events.prototype.load = function (fromUserAction) {
if (!core.isPlaying()) {
core.dom.startPanel.style.display = 'none';
core.clearStatus();
core.clearMap('all');
core.status.event = {'id': 'load', 'data': null};
core.status.lockControl = true;
core.ui.drawSLPanel(10*page+offset);

View File

@ -588,14 +588,15 @@ ui.prototype.drawTextContent = function (ctx, content, config) {
ctx = core.getContextByName(ctx);
if (!ctx) return;
// 设置默认配置项
var textAttribute = core.status.textAttribute || core.initStatus.textAttribute;
config = core.clone(config || {});
config.left = config.left || 0;
config.right = config.left + (config.maxWidth == null ? ctx.canvas.width : config.maxWidth);
config.top = config.top || 0;
config.color = config.color || core.arrayToRGBA(core.status.textAttribute.text);
config.bold = config.bold || false;
config.align = config.align || core.status.textAttribute.align || "left";
config.fontSize = config.fontSize || core.status.textAttribute.textfont;
config.color = config.color || core.arrayToRGBA(textAttribute.text);
if (config.bold == null) config.bold = textAttribute.bold;
config.align = config.align || textAttribute.align || "left";
config.fontSize = config.fontSize || textAttribute.textfont;
config.lineHeight = config.lineHeight || (config.fontSize * 1.3);
config.time = config.time || 0;
@ -783,7 +784,7 @@ ui.prototype.drawTextBox = function(content, showAll) {
var isWindowSkin = this.drawBackground(hPos.left, vPos.top, hPos.right, vPos.bottom, pInfo);
var alpha = isWindowSkin ? 0.85 : textAttribute.background[3];
// Step 4: 绘制标题、头像、
// Step 4: 绘制标题、头像、动画
var content_top = this._drawTextBox_drawTitleAndIcon(titleInfo, hPos, vPos, alpha);
// Step 5: 绘制正文
@ -1084,6 +1085,7 @@ ui.prototype.drawConfirmBox = function (text, yesCallback, noCallback) {
// 处理自定义事件
if (core.status.event.id != 'action') {
core.status.event.id = 'confirmBox';
core.status.event.ui = text;
core.status.event.data = {'yes': yesCallback, 'no': noCallback};
}