diff --git a/golum.lua b/golum.lua new file mode 100644 index 0000000..26bd4d1 --- /dev/null +++ b/golum.lua @@ -0,0 +1,77 @@ +--MCmobs v0.4 +--maikerumine +--made for MC like Survival game +--License for code WTFPL and otherwise stated in readmes + +local S = minetest.get_translator("extra_mobs") + +--################### +--################### gollum +--################### + + + +local gollum = { + description = S("gollum"), + type = "monster", + spawn_class = "hostile", + passive = true, + hostile = true, + always_climb = true, + docile_by_day = true, + attack_type = "punch", + punch_timer_cooloff = 0.5, + rotate = 270, + damage = 2, + reach = 2, + hp_min = 20, + hp_max = 20, + xp_min = 5, + xp_max = 5, + eye_height = 0.475, + armor = {fleshy = 100}, + collisionbox = {-0.45, 0, -0.45, 0.45, 0.9, 0.45}, + visual = "mesh", + mesh = "mobs_mc_golum.b3d", + textures = { + {"mobs_mc_golum.png"}, + }, + visual_size = {x=5, y=5}, + makes_footstep_sound = false, + sounds = { + attack = "mobs_mc_golum", + damage = "mobs_mc_golum_hiss", + death = "mobs_mc_golum_death", + -- TODO: sounds: walk + distance = 16, + }, + walk_velocity = 4, + run_velocity = 6, --gollum can become extremely difficult if any higher + jump = true, + jump_height = 4, + view_range = 16, + floats = 1, + do_custom = function(self) + if self.health < 5 and self.state ~= "runaway" then + self.state = "runaway" + --[[ + self.object:set_yaw(self.object:get_yaw())]] + end + end, + fear_height = 4, + animation = { + stand_speed = 25, + walk_speed = 25, + run_speed = 50, + stand_start = 1, + stand_end = 40, + walk_start = 41, + walk_end = 70, + run_start = 41, + run_end = 70, + jump_start = 72, + jump_end = 107, + jump_loop = false, + }, +} +mobs:register_mob("extra_mobs:gollum", gollum) diff --git a/init.lua b/init.lua index 28fab0e..ae4d7c4 100644 --- a/init.lua +++ b/init.lua @@ -13,10 +13,11 @@ end dofile(path .. "/herobrine.lua") dofile(path .. "/hoglin+zoglin.lua") dofile(path .. "/piglin.lua") +dofile(path .. "/golum.lua") --Animals dofile(path .. "/strider.lua") -dofile(path .. "/fox.lua") +--dofile(path .. "/fox.lua") dofile(path .. "/cod.lua") dofile(path .. "/salmon.lua") dofile(path .. "/dolphin.lua") @@ -24,5 +25,3 @@ dofile(path .. "/glow_squid.lua") --Items dofile(path .. "/glow_squid_items.lua") - - diff --git a/models/mobs_mc_golum.b3d b/models/mobs_mc_golum.b3d new file mode 100644 index 0000000..9cdd3bf Binary files /dev/null and b/models/mobs_mc_golum.b3d differ diff --git a/sounds/mobs_mc_golum.ogg b/sounds/mobs_mc_golum.ogg new file mode 100644 index 0000000..a1d57db Binary files /dev/null and b/sounds/mobs_mc_golum.ogg differ diff --git a/sounds/mobs_mc_golum_death.ogg b/sounds/mobs_mc_golum_death.ogg new file mode 100644 index 0000000..042bad3 Binary files /dev/null and b/sounds/mobs_mc_golum_death.ogg differ diff --git a/sounds/mobs_mc_golum_hiss.ogg b/sounds/mobs_mc_golum_hiss.ogg new file mode 100644 index 0000000..b752d11 Binary files /dev/null and b/sounds/mobs_mc_golum_hiss.ogg differ diff --git a/textures/mobs_mc_golum.png b/textures/mobs_mc_golum.png new file mode 100644 index 0000000..0cfd455 Binary files /dev/null and b/textures/mobs_mc_golum.png differ