{"action":"closed","issue":{"url":"https://api.github.com/repos/NyaaCat/nyaautils/issues/7","repository_url":"https://api.github.com/repos/NyaaCat/nyaautils","labels_url":"https://api.github.com/repos/NyaaCat/nyaautils/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/NyaaCat/nyaautils/issues/7/comments","events_url":"https://api.github.com/repos/NyaaCat/nyaautils/issues/7/events","html_url":"https://github.com/NyaaCat/nyaautils/issues/7","id":171867610,"number":7,"title":"新增功能：材料修复 用于替代 MythicDrops","user":{"login":"phoenixlzx","id":1400198,"avatar_url":"https://avatars.githubusercontent.com/u/1400198?v=3","gravatar_id":"","url":"https://api.github.com/users/phoenixlzx","html_url":"https://github.com/phoenixlzx","followers_url":"https://api.github.com/users/phoenixlzx/followers","following_url":"https://api.github.com/users/phoenixlzx/following{/other_user}","gists_url":"https://api.github.com/users/phoenixlzx/gists{/gist_id}","starred_url":"https://api.github.com/users/phoenixlzx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoenixlzx/subscriptions","organizations_url":"https://api.github.com/users/phoenixlzx/orgs","repos_url":"https://api.github.com/users/phoenixlzx/repos","events_url":"https://api.github.com/users/phoenixlzx/events{/privacy}","received_events_url":"https://api.github.com/users/phoenixlzx/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NyaaCat/nyaautils/labels/feature%20request","name":"feature request","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-18T10:21:28Z","updated_at":"2016-09-20T19:12:11Z","closed_at":"2016-09-20T19:12:11Z","body":"配置文件 `repair.yml` 内容例如：\r\n\r\n```\r\nrepairCost:\r\n  WOODEN_PICKAXE:\r\n    material: planks # or use value 5\r\n    fullRepairCost: 2 # how many material is required to fully repair the item, this decide durability amount each material can regain.\r\n    expCost: 1 # exp points (not level) cost on **each consume**\r\n    enchantCostPerLv: 1 # if item is enchanted, each level will require more material and exp to repair. Details below.\r\n    repairLimit: 100 # how many times an item can be fixed, this value is stored in NBT. -1 to disable, in this case no changes will be applied to NBT.\r\n  ELYTRA:\r\n    material: leather\r\n    fullRepairCost: 3\r\n    expCost: 2\r\n    enchantCostPerLv: 2\r\n    repairLimit: -1\r\n(...)\r\n```\r\n\r\n管理员命令：\r\n\r\n`/nu addrepair [item] [material] [fullRepairCostAmount] [expCostPerConsume] [enchantCostPerLv] [repairTimesLimit]`\r\n\r\n权限 `nu.addrepair` 默认为 op\r\n\r\n玩家使用：\r\n\r\n1. 修复材料放置副手\r\n2. 修复目标物品放置主手\r\n3. 命令 `/nu repair` 消耗一个材料修复，`/nu repair full` 消耗副手材料修复直到修满耐久，或者消耗完副手的材料。耐久消耗不满一个材料修复时，也消耗一个材料和对应经验值并修满耐久。（不会说话了）。`/nu repairinfo` 展示当前主手所持物品的修复信息（无法修复、当前耐久值、需要何种材料修复、消耗一个材料修复所需的经验值和恢复的耐久值、剩余修复可能次数）\r\n4. 材料或经验值不足时提示相应错误\r\n\r\n权限 `nu.repair` 默认为玩家\r\n\r\n权限 `nu.repairinfo` 默认为玩家\r\n\r\n修复后播放铁砧修复的声音。\r\n\r\n补充：\r\n\r\n举例，配置如下\r\n\r\n```\r\n  DIAMOND_PICKAXE:\r\n    material: diamond\r\n    fullRepairCost: 3\r\n    expCost: 2\r\n    enchantCostPerLv: 2\r\n    repairLimit: -1\r\n```\r\n\r\n钻石镐的耐久值为 1561，则无附魔的钻石镐每次修复消耗 1 颗钻石和 2 点经验，恢复 `floor(1561/3) = 520` 点耐久。\r\n\r\n附魔有耐久 I 和效率 III 的钻石镐（附魔总等级 `1 + 3 = 4`），每次修复消耗 1 颗钻石和 `floor(2 + 2 * 4)` 点经验，并恢复 `floor(1561 / (3 + 2 * 4)) = 141` 点耐久。\r\n\r\n`enchantCostPerLv` 可以为 >= 0 的浮点数。"}}
{"actor":{"display_login":"RecursiveG"}}