From 92b3fbee3a1f58ed839f8136e024aff6b7d2dd49 Mon Sep 17 00:00:00 2001 From: lizhuoyuan <2820814112@qq.com> Date: Fri, 7 Feb 2025 09:39:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=B7=BB=E5=8A=A0=E7=89=A9=E5=93=81:?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=88=B0=E6=B8=B8=E6=88=8F=E5=BC=80=E5=B1=80?= =?UTF-8?q?=EF=BC=8C=E6=B3=A8=E5=86=8C=E4=BA=86=E7=B4=A0=E6=9D=90=E4=B8=AD?= =?UTF-8?q?=E6=9C=AA=E6=B3=A8=E5=86=8C=E7=9A=84=E7=89=A9=E5=93=81=E5=9B=BE?= =?UTF-8?q?=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/data.js | 3 +- project/icons.js | 66 +++++++++++++--------- project/items.js | 141 +++++++++++++++++++++++++---------------------- project/maps.js | 18 +++++- 4 files changed, 131 insertions(+), 97 deletions(-) diff --git a/project/data.js b/project/data.js index 6a96cc8d..49e1aef4 100644 --- a/project/data.js +++ b/project/data.js @@ -139,7 +139,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = "equipment": [], "items": { "constants": { - "book": 1 + "book": 1, + "setting": 1, }, "tools": {}, "equips": {} diff --git a/project/icons.js b/project/icons.js index c0d6eae8..c541ff1c 100644 --- a/project/icons.js +++ b/project/icons.js @@ -215,7 +215,17 @@ var icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 = "redKey": 2, "greenKey": 3, "steelKey": 4, + "purpleKey": 5, "bigKey": 6, + "scroll": 7, + "earthquake": 8, + "book": 9, + "wand": 10, + "coin": 11, + "fly": 12, + "centerFly": 13, + "downFly": 14, + "upFly": 15, "redGem": 16, "blueGem": 17, "greenGem": 18, @@ -224,43 +234,45 @@ var icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 = "bluePotion": 21, "greenPotion": 22, "yellowPotion": 23, - "lifeWand": 33, - "sword0": 60, + "poisonWine": 24, + "weakWine": 25, + "blueWine": 26, + "curseWine": 27, + "superWine": 28, + "superPotion": 29, + "redWand": 30, + "cyanWand": 31, + "yellowWand": 32, + "greenWand": 33, + "blueWand": 34, + "whiteWand": 35, + "silverCoin": 36, + "orb": 37, + "bentWand": 38, + "crossChest": 39, + "cross": 40, + "freezeBadge": 41, + "dagger": 42, + "bomb": 43, + "icePickaxe": 44, + "pickaxe": 45, + "pack": 46, + "amulet": 47, + "hammer": 48, + "jumpShoes": 49, "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, - "freezeBadge": 41, - "cross": 40, - "superPotion": 29, - "earthquake": 8, - "poisonWine": 24, - "weakWine": 25, - "curseWine": 27, - "superWine": 28, - "dagger": 42, - "amulet": 47, - "hammer": 48, - "jumpShoes": 49, - "skill1": 30, - "wand": 10, - "pack": 46 + "sword0": 60, + "shield0": 61, + "setting": 62 }, "autotile": { "autotile": 0, diff --git a/project/items.js b/project/items.js index d7ba487a..cfeb840a 100644 --- a/project/items.js +++ b/project/items.js @@ -446,64 +446,6 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = "name": "圣锤", "text": "该道具尚未被定义" }, - "lifeWand": { - "cls": "tools", - "name": "生命魔杖", - "text": "可以恢复100点生命值", - "useItemEvent": [ - { - "type": "comment", - "text": "先恢复一个魔杖(因为使用道具必须消耗一个)" - }, - { - "type": "function", - "function": "function(){\ncore.addItem('lifeWand', 1);\n}" - }, - { - "type": "playSound", - "name": "打开界面" - }, - { - "type": "input", - "text": "请输入生命魔杖使用次数:(0-${item:lifeWand})" - }, - { - "type": "comment", - "text": "【接受用户输入】弹窗输入的结果将会保存在“flag:input”中\n如果需要更多帮助,请查阅帮助文档" - }, - { - "type": "if", - "condition": "flag:input<=item:lifeWand", - "true": [ - { - "type": "setValue", - "name": "item:lifeWand", - "operator": "-=", - "value": "flag:input" - }, - { - "type": "setValue", - "name": "status:hp", - "operator": "+=", - "value": "flag:input*100" - }, - { - "type": "playSound", - "name": "回血" - }, - "成功使用${flag:input}次生命魔杖,恢复${flag:input*100}点生命。" - ], - "false": [ - { - "type": "playSound", - "name": "操作失败" - }, - "输入不合法!" - ] - } - ], - "canUseItemEffect": "true" - }, "jumpShoes": { "cls": "tools", "name": "跳跃靴", @@ -511,14 +453,6 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = "useItemEffect": "core.playSound(\"跳跃\");\ncore.insertAction({ \"type\": \"jumpHero\", \"loc\": [core.nextX(2), core.nextY(2)] });", "canUseItemEffect": "(function () {\n\tvar nx = core.nextX(2),\n\t\tny = core.nextY(2);\n\treturn nx >= 0 && nx < core.bigmap.width && ny >= 0 && ny < core.bigmap.height && core.getBlockId(nx, ny) == null;\n})();" }, - "skill1": { - "cls": "constants", - "name": "技能:二倍斩", - "text": "可以打开或关闭主动技能二倍斩", - "hideInReplay": true, - "useItemEffect": "(function () {\n\tvar skillValue = 1; // 技能的flag:skill值,可用于当前开启技能的判定;对于新技能可以依次改成2,3等等\n\tvar skillNeed = 5; // 技能的需求\n\tvar skillName = '二倍斩'; // 技能的名称\n\n\tif (core.getFlag('skill', 0) != skillValue) { // 判断当前是否已经开了技能\n\t\tif (core.getStatus('mana') >= skillNeed) { // 这里要写当前能否开技能的条件判断,比如魔力值至少要多少\n\t\t\tcore.playSound('打开界面');\n\t\t\tcore.setFlag('skill', skillValue); // 开技能1\n\t\t\tcore.setFlag('skillName', skillName); // 设置技能名\n\t\t} else {\n\t\t\tcore.playSound('操作失败');\n\t\t\tcore.drawTip('魔力不足,无法开启技能');\n\t\t}\n\t} else { // 关闭技能\n\t\tcore.setFlag('skill', 0); // 关闭技能状态\n\t\tcore.setFlag('skillName', '无');\n\t}\n})();", - "canUseItemEffect": "true" - }, "wand": { "cls": "items", "name": "新物品" @@ -528,5 +462,80 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = "name": "钱袋", "itemEffect": "core.status.hero.money += 500", "itemEffectTip": ",金币+500" + }, + "blueWine": { + "cls": "items", + "name": "新物品", + "canUseItemEffect": "true" + }, + "silverCoin": { + "cls": "items", + "name": "新物品", + "canUseItemEffect": "true" + }, + "orb": { + "cls": "items", + "name": "新物品", + "canUseItemEffect": "true" + }, + "bentWand": { + "cls": "items", + "name": "新物品", + "canUseItemEffect": "true" + }, + "setting": { + "cls": "constants", + "name": "设置", + "canUseItemEffect": "true", + "text": "可以调节设置开关。", + "useItemEffect": "core.plugin.openSetting();" + }, + "redWand": { + "cls": "items", + "name": "新物品", + "text": "null", + "hideInReplay": false, + "useItemEffect": null, + "canUseItemEffect": "true" + }, + "cyanWand": { + "cls": "items", + "name": "新物品", + "canUseItemEffect": "true" + }, + "yellowWand": { + "cls": "items", + "name": "新物品", + "canUseItemEffect": "true" + }, + "greenWand": { + "cls": "tools", + "name": "新物品", + "canUseItemEffect": "true" + }, + "blueWand": { + "cls": "items", + "name": "新物品", + "canUseItemEffect": "true" + }, + "whiteWand": { + "cls": "items", + "name": "新物品", + "canUseItemEffect": "true" + }, + "purpleKey": { + "cls": "items", + "name": "新物品", + "canUseItemEffect": "true" + }, + "scroll": { + "cls": "items", + "name": "新物品", + "canUseItemEffect": "true" + }, + "crossChest": { + "cls": "items", + "name": "新物品", + "canUseItemEffect": "true" } } \ No newline at end of file diff --git a/project/maps.js b/project/maps.js index fbf881ca..c2459096 100644 --- a/project/maps.js +++ b/project/maps.js @@ -62,11 +62,11 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e = "63": {"cls":"items","id":"pack"}, "64": {"cls":"items","id":"amulet"}, "65": {"cls":"items","id":"hammer"}, - "68": {"cls":"items","id":"lifeWand"}, + "68": {"cls":"items","id":"greenWand"}, "69": {"cls":"items","id":"jumpShoes"}, "70": {"cls":"items","id":"sword0"}, "71": {"cls":"items","id":"shield0"}, - "72": {"cls":"items","id":"skill1"}, + "72": {"cls":"items","id":"redWand"}, "73": {"cls":"items","id":"wand"}, "81": {"cls":"animates","id":"yellowDoor","trigger":"openDoor","animate":1,"doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{"yellowKey":1}},"name":"黄门"}, "82": {"cls":"animates","id":"blueDoor","trigger":"openDoor","animate":1,"doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{"blueKey":1}},"name":"蓝门"}, @@ -223,5 +223,17 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e = "327": {"cls":"enemy48","id":"bearDown"}, "328": {"cls":"enemy48","id":"bearLeft"}, "329": {"cls":"enemy48","id":"bearRight"}, - "330": {"cls":"enemy48","id":"bearUp"} + "330": {"cls":"enemy48","id":"bearUp"}, + "331": {"cls":"items","id":"cyanWand"}, + "332": {"cls":"items","id":"yellowWand"}, + "333": {"cls":"items","id":"blueWand"}, + "334": {"cls":"items","id":"whiteWand"}, + "335": {"cls":"items","id":"setting"}, + "336": {"cls":"items","id":"purpleKey"}, + "337": {"cls":"items","id":"scroll"}, + "338": {"cls":"items","id":"blueWine"}, + "339": {"cls":"items","id":"silverCoin"}, + "340": {"cls":"items","id":"orb"}, + "341": {"cls":"items","id":"bentWand"}, + "342": {"cls":"items","id":"crossChest"} } \ No newline at end of file