diff --git a/libs/control.js b/libs/control.js index e663f9ba..1ca01d62 100644 --- a/libs/control.js +++ b/libs/control.js @@ -300,10 +300,13 @@ control.prototype.startGame = function (hard, callback) { ////// 重新开始游戏;此函数将回到标题页面 ////// control.prototype.restart = function() { this.showStartAnimate(); - if (core.bgms.length>0) - core.playBgm(core.bgms[0]); } + + + + + /////////////////////// 寻路算法 & 人物行走控制 /////////////////////// ////// 清除自动寻路路线 ////// @@ -1972,7 +1975,7 @@ control.prototype.pauseBgm = function () { core.musicStatus.isPlaying = false; } catch (e) { - console.log("无法暂停BGM"); + console.log("无法暂停BGM "+bgm); console.log(e); } } @@ -1991,18 +1994,13 @@ control.prototype.resumeBgm = function () { } else { if (core.bgms.length>0) { - if (core.isset(core.floors[core.status.floorId].bgm)) { - core.playBgm(core.floors[core.status.floorId].bgm); - } - else { - core.playBgm(core.bgms[0]); - } + core.playBgm(core.bgms[0]); core.musicStatus.isPlaying = true; } } } catch (e) { - console.log("无法恢复BGM"); + console.log("无法恢复BGM "+bgm); console.log(e); } } diff --git a/project/floors/sample0.js b/project/floors/sample0.js index 06a5bd60..d5815cc9 100644 --- a/project/floors/sample0.js +++ b/project/floors/sample0.js @@ -1,213 +1,122 @@ -main.floors.sample0= +main.floors.sample0 = { -"floorId": "sample0", -"title": "样板 0 层", -"name": "0", -"canFlyTo": true, -"canUseQuickShop": true, -"defaultGround": "ground", -"png": [], -"bgm": "bgm.mp3", -"item_ratio": 2, -"map": [ - [ 0, 0,220, 0, 0, 20, 87, 3, 65, 64, 44, 43, 42], - [ 0,246, 0,246, 0, 20, 0, 3, 58, 59, 60, 61, 41], - [219, 0, 0, 0,219, 20, 0, 3, 57, 26, 62, 63, 40], - [ 20, 20,125, 20, 20, 20, 0, 3, 53, 54, 55, 56, 39], - [216,247,256,235,248, 6, 0, 3, 49, 50, 51, 52, 38], - [ 6, 6,125, 6, 6, 6, 0, 1, 45, 46, 47, 48, 37], - [224,254,212,232,204, 5, 0, 1, 31, 32, 34, 33, 36], - [201,205,217,215,207, 5, 0, 1, 27, 28, 29, 30, 35], - [ 5, 5,125, 5, 5, 5, 0, 1, 21, 22, 23, 24, 25], - [ 0, 0,237, 0, 0, 0, 45, 1, 1, 1,121, 1, 1], - [ 4, 4,126, 4, 4, 4, 0, 0, 0, 0, 0, 85,124], - [ 87, 11, 12, 13, 14, 4, 4, 2, 2, 2,122, 2, 2], - [ 88, 89, 90, 91, 92, 93, 94, 2, 81, 82, 83, 84, 86] -], -"firstArrive": [ - "\t[样板提示]首次到达某层可以触发 firstArrive 事件,该事件可类似于RMXP中的“自动执行脚本”。\n\n本事件支持一切的事件类型,常常用来触发对话,例如:", - "\t[hero]\b[up,hero]我是谁?我从哪来?我又要到哪去?", - "\t[仙子,fairy]你问我...?我也不知道啊...", - "本层主要对道具、门、怪物等进行介绍,有关事件的各种信息在下一层会有更为详细的说明。" -], -"events": { - "10,9": [ - "\t[老人,man]这些是本样板支持的所有的道具。\n\n道具分为三类:items, constants, tools。\nitems 为即捡即用类道具,例如宝石、血瓶、剑盾等。\nconstants 为永久道具,例如怪物手册、楼层传送器、幸运金币等。\ntools 为消耗类道具,例如破墙镐、炸弹、中心对称飞行器等。\n\n后两类道具在工具栏中可以看到并使用。", - "\t[老人,man]\b[up]有关道具效果,定义在items.js中。\n目前大多数道具已有默认行为,如有自定义的需求则需在items.js中修改代码。", - "\t[老人,man]constants 和 tools 各最多只允许12种,多了会导致图标溢出。", - "\t[老人,man]\b[up]拾取道具结束后可触发 afterGetItem 事件。\n\n有关事件的各种信息在下一层会有更为详细的说明。", - { - "type": "hide", - "time": 500 - } + "floorId": "sample0", // 这里需要改楼层名,请和文件名及下面的floorId保持完全一致 + // 楼层唯一标识符仅能由字母、数字、下划线组成,且不能由数字开头 + // 推荐用法:第20层就用MT20,第38层就用MT38,地下6层就用MT_6(用下划线代替负号),隐藏3层用MT3h(h表示隐藏),等等 + // 楼层唯一标识符,需要和名字完全一致 + "title": "样板 0 层", // 楼层中文名 + "name": "0", // 显示在状态栏中的层数 + "canFlyTo": true, // 该楼能否被楼传器飞到(不能的话在该楼也不允许使用楼传器) + "canUseQuickShop": true, // 该层是否允许使用快捷商店 + "defaultGround": "ground", // 默认地面的图块ID(terrains中) + "png": [], // 该层默认显示的所有图片;详细用法请查看文档“自定义素材”中的说明。 + // "color": [0,0,0,0.3] // 该层的默认画面色调。本项可不写(代表无色调),如果写需要是一个RGBA数组。 + // "weather": ["snow",5], // 该层的默认天气。本项可忽略表示晴天,如果写则第一项为"rain"或"snow"代表雨雪,第二项为1-10之间的数代表强度。 + "bgm": "bgm.mp3", // 到达该层后默认播放的BGM。本项可忽略。 + "item_ratio": 2, // 该层的宝石/血瓶倍率 + "map": [ // 地图数据,需要是13x13,建议使用地图生成器来生成 + [0, 0, 220, 0, 0, 20, 87, 3, 65, 64, 44, 43, 42], + [0, 246, 0, 246, 0, 20, 0, 3, 58, 59, 60, 61, 41], + [219, 0, 0, 0, 219, 20, 0, 3, 57, 26, 62, 63, 40], + [20, 20, 125, 20, 20, 20, 0, 3, 53, 54, 55, 56, 39], + [216, 247, 256, 235, 248, 6, 0, 3, 49, 50, 51, 52, 38], + [6, 6, 125, 6, 6, 6, 0, 1, 45, 46, 47, 48, 37], + [224, 254, 212, 232, 204, 5, 0, 1, 31, 32, 34, 33, 36], + [201, 205, 217, 215, 207, 5, 0, 1, 27, 28, 29, 30, 35], + [5, 5, 125, 5, 5, 5, 0, 1, 21, 22, 23, 24, 25], + [0, 0, 237, 0, 0, 0, 45, 1, 1, 1, 121, 1, 1], + [4, 4, 126, 4, 4, 4, 0, 0, 0, 0, 0, 85, 124], + [87, 11, 12, 13, 14, 4, 4, 2, 2, 2, 122, 2, 2], + [88, 89, 90, 91, 92, 93, 94, 2, 81, 82, 83, 84, 86], ], - "10,11": [ - "\t[老人,woman]这些是门,需要对应的钥匙打开。\n机关门必须使用特殊的开法。", - "\t[老人,woman]开门后可触发 afterOpenDoor 事件。\n\n有关事件的各种信息在下一层会有更为详细的说明。", - { - "type": "hide", - "time": 500 - } + "firstArrive": [ // 第一次到该楼层触发的事件 + "\t[样板提示]首次到达某层可以触发 firstArrive 事件,该事件可类似于RMXP中的“自动执行脚本”。\n\n本事件支持一切的事件类型,常常用来触发对话,例如:", + "\t[hero]\b[up,hero]我是谁?我从哪来?我又要到哪去?", + "\t[仙子,fairy]你问我...?我也不知道啊...", + "本层主要对道具、门、怪物等进行介绍,有关事件的各种信息在下一层会有更为详细的说明。", ], - "2,10": [ - "\t[老人,womanMagician]这些是路障、楼梯、传送门。", - "\t[老人,womanMagician]血网的伤害数值、中毒后每步伤害数值、衰弱时攻防下降的数值,都在 data.js 内定义。\n\n路障同样会尽量被自动寻路绕过。", - "\t[老人,womanMagician]楼梯和传送门需要在changeFloor中定义目标楼层和位置,可参见样板里已有的的写法。", - { - "type": "hide", - "time": 500 - } - ], - "2,8": [ - "\t[老人,magician]这些都是各种各样的怪物,所有怪物的数据都在enemys.js中设置。", - "\t[老人,magician]这批怪物分别为:普通、先攻、魔攻、坚固、2连击、3连击、4连击、破甲、反击、净化。", - "\t[老人,magician]打败怪物后可触发 afterBattle 事件。\n\n有关事件的各种信息在下一层会有更为详细的说明。", - { - "type": "hide", - "time": 500 - } - ], - "2,5": [ - "\t[老人,magician]模仿、吸血、中毒、衰弱、诅咒。\n\n请注意吸血怪需要设置value为吸血数值,可参见样板中黑暗大法师的写法。", - { - "type": "hide", - "time": 500 - } - ], - "2,3": [ - "\t[老人,magician]领域、夹击。\n请注意领域怪需要设置value为伤害数值,可参见样板中初级巫师的写法。", - "\t[老人,magician]夹击和领域同时发生时先计算领域,再夹击。\n自动寻路同样会尽量绕过你设置的这些点。", - { - "type": "hide", - "time": 500 - } - ], - "12,10": { - "trigger": "action", - "enable": false, - "noPass": null, - "displayDamage": true, - "data": [ - "\t[仙子,fairy]只有楼上启用事件后,才能看到我并可以和我对话来触发事件。", - { - "type": "hide", - "time": 500 - } - ] - } -}, -"changeFloor": { - "7,9": { - "floorId": "sample1", - "stair": "downFloor" - }, - "6,0": { - "floorId": "sample1", - "stair": "downFloor" - }, - "0,11": { - "floorId": "sample0", - "loc": [ - 0, - 12 - ] - }, - "0,12": { - "floorId": "sample0", - "stair": "upFloor" - }, - "1,12": { - "floorId": "sample0", - "loc": [ - 1, - 12 - ] - }, - "2,12": { - "floorId": "sample0", - "loc": [ - 2, - 12 - ] - }, - "3,12": { - "floorId": "sample0", - "loc": [ - 6, - 1 + "events": { // 该楼的所有可能事件列表 + "10,9": [ // 守着道具的老人 + "\t[老人,man]这些是本样板支持的所有的道具。\n\n道具分为三类:items, constants, tools。\nitems 为即捡即用类道具,例如宝石、血瓶、剑盾等。\nconstants 为永久道具,例如怪物手册、楼层传送器、幸运金币等。\ntools 为消耗类道具,例如破墙镐、炸弹、中心对称飞行器等。\n\n后两类道具在工具栏中可以看到并使用。", + "\t[老人,man]\b[up]有关道具效果,定义在items.js中。\n目前大多数道具已有默认行为,如有自定义的需求则需在items.js中修改代码。", + "\t[老人,man]constants 和 tools 各最多只允许12种,多了会导致图标溢出。", + "\t[老人,man]\b[up]拾取道具结束后可触发 afterGetItem 事件。\n\n有关事件的各种信息在下一层会有更为详细的说明。", + {"type": "hide", "time": 500} // 消失 ], - "direction": "up" - }, - "4,12": { - "floorId": "sample0", - "loc": [ - 0, - 9 + "10,11": [ // 守着门的老人 + "\t[老人,woman]这些是门,需要对应的钥匙打开。\n机关门必须使用特殊的开法。", + "\t[老人,woman]开门后可触发 afterOpenDoor 事件。\n\n有关事件的各种信息在下一层会有更为详细的说明。", + {"type": "hide", "time": 500} ], - "direction": "left", - "time": 1000 - }, - "5,12": { - "floorId": "sample0", - "loc": [ - 6, - 10 + "2,10": [ // 守着楼梯、传送门、路障的老人 + "\t[老人,womanMagician]这些是路障、楼梯、传送门。", + "\t[老人,womanMagician]血网的伤害数值、中毒后每步伤害数值、衰弱时攻防下降的数值,都在 data.js 内定义。\n\n路障同样会尽量被自动寻路绕过。", + "\t[老人,womanMagician]楼梯和传送门需要在changeFloor中定义目标楼层和位置,可参见样板里已有的的写法。", + {"type": "hide", "time": 500} ], - "time": 0, - "portalWithoutTrigger": false - }, - "6,12": { - "floorId": "sample0", - "loc": [ - 10, - 10 + "2,8": [ // 守着第一批怪物的老人 + "\t[老人,magician]这些都是各种各样的怪物,所有怪物的数据都在enemys.js中设置。", + "\t[老人,magician]这批怪物分别为:普通、先攻、魔攻、坚固、2连击、3连击、4连击、破甲、反击、净化。", + "\t[老人,magician]打败怪物后可触发 afterBattle 事件。\n\n有关事件的各种信息在下一层会有更为详细的说明。", + {"type": "hide", "time": 500} ], - "direction": "left", - "time": 1000 - } -}, -"afterBattle": { - "2,6": [ - "\t[ghostSkeleton]不可能,你怎么可能打败我!\n(一个打败怪物触发的事件)" - ] -}, -"afterGetItem": { - "11,8": [ - "由于状态栏放不下,绿钥匙和铁门钥匙均视为tools,放入工具栏中。\n碰到绿门和铁门仍然会自动使用开门。" - ], - "8,6": [ - "由于吸血和夹击等的存在,血瓶默认自动被绕路。\n你可以修改data.js中的系统Flag来设置这一项。" - ], - "8,7": [ - "如需修改消耗品的效果,请前往 data.js ,找到并修改values内对应的具体数值即可。\n如果有更高级的需求(如每个区域宝石数值变化),详见doc文档内的做法说明。" - ], - "10,7": [ - "在 data.js 的系统Flag中设置是否启用魔防。\n如果不启用魔防则不会在状态栏显示。" - ], - "9,5": [ - "每层楼的 canFlyTo 决定了该楼层能否被飞到。\n\n不能被飞到的楼层也无法使用楼层传送器。", - "飞行的楼层顺序由 main.js 中 floorIds 加载顺序所决定。\n\n是否必须在楼梯边使用楼传器由 data.js 中的系统Flag所决定。" - ], - "10,5": [ - "破墙镐是破面前的墙壁还是四个方向的墙壁,由data.js中的系统Flag所决定。" - ], - "8,4": [ - "炸弹是只能炸面前的怪物还是四个方向的怪物,由data.js中的系统Flag所决定。\n如只能炸前方怪物则和上面的圣锤等价。\n不能被炸的怪物在enemys中可以定义,可参见样板里黑衣魔王和黑暗大法师的写法。" - ], - "10,4": [ - "“上楼”和“下楼”的目标层由 main.js 的 floorIds顺序所决定。" - ], - "9,2": [ - "该道具默认是大黄门钥匙,如需改为钥匙盒直接修改 data.js 中的系统Flag即可。" - ], - "10,2": [ - "屠龙匕首目前未被定义,可能需要自行实现功能。\n有关如何实现一个道具功能参见doc文档。" - ] -}, -"afterOpenDoor": { - "11,12": [ - "你开了一个绿门,触发了一个afterOpenDoor事件" - ] -}, -"cannotMove": {}, -} \ No newline at end of file + "2,5": [ // 守着第二批怪物的老人 + "\t[老人,magician]模仿、吸血、中毒、衰弱、诅咒。\n\n请注意吸血怪需要设置value为吸血数值,可参见样板中黑暗大法师的写法。", + {"type": "hide", "time": 500} + ], + "2,3": [ // 守着第三批怪物的老人 + "\t[老人,magician]领域、夹击。\n请注意领域怪需要设置value为伤害数值,可参见样板中初级巫师的写法。", + "\t[老人,magician]夹击和领域同时发生时先计算领域,再夹击。\n自动寻路同样会尽量绕过你设置的这些点。", + {"type": "hide", "time": 500} + ], + "12,10": { // 隐藏的仙子 + "enable": false, // enable: false代表初始时禁用事件 + "data": [ + "\t[仙子,fairy]只有楼上启用事件后,才能看到我并可以和我对话来触发事件。", + {"type": "hide", "time": 500} + ] + }, + }, + "changeFloor": { // 楼层转换事件;该事件不能和上面的events有冲突(同位置点),否则会被覆盖 + "7,9": {"floorId": "sample1", "stair": "downFloor"}, + "6,0": {"floorId": "sample1", "stair": "downFloor"}, // 目标点:sample1层的下楼梯位置 + "0,11": {"floorId": "sample0", "loc": [0,12]}, // 目标点:sample0层的x=0,y=12位置 + "0,12": {"floorId": "sample0", "stair": "upFloor"}, // 注意,目标层有多个楼梯的话,写stair可能会导致到达位置不确定。这时候推荐写loc指明目标点位置。 + "1,12": {"floorId": "sample0", "loc": [1,12]}, + "2,12": {"floorId": "sample0", "loc": [2,12]}, + "3,12": {"floorId": "sample0", "loc": [6,1], "direction": "up"}, // 切换楼层后勇士面对上方 + "4,12": {"floorId": "sample0", "loc": [0,9], "direction": "left", "time": 1000}, // 切换楼层后勇士面对左边,切换动画1000ms + "5,12": {"floorId": "sample0", "loc": [6,10], "time": 0, "portalWithoutTrigger": false}, // time=0表示无切换时间 + "6,12": {"floorId": "sample0", "loc": [10,10], "direction": "left", "time": 1000}, + }, + "afterBattle": { // 战斗后可能触发的事件列表 + "2,6": ["\t[ghostSkeleton]不可能,你怎么可能打败我!\n(一个打败怪物触发的事件)"], + }, + "afterGetItem": { // 获得道具后可能触发的事件列表 + "11,8": ["由于状态栏放不下,绿钥匙和铁门钥匙均视为tools,放入工具栏中。\n碰到绿门和铁门仍然会自动使用开门。"], + "8,6": ["由于吸血和夹击等的存在,血瓶默认自动被绕路。\n你可以修改data.js中的系统Flag来设置这一项。"], + "8,7": ["如需修改消耗品的效果,请前往 data.js ,找到并修改values内对应的具体数值即可。\n如果有更高级的需求(如每个区域宝石数值变化),详见doc文档内的做法说明。"], + "10,7": ["在 data.js 的系统Flag中设置是否启用魔防。\n如果不启用魔防则不会在状态栏显示。"], + "9,5": [ + "每层楼的 canFlyTo 决定了该楼层能否被飞到。\n\n不能被飞到的楼层也无法使用楼层传送器。", + "飞行的楼层顺序由 main.js 中 floorIds 加载顺序所决定。\n\n是否必须在楼梯边使用楼传器由 data.js 中的系统Flag所决定。" + ], + "10,5": ["破墙镐是破面前的墙壁还是四个方向的墙壁,由data.js中的系统Flag所决定。"], + "8,4": [ + "炸弹是只能炸面前的怪物还是四个方向的怪物,由data.js中的系统Flag所决定。\n如只能炸前方怪物则和上面的圣锤等价。\n不能被炸的怪物在enemys中可以定义,可参见样板里黑衣魔王和黑暗大法师的写法。", + ], + "10,4": ["“上楼”和“下楼”的目标层由 main.js 的 floorIds顺序所决定。"], + "9,2": ["该道具默认是大黄门钥匙,如需改为钥匙盒直接修改 data.js 中的系统Flag即可。"], + "10,2": ["屠龙匕首目前未被定义,可能需要自行实现功能。\n有关如何实现一个道具功能参见doc文档。"], + }, + "afterOpenDoor": { // 开完门后可能触发的事件列表 + "11,12": ["你开了一个绿门,触发了一个afterOpenDoor事件"] + }, + "cannotMove": { // 每个图块不可通行的方向 + // 可以在这里定义每个点不能前往哪个方向,例如悬崖边不能跳下去 + // "x,y": ["up", "left"], // (x,y)点不能往上和左走 + + }, + +} + diff --git a/project/icons.js b/project/icons.js index 7a276890..fbd4a186 100644 --- a/project/icons.js +++ b/project/icons.js @@ -1,245 +1,221 @@ icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 = { - "hero": { - "down": { - "loc": 0, - "stop": 0, - "leftFoot": 1, - "rightFoot": 3 + 'hero': { + 'down': {'loc': 0, 'stop': 0, 'leftFoot': 1, 'rightFoot': 3}, + 'left': {'loc': 1, 'stop': 0, 'leftFoot': 1, 'rightFoot': 3}, + 'right': {'loc': 2, 'stop': 0, 'leftFoot': 1, 'rightFoot': 3}, + 'up': {'loc': 3, 'stop': 0, 'leftFoot': 1, 'rightFoot': 3} }, - "left": { - "loc": 1, - "stop": 0, - "leftFoot": 1, - "rightFoot": 3 + 'terrains': { + 'ground': 0, + 'grass': 1, + 'grass2': 2, + 'yellowWall': 3, + 'whiteWall': 4, + 'blueWall': 5, + 'snowGround': 6, + 'ground2': 7, + 'ground3': 8, + 'ground4': 9, + 'sand': 10, + 'ground5': 11, + 'yellowWall2': 12, + 'whiteWall2': 13, + 'blueWall2': 14, + 'blockWall': 15, + 'grayWall': 16, + 'white': 17, + 'ground6': 18, + 'soil': 19, + 'star': 20, + 'lava': 21, + 'ice': 22, + 'downFloor': 23, + 'upFloor': 24, + 'yellowDoor': 25, + 'blueDoor': 26, + 'redDoor': 27, + 'greenDoor': 28, + 'specialDoor': 29, + 'steelDoor': 30, + 'blueShop-left': 31, + 'blueShop-right': 32, + 'pinkShop-left': 33, + 'pinkShop-right': 34, + 'arrowUp': 35, + 'arrowDown': 36, + 'arrowLeft': 37, + 'arrowRight': 38, + 'light': 39, + 'darkLight': 40, + 'ski': 41, + 'flower': 42, + 'box': 43, + 'boxed': 44 }, - "right": { - "loc": 2, - "stop": 0, - "leftFoot": 1, - "rightFoot": 3 + 'animates': { + 'star': 0, + 'lava': 1, + 'waterWall': 2, + 'yellowDoor': 3, + 'blueDoor': 4, + 'redDoor': 5, + 'greenDoor': 6, + 'specialDoor': 7, + 'blueWallDoor': 8, + 'yellowWallDoor': 9, + 'whiteWallDoor': 10, + 'steelDoor': 11, + 'lavaDoor': 12, + 'grayLavaDoor': 13, + 'starDoor': 14, + 'mockBlueWallDoor': 15, + 'mockYellowWallDoor': 16, + 'mockWhiteWallDoor': 17, + 'iceYellowWallDoor': 18, + 'starPortal': 19, + 'exclamation': 20, + 'portal': 21, + 'switch': 22, + 'lavaNet': 23, + 'poisonNet': 24, + 'weakNet': 25, + 'curseNet': 26, + 'downPortal': 27, + 'leftPortal': 28, + 'rightPortal': 29, + 'upPortal': 30, + 'water': 31, }, - "up": { - "loc": 3, - "stop": 0, - "leftFoot": 1, - "rightFoot": 3 + 'npcs': { + 'man': 0, + 'woman': 1, + 'thief': 2, + 'fairy': 3, + 'magician': 4, + 'womanMagician': 5, + 'oldMan': 6, + 'child': 7, + 'wood': 8, + 'pinkShop': 9, + 'blueShop': 10, + 'princess': 11 }, - "height": 48 - }, - "terrains": { - "ground": 0, - "grass": 1, - "grass2": 2, - "yellowWall": 3, - "whiteWall": 4, - "blueWall": 5, - "snowGround": 6, - "ground2": 7, - "ground3": 8, - "ground4": 9, - "sand": 10, - "ground5": 11, - "yellowWall2": 12, - "whiteWall2": 13, - "blueWall2": 14, - "blockWall": 15, - "grayWall": 16, - "white": 17, - "ground6": 18, - "soil": 19, - "star": 20, - "lava": 21, - "ice": 22, - "downFloor": 23, - "upFloor": 24, - "yellowDoor": 25, - "blueDoor": 26, - "redDoor": 27, - "greenDoor": 28, - "specialDoor": 29, - "steelDoor": 30, - "blueShop-left": 31, - "blueShop-right": 32, - "pinkShop-left": 33, - "pinkShop-right": 34, - "arrowUp": 35, - "arrowDown": 36, - "arrowLeft": 37, - "arrowRight": 38, - "light": 39, - "darkLight": 40, - "ski": 41, - "flower": 42, - "box": 43, - "boxed": 44 - }, - "animates": { - "star": 0, - "lava": 1, - "waterWall": 2, - "yellowDoor": 3, - "blueDoor": 4, - "redDoor": 5, - "greenDoor": 6, - "specialDoor": 7, - "blueWallDoor": 8, - "yellowWallDoor": 9, - "whiteWallDoor": 10, - "steelDoor": 11, - "lavaDoor": 12, - "grayLavaDoor": 13, - "starDoor": 14, - "mockBlueWallDoor": 15, - "mockYellowWallDoor": 16, - "mockWhiteWallDoor": 17, - "iceYellowWallDoor": 18, - "starPortal": 19, - "exclamation": 20, - "portal": 21, - "switch": 22, - "lavaNet": 23, - "poisonNet": 24, - "weakNet": 25, - "curseNet": 26, - "downPortal": 27, - "leftPortal": 28, - "rightPortal": 29, - "upPortal": 30, - "water": 31 - }, - "npcs": { - "man": 0, - "woman": 1, - "thief": 2, - "fairy": 3, - "magician": 4, - "womanMagician": 5, - "oldMan": 6, - "child": 7, - "wood": 8, - "pinkShop": 9, - "blueShop": 10, - "princess": 11 - }, - "enemys": { - "greenSlime": 0, - "redSlime": 1, - "blackSlime": 2, - "slimelord": 3, - "bat": 4, - "bigBat": 5, - "redBat": 6, - "vampire": 7, - "skeleton": 8, - "skeletonSoilder": 9, - "skeletonCaptain": 10, - "ghostSkeleton": 11, - "zombie": 12, - "zombieKnight": 13, - "rock": 14, - "slimeMan": 15, - "bluePriest": 16, - "redPriest": 17, - "brownWizard": 18, - "redWizard": 19, - "yellowGuard": 20, - "blueGuard": 21, - "redGuard": 22, - "swordsman": 23, - "soldier": 24, - "yellowKnight": 25, - "redKnight": 26, - "darkKnight": 27, - "blackKing": 28, - "yellowKing": 29, - "greenKing": 30, - "blueKnight": 31, - "goldSlime": 32, - "poisonSkeleton": 33, - "poisonBat": 34, - "steelRock": 35, - "skeletonPriest": 36, - "skeletonKing": 37, - "skeletonWizard": 38, - "redSkeletonCaption": 39, - "badHero": 40, - "demon": 41, - "demonPriest": 42, - "goldHornSlime": 43, - "redKing": 44, - "whiteKing": 45, - "blackMagician": 46, - "silverSlime": 47, - "swordEmperor": 48, - "whiteHornSlime": 49, - "badPrincess": 50, - "badFairy": 51, - "grayPriest": 52, - "redSwordsman": 53, - "whiteGhost": 54, - "poisonZombie": 55, - "magicDragon": 56, - "octopus": 57, - "darkFairy": 58, - "greenKnight": 59, - "test": 60 - }, - "items": { - "yellowKey": 0, - "blueKey": 1, - "redKey": 2, - "greenKey": 3, - "steelKey": 4, - "bigKey": 6, - "redJewel": 16, - "blueJewel": 17, - "greenJewel": 18, - "yellowJewel": 19, - "redPotion": 20, - "bluePotion": 21, - "greenPotion": 22, - "yellowPotion": 23, - "sword0": 60, - "sword1": 50, - "sword2": 51, - "sword3": 52, - "sword4": 53, - "sword5": 54, - "shield0": 61, - "shield1": 55, - "shield2": 56, - "shield3": 57, - "shield4": 58, - "shield5": 59, - "book": 9, - "fly": 12, - "pickaxe": 45, - "icePickaxe": 44, - "bomb": 43, - "centerFly": 13, - "upFly": 15, - "downFly": 14, - "coin": 11, - "snow": 41, - "cross": 40, - "superPotion": 29, - "earthquake": 8, - "poisonWine": 24, - "weakWine": 25, - "curseWine": 27, - "superWine": 28, - "knife": 42, - "moneyPocket": 46, - "shoes": 47, - "hammer": 48, - "ttt": 49, - "sgg": 35 - }, - "autotile": { - "autotile": 0, - "autotile1": 0, - "autotile2": 0, - "autotile3": 0 - } + 'enemys': { + 'greenSlime': 0, + 'redSlime': 1, + 'blackSlime': 2, + 'slimelord': 3, + 'bat': 4, + 'bigBat': 5, + 'redBat': 6, + 'vampire': 7, + 'skeleton': 8, + 'skeletonSoilder': 9, + 'skeletonCaptain': 10, + 'ghostSkeleton': 11, + 'zombie': 12, + 'zombieKnight': 13, + 'rock': 14, + 'slimeMan': 15, + 'bluePriest': 16, + 'redPriest': 17, + 'brownWizard': 18, + 'redWizard': 19, + 'yellowGuard': 20, + 'blueGuard': 21, + 'redGuard': 22, + 'swordsman': 23, + 'soldier': 24, + 'yellowKnight': 25, + 'redKnight': 26, + 'darkKnight': 27, + 'blackKing': 28, + 'yellowKing': 29, + 'greenKing': 30, + 'blueKnight': 31, + 'goldSlime': 32, + 'poisonSkeleton': 33, + 'poisonBat': 34, + 'steelRock': 35, + 'skeletonPriest': 36, + 'skeletonKing': 37, + 'skeletonWizard': 38, + 'redSkeletonCaption': 39, + 'badHero': 40, + 'demon': 41, + 'demonPriest': 42, + 'goldHornSlime': 43, + 'redKing': 44, + 'whiteKing': 45, + 'blackMagician': 46, + 'silverSlime': 47, + 'swordEmperor': 48, + 'whiteHornSlime': 49, + 'badPrincess': 50, + 'badFairy': 51, + 'grayPriest': 52, + 'redSwordsman': 53, + 'whiteGhost': 54, + 'poisonZombie': 55, + 'magicDragon': 56, + 'octopus': 57, + 'darkFairy': 58, + 'greenKnight': 59, + }, + 'items': { + 'yellowKey': 0, + 'blueKey': 1, + 'redKey': 2, + 'greenKey': 3, + 'steelKey': 4, + 'bigKey': 6, + 'redJewel': 16, + 'blueJewel': 17, + 'greenJewel': 18, + 'yellowJewel': 19, + 'redPotion': 20, + 'bluePotion': 21, + 'greenPotion': 22, + 'yellowPotion': 23, + 'sword0': 60, + 'sword1': 50, + 'sword2': 51, + 'sword3': 52, + 'sword4': 53, + 'sword5': 54, + 'shield0': 61, + 'shield1': 55, + 'shield2': 56, + 'shield3': 57, + 'shield4': 58, + 'shield5': 59, + 'book': 9, + 'fly': 12, + 'pickaxe': 45, + 'icePickaxe': 44, + 'bomb': 43, + 'centerFly': 13, + 'upFly': 15, + 'downFly': 14, + 'coin': 11, + 'snow': 41, + 'cross': 40, + 'superPotion': 29, + 'earthquake': 8, + 'poisonWine': 24, + 'weakWine': 25, + 'curseWine': 27, + 'superWine': 28, + 'knife': 42, + 'moneyPocket': 46, + 'shoes': 47, + 'hammer': 48 + }, + 'autotile': { // 所有的Autotile列表;后面的index简单取0即可 + 'autotile': 0, + 'autotile1': 0, + 'autotile2': 0, + 'autotile3': 0, + } } \ No newline at end of file diff --git a/project/images/enemys.png b/project/images/enemys.png index 11cac233..6797ae59 100644 Binary files a/project/images/enemys.png and b/project/images/enemys.png differ diff --git a/project/items.js b/project/items.js index d9b28d69..b68555f5 100644 --- a/project/items.js +++ b/project/items.js @@ -1,281 +1,117 @@ items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = { - "items": { - "yellowKey": { - "cls": "keys", - "name": "黄钥匙" - }, - "blueKey": { - "cls": "keys", - "name": "蓝钥匙" - }, - "redKey": { - "cls": "keys", - "name": "红钥匙" - }, - "redJewel": { - "cls": "items", - "name": "红宝石" - }, - "blueJewel": { - "cls": "items", - "name": "蓝宝石" - }, - "greenJewel": { - "cls": "items", - "name": "绿宝石" - }, - "yellowJewel": { - "cls": "items", - "name": "黄宝石" - }, - "redPotion": { - "cls": "items", - "name": "红血瓶" - }, - "bluePotion": { - "cls": "items", - "name": "蓝血瓶" - }, - "yellowPotion": { - "cls": "items", - "name": "黄血瓶" - }, - "greenPotion": { - "cls": "items", - "name": "绿血瓶" - }, - "sword1": { - "cls": "items", - "name": "铁剑", - "isEquipment": true - }, - "sword2": { - "cls": "items", - "name": "银剑", - "isEquipment": true - }, - "sword3": { - "cls": "items", - "name": "骑士剑", - "isEquipment": true - }, - "sword4": { - "cls": "items", - "name": "圣剑", - "isEquipment": true - }, - "sword5": { - "cls": "items", - "name": "神圣剑", - "isEquipment": true - }, - "shield1": { - "cls": "items", - "name": "铁盾", - "isEquipment": true - }, - "shield2": { - "cls": "items", - "name": "银盾", - "isEquipment": true - }, - "shield3": { - "cls": "items", - "name": "骑士盾", - "isEquipment": true - }, - "shield4": { - "cls": "items", - "name": "圣盾", - "isEquipment": true - }, - "shield5": { - "cls": "items", - "name": "神圣盾", - "isEquipment": true - }, - "superPotion": { - "cls": "items", - "name": "圣水" - }, - "moneyPocket": { - "cls": "items", - "name": "金钱袋" - }, - "sword0": { - "cls": "constants", - "name": "折断的剑", - "text": "没有任何作用的剑,相当于脱掉装备。" - }, - "shield0": { - "cls": "constants", - "name": "残破的盾", - "text": "没有任何作用的盾,相当于脱掉装备。" - }, - "book": { - "cls": "constants", - "name": "怪物手册", - "text": "可以查看当前楼层各怪物属性" - }, - "fly": { - "cls": "constants", - "name": "楼层传送器", - "text": "可以自由往来去过的楼层" - }, - "coin": { - "cls": "constants", - "name": "幸运金币", - "text": "持有时打败怪物可得双倍金币" - }, - "snow": { - "cls": "constants", - "name": "冰冻徽章", - "text": "可以将四周的熔岩变成平地" - }, - "cross": { - "cls": "constants", - "name": "十字架", - "text": "持有后无视怪物的无敌属性" - }, - "knife": { - "cls": "constants", - "name": "屠龙匕首", - "text": "该道具尚未被定义" - }, - "shoes": { - "cls": "constants", - "name": "绿鞋", - "text": "持有时无视负面地形" - }, - "bigKey": { - "cls": "tools", - "name": "大黄门钥匙", - "text": "可以开启当前层所有黄门" - }, - "greenKey": { - "cls": "tools", - "name": "绿钥匙", - "text": "可以打开一扇绿门" - }, - "steelKey": { - "cls": "tools", - "name": "铁门钥匙", - "text": "可以打开一扇铁门" - }, - "pickaxe": { - "cls": "tools", - "name": "破墙镐", - "text": "可以破坏勇士四周的墙" - }, - "icePickaxe": { - "cls": "tools", - "name": "破冰镐", - "text": "可以破坏勇士面前的一堵冰墙" - }, - "bomb": { - "cls": "tools", - "name": "炸弹", - "text": "可以炸掉勇士四周的怪物" - }, - "centerFly": { - "cls": "tools", - "name": "中心对称飞行器", - "text": "可以飞向当前楼层中心对称的位置" - }, - "upFly": { - "cls": "tools", - "name": "上楼器", - "text": "可以飞往楼上的相同位置" - }, - "downFly": { - "cls": "tools", - "name": "下楼器", - "text": "可以飞往楼下的相同位置" - }, - "earthquake": { - "cls": "tools", - "name": "地震卷轴", - "text": "可以破坏当前层的所有墙" - }, - "poisonWine": { - "cls": "tools", - "name": "解毒药水", - "text": "可以解除中毒状态" - }, - "weakWine": { - "cls": "tools", - "name": "解衰药水", - "text": "可以解除衰弱状态" - }, - "curseWine": { - "cls": "tools", - "name": "解咒药水", - "text": "可以解除诅咒状态" - }, - "superWine": { - "cls": "tools", - "name": "万能药水", - "text": "可以解除所有不良状态" - }, - "hammer": { - "cls": "tools", - "name": "圣锤", - "text": "可以炸掉勇士面前的怪物" - }, - "ttt": { - "cls": "items", - "name": "新物品" - }, - "sgg": { - "cls": "items", - "name": "新物品" - } - }, - "itemEffect": { - "redJewel": "core.status.hero.atk += core.values.redJewel * ratio", - "blueJewel": "core.status.hero.def += core.values.blueJewel * ratio", - "greenJewel": "core.status.hero.mdef += core.values.greenJewel * ratio", - "yellowJewel": "core.status.hero.hp+=1000;core.status.hero.atk+=6;core.status.hero.def+=6;core.status.hero.mdef+=10;", - "redPotion": "core.status.hero.hp += core.values.redPotion * ratio", - "bluePotion": "core.status.hero.hp += core.values.bluePotion * ratio", - "yellowPotion": "core.status.hero.hp += core.values.yellowPotion * ratio", - "greenPotion": "core.status.hero.hp += core.values.greenPotion * ratio", - "sword1": "core.status.hero.atk += core.values.sword1", - "sword2": "core.status.hero.atk += core.values.sword2", - "sword3": "core.status.hero.atk += core.values.sword3", - "sword4": "core.status.hero.atk += core.values.sword4", - "sword5": "core.status.hero.atk += core.values.sword5", - "shield1": "core.status.hero.def += core.values.shield1", - "shield2": "core.status.hero.def += core.values.shield2", - "shield3": "core.status.hero.def += core.values.shield3", - "shield4": "core.status.hero.def += core.values.shield4", - "shield5": "core.status.hero.def += core.values.shield5", - "bigKey": "core.status.hero.items.keys.yellowKey++;core.status.hero.items.keys.blueKey++;core.status.hero.items.keys.redKey++;", - "superPotion": "core.status.hero.hp *= 2", - "moneyPocket": "core.status.hero.money += core.values.moneyPocket" - }, - "itemEffectTip": { - "redJewel": "',攻击+'+core.values.redJewel * ratio", - "blueJewel": "',防御+'+core.values.blueJewel * ratio", - "greenJewel": "',魔防+'+core.values.greenJewel * ratio", - "yellowJewel": "',全属性提升'", - "redPotion": "',生命+'+core.values.redPotion * ratio", - "bluePotion": "',生命+'+core.values.bluePotion * ratio", - "yellowPotion": "',生命+'+core.values.yellowPotion * ratio", - "greenPotion": "',生命+'+core.values.greenPotion * ratio", - "sword1": "',攻击+'+core.values.sword1", - "sword2": "',攻击+'+core.values.sword2", - "sword3": "',攻击+'+core.values.sword3", - "sword4": "',攻击+'+core.values.sword4", - "sword5": "',攻击+'+core.values.sword5", - "shield1": "',防御+'+core.values.shield1", - "shield2": "',防御+'+core.values.shield2", - "shield3": "',防御+'+core.values.shield3", - "shield4": "',防御+'+core.values.shield4", - "shield5": "',防御+'+core.values.shield5", - "bigKey": "',全钥匙+1'", - "superPotion": "',生命值翻倍'", - "moneyPocket": "',金币+'+core.values.moneyPocket" - } + +"items" : { + // 钥匙 + 'yellowKey': {'cls': 'keys', 'name': '黄钥匙'}, + 'blueKey': {'cls': 'keys', 'name': '蓝钥匙'}, + 'redKey': {'cls': 'keys', 'name': '红钥匙'}, + + // 宝石、血瓶 + 'redJewel': {'cls': 'items', 'name': '红宝石'}, + 'blueJewel': {'cls': 'items', 'name': '蓝宝石'}, + 'greenJewel': {'cls': 'items', 'name': '绿宝石'}, + 'yellowJewel': {'cls': 'items', 'name': '黄宝石'}, + 'redPotion': {'cls': 'items', 'name': '红血瓶'}, + 'bluePotion': {'cls': 'items', 'name': '蓝血瓶'}, + 'yellowPotion': {'cls': 'items', 'name': '黄血瓶'}, + 'greenPotion': {'cls': 'items', 'name': '绿血瓶'}, + 'sword1': {'cls': 'items', 'name': '铁剑', 'isEquipment': true}, + 'sword2': {'cls': 'items', 'name': '银剑', 'isEquipment': true}, + 'sword3': {'cls': 'items', 'name': '骑士剑', 'isEquipment': true}, + 'sword4': {'cls': 'items', 'name': '圣剑', 'isEquipment': true}, + 'sword5': {'cls': 'items', 'name': '神圣剑', 'isEquipment': true}, + 'shield1': {'cls': 'items', 'name': '铁盾', 'isEquipment': true}, + 'shield2': {'cls': 'items', 'name': '银盾', 'isEquipment': true}, + 'shield3': {'cls': 'items', 'name': '骑士盾', 'isEquipment': true}, + 'shield4': {'cls': 'items', 'name': '圣盾', 'isEquipment': true}, + 'shield5': {'cls': 'items', 'name': '神圣盾', 'isEquipment': true}, + 'superPotion': {'cls': 'items', 'name': '圣水'}, + 'moneyPocket': {'cls': 'items', 'name': '金钱袋'}, + + // 物品 + 'sword0': {'cls': 'constants', 'name': '折断的剑', 'text': '没有任何作用的剑,相当于脱掉装备。'}, + 'shield0': {'cls': 'constants', 'name': '残破的盾', 'text': '没有任何作用的盾,相当于脱掉装备。'}, + 'book': {'cls': 'constants', 'name': '怪物手册', 'text': '可以查看当前楼层各怪物属性'}, + 'fly': {'cls': 'constants', 'name': '楼层传送器', 'text': '可以自由往来去过的楼层'}, + 'coin': {'cls': 'constants', 'name': '幸运金币', 'text': '持有时打败怪物可得双倍金币'}, + 'snow': {'cls': 'constants', 'name': '冰冻徽章', 'text': '可以将四周的熔岩变成平地'}, + 'cross': {'cls': 'constants', 'name': '十字架', 'text': '持有后无视怪物的无敌属性'}, + 'knife': {'cls': 'constants', 'name': '屠龙匕首', 'text': '该道具尚未被定义'}, + 'shoes': {'cls': 'constants', 'name': '绿鞋', 'text': '持有时无视负面地形'}, + + // 道具 + 'bigKey': {'cls': 'tools', 'name': '大黄门钥匙', 'text': '可以开启当前层所有黄门'}, + 'greenKey': {'cls': 'tools', 'name': '绿钥匙', 'text': '可以打开一扇绿门'}, + 'steelKey': {'cls': 'tools', 'name': '铁门钥匙', 'text': '可以打开一扇铁门'}, + 'pickaxe': {'cls': 'tools', 'name': '破墙镐', 'text': '可以破坏勇士面前的墙'}, + 'icePickaxe': {'cls': 'tools', 'name': '破冰镐', 'text': '可以破坏勇士面前的一堵冰墙'}, + 'bomb': {'cls': 'tools', 'name': '炸弹', 'text': '可以炸掉勇士面前的怪物'}, + 'centerFly': {'cls': 'tools', 'name': '中心对称飞行器', 'text': '可以飞向当前楼层中心对称的位置'}, + 'upFly': {'cls': 'tools', 'name': '上楼器', 'text': '可以飞往楼上的相同位置'}, + 'downFly': {'cls': 'tools', 'name': '下楼器', 'text': '可以飞往楼下的相同位置'}, + 'earthquake': {'cls': 'tools', 'name': '地震卷轴', 'text': '可以破坏当前层的所有墙'}, + 'poisonWine': {'cls': 'tools', 'name': '解毒药水', 'text': '可以解除中毒状态'}, + 'weakWine': {'cls': 'tools', 'name': '解衰药水', 'text': '可以解除衰弱状态'}, + 'curseWine': {'cls': 'tools', 'name': '解咒药水', 'text': '可以解除诅咒状态'}, + 'superWine': {'cls': 'tools', 'name': '万能药水', 'text': '可以解除所有不良状态'}, + 'hammer': {'cls': 'tools', 'name': '圣锤', 'text': '可以炸掉勇士面前的怪物'} +}, + + + + +"itemEffect" : { + "redJewel":"core.status.hero.atk += core.values.redJewel * ratio", + "blueJewel":"core.status.hero.def += core.values.blueJewel * ratio", + "greenJewel":"core.status.hero.mdef += core.values.greenJewel * ratio", + + "yellowJewel":"core.status.hero.hp+=1000;core.status.hero.atk+=6;core.status.hero.def+=6;core.status.hero.mdef+=10;", + // 黄宝石属性:需自己定义 + "redPotion":"core.status.hero.hp += core.values.redPotion * ratio", + "bluePotion":"core.status.hero.hp += core.values.bluePotion * ratio", + "yellowPotion":"core.status.hero.hp += core.values.yellowPotion * ratio", + "greenPotion":"core.status.hero.hp += core.values.greenPotion * ratio", + "sword1":"core.status.hero.atk += core.values.sword1", + "sword2":"core.status.hero.atk += core.values.sword2", + "sword3":"core.status.hero.atk += core.values.sword3", + "sword4":"core.status.hero.atk += core.values.sword4", + "sword5":"core.status.hero.atk += core.values.sword5", + "shield1":"core.status.hero.def += core.values.shield1", + "shield2":"core.status.hero.def += core.values.shield2", + "shield3":"core.status.hero.def += core.values.shield3", + "shield4":"core.status.hero.def += core.values.shield4", + "shield5":"core.status.hero.def += core.values.shield5", + + "bigKey":"core.status.hero.items.keys.yellowKey++;core.status.hero.items.keys.blueKey++;core.status.hero.items.keys.redKey++;", + // 只有是钥匙盒才会执行这一步 + "superPotion":"core.status.hero.hp *= 2", + "moneyPocket":"core.status.hero.money += core.values.moneyPocket", +}, + + +"itemEffectTip" : { + "redJewel":"',攻击+'+core.values.redJewel * ratio", + "blueJewel":"',防御+'+core.values.blueJewel * ratio", + "greenJewel":"',魔防+'+core.values.greenJewel * ratio", + "yellowJewel":"',全属性提升'", + "redPotion":"',生命+'+core.values.redPotion * ratio", + "bluePotion":"',生命+'+core.values.bluePotion * ratio", + "yellowPotion":"',生命+'+core.values.yellowPotion * ratio", + "greenPotion":"',生命+'+core.values.greenPotion * ratio", + "sword1":"',攻击+'+core.values.sword1", + "sword2":"',攻击+'+core.values.sword2", + "sword3":"',攻击+'+core.values.sword3", + "sword4":"',攻击+'+core.values.sword4", + "sword5":"',攻击+'+core.values.sword5", + "shield1":"',防御+'+core.values.shield1", + "shield2":"',防御+'+core.values.shield2", + "shield3":"',防御+'+core.values.shield3", + "shield4":"',防御+'+core.values.shield4", + "shield5":"',防御+'+core.values.shield5", + "bigKey":"',全钥匙+1'", + "superPotion":"',生命值翻倍'", + "moneyPocket":"',金币+'+core.values.moneyPocket", +} + } \ No newline at end of file diff --git a/project/maps.js b/project/maps.js index 9f0aef62..a265e88c 100644 --- a/project/maps.js +++ b/project/maps.js @@ -1,698 +1,197 @@ maps_90f36752_8815_4be8_b32b_d7fad1d0542e = { - "1": { - "cls": "terrains", - "id": "yellowWall" - }, - "2": { - "cls": "terrains", - "id": "whiteWall" - }, - "3": { - "cls": "terrains", - "id": "blueWall" - }, - "4": { - "cls": "animates", - "id": "star", - "noPass": true - }, - "5": { - "cls": "animates", - "id": "lava", - "noPass": true - }, - "6": { - "cls": "terrains", - "id": "ice" - }, - "7": { - "cls": "terrains", - "id": "blueShop-left" - }, - "8": { - "cls": "terrains", - "id": "blueShop-right" - }, - "9": { - "cls": "terrains", - "id": "pinkShop-left" - }, - "10": { - "cls": "terrains", - "id": "pinkShop-right" - }, - "11": { - "cls": "animates", - "id": "lavaNet", - "noPass": false, - "trigger": "passNet" - }, - "12": { - "cls": "animates", - "id": "poisonNet", - "noPass": false, - "trigger": "passNet" - }, - "13": { - "cls": "animates", - "id": "weakNet", - "noPass": false, - "trigger": "passNet" - }, - "14": { - "cls": "animates", - "id": "curseNet", - "noPass": false, - "trigger": "passNet" - }, - "15": { - "cls": "animates", - "id": "water", - "noPass": true - }, - "20": { - "cls": "autotile", - "id": "autotile", - "noPass": true - }, - "21": { - "cls": "items", - "id": "yellowKey" - }, - "22": { - "cls": "items", - "id": "blueKey" - }, - "23": { - "cls": "items", - "id": "redKey" - }, - "24": { - "cls": "items", - "id": "greenKey" - }, - "25": { - "cls": "items", - "id": "steelKey" - }, - "26": { - "cls": "items", - "id": "bigKey" - }, - "27": { - "cls": "items", - "id": "redJewel" - }, - "28": { - "cls": "items", - "id": "blueJewel" - }, - "29": { - "cls": "items", - "id": "greenJewel" - }, - "30": { - "cls": "items", - "id": "yellowJewel" - }, - "31": { - "cls": "items", - "id": "redPotion" - }, - "32": { - "cls": "items", - "id": "bluePotion" - }, - "33": { - "cls": "items", - "id": "greenPotion" - }, - "34": { - "cls": "items", - "id": "yellowPotion" - }, - "35": { - "cls": "items", - "id": "sword1" - }, - "36": { - "cls": "items", - "id": "shield1" - }, - "37": { - "cls": "items", - "id": "sword2" - }, - "38": { - "cls": "items", - "id": "shield2" - }, - "39": { - "cls": "items", - "id": "sword3" - }, - "40": { - "cls": "items", - "id": "shield3" - }, - "41": { - "cls": "items", - "id": "sword4" - }, - "42": { - "cls": "items", - "id": "shield4" - }, - "43": { - "cls": "items", - "id": "sword5" - }, - "44": { - "cls": "items", - "id": "shield5" - }, - "45": { - "cls": "items", - "id": "book" - }, - "46": { - "cls": "items", - "id": "fly" - }, - "47": { - "cls": "items", - "id": "pickaxe" - }, - "48": { - "cls": "items", - "id": "icePickaxe" - }, - "49": { - "cls": "items", - "id": "bomb" - }, - "50": { - "cls": "items", - "id": "centerFly" - }, - "51": { - "cls": "items", - "id": "upFly" - }, - "52": { - "cls": "items", - "id": "downFly" - }, - "53": { - "cls": "items", - "id": "coin" - }, - "54": { - "cls": "items", - "id": "snow" - }, - "55": { - "cls": "items", - "id": "cross" - }, - "56": { - "cls": "items", - "id": "superPotion" - }, - "57": { - "cls": "items", - "id": "earthquake" - }, - "58": { - "cls": "items", - "id": "poisonWine" - }, - "59": { - "cls": "items", - "id": "weakWine" - }, - "60": { - "cls": "items", - "id": "curseWine" - }, - "61": { - "cls": "items", - "id": "superWine" - }, - "62": { - "cls": "items", - "id": "knife" - }, - "63": { - "cls": "items", - "id": "moneyPocket" - }, - "64": { - "cls": "items", - "id": "shoes" - }, - "65": { - "cls": "items", - "id": "hammer" - }, - "81": { - "cls": "terrains", - "id": "yellowDoor", - "trigger": "openDoor" - }, - "82": { - "cls": "terrains", - "id": "blueDoor", - "trigger": "openDoor" - }, - "83": { - "cls": "terrains", - "id": "redDoor", - "trigger": "openDoor" - }, - "84": { - "cls": "terrains", - "id": "greenDoor", - "trigger": "openDoor" - }, - "85": { - "cls": "terrains", - "id": "specialDoor", - "trigger": "openDoor" - }, - "86": { - "cls": "terrains", - "id": "steelDoor", - "trigger": "openDoor" - }, - "87": { - "cls": "terrains", - "id": "upFloor", - "noPass": false - }, - "88": { - "cls": "terrains", - "id": "downFloor", - "noPass": false - }, - "89": { - "cls": "animates", - "id": "portal", - "noPass": false - }, - "90": { - "cls": "animates", - "id": "starPortal", - "noPass": false - }, - "91": { - "cls": "animates", - "id": "upPortal", - "noPass": false - }, - "92": { - "cls": "animates", - "id": "leftPortal", - "noPass": false - }, - "93": { - "cls": "animates", - "id": "downPortal", - "noPass": false - }, - "94": { - "cls": "animates", - "id": "rightPortal", - "noPass": false - }, - "121": { - "cls": "npcs", - "id": "man" - }, - "122": { - "cls": "npcs", - "id": "woman" - }, - "123": { - "cls": "npcs", - "id": "thief" - }, - "124": { - "cls": "npcs", - "id": "fairy" - }, - "125": { - "cls": "npcs", - "id": "magician" - }, - "126": { - "cls": "npcs", - "id": "womanMagician" - }, - "127": { - "cls": "npcs", - "id": "oldMan" - }, - "128": { - "cls": "npcs", - "id": "child" - }, - "129": { - "cls": "npcs", - "id": "wood" - }, - "130": { - "cls": "npcs", - "id": "pinkShop" - }, - "131": { - "cls": "npcs", - "id": "blueShop" - }, - "132": { - "cls": "npcs", - "id": "princess" - }, - "151": { - "cls": "autotile", - "id": "autotile1", - "noPass": true - }, - "152": { - "cls": "autotile", - "id": "autotile2", - "noPass": true - }, - "153": { - "cls": "autotile", - "id": "autotile3", - "noPass": true - }, - "161": { - "cls": "terrains", - "id": "arrowUp", - "noPass": false - }, - "162": { - "cls": "terrains", - "id": "arrowDown", - "noPass": false - }, - "163": { - "cls": "terrains", - "id": "arrowLeft", - "noPass": false - }, - "164": { - "cls": "terrains", - "id": "arrowRight", - "noPass": false - }, - "165": { - "cls": "terrains", - "id": "light", - "trigger": "changeLight", - "noPass": false - }, - "166": { - "cls": "terrains", - "id": "darkLight", - "noPass": true - }, - "167": { - "cls": "terrains", - "id": "ski", - "trigger": "ski", - "noPass": false - }, - "168": { - "cls": "terrains", - "id": "flower", - "noPass": false - }, - "169": { - "cls": "terrains", - "id": "box", - "trigger": "pushBox", - "noPass": true - }, - "170": { - "cls": "terrains", - "id": "boxed", - "trigger": "pushBox", - "noPass": true - }, - "201": { - "cls": "enemys", - "id": "greenSlime" - }, - "202": { - "cls": "enemys", - "id": "redSlime" - }, - "203": { - "cls": "enemys", - "id": "blackSlime" - }, - "204": { - "cls": "enemys", - "id": "slimelord" - }, - "205": { - "cls": "enemys", - "id": "bat" - }, - "206": { - "cls": "enemys", - "id": "bigBat" - }, - "207": { - "cls": "enemys", - "id": "redBat" - }, - "208": { - "cls": "enemys", - "id": "vampire" - }, - "209": { - "cls": "enemys", - "id": "skeleton" - }, - "210": { - "cls": "enemys", - "id": "skeletonSoilder" - }, - "211": { - "cls": "enemys", - "id": "skeletonCaptain" - }, - "212": { - "cls": "enemys", - "id": "ghostSkeleton" - }, - "213": { - "cls": "enemys", - "id": "zombie" - }, - "214": { - "cls": "enemys", - "id": "zombieKnight" - }, - "215": { - "cls": "enemys", - "id": "rock" - }, - "216": { - "cls": "enemys", - "id": "slimeMan" - }, - "217": { - "cls": "enemys", - "id": "bluePriest" - }, - "218": { - "cls": "enemys", - "id": "redPriest" - }, - "219": { - "cls": "enemys", - "id": "brownWizard" - }, - "220": { - "cls": "enemys", - "id": "redWizard" - }, - "221": { - "cls": "enemys", - "id": "yellowGuard" - }, - "222": { - "cls": "enemys", - "id": "blueGuard" - }, - "223": { - "cls": "enemys", - "id": "redGuard" - }, - "224": { - "cls": "enemys", - "id": "swordsman" - }, - "225": { - "cls": "enemys", - "id": "soldier" - }, - "226": { - "cls": "enemys", - "id": "yellowKnight" - }, - "227": { - "cls": "enemys", - "id": "redKnight" - }, - "228": { - "cls": "enemys", - "id": "darkKnight" - }, - "229": { - "cls": "enemys", - "id": "blackKing" - }, - "230": { - "cls": "enemys", - "id": "yellowKing" - }, - "231": { - "cls": "enemys", - "id": "greenKing" - }, - "232": { - "cls": "enemys", - "id": "blueKnight" - }, - "233": { - "cls": "enemys", - "id": "goldSlime" - }, - "234": { - "cls": "enemys", - "id": "poisonSkeleton" - }, - "235": { - "cls": "enemys", - "id": "poisonBat" - }, - "236": { - "cls": "enemys", - "id": "steelRock" - }, - "237": { - "cls": "enemys", - "id": "skeletonPriest" - }, - "238": { - "cls": "enemys", - "id": "skeletonKing" - }, - "239": { - "cls": "enemys", - "id": "skeletonWizard" - }, - "240": { - "cls": "enemys", - "id": "redSkeletonCaption" - }, - "241": { - "cls": "enemys", - "id": "badHero" - }, - "242": { - "cls": "enemys", - "id": "demon" - }, - "243": { - "cls": "enemys", - "id": "demonPriest" - }, - "244": { - "cls": "enemys", - "id": "goldHornSlime" - }, - "245": { - "cls": "enemys", - "id": "redKing" - }, - "246": { - "cls": "enemys", - "id": "whiteKing" - }, - "247": { - "cls": "enemys", - "id": "blackMagician" - }, - "248": { - "cls": "enemys", - "id": "silverSlime" - }, - "249": { - "cls": "enemys", - "id": "swordEmperor" - }, - "250": { - "cls": "enemys", - "id": "whiteHornSlime" - }, - "251": { - "cls": "enemys", - "id": "badPrincess" - }, - "252": { - "cls": "enemys", - "id": "badFairy" - }, - "253": { - "cls": "enemys", - "id": "grayPriest" - }, - "254": { - "cls": "enemys", - "id": "redSwordsman" - }, - "255": { - "cls": "enemys", - "id": "whiteGhost" - }, - "256": { - "cls": "enemys", - "id": "poisonZombie" - }, - "257": { - "cls": "enemys", - "id": "magicDragon" - }, - "258": { - "cls": "enemys", - "id": "octopus" - }, - "259": { - "cls": "enemys", - "id": "darkFairy" - }, - "260": { - "cls": "enemys", - "id": "greenKnight" - }, - "267": { - "cls": "items", - "id": "sgg" - }, - "299": { - "cls": "items", - "id": "ttt" - }, - "303": { - "cls": "enemys", - "id": "test" - } + ////////////////////////// 地形部分 ////////////////////////// + + // 0-20 地形 + '1':{'cls': 'terrains', 'id': 'yellowWall'}, // 黄墙 + '2':{'cls': 'terrains', 'id': 'whiteWall'}, // 白墙 + '3':{'cls': 'terrains', 'id': 'blueWall'}, // 蓝墙 + '4':{'cls': 'animates', 'id': 'star', 'noPass': true}, // 星空 + '5':{'cls': 'animates', 'id': 'lava', 'noPass': true}, // 岩浆 + '6':{'cls': 'terrains', 'id': 'ice'}, // 冰面 + '7':{'cls': 'terrains', 'id': 'blueShop-left'}, // 蓝色商店左 + '8':{'cls': 'terrains', 'id': 'blueShop-right'}, // 蓝色商店右 + '9':{'cls': 'terrains', 'id': 'pinkShop-left'}, // 粉色商店左 + '10':{'cls': 'terrains', 'id': 'pinkShop-right'}, // 粉色商店左 + '11':{'cls': 'animates', 'id': 'lavaNet', 'noPass': false, 'trigger': 'passNet'}, // 血网 + '12':{'cls': 'animates', 'id': 'poisonNet', 'noPass': false, 'trigger': 'passNet'}, // 毒网 + '13':{'cls': 'animates', 'id': 'weakNet', 'noPass': false, 'trigger': 'passNet'}, // 衰网 + '14':{'cls': 'animates', 'id': 'curseNet', 'noPass': false, 'trigger': 'passNet'}, // 咒网 + '15':{'cls': 'animates', 'id': 'water', 'noPass': true}, // 水 + // 在这里添加更多地形 + // 如果空位不足,可以从180以后开始继续放,只要不和现有的数字冲突即可 + + // Autotile + '20':{'cls': 'autotile', 'id': 'autotile', 'noPass': true}, // autotile + // 更多的autotile从151到160等,只要不和现有的数字冲突即可 + '151':{'cls': 'autotile', 'id': 'autotile1', 'noPass': true}, + '152':{'cls': 'autotile', 'id': 'autotile2', 'noPass': true}, + '153':{'cls': 'autotile', 'id': 'autotile3', 'noPass': true}, + + ////////////////////////// 物品部分 ////////////////////////// + + // 21-80 物品 + '21':{'cls': 'items', 'id': 'yellowKey'}, // 黄钥匙 + '22':{'cls': 'items', 'id': 'blueKey'}, // 蓝钥匙 + '23':{'cls': 'items', 'id': 'redKey'}, // 红钥匙 + '24':{'cls': 'items', 'id': 'greenKey'}, // 绿钥匙 + '25':{'cls': 'items', 'id': 'steelKey'}, // 铁门钥匙 + '26':{'cls': 'items', 'id': 'bigKey'}, // 大黄门钥匙(钥匙盒) + '27':{'cls': 'items', 'id': 'redJewel'}, // 红宝石 + '28':{'cls': 'items', 'id': 'blueJewel'}, // 蓝宝石 + '29':{'cls': 'items', 'id': 'greenJewel'}, // 绿宝石 + '30':{'cls': 'items', 'id': 'yellowJewel'}, // 黄宝石 + '31':{'cls': 'items', 'id': 'redPotion'}, // 红血瓶 + '32':{'cls': 'items', 'id': 'bluePotion'}, // 蓝血瓶 + '33':{'cls': 'items', 'id': 'greenPotion'}, // 绿血瓶 + '34':{'cls': 'items', 'id': 'yellowPotion'}, // 黄血瓶 + '35':{'cls': 'items', 'id': 'sword1'}, // 铁剑 + '36':{'cls': 'items', 'id': 'shield1'}, // 铁盾 + '37':{'cls': 'items', 'id': 'sword2'}, // 银剑 + '38':{'cls': 'items', 'id': 'shield2'}, // 银盾 + '39':{'cls': 'items', 'id': 'sword3'}, // 骑士剑 + '40':{'cls': 'items', 'id': 'shield3'}, // 骑士盾 + '41':{'cls': 'items', 'id': 'sword4'}, // 圣剑 + '42':{'cls': 'items', 'id': 'shield4'}, // 圣盾 + '43':{'cls': 'items', 'id': 'sword5'}, // 神圣剑 + '44':{'cls': 'items', 'id': 'shield5'}, // 神圣盾 + '45':{'cls': 'items', 'id': 'book'}, // 怪物手册 + '46':{'cls': 'items', 'id': 'fly'}, // 楼层传送器 + '47':{'cls': 'items', 'id': 'pickaxe'}, // 破墙镐 + '48':{'cls': 'items', 'id': 'icePickaxe'}, // 破冰镐 + '49':{'cls': 'items', 'id': 'bomb'}, // 炸弹 + '50':{'cls': 'items', 'id': 'centerFly'}, // 中心对称 + '51':{'cls': 'items', 'id': 'upFly'}, // 上楼器 + '52':{'cls': 'items', 'id': 'downFly'}, // 下楼器 + '53':{'cls': 'items', 'id': 'coin'}, // 幸运金币 + '54':{'cls': 'items', 'id': 'snow'}, // 冰冻徽章 + '55':{'cls': 'items', 'id': 'cross'}, // 十字架 + '56':{'cls': 'items', 'id': 'superPotion'}, // 圣水 + '57':{'cls': 'items', 'id': 'earthquake'}, // 地震卷轴 + '58':{'cls': 'items', 'id': 'poisonWine'}, // 解毒药水 + '59':{'cls': 'items', 'id': 'weakWine'}, // 解衰药水 + '60':{'cls': 'items', 'id': 'curseWine'}, // 解咒药水 + '61':{'cls': 'items', 'id': 'superWine'}, // 万能药水 + '62':{'cls': 'items', 'id': 'knife'}, // 屠龙匕首 + '63':{'cls': 'items', 'id': 'moneyPocket'}, // 金钱袋 + '64':{'cls': 'items', 'id': 'shoes'}, // 绿鞋 + '65':{'cls': 'items', 'id': 'hammer'}, // 圣锤 + + + ////////////////////////// 门、楼梯、传送点部分 ////////////////////////// + + // 81-100 门 + '81':{'cls': 'terrains', 'id': 'yellowDoor', 'trigger': 'openDoor'}, // 黄门 + '82':{'cls': 'terrains', 'id': 'blueDoor', 'trigger': 'openDoor'}, // 蓝门 + '83':{'cls': 'terrains', 'id': 'redDoor', 'trigger': 'openDoor'}, // 红门 + '84':{'cls': 'terrains', 'id': 'greenDoor', 'trigger': 'openDoor'}, // 绿门 + '85':{'cls': 'terrains', 'id': 'specialDoor', 'trigger': 'openDoor'}, // 机关门左 + '86':{'cls': 'terrains', 'id': 'steelDoor', 'trigger': 'openDoor'}, // 铁门 + '87':{'cls': 'terrains', 'id': 'upFloor', 'noPass': false}, // 上楼梯 + '88':{'cls': 'terrains', 'id': 'downFloor', 'noPass': false}, // 下楼梯 + '89':{'cls': 'animates', 'id': 'portal', 'noPass': false}, // 传送门 + '90':{'cls': 'animates', 'id': 'starPortal', 'noPass': false}, // 星空传送门 + '91':{'cls': 'animates', 'id': 'upPortal', 'noPass': false}, // 上箭头 + '92':{'cls': 'animates', 'id': 'leftPortal', 'noPass': false}, // 左箭头 + '93':{'cls': 'animates', 'id': 'downPortal', 'noPass': false}, // 下箭头 + '94':{'cls': 'animates', 'id': 'rightPortal', 'noPass': false}, // 右箭头 + + + ////////////////////////// NPC部分 ////////////////////////// + + // 121-150 NPC + '121':{'cls': 'npcs', 'id': 'man'}, + '122':{'cls': 'npcs', 'id': 'woman'}, + '123':{'cls': 'npcs', 'id': 'thief'}, + '124':{'cls': 'npcs', 'id': 'fairy'}, + '125':{'cls': 'npcs', 'id': 'magician'}, + '126':{'cls': 'npcs', 'id': 'womanMagician'}, + '127':{'cls': 'npcs', 'id': 'oldMan'}, + '128':{'cls': 'npcs', 'id': 'child'}, + '129':{'cls': 'npcs', 'id': 'wood'}, + '130':{'cls': 'npcs', 'id': 'pinkShop'}, + '131':{'cls': 'npcs', 'id': 'blueShop'}, + '132':{'cls': 'npcs', 'id': 'princess'}, + + ////////////////////////// 其他部分 ////////////////////////// + + // 161-200 其他(单向箭头、灯、箱子等等) + '161':{'cls': 'terrains', 'id': 'arrowUp', 'noPass': false}, // 单向上箭头 + '162':{'cls': 'terrains', 'id': 'arrowDown', 'noPass': false}, // 单向下箭头 + '163':{'cls': 'terrains', 'id': 'arrowLeft', 'noPass': false}, // 单向左箭头 + '164':{'cls': 'terrains', 'id': 'arrowRight', 'noPass': false}, // 单向右箭头 + '165':{'cls': 'terrains', 'id': 'light', 'trigger': 'changeLight', 'noPass': false}, // 灯 + '166':{'cls': 'terrains', 'id': 'darkLight', 'noPass': true}, // 暗灯 + '167':{'cls': 'terrains', 'id': 'ski', 'trigger': 'ski', 'noPass': false}, // 滑冰 + '168':{'cls': 'terrains', 'id': 'flower', 'noPass': false}, // 花 + '169':{'cls': 'terrains', 'id': 'box', 'trigger': 'pushBox', 'noPass': true}, // 箱子 + '170':{'cls': 'terrains', 'id': 'boxed', 'trigger': 'pushBox', 'noPass': true}, // 完成的箱子 + + + ////////////////////////// 怪物部分 ////////////////////////// + + // 201-300 怪物 + '201':{'cls': 'enemys', 'id': 'greenSlime'}, + '202':{'cls': 'enemys', 'id': 'redSlime'}, + '203':{'cls': 'enemys', 'id': 'blackSlime'}, + '204':{'cls': 'enemys', 'id': 'slimelord'}, + '205':{'cls': 'enemys', 'id': 'bat'}, + '206':{'cls': 'enemys', 'id': 'bigBat'}, + '207':{'cls': 'enemys', 'id': 'redBat'}, + '208':{'cls': 'enemys', 'id': 'vampire'}, + '209':{'cls': 'enemys', 'id': 'skeleton'}, + '210':{'cls': 'enemys', 'id': 'skeletonSoilder'}, + '211':{'cls': 'enemys', 'id': 'skeletonCaptain'}, + '212':{'cls': 'enemys', 'id': 'ghostSkeleton'}, + '213':{'cls': 'enemys', 'id': 'zombie'}, + '214':{'cls': 'enemys', 'id': 'zombieKnight'}, + '215':{'cls': 'enemys', 'id': 'rock'}, + '216':{'cls': 'enemys', 'id': 'slimeMan'}, + '217':{'cls': 'enemys', 'id': 'bluePriest'}, + '218':{'cls': 'enemys', 'id': 'redPriest'}, + '219':{'cls': 'enemys', 'id': 'brownWizard'}, + '220':{'cls': 'enemys', 'id': 'redWizard'}, + '221':{'cls': 'enemys', 'id': 'yellowGuard'}, + '222':{'cls': 'enemys', 'id': 'blueGuard'}, + '223':{'cls': 'enemys', 'id': 'redGuard'}, + '224':{'cls': 'enemys', 'id': 'swordsman'}, + '225':{'cls': 'enemys', 'id': 'soldier'}, + '226':{'cls': 'enemys', 'id': 'yellowKnight'}, + '227':{'cls': 'enemys', 'id': 'redKnight'}, + '228':{'cls': 'enemys', 'id': 'darkKnight'}, + '229':{'cls': 'enemys', 'id': 'blackKing'}, + '230':{'cls': 'enemys', 'id': 'yellowKing'}, + '231':{'cls': 'enemys', 'id': 'greenKing'}, + '232':{'cls': 'enemys', 'id': 'blueKnight'}, + '233':{'cls': 'enemys', 'id': 'goldSlime'}, + '234':{'cls': 'enemys', 'id': 'poisonSkeleton'}, + '235':{'cls': 'enemys', 'id': 'poisonBat'}, + '236':{'cls': 'enemys', 'id': 'steelRock'}, + '237':{'cls': 'enemys', 'id': 'skeletonPriest'}, + '238':{'cls': 'enemys', 'id': 'skeletonKing'}, + '239':{'cls': 'enemys', 'id': 'skeletonWizard'}, + '240':{'cls': 'enemys', 'id': 'redSkeletonCaption'}, + '241':{'cls': 'enemys', 'id': 'badHero'}, + '242':{'cls': 'enemys', 'id': 'demon'}, + '243':{'cls': 'enemys', 'id': 'demonPriest'}, + '244':{'cls': 'enemys', 'id': 'goldHornSlime'}, + '245':{'cls': 'enemys', 'id': 'redKing'}, + '246':{'cls': 'enemys', 'id': 'whiteKing'}, + '247':{'cls': 'enemys', 'id': 'blackMagician'}, + '248':{'cls': 'enemys', 'id': 'silverSlime'}, + '249':{'cls': 'enemys', 'id': 'swordEmperor'}, + '250':{'cls': 'enemys', 'id': 'whiteHornSlime'}, + '251':{'cls': 'enemys', 'id': 'badPrincess'}, + '252':{'cls': 'enemys', 'id': 'badFairy'}, + '253':{'cls': 'enemys', 'id': 'grayPriest'}, + '254':{'cls': 'enemys', 'id': 'redSwordsman'}, + '255':{'cls': 'enemys', 'id': 'whiteGhost'}, + '256':{'cls': 'enemys', 'id': 'poisonZombie'}, + '257':{'cls': 'enemys', 'id': 'magicDragon'}, + '258':{'cls': 'enemys', 'id': 'octopus'}, + '259':{'cls': 'enemys', 'id': 'darkFairy'}, + '260':{'cls': 'enemys', 'id': 'greenKnight'}, + + ////////////////////////// 待定... ////////////////////////// + // 目前ID暂时不要超过400 } \ No newline at end of file