Only give knights a damage boost where it helps

This commit is contained in:
LoneWolfHT 2020-11-07 17:17:21 -08:00 committed by GitHub
parent de3697f0ed
commit 536474adb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,8 @@ minetest.register_on_punchplayer(function(player, hitter, time_from_last_punch,
time_from_last_punch = 0.5 time_from_last_punch = 0.5
end end
if hitter:get_hp() > 0 then
player:punch(hitter, 1, {damage_groups = {fleshy = time_from_last_punch*2, nopunch = 1}}, dir) player:punch(hitter, 1, {damage_groups = {fleshy = time_from_last_punch*2, nopunch = 1}}, dir)
end end
end
end) end)