tweak kb code
This commit is contained in:
parent
6a03423cce
commit
c3c5dd6c2d
7
init.lua
7
init.lua
@ -269,7 +269,9 @@ local function punchy(
|
||||
|
||||
if tmp < 0 then tmp = 0.0 elseif tmp > 1 then tmp = 1.0 end
|
||||
|
||||
damage = damage + (tool_capabilities.damage_groups[group] or 0) * tmp
|
||||
if group ~= "knockback" then
|
||||
damage = damage + (tool_capabilities.damage_groups[group] or 0) * tmp
|
||||
end
|
||||
end
|
||||
|
||||
-- if custom value found then use instead
|
||||
@ -298,9 +300,10 @@ minetest.register_tool("playerplus:stick", {
|
||||
description = "Sword of Boing",
|
||||
inventory_image = "playerplus_sword_boing.png",
|
||||
wield_image = "playerplus_sword_boing.png",
|
||||
groups = {not_in_creative_inventory = 1},
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.4,
|
||||
damage_groups = {fleshy = 0, knockback = 11, not_in_creative_inventory = 1}
|
||||
damage_groups = {knockback = 11}
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user