mota-js/project/items.js
2020-05-05 22:46:15 +08:00

494 lines
21 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
{
"items": {
"yellowKey": {
"cls": "keys",
"name": "黄钥匙",
"text": "可以打开一扇黄门"
},
"blueKey": {
"cls": "keys",
"name": "蓝钥匙",
"text": "可以打开一扇蓝门"
},
"redKey": {
"cls": "keys",
"name": "红钥匙",
"text": "可以打开一扇红门"
},
"redJewel": {
"cls": "items",
"name": "红宝石",
"text": "',攻击+${core.values.redJewel}'"
},
"blueJewel": {
"cls": "items",
"name": "蓝宝石",
"text": "',防御+${core.values.blueJewel}'"
},
"greenJewel": {
"cls": "items",
"name": "绿宝石",
"text": "',魔防+${core.values.greenJewel}'"
},
"yellowJewel": {
"cls": "items",
"name": "黄宝石",
"text": "可以进行加点"
},
"redPotion": {
"cls": "items",
"name": "红血瓶",
"text": "',生命+${core.values.redPotion}'"
},
"bluePotion": {
"cls": "items",
"name": "蓝血瓶",
"text": "',生命+${core.values.bluePotion}'"
},
"yellowPotion": {
"cls": "items",
"name": "黄血瓶",
"text": "',生命+${core.values.yellowPotion'}"
},
"greenPotion": {
"cls": "items",
"name": "绿血瓶",
"text": "',生命+${core.values.greenPotion}'"
},
"sword0": {
"cls": "items",
"name": "破旧的剑",
"text": "一把已经生锈的剑",
"equip": {
"type": 0,
"atk": 0,
"animate": "sword"
}
},
"sword1": {
"cls": "items",
"name": "铁剑",
"text": "一把很普通的铁剑",
"equip": {
"type": 0,
"atk": 10,
"animate": "sword"
}
},
"sword2": {
"cls": "items",
"name": "银剑",
"text": "一把很普通的银剑",
"equip": {
"type": 0,
"atk": 20,
"animate": "sword"
}
},
"sword3": {
"cls": "items",
"name": "骑士剑",
"text": "一把很普通的骑士剑",
"equip": {
"type": 0,
"atk": 40,
"animate": "sword"
}
},
"sword4": {
"cls": "items",
"name": "圣剑",
"text": "一把很普通的圣剑",
"equip": {
"type": 0,
"atk": 80,
"animate": "sword"
}
},
"sword5": {
"cls": "items",
"name": "神圣剑",
"text": "一把很普通的神圣剑",
"equip": {
"type": 0,
"atk": 100,
"animate": "sword"
}
},
"shield0": {
"cls": "items",
"name": "破旧的盾",
"text": "一个很破旧的铁盾",
"equip": {
"type": 1,
"def": 0
}
},
"shield1": {
"cls": "items",
"name": "铁盾",
"text": "一个很普通的铁盾",
"equip": {
"type": 1,
"def": 10
}
},
"shield2": {
"cls": "items",
"name": "银盾",
"text": "一个很普通的银盾",
"equip": {
"type": 1,
"def": 20
}
},
"shield3": {
"cls": "items",
"name": "骑士盾",
"text": "一个很普通的骑士盾",
"equip": {
"type": 1,
"def": 40
}
},
"shield4": {
"cls": "items",
"name": "圣盾",
"text": "一个很普通的圣盾",
"equip": {
"type": 1,
"def": 80
}
},
"shield5": {
"cls": "items",
"name": "神圣盾",
"text": "一个很普通的神圣盾",
"equip": {
"type": 1,
"def": 100,
"mdef": 100
}
},
"superPotion": {
"cls": "items",
"name": "圣水"
},
"moneyPocket": {
"cls": "items",
"name": "金钱袋"
},
"book": {
"cls": "constants",
"name": "怪物手册",
"text": "可以查看当前楼层各怪物属性"
},
"fly": {
"cls": "constants",
"name": "楼层传送器",
"text": "可以自由往来去过的楼层",
"hideInReplay": true
},
"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": "该道具尚未被定义"
},
"lifeWand": {
"cls": "tools",
"name": "生命魔杖",
"text": "可以恢复100点生命值"
},
"jumpShoes": {
"cls": "tools",
"name": "跳跃靴",
"text": "能跳跃到前方两格处"
},
"skill1": {
"cls": "constants",
"name": "技能:二倍斩",
"text": "可以打开或关闭主动技能二倍斩",
"hideInReplay": true
},
"wand": {
"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",
"sword0": "core.status.hero.atk += 0",
"sword1": "core.status.hero.atk += 10",
"sword2": "core.status.hero.atk += 20",
"sword3": "core.status.hero.atk += 40",
"sword4": "core.status.hero.atk += 80",
"sword5": "core.status.hero.atk += 100",
"shield0": "core.status.hero.def += 0",
"shield1": "core.status.hero.def += 10",
"shield2": "core.status.hero.def += 20",
"shield3": "core.status.hero.def += 40",
"shield4": "core.status.hero.def += 80",
"shield5": "core.status.hero.def += 100;core.status.hero.mdef += 100",
"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 += 500"
},
"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",
"sword0": "',攻击+0'",
"sword1": "',攻击+10'",
"sword2": "',攻击+20'",
"sword3": "',攻击+40'",
"sword4": "',攻击+80'",
"sword5": "',攻击+100'",
"shield0": "',防御+0'",
"shield1": "',防御+10'",
"shield2": "',防御+20'",
"shield3": "',防御+40'",
"shield4": "',防御+80'",
"shield5": "',防御+100魔防+100'",
"bigKey": "',全钥匙+1'",
"superPotion": "',生命值翻倍'",
"moneyPocket": "',金币+500'"
},
"useItemEffect": {
"book": "core.ui.drawBook(0);",
"fly": "core.ui.drawFly(core.floorIds.indexOf(core.status.floorId));",
"earthquake": "(function () {\n\tvar indexes = [];\n\tfor (var index in core.status.thisMap.blocks) {\n\t\tvar block = core.status.thisMap.blocks[index];\n\t\tif (!block.disable && block.event.canBreak) {\n\t\t\tindexes.push(index);\n\t\t}\n\t}\n\tcore.removeBlockByIndexes(indexes);\n\tcore.drawMap(core.status.floorId, function () {\n\t\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n\t});\n})();",
"pickaxe": "(function () {\n\tvar canBreak = function (x, y) {\n\t\tvar block = core.getBlock(x, y);\n\t\tif (block == null || block.block.disable) return false;\n\t\treturn block.block.event.canBreak;\n\t};\n\n\tcore.playSound('pickaxe.mp3');\n\tif (core.flags.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}\n\t\t}\n\t} else {\n\t\t// 仅破当前\n\t\tcore.removeBlock(core.nextX(), core.nextY());\n\t}\n\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n})();",
"icePickaxe": "(function () {\n\tcore.removeBlock(core.nextX(), core.nextY());\n\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n})();",
"snow": "(function () {\n\tif (core.flags.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}\n\t\t}\n\t} else {\n\t\tcore.removeBlock(core.nextX(), core.nextY());\n\t}\n\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n})();",
"bigKey": "(function () {\n\tvar actions = core.searchBlock(\"yellowDoor\").map(function (block) {\n\t\treturn { \"type\": \"openDoor\", \"loc\": [block.x, block.y], \"async\": true };\n\t});\n\tactions.push({ \"type\": \"waitAsync\" });\n\tactions.push({ \"type\": \"tip\", \"text\": core.material.items[itemId].name + \"使用成功\" });\n\tcore.insertAction(actions);\n})();",
"bomb": "(function () {\n\tvar canBomb = function (x, y) {\n\t\tvar block = core.getBlock(x, y);\n\t\tif (block == null || block.block.disable || block.block.event.cls.indexOf('enemy') != 0) return false;\n\t\tvar enemy = core.material.enemys[block.block.event.id];\n\t\treturn enemy && !enemy.notBomb;\n\t};\n\n\tcore.playSound('bomb.mp3');\n\tvar bombList = []; // 炸掉的怪物坐标列表\n\tif (core.flags.bombFourDirections) {\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 (canBomb(nx, ny)) {\n\t\t\t\tbombList.push([nx, ny]);\n\t\t\t\tcore.removeBlock(nx, ny);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// 仅炸当前\n\t\tcore.removeBlock(core.nextX(), core.nextY());\n\t\tbombList.push([core.nextX(), core.nextY()]);\n\t}\n\n\tcore.drawTip(core.material.items[itemId].name + '使用成功');\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})();",
"centerFly": "core.playSound('centerFly.mp3');\ncore.clearMap('hero');\ncore.setHeroLoc('x', core.bigmap.width - 1 - core.getHeroLoc('x'));\ncore.setHeroLoc('y', core.bigmap.height - 1 - core.getHeroLoc('y'));\ncore.drawHero();\ncore.drawTip(core.material.items[itemId].name + '使用成功');",
"upFly": "(function () {\n\tvar floorId = core.floorIds[core.floorIds.indexOf(core.status.floorId) + 1];\n\tif (core.status.event.id == 'action') {\n\t\tcore.insertAction([\n\t\t\t{ \"type\": \"changeFloor\", \"loc\": [core.getHeroLoc('x'), core.getHeroLoc('y')], \"floorId\": floorId },\n\t\t\t{ \"type\": \"tip\", \"text\": core.material.items[itemId].name + '使用成功' }\n\t\t]);\n\t} else {\n\t\tcore.changeFloor(floorId, null, core.status.hero.loc, null, function () {\n\t\t\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n\t\t\tcore.replay();\n\t\t});\n\t}\n})();",
"downFly": "(function () {\n\tvar floorId = core.floorIds[core.floorIds.indexOf(core.status.floorId) - 1];\n\tif (core.status.event.id == 'action') {\n\t\tcore.insertAction([\n\t\t\t{ \"type\": \"changeFloor\", \"loc\": [core.getHeroLoc('x'), core.getHeroLoc('y')], \"floorId\": floorId },\n\t\t\t{ \"type\": \"tip\", \"text\": core.material.items[itemId].name + '使用成功' }\n\t\t]);\n\t} else {\n\t\tcore.changeFloor(floorId, null, core.status.hero.loc, null, function () {\n\t\t\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n\t\t\tcore.replay();\n\t\t});\n\t}\n})();",
"poisonWine": "core.removeFlag('poison');",
"weakWine": "core.removeFlag('weak');\nif (core.values.weakValue>=1) { // >=1直接扣数值\n\tcore.status.hero.atk += core.values.weakValue;\n\tcore.status.hero.def += core.values.weakValue;\n}\nelse { // <1扣比例\n\tcore.addBuff(\"atk\", core.values.weakValue);\n\tcore.addBuff(\"def\", core.values.weakValue);\n}",
"curseWine": "core.removeFlag('curse');",
"superWine": "core.removeFlag('poison');\nif (core.hasFlag('weak')) {\n\tcore.removeFlag('weak');\n\tif (core.values.weakValue>=1) { // >=1直接扣数值\n\t\tcore.status.hero.atk += core.values.weakValue;\n\t\tcore.status.hero.def += core.values.weakValue;\n\t}\n\telse { // <1扣比例\n\t\tcore.addBuff(\"atk\", core.values.weakValue);\n\t\tcore.addBuff(\"def\", core.values.weakValue);\n\t}\n}\ncore.removeFlag('curse');",
"lifeWand": null,
"jumpShoes": "core.insertAction({ \"type\": \"jumpHero\", \"loc\": [core.nextX(2), core.nextY(2)] });",
"redPotion": "core.status.hero.hp += core.values.redPotion",
"bluePotion": "core.status.hero.hp += core.values.bluePotion",
"greenPotion": "core.status.hero.hp += core.values.greenPotion",
"yellowPotion": "core.status.hero.hp += core.values.yellowPotion",
"redJewel": "core.status.hero.atk += core.values.redJewel",
"blueJewel": "core.status.hero.def += core.values.blueJewel",
"greenJewel": "core.status.hero.mdef += core.values.greenJewel",
"yellowJewel": null,
"skill1": "// 二倍斩的flag:skill为1\nif (core.getFlag('skill', 0)==0) { // 判断当前是否已经开了技能\n\tif (core.getStatus('mana')>=5) { // 这里要写当前能否开技能的条件判断,比如魔力值至少要多少\n\t\tcore.setFlag('skill', 1); // 开技能1\n\t\tcore.setFlag('skillName', '二倍斩'); // 设置技能名\n\t}\n\telse {\n\t\tcore.drawTip(\"魔力不足,无法开启技能\");\n\t}\n}\nelse { // 关闭技能\n\tcore.setFlag('skill', 0); // 关闭技能状态\n\tcore.setFlag('skillName', '无');\n}"
},
"canUseItemEffect": {
"book": "true",
"fly": "(function () {\n\treturn core.status.maps[core.status.floorId].canFlyTo;\n})();",
"pickaxe": "(function () {\n\tvar canBreak = function (x, y) {\n\t\tvar block = core.getBlock(x, y);\n\t\tif (block == null || block.block.disable) return false;\n\t\treturn block.block.event.canBreak;\n\t};\n\n\tif (core.flags.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\tif (canBreak(core.getHeroLoc('x') + delta.x, core.getHeroLoc('y') + delta.y)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t} else {\n\t\t// 仅破当前\n\t\treturn canBreak(core.nextX(), core.nextY());\n\t}\n})();",
"icePickaxe": "(function () {\n\treturn core.getBlockId(core.nextX(), core.nextY()) == 'ice';\n})();",
"bomb": "(function () {\n\tvar canBomb = function (x, y) {\n\t\tvar block = core.getBlock(x, y);\n\t\tif (block == null || block.block.disable || block.block.event.cls.indexOf('enemy') != 0) return false;\n\t\tvar enemy = core.material.enemys[block.block.event.id];\n\t\treturn enemy && !enemy.notBomb;\n\t};\n\n\tif (core.flags.bombFourDirections) {\n\t\t// 四方向炸\n\t\tfor (var direction in core.utils.scan) {\n\t\t\tvar delta = core.utils.scan[direction];\n\t\t\tif (canBomb(core.getHeroLoc('x') + delta.x, core.getHeroLoc('y') + delta.y)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t} else {\n\t\t// 仅炸当前\n\t\treturn canBomb(core.nextX(), core.nextY());\n\t}\n})();",
"earthquake": "(function () {\n\treturn core.status.thisMap.blocks.filter(function (block) {\n\t\treturn !block.disable && block.event.canBreak;\n\t}).length > 0;\n})();",
"centerFly": "(function () {\n\tvar toX = core.bigmap.width - 1 - core.getHeroLoc('x'),\n\t\ttoY = core.bigmap.height - 1 - core.getHeroLoc('y');\n\tvar id = core.getBlockId(toX, toY);\n\treturn id == null;\n})();",
"upFly": "(function () {\n\tvar floorId = core.status.floorId,\n\t\tindex = core.floorIds.indexOf(floorId);\n\tif (index < core.floorIds.length - 1) {\n\t\tvar toId = core.floorIds[index + 1],\n\t\t\ttoX = core.getHeroLoc('x'),\n\t\t\ttoY = core.getHeroLoc('y');\n\t\tvar mw = core.floors[toId].width,\n\t\t\tmh = core.floors[toId].height;\n\t\tif (toX >= 0 && toX < mw && toY >= 0 && toY < mh && core.getBlock(toX, toY, toId) == null) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n})();",
"downFly": "(function () {\n\tvar floorId = core.status.floorId,\n\t\tindex = core.floorIds.indexOf(floorId);\n\tif (index > 0) {\n\t\tvar toId = core.floorIds[index - 1],\n\t\t\ttoX = core.getHeroLoc('x'),\n\t\t\ttoY = core.getHeroLoc('y');\n\t\tvar mw = core.floors[toId].width,\n\t\t\tmh = core.floors[toId].height;\n\t\tif (toX >= 0 && toX < mw && toY >= 0 && toY < mh && core.getBlock(toX, toY, toId) == null) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n})();",
"snow": "(function () {\n\tif (core.flags.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\tif (core.getBlockId(core.getHeroLoc('x') + delta.x, core.getHeroLoc('y') + delta.y) == 'lava') {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t} else {\n\t\treturn core.getBlockId(core.nextX(), core.nextY()) == 'lava';\n\t}\n})();",
"bigKey": "(function () {\n\treturn core.searchBlock('yellowDoor').length > 0;\n})();",
"poisonWine": "core.hasFlag('poison');",
"weakWine": "core.hasFlag('weak');",
"curseWine": "core.hasFlag('curse');",
"superWine": "(function() {\n\treturn core.hasFlag('poison') || core.hasFlag('weak') || core.hasFlag('curse');\n})();",
"lifeWand": "true",
"jumpShoes": "(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})();",
"redPotion": "true",
"bluePotion": "true",
"greenPotion": "true",
"yellowPotion": "true",
"redJewel": "true",
"blueJewel": "true",
"greenJewel": "true",
"yellowJewel": "true",
"skill1": "true"
},
"equipCondition": {},
"useItemEvent": {
"yellowJewel": [
{
"type": "choices",
"choices": [
{
"text": "攻击+1",
"action": [
{
"type": "setValue",
"name": "status:atk",
"value": "status:atk+1"
}
]
},
{
"text": "防御+2",
"action": [
{
"type": "setValue",
"name": "status:def",
"value": "status:def+2"
}
]
},
{
"text": "生命+200",
"action": [
{
"type": "setValue",
"name": "status:hp",
"value": "status:hp+200"
}
]
}
]
}
],
"lifeWand": [
{
"type": "comment",
"text": "先恢复一个魔杖(因为使用道具必须消耗一个)"
},
{
"type": "function",
"function": "function(){\ncore.addItem('lifeWand', 1);\n}"
},
{
"type": "input",
"text": "请输入生命魔杖使用次数:(0-${item:lifeWand})"
},
{
"type": "if",
"condition": "flag:input<=item:lifeWand",
"true": [
{
"type": "setValue",
"name": "item:lifeWand",
"value": "item:lifeWand-flag:input"
},
{
"type": "setValue",
"name": "status:hp",
"value": "status:hp+flag:input*100"
},
"成功使用${flag:input}次生命魔杖,恢复${flag:input*100}点生命。"
],
"false": [
"输入不合法!"
]
}
]
}
}