Merge branch 'v2.0' of https://github.com/ckcz123/mota-js into v2.0

This commit is contained in:
ckcz123 committed 2018-03-15 19:51:45 +08:00
commit dc35bc7adf
9 files changed
+120 -47

No files matched your search

+9 -2
View File
@@ -9,8 +9,8 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
},
'itemEffect':'cls为items的即捡即用类物品的效果,执行时会对这里的字符串执行eval()',
'itemEffectTip':'cls为items的即捡即用类物品,在获得时左上角额外显示的文字,执行时会对这里的字符串执行eval()得到字符串',
'useItem':'cls为tools或contants时的使用物品效果,执行时会对这里的字符串执行eval()',
'canUseItem':'cls为tools或contants时能否使用物品的判断,执行时会return这里的字符串执行eval()后的结果',
'useItemEffect':'cls为tools或contants时的使用物品效果,执行时会对这里的字符串执行eval()',
'canUseItemEffect':'cls为tools或contants时能否使用物品的判断,执行时会return这里的字符串执行eval()后的结果',
},
"items_template" : {'cls': 'items', 'name': '新物品'},
"enemys" : {
@@ -33,6 +33,13 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
'damage':'战前扣血的点数\n$range(thiseval==~~thiseval||thiseval==null)$end'
},
"enemys_template" : {'name': '新敌人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
"maps" : {
"id" : "$range(false)$end",
"idnum" : "$range(false)$end",
"cls" : "$range(false)$end",
"trigger" : "$select({\"values\":[null,\"openDoor\",\"passNet\",\"changeLight\",\"ski\",\"pushBox\"]})$end",
"noPass" : "$select({\"values\":[null,true,false]})$end"
},
"floors" : {
'floor' : {
"floorId": "文件名和floorId需要保持完全一致 \n楼层唯一标识符仅能由字母、数字、下划线组成,且不能由数字开头 \n推荐用法:第20层就用MT20,第38层就用MT38,地下6层就用MT_6(用下划线代替负号),隐藏3层用MT3h(h表示隐藏),等等 \n楼层唯一标识符,需要和名字完全一致 \n这里不能更改floorId,请通过另存为来实现\n$range(false)$end",
+2 -2
View File
@@ -114,7 +114,7 @@ items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"moneyPocket":"',金币+'+core.values.moneyPocket",
},
"useItem": {
"useItemEffect": {
"book": "core.ui.drawBook(0);",
"fly": "core.ui.drawFly(core.status.hero.flyRange.indexOf(core.status.floorId));",
"earthquake": "core.removeBlockByIds(core.status.floorId, core.status.event.data);\ncore.drawMap(core.status.floorId, function () {\n core.drawHero(core.getHeroLoc('direction'), core.getHeroLoc('x'), core.getHeroLoc('y'), 'stop');\n core.updateFg();\n core.drawTip(core.material.items[itemId].name + '使用成功');\n});",
@@ -145,7 +145,7 @@ items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"shield5": "core.plugin.useEquipment(itemId)",
},
"canUseItem": {
"canUseItemEffect": {
"book": "true",
"fly": "core.status.hero.flyRange.indexOf(core.status.floorId)>=0",
"pickaxe": "var able=false;\nvar ids = [];\nfor (var i in core.status.thisMap.blocks) {\n var block = core.status.thisMap.blocks[i];\n if (core.isset(block.event) && !(core.isset(block.enable) && !block.enable) &&\n (block.event.id == 'yellowWall' || block.event.id=='whiteWall' || block.event.id=='blueWall')) // 能破哪些墙\n {\n // 四个方向\n if (core.flags.pickaxeFourDirections) {\n if (Math.abs(block.x-core.status.hero.loc.x)+Math.abs(block.y-core.status.hero.loc.y)<=1) {\n ids.push(i);\n }\n }\n else {\n if (block.x == core.nextX() && block.y == core.nextY()) {\n ids.push(i);\n }\n }\n }\n}\nif (ids.length>0) {\n core.status.event.data = ids;\n able=true;\n}\nable",