1
0
Fork 0

Added ghast achievement and nerfed ghast

* ghast now attacks less frequently
* killing ghast with a ghast fireball now awards an achievement
patch_skins
the-real-herowl 2024-01-25 14:16:09 +01:00
parent 1478960b7f
commit a8ad631864
3 changed files with 13 additions and 1 deletions

View File

@ -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

View File

@ -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)

View File

@ -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"),