21 lines
812 B
Lua
21 lines
812 B
Lua
PyuTestCore.make_sword = function (nsname, desc, texture, damage, durability, atkspeed)
|
|
PyuTestCore.make_tool(nsname, desc, {}, texture, {
|
|
stack_max = 1,
|
|
tool_capabilities = {
|
|
groupcaps = {
|
|
block = {
|
|
uses = durability / 2
|
|
}
|
|
},
|
|
punch_attack_uses = durability,
|
|
damage_groups = {fleshy = damage},
|
|
full_punch_interval = atkspeed or 1
|
|
}
|
|
})
|
|
end
|
|
|
|
PyuTestCore.make_sword("pyutest_core:wooden_sword", "Wooden Sword", "wooden-sword.png", 4, 200, 1.8)
|
|
PyuTestCore.make_sword("pyutest_core:stone_sword", "Stone Sword", "stone-sword.png", 5, 450, 1.5)
|
|
PyuTestCore.make_sword("pyutest_core:iron_sword", "Iron Sword", "iron-sword.png", 7, 750, 1.2)
|
|
PyuTestCore.make_sword("pyutest_core:diamond_sword", "Diamond Sword", "diamond-sword.png", 12, 1200, 0.8)
|