From 6f309da7479b69480a4e9f5dbf53c3452162d673 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 24 Jul 2017 18:36:41 +0200 Subject: [PATCH] Add fireball death messages --- mods/PLAYER/mcl_death/init.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/mods/PLAYER/mcl_death/init.lua b/mods/PLAYER/mcl_death/init.lua index abf7fe225e..13d316d009 100644 --- a/mods/PLAYER/mcl_death/init.lua +++ b/mods/PLAYER/mcl_death/init.lua @@ -43,6 +43,14 @@ local msgs = { ["mob_kill"] = { "%s was killed by a mob.", }, + ["blaze_fireball"] = { + "%s was burned to death by a blaze's fireball.", + "%s was killed by a fireball from a blaze.", + }, + ["ghast_fireball"] = { + "A ghast scared %s to death.", + "%s has been fireballed by a ghast.", + }, ["falling_anvil"] = { "%s was smashed by a falling anvil!", }, @@ -197,6 +205,11 @@ minetest.register_on_dieplayer(function(player) -- Arrow elseif last_punches[name].hittertype == "arrow" then msg = dmsg("arrow", name) + -- Fireball + elseif last_punches[name].hittertype == "blaze_fireball" then + msg = dmsg("blaze_fireball", name) + elseif last_punches[name].hittertype == "ghast_fireball" then + msg = dmsg("ghast_fireball", name) end -- Other reason else @@ -233,6 +246,12 @@ minetest.register_on_punchplayer(function(player, hitter) if hitter:get_luaentity()._shooter then shooter = hitter:get_luaentity()._shooter end + -- Blaze fireball + elseif hitter:get_luaentity().name == "mobs_mc:blaze_fireball" then + hittertype = "blaze_fireball" + -- Ghast fireball + elseif hitter:get_luaentity().name == "mobs_monster:fireball" then + hittertype = "ghast_fireball" else return end