I'll explain in the code tags;SegFault22 wrote:How is damage dealt with a weapon calculated?
minetest.register_tool("tools:sword_stone", {
description = "Stone Sword",
inventory_image = "tool_stonesword.png",
tool_capabilities = {
full_punch_interval = 4.1,
max_drop_level = 0,
groupcaps = {
snappy={times={[1]=1.2, [2]=0.6, [3]=0.3}, uses=17, maxlevel=1},
},
damage_groups = {fleshy=5}, --this is how many hearts (to other players) the sword will do, and only until
-- the sword has moved itself back into it's resting position, it will do full damage again, while waiting 2.05
-- seconds means it will only do half the damage, while having to wait again to use it.
-- i belive fleshy = 3 is the full damage, fleshy = 2 does 75%, and so on. immortal = 0 disables damage.
}
})Jordach wrote:I'll explain in the code tags;SegFault22 wrote:How is damage dealt with a weapon calculated?Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_tool("tools:sword_stone", {
description = "Stone Sword",
inventory_image = "tool_stonesword.png",
tool_capabilities = {
full_punch_interval = 4.1,
max_drop_level = 0,
groupcaps = {
snappy={times={[1]=1.2, [2]=0.6, [3]=0.3}, uses=17, maxlevel=1},
},
damage_groups = {fleshy=5}, --this is how many hearts (to other players) the sword will do, and only until
-- the sword has moved itself back into it's resting position, it will do full damage again, while waiting 2.05
-- seconds means it will only do half the damage, while having to wait again to use it.
-- i belive fleshy = 3 is the full damage, fleshy = 2 does 75%, and so on. immortal = 0 disables damage.
}
})
Users browsing this forum: No registered users and 12 guests