diff --git a/README.md b/README.md index aef141e7..be85c94f 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ HTML5 canvas制作的魔塔样板,支持全平台游戏! * [x] 地图数据统计 * [x] 衰弱可以减少攻防的比例 * [x] 便捷PS工具可以批量导入素材 +* [x] 楼层转换可以直接指定“上一楼”和“下一楼” * [x] 除Autotile外均可自动注册 * [x] 支持status:x获得当前坐标 * [x] core.debug()改成调试模式,可以Ctrl穿墙 diff --git a/project/data.js b/project/data.js index 1e44739f..6e6b2432 100644 --- a/project/data.js +++ b/project/data.js @@ -145,6 +145,7 @@ data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = "flyNearStair": true, "pickaxeFourDirections": false, "bombFourDirections": false, + "snowFourDirections": false, "bigKeyIsBox": false, "equipment": false, "enableDeleteItem": true, diff --git a/project/items.js b/project/items.js index 94a57ff9..94f1e866 100644 --- a/project/items.js +++ b/project/items.js @@ -223,11 +223,11 @@ items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = "name": "圣锤", "text": "可以炸掉勇士面前的怪物" }, - "lifeWand": { - "cls": "tools", - "name": "生命魔杖", - "text": "可以恢复100点生命值" - } + "lifeWand": { + "cls": "tools", + "name": "生命魔杖", + "text": "可以恢复100点生命值" + } }, "itemEffect": { "redJewel": "core.status.hero.atk += core.values.redJewel * ratio", @@ -317,7 +317,7 @@ items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = "centerFly": "var able=false;\nvar toX = 12 - core.getHeroLoc('x'), toY = 12-core.getHeroLoc('y');\nvar block = core.getBlock(toX, toY);\nif (block==null) {\n core.status.event.data = {'x': toX, 'y': toY};\n able = true;\n}\nable", "upFly": "var able=false;\nvar floorId = core.status.floorId, index = core.floorIds.indexOf(floorId);\nif (index0) {\n\tvar toId = core.floorIds[index-1], toX = core.getHeroLoc('x'), toY = core.getHeroLoc('y');\n\tif (core.getBlock(toX, toY, toId)==null) {\n\t\tcore.status.event.data = {'id': toId, 'x': toX, 'y': toY};\n\t\table=true;\n\t}\n}\nable", - "snow": "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) && block.event.id == 'lava' && 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}\nif (ids.length>0) {\n core.status.event.data = ids;\n able=true;\n}\nable", + "snow": "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) && block.event.id == 'lava') {\n\t\tif (core.flags.snowFourDirections) {\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", "bigKey": "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) && block.event.id == 'yellowDoor') {\n ids.push(i);\n }\n}\nif (ids.length>0) {\n core.status.event.data = ids;\n able=true;\n}\nable", "poisonWine": "core.hasFlag('poison')", "weakWine": "core.hasFlag('weak')",