Added ghast achievement and nerfed ghast
* ghast now attacks less frequently * killing ghast with a ghast fireball now awards an achievement
This commit is contained in:
parent
1478960b7f
commit
a8ad631864
|
@ -368,6 +368,7 @@ function mcl_mobs.register_arrow(name, def)
|
||||||
on_punch = def.on_punch or function(self, puncher, time_from_last_punch, tool_capabilities, dir, damage)
|
on_punch = def.on_punch or function(self, puncher, time_from_last_punch, tool_capabilities, dir, damage)
|
||||||
local vel = self.object:get_velocity():length()
|
local vel = self.object:get_velocity():length()
|
||||||
self.object:set_velocity({x=dir.x * vel, y=dir.y * vel, z=dir.z * vel})
|
self.object:set_velocity({x=dir.x * vel, y=dir.y * vel, z=dir.z * vel})
|
||||||
|
self._puncher = puncher
|
||||||
end,
|
end,
|
||||||
collisionbox = def.collisionbox or {0, 0, 0, 0, 0, 0},
|
collisionbox = def.collisionbox or {0, 0, 0, 0, 0, 0},
|
||||||
automatic_face_movement_dir = def.rotate
|
automatic_face_movement_dir = def.rotate
|
||||||
|
|
|
@ -53,7 +53,7 @@ mcl_mobs.register_mob("mobs_mc:ghast", {
|
||||||
view_range = 64,
|
view_range = 64,
|
||||||
attack_type = "dogshoot",
|
attack_type = "dogshoot",
|
||||||
arrow = "mobs_mc:fireball",
|
arrow = "mobs_mc:fireball",
|
||||||
shoot_interval = 3,
|
shoot_interval = 5,
|
||||||
shoot_offset = -0.5,
|
shoot_offset = -0.5,
|
||||||
dogshoot_switch = 1,
|
dogshoot_switch = 1,
|
||||||
dogshoot_count_max =1,
|
dogshoot_count_max =1,
|
||||||
|
@ -131,6 +131,10 @@ mcl_mobs.register_arrow("mobs_mc:fireball", {
|
||||||
damage_groups = {fleshy = 6},
|
damage_groups = {fleshy = 6},
|
||||||
}, nil)
|
}, nil)
|
||||||
mcl_mobs.mob_class.boom(self,self.object:get_pos(), 1, true)
|
mcl_mobs.mob_class.boom(self,self.object:get_pos(), 1, true)
|
||||||
|
local ent = mob:get_luaentity()
|
||||||
|
if not ent or ent.health <= 0 then
|
||||||
|
awards.unlock(self._puncher:get_player_name(), "mcl:fireball_redir_serv")
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
hit_node = function(self, pos, node)
|
hit_node = function(self, pos, node)
|
||||||
|
|
|
@ -550,6 +550,13 @@ awards.register_achievement("mcl:obsidian", {
|
||||||
type = "Advancement",
|
type = "Advancement",
|
||||||
group = "Overworld",
|
group = "Overworld",
|
||||||
})
|
})
|
||||||
|
awards.register_achievement("mcl:fireball_redir_serv", {
|
||||||
|
title = S("Fireball Redirection Service"),
|
||||||
|
description = S("Defeat a ghast with his own weapon."),
|
||||||
|
icon = "mcl_fire_fire_charge.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Nether",
|
||||||
|
})
|
||||||
|
|
||||||
awards.register_achievement("mcl:hero_of_the_village", {
|
awards.register_achievement("mcl:hero_of_the_village", {
|
||||||
title = S("Hero of the Village"),
|
title = S("Hero of the Village"),
|
||||||
|
|
Loading…
Reference in New Issue