spawners/spawners_mobs/mob_mummy.lua

123 lines
3.2 KiB
Lua
Raw Normal View History

2016-10-08 21:54:26 +03:00
-- modified Sand Monster by PilzAdam with Mummy by BlockMen
local mummy_def = {
type = "monster",
passive = false,
pathfinding = true,
2016-10-16 17:26:49 +03:00
attack_type = "dogshoot",
2017-12-11 08:11:38 +03:00
owner_loyal = true,
2016-10-16 17:26:49 +03:00
shoot_interval = 2,
dogshoot_switch = 1,
dogshoot_count_max = 10,
arrow = "spawners_mobs:black_skull",
shoot_offset = 2,
reach = 3,
2016-10-21 02:23:32 +03:00
damage = 5,
2016-11-13 14:44:52 +03:00
hp_min = 60,
hp_max = 120,
2016-10-08 21:54:26 +03:00
armor = 100,
collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4},
visual = "mesh",
mesh = "spawners_mobs_mummy.b3d",
textures = {
{"spawners_mobs_mummy.png"},
},
makes_footstep_sound = true,
sounds = {
random = "spawners_mobs_mummy",
damage = "spawners_mobs_mummy_hit",
2016-10-16 17:26:49 +03:00
shoot_attack = "spawners_mobs_mummy_shoot",
2016-10-08 21:54:26 +03:00
},
walk_velocity = .75,
run_velocity = 1.5,
2016-10-16 17:26:49 +03:00
view_range = 15,
2016-10-08 21:54:26 +03:00
jump = true,
2016-12-04 01:14:15 +03:00
floats = 1,
2016-10-08 21:54:26 +03:00
drops = {
2016-10-21 02:23:32 +03:00
{name = "default:sandstonebrick", chance = 5, min = 1, max = 2},
{name = "spawners_mobs:deco_stone_eye", chance = 25, min = 1, max = 1},
{name = "spawners_mobs:deco_stone_men", chance = 25, min = 1, max = 1},
{name = "spawners_mobs:deco_stone_sun", chance = 25, min = 1, max = 1},
{name = "spawners_mobs:deco_stone_bird", chance = 25, min = 1, max = 1},
2017-01-06 21:17:02 +03:00
{name = "default:diamond", chance = 3, min = 1, max = 2},
{name = "default:mese_crystal", chance = 3, min = 1, max = 2},
2017-08-03 23:06:27 +03:00
{name = "spawners_mobs:mummy", chance = 25, min = 1, max = 1},
2016-10-08 21:54:26 +03:00
},
water_damage = 4,
lava_damage = 8,
2016-11-13 14:44:52 +03:00
light_damage = 10,
2016-10-08 21:54:26 +03:00
fear_height = 4,
animation = {
speed_normal = 15,
speed_run = 15,
stand_start = 0,
stand_end = 39,
walk_start = 41,
walk_end = 72,
run_start = 74,
run_end = 105,
punch_start = 74,
punch_end = 105,
},
follow = {"spawners_mobs:deco_stone_eye","spawners_mobs:deco_stone_men","spawners_mobs:deco_stone_sun","spawners_mobs:deco_stone_bird"},
2016-10-08 21:54:26 +03:00
on_die = function(self, pos)
minetest.sound_play("spawners_mobs_mummy_death", {
object = self.object,
pos = pos,
max_hear_distance = 10
})
end,
2016-12-03 21:29:27 +03:00
on_rightclick = function(self, clicker)
if mobs:feed_tame(self, clicker, 8, true, true) then
return
end
mobs:capture_mob(self, clicker, 30, 50, 80, false, nil)
end,
2016-10-08 21:54:26 +03:00
}
mobs:register_mob("spawners_mobs:mummy", mummy_def)
2016-12-05 20:09:12 +03:00
mobs:spawn({
name = "spawners_mobs:mummy",
nodes = {"default:desert_sand", "default:desert_stone", "default:sand", "default:sandstone", "default:silver_sand", "spawners_mobs:deco_stone_eye", "spawners_mobs:deco_stone_men", "spawners_mobs:deco_stone_sun"},
2016-12-05 20:09:12 +03:00
min_light = 0,
max_light = 20,
chance = 2000,
active_object_count = 2,
day_toggle = false,
})
2016-10-08 21:54:26 +03:00
mobs:register_egg("spawners_mobs:mummy", "Mummy Monster", "default_sandstone_brick.png", 1)
2016-10-16 17:26:49 +03:00
-- black skull shooting
mobs:register_arrow("spawners_mobs:black_skull", {
visual = "sprite",
visual_size = {x = 1, y = 1},
textures = {"spawners_mobs_black_skull.png"},
velocity = 7,
2016-10-21 02:23:32 +03:00
tail = 1,
tail_texture = "spawners_mobs_black_skull.png",
2017-07-18 23:29:39 +03:00
glow = 5,
2016-10-16 17:26:49 +03:00
-- tail_size = 10,
-- direct hit, no fire... just plenty of pain
hit_player = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 8},
}, nil)
end,
hit_mob = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 8},
}, nil)
end,
2016-11-13 14:44:52 +03:00
hit_node = function(self, pos, node)
end
2016-10-16 17:26:49 +03:00
})