fix:添加物品:设置到游戏开局,注册了素材中未注册的物品图片
This commit is contained in:
parent
ac1b8b860c
commit
92b3fbee3a
@ -139,7 +139,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"equipment": [],
|
||||
"items": {
|
||||
"constants": {
|
||||
"book": 1
|
||||
"book": 1,
|
||||
"setting": 1,
|
||||
},
|
||||
"tools": {},
|
||||
"equips": {}
|
||||
|
||||
@ -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,
|
||||
|
||||
141
project/items.js
141
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"
|
||||
}
|
||||
}
|
||||
@ -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"}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user