Fix 281
This commit is contained in:
parent
5ba580c857
commit
81349bfd83
@ -12,7 +12,7 @@ main.floors.sample0=
|
||||
"ratio": 1,
|
||||
"map": [
|
||||
[ 0, 0,220, 0, 0, 20, 87, 3, 58, 59, 60, 61, 64],
|
||||
[ 0,246, 0,246, 0, 20, 0, 3, 57, 62, 63, 43, 44],
|
||||
[ 0,246, 0,246, 0, 20, 0, 3, 57, 72, 63, 43, 44],
|
||||
[219, 0, 0, 0,219, 20, 0, 3, 53, 54, 55, 56, 69],
|
||||
[ 20, 20,125, 20, 20, 20, 0, 3, 49, 50, 51, 52, 68],
|
||||
[251,247,256,234,248, 6, 0, 3, 35, 36, 46, 47, 48],
|
||||
@ -177,13 +177,13 @@ main.floors.sample0=
|
||||
},
|
||||
"afterGetItem": {
|
||||
"9,1": [
|
||||
"样板给出的道具素材中有很多道具都是未定义甚至未注册的,需要自行实现功能。\n(比如屠龙匕首就是一个没有功能的道具)\n如果你想为未定的道具添加自定义功能,请参照样板中其他道具的写法;如果有更多疑问,请查阅帮助文档。"
|
||||
"技能的支持需要依赖状态栏的“魔力”以及脚本编辑的“按键处理”,详见帮助文档“个性化”一节。"
|
||||
],
|
||||
"12,2": [
|
||||
"跳跃本身没有音效,使用跳跃鞋时播放的音效是通过跳跃鞋的道具效果实现的。\n如果想为跳跃设置音效,请在 events.js 的 jumpHero 函数执行前插入一行代码,用 core.playSound 的方式来播放音效即可。\n如果想了解更多关于这方面的内容,请参与帮助文档中的“脚本——复写函数”章节。\n\n类似的是,敌人的“支援”技能也是通过在支援技能中播放音效实现的。"
|
||||
"跳跃靴和支援怪的跳跃音效是用脚本额外添加的,\n如果想为任意跳跃指令添加音效,请查阅帮助文档中的“脚本——复写函数”章节。"
|
||||
],
|
||||
"8,3": [
|
||||
"炸弹是只能炸面前的怪物还是四个方向的怪物,由其图块属性(快捷键C)中的“使用效果”决定。\n不能被炸的怪物请直接在该怪物的图块属性中勾选“不可炸”,可参见样板里黑衣魔王和黑暗大法师的写法。"
|
||||
"炸弹是只能炸面前的怪物还是四个甚至八个方向的怪物,\n由其图块属性(快捷键C)中的“使用效果”决定。\n不能被炸的怪物请直接在该怪物的图块属性中勾选“不可炸”,\n可参见样板里黑衣魔王和黑暗大法师的写法。\nV2.8.1起,炸弹炸怪可以添加获得金经/触发战后事件,详见其使用效果中的注释。"
|
||||
],
|
||||
"10,3": [
|
||||
"“上楼”和“下楼”的目标层由全塔属性(快捷键B)的“楼层列表”顺序所决定。"
|
||||
@ -209,11 +209,7 @@ main.floors.sample0=
|
||||
"在 2.8.1 版更新后,能够被破冰镐摧毁的冰块被移动到了 animates 下。\n如果想制作一个可以以特定触发器的方式移除特定图块的道具,可以参照破冰镐物品图块属性中\n useItemEffect 和 canUseItemEffect 的写法。"
|
||||
],
|
||||
"11,8": [
|
||||
"由于状态栏放不下,铁门钥匙(根据全塔属性的系统开关勾选与否,可能还有绿钥匙)会被放入道具栏中。\n碰到绿门和铁门时仍然会自动使用钥匙开门。",
|
||||
{
|
||||
"type": "comment",
|
||||
"text": "由于状态栏放不下,铁门钥匙(根据全塔属性的系统开关勾选与否,可能还有绿钥匙)会被放入道具栏中。\n碰到绿门和铁门仍然会自动使用钥匙(根据全塔属性的系统开关勾选与否,铁门可能不需要钥匙)开门。"
|
||||
}
|
||||
"由于状态栏放不下,铁门钥匙(根据全塔属性的系统开关勾选与否,可能还有绿钥匙)会被放入道具栏中。\n碰到绿门和铁门时仍然会自动使用钥匙开门。"
|
||||
],
|
||||
"12,8": [
|
||||
"该道具默认是大黄门钥匙,如需改为钥匙盒直接修改其图块属性(快捷键C)的“道具类别”为items即可。"
|
||||
|
||||
@ -1141,11 +1141,14 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
core.setFlag('curse', true);
|
||||
}
|
||||
} else if (action == 'remove') {
|
||||
var success = false;
|
||||
if (core.inArray(type, "poison") && core.hasFlag("poison")) {
|
||||
success = true;
|
||||
// 移除毒效果
|
||||
core.setFlag("poison", false);
|
||||
}
|
||||
if (core.inArray(type, "weak") && core.hasFlag("weak")) {
|
||||
success = true;
|
||||
// 移除衰效果
|
||||
core.setFlag("weak", false);
|
||||
if (core.values.weakValue >= 1) {
|
||||
@ -1159,9 +1162,11 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
}
|
||||
}
|
||||
if (core.inArray(type, "curse") && core.hasFlag("curse")) {
|
||||
success = true;
|
||||
// 移除咒效果
|
||||
core.setFlag("curse", false);
|
||||
}
|
||||
if (success) core.playSound('回血');
|
||||
}
|
||||
},
|
||||
"updateStatusBar": function () {
|
||||
|
||||
@ -297,7 +297,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"name": "圣水",
|
||||
"itemEffect": "core.status.hero.hp *= 2",
|
||||
"itemEffectTip": ",生命值翻倍",
|
||||
"useItemEffect": "core.status.hero.hp *= 2;\ncore.playSound('回血');",
|
||||
"useItemEffect": "core.status.hero.hp *= 2;core.playSound('回血');",
|
||||
"canUseItemEffect": "true",
|
||||
"text": "生命值翻倍"
|
||||
},
|
||||
@ -327,7 +327,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"cls": "constants",
|
||||
"name": "冰冻徽章",
|
||||
"text": "可以将面前的熔岩变成平地",
|
||||
"useItemEffect": "(function () {\n\tvar success = false;\n\n\tvar snowFourDirections = false; // 是否四方向雪花;如果是将其改成true\n\tif (snowFourDirections) {\n\t\t// 四方向雪花\n\t\tfor (var direction in core.utils.scan) {\n\t\t\tvar delta = core.utils.scan[direction];\n\t\t\tvar nx = core.getHeroLoc('x') + delta.x,\n\t\t\t\tny = core.getHeroLoc('y') + delta.y;\n\t\t\tif (core.getBlockId(nx, ny) == 'lava') {\n\t\t\t\tcore.removeBlock(nx, ny);\n\t\t\t\tsuccess = true;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (core.getBlockId(core.nextX(), core.nextY()) == 'lava') {\n\t\t\tcore.removeBlock(core.nextX(), core.nextY());\n\t\t\tsuccess = true;\n\t\t}\n\t}\n\n\tif (success) {\n\t\tcore.playSound('打开界面');\n\t\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n\t} else {\n\t\tcore.playSound('操作失败');\n\t\tcore.drawTip(\"当前无法使用\" + core.material.items[itemId].name);\n\t\tcore.addItem(itemId, 1);\n\t\treturn;\n\t}\n})();",
|
||||
"useItemEffect": "(function () {\n\tvar success = false;\n\n\tvar snowFourDirections = false; // 是否多方向雪花;如果是将其改成true\n\tif (snowFourDirections) {\n\t\t// 多方向雪花\n\t\tfor (var direction in core.utils.scan) { // 多方向雪花默认四方向,如需改为八方向请将这两个scan改为scan2\n\t\t\tvar delta = core.utils.scan[direction];\n\t\t\tvar nx = core.getHeroLoc('x') + delta.x,\n\t\t\t\tny = core.getHeroLoc('y') + delta.y;\n\t\t\tif (core.getBlockId(nx, ny) == 'lava') {\n\t\t\t\tcore.removeBlock(nx, ny);\n\t\t\t\tsuccess = true;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (core.getBlockId(core.nextX(), core.nextY()) == 'lava') {\n\t\t\tcore.removeBlock(core.nextX(), core.nextY());\n\t\t\tsuccess = true;\n\t\t}\n\t}\n\n\tif (success) {\n\t\tcore.playSound('打开界面');\n\t\tcore.drawTip(core.material.items[itemId].name + '使用成功', itemId);\n\t} else {\n\t\tcore.playSound('操作失败');\n\t\tcore.drawTip(\"当前无法使用\" + core.material.items[itemId].name, itemId);\n\t\tcore.addItem(itemId, 1);\n\t\treturn;\n\t}\n})();",
|
||||
"canUseItemEffect": "true"
|
||||
},
|
||||
"cross": {
|
||||
@ -368,21 +368,21 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"cls": "tools",
|
||||
"name": "破墙镐",
|
||||
"text": "可以破坏勇士面前的墙",
|
||||
"useItemEffect": "(function () {\n\tvar canBreak = function (x, y) {\n\t\tvar block = core.getBlock(x, y);\n\t\tif (block == null || block.disable) return false;\n\t\treturn block.event.canBreak;\n\t};\n\n\tvar success = false;\n\tvar pickaxeFourDirections = false; // 是否四方向破;如果是将其改成true\n\tif (pickaxeFourDirections) {\n\t\t// 四方向破\n\t\tfor (var direction in core.utils.scan) {\n\t\t\tvar delta = core.utils.scan[direction];\n\t\t\tvar nx = core.getHeroLoc('x') + delta.x,\n\t\t\t\tny = core.getHeroLoc('y') + delta.y;\n\t\t\tif (canBreak(nx, ny)) {\n\t\t\t\tcore.removeBlock(nx, ny);\n\t\t\t\tsuccess = true;\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// 仅破当前\n\t\tif (canBreak(core.nextX(), core.nextY())) {\n\t\t\tcore.removeBlock(core.nextX(), core.nextY());\n\t\t\tsuccess = true;\n\t\t}\n\t}\n\n\tif (success) {\n\t\tcore.playSound('破墙镐');\n\t\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n\t} else {\n\t\t// 无法使用\n\t\tcore.playSound('操作失败');\n\t\tcore.drawTip(\"当前无法使用\" + core.material.items[itemId].name);\n\t\tcore.addItem(itemId, 1);\n\t\treturn;\n\t}\n})();",
|
||||
"useItemEffect": "(function () {\n\tvar canBreak = function (x, y) {\n\t\tvar block = core.getBlock(x, y);\n\t\tif (block == null || block.disable) return false;\n\t\treturn block.event.canBreak;\n\t};\n\n\tvar success = false;\n\tvar pickaxeFourDirections = false; // 是否多方向破;如果是将其改成true\n\tif (pickaxeFourDirections) {\n\t\t// 多方向破\n\t\tfor (var direction in core.utils.scan) { // 多方向破默认四方向,如需改成八方向请将这两个scan改为scan2\n\t\t\tvar delta = core.utils.scan[direction];\n\t\t\tvar nx = core.getHeroLoc('x') + delta.x,\n\t\t\t\tny = core.getHeroLoc('y') + delta.y;\n\t\t\tif (canBreak(nx, ny)) {\n\t\t\t\tcore.removeBlock(nx, ny);\n\t\t\t\tsuccess = true;\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// 仅破当前\n\t\tif (canBreak(core.nextX(), core.nextY())) {\n\t\t\tcore.removeBlock(core.nextX(), core.nextY());\n\t\t\tsuccess = true;\n\t\t}\n\t}\n\n\tif (success) {\n\t\tcore.playSound('破墙镐');\n\t\tcore.drawTip(core.material.items[itemId].name + '使用成功', itemId);\n\t} else {\n\t\t// 无法使用\n\t\tcore.playSound('操作失败');\n\t\tcore.drawTip(\"当前无法使用\" + core.material.items[itemId].name, itemId);\n\t\tcore.addItem(itemId, 1);\n\t\treturn;\n\t}\n})();",
|
||||
"canUseItemEffect": "true"
|
||||
},
|
||||
"icePickaxe": {
|
||||
"cls": "tools",
|
||||
"name": "破冰镐",
|
||||
"text": "可以破坏勇士面前的一堵冰墙",
|
||||
"useItemEffect": "(function () {\n\tcore.openDoor(core.nextX(), core.nextY(), false);\n\tcore.playSound('破冰镐');\n\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n})();",
|
||||
"useItemEffect": "(function () {\n\tcore.drawTip(core.material.items[itemId].name + '使用成功', itemId);\n\tcore.insertAction({ \"type\": \"openDoor\", \"loc\": [\"core.nextX()\", \"core.nextY()\"] });\n})();",
|
||||
"canUseItemEffect": "(function () {\n\treturn core.getBlockId(core.nextX(), core.nextY()) == 'ice';\n})();"
|
||||
},
|
||||
"bomb": {
|
||||
"cls": "tools",
|
||||
"name": "炸弹",
|
||||
"text": "可以炸掉勇士面前的怪物",
|
||||
"useItemEffect": "(function () {\n\tvar bombList = []; // 炸掉的怪物坐标列表\n\tvar todo = []; // 炸弹后事件\n\tvar money = 0,\n\t\texp = 0; // 炸弹获得的金币和经验\n\n\tvar canBomb = function (x, y) {\n\t\tvar block = core.getBlock(x, y);\n\t\tif (block == null || block.disable || block.event.cls.indexOf('enemy') != 0) return false;\n\t\tvar enemy = core.material.enemys[block.event.id];\n\t\treturn enemy && !enemy.notBomb;\n\t};\n\n\tvar bomb = function (x, y) {\n\t\tif (!canBomb(x, y)) return;\n\t\tbombList.push([x, y]);\n\t\tvar id = core.getBlockId(x, y),\n\t\t\tenemy = core.material.enemys[id];\n\t\tmoney += core.getEnemyValue(enemy, 'money', x, y) || 0;\n\t\texp += core.getEnemyValue(enemy, 'exp', x, y) || 0;\n\t\tcore.push(todo, core.floors[core.status.floorId].afterBattle[x + \",\" + y]);\n\t\tcore.push(todo, enemy.afterBattle);\n\t\tcore.removeBlock(x, y);\n\t}\n\n\t// 如果要四方形可炸,把这里的false改成true\n\tif (false) {\n\t\tvar scan = core.utils.scan; // 如果要改成八方向炸可以改成 core.utils.scan2\n\t\tfor (var direction in scan) {\n\t\t\tvar delta = scan[direction];\n\t\t\tbomb(core.getHeroLoc('x') + delta.x, core.getHeroLoc('y') + delta.y);\n\t\t}\n\t} else {\n\t\t// 仅炸当前\n\t\tbomb(core.nextX(), core.nextY());\n\t}\n\n\tif (bombList.length > 0) {\n\t\tcore.playSound('炸弹');\n\t\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n\t\t// 取消这里的注释可以炸弹后获得金币和经验\n\t\t// core.status.hero.money += money;\n\t\t// core.status.hero.exp += exp;\n\n\t\t// 取消这里的注释可以炸弹引发战后事件\n\t\t// if (todo.length > 0) core.insertAction(todo);\n\t} else {\n\t\tcore.playSound('操作失败');\n\t\tcore.drawTip('当前无法使用' + core.material.items[itemId].name);\n\t\tcore.addItem(itemId, 1);\n\t\treturn;\n\t}\n\n\t// 炸弹后事件\n\t// 这是一个使用炸弹也能开门的例子\n\t/*\n\tif (core.status.floorId=='xxx' && core.terrainExists(x0,y0,'specialDoor') // 某个楼层,该机关门存在\n\t\t&& !core.enemyExists(x1,y1) && !core.enemyExists(x2,y2)) // 且守门的怪物都不存在\n\t{\n\t\tcore.insertAction([ // 插入事件\n\t\t\t{\"type\": \"openDoor\", \"loc\": [x0,y0]} // 开门\n\t\t])\n\t}\n\t*/\n})();",
|
||||
"useItemEffect": "(function () {\n\tvar bombList = []; // 炸掉的怪物坐标列表\n\tvar todo = []; // 炸弹后事件\n\tvar money = 0,\n\t\texp = 0; // 炸弹获得的金币和经验\n\n\tvar canBomb = function (x, y) {\n\t\tvar block = core.getBlock(x, y);\n\t\tif (block == null || block.disable || block.event.cls.indexOf('enemy') != 0) return false;\n\t\tvar enemy = core.material.enemys[block.event.id];\n\t\treturn enemy && !enemy.notBomb;\n\t};\n\n\tvar bomb = function (x, y) {\n\t\tif (!canBomb(x, y)) return;\n\t\tbombList.push([x, y]);\n\t\tvar id = core.getBlockId(x, y),\n\t\t\tenemy = core.material.enemys[id];\n\t\tmoney += core.getEnemyValue(enemy, 'money', x, y) || 0;\n\t\texp += core.getEnemyValue(enemy, 'exp', x, y) || 0;\n\t\tcore.push(todo, core.floors[core.status.floorId].afterBattle[x + \",\" + y]);\n\t\tcore.push(todo, enemy.afterBattle);\n\t\tcore.removeBlock(x, y);\n\t}\n\n\t// 如果要多方向可炸,把这里的false改成true\n\tif (false) {\n\t\tvar scan = core.utils.scan; // 多方向炸时默认四方向,如果要改成八方向炸可以改成 core.utils.scan2\n\t\tfor (var direction in scan) {\n\t\t\tvar delta = scan[direction];\n\t\t\tbomb(core.getHeroLoc('x') + delta.x, core.getHeroLoc('y') + delta.y);\n\t\t}\n\t} else {\n\t\t// 仅炸当前\n\t\tbomb(core.nextX(), core.nextY());\n\t}\n\n\tif (bombList.length > 0) {\n\t\tcore.playSound('炸弹');\n\t\tcore.drawTip(core.material.items[itemId].name + '使用成功', itemId);\n\t\t// 取消这里的注释可以炸弹后获得金币和经验\n\t\t// core.status.hero.money += money;\n\t\t// core.status.hero.exp += exp;\n\n\t\t// 取消这里的注释可以炸弹引发战后事件\n\t\t// if (todo.length > 0) core.insertAction(todo);\n\t} else {\n\t\tcore.playSound('操作失败');\n\t\tcore.drawTip('当前无法使用' + core.material.items[itemId].name, itemId);\n\t\tcore.addItem(itemId, 1);\n\t\treturn;\n\t}\n\n\t// 炸弹后事件\n\t// 这是一个使用炸弹也能开门的例子\n\t/*\n\tif (core.status.floorId=='xxx' && core.terrainExists(x0,y0,'specialDoor') // 某个楼层,该机关门存在\n\t\t&& !core.enemyExists(x1,y1) && !core.enemyExists(x2,y2)) // 且守门的怪物都不存在\n\t{\n\t\tcore.insertAction([ // 插入事件\n\t\t\t{\"type\": \"openDoor\", \"loc\": [x0,y0]} // 开门\n\t\t])\n\t}\n\t*/\n})();",
|
||||
"canUseItemEffect": "true"
|
||||
},
|
||||
"centerFly": {
|
||||
@ -417,28 +417,28 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"cls": "tools",
|
||||
"name": "解毒药水",
|
||||
"text": "可以解除中毒状态",
|
||||
"useItemEffect": "core.triggerDebuff('remove', 'poison');\ncore.playSound('回血');",
|
||||
"useItemEffect": "core.triggerDebuff('remove', 'poison');",
|
||||
"canUseItemEffect": "core.hasFlag('poison');"
|
||||
},
|
||||
"weakWine": {
|
||||
"cls": "tools",
|
||||
"name": "解衰药水",
|
||||
"text": "可以解除衰弱状态",
|
||||
"useItemEffect": "core.triggerDebuff('remove', 'weak');\ncore.playSound('回血');",
|
||||
"useItemEffect": "core.triggerDebuff('remove', 'weak');",
|
||||
"canUseItemEffect": "core.hasFlag('weak');"
|
||||
},
|
||||
"curseWine": {
|
||||
"cls": "tools",
|
||||
"name": "解咒药水",
|
||||
"text": "可以解除诅咒状态",
|
||||
"useItemEffect": "core.triggerDebuff('remove', 'curse');\ncore.playSound('回血');",
|
||||
"useItemEffect": "core.triggerDebuff('remove', 'curse');",
|
||||
"canUseItemEffect": "core.hasFlag('curse');"
|
||||
},
|
||||
"superWine": {
|
||||
"cls": "tools",
|
||||
"name": "万能药水",
|
||||
"text": "可以解除所有不良状态",
|
||||
"useItemEffect": "core.triggerDebuff('remove', ['poison', 'weak', 'curse']);\ncore.playSound('回血');",
|
||||
"useItemEffect": "core.triggerDebuff('remove', ['poison', 'weak', 'curse']);",
|
||||
"canUseItemEffect": "(function() {\n\treturn core.hasFlag('poison') || core.hasFlag('weak') || core.hasFlag('curse');\n})();"
|
||||
},
|
||||
"hammer": {
|
||||
|
||||
@ -5,7 +5,7 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
|
||||
"3": {"cls":"animates","id":"blueWall","canBreak":true,"animate":1,"doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{}}},
|
||||
"4": {"cls":"animates","id":"star","name":"星空"},
|
||||
"5": {"cls":"animates","id":"lava","name":"岩浆"},
|
||||
"6": {"cls":"animates","id":"ice","doorInfo":{"time":160,"openSound":"icepickaxe.mp3","closeSound":"door.mp3","keys":{"specialKey":1}},"animate":1},
|
||||
"6": {"cls":"animates","id":"ice","doorInfo":{"time":160,"openSound":"破冰镐","closeSound":"door.mp3","keys":{"icePickaxe":1}},"animate":1},
|
||||
"7": {"cls":"terrains","id":"blueShopLeft"},
|
||||
"8": {"cls":"terrains","id":"blueShopRight"},
|
||||
"9": {"cls":"terrains","id":"pinkShopLeft"},
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user