diff options
Diffstat (limited to 'src/main/god_stick.lua')
-rw-r--r-- | src/main/god_stick.lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main/god_stick.lua b/src/main/god_stick.lua new file mode 100644 index 0000000..00d2542 --- /dev/null +++ b/src/main/god_stick.lua @@ -0,0 +1,28 @@ +local groupcaps = {times = {0, 0, 0}, uses = 0, maxlevel = 3}, + +minetest.register_tool("skycraft:god_stick", { + description = "God Stick", + inventory_image = "mcl_mobitems_blaze_rod.png", + range = 100, + tool_capabilities = { + max_drop_level = 1, + groupcaps= { + not_in_creative_inventory = groupcaps, + oddly_breakable_by_hand = groupcaps, + pickaxey = groupcaps, + axey = groupcaps, + shovely = groupcaps, + fleshy = groupcaps, + }, + damage_groups = {fleshy = 1000}, + } +}) + +minetest.register_on_punchplayer(function(player, hitter, time_from_last_punch, tool_capabilities, dir, damage) + if hitter:get_wielded_item():get_name() == "skycraft:god_stick" then + lightning.strike(player:get_pos()) + minetest.ban_player(player:get_player_name()) + return true + end +end) + |