1
0
Fork 0
VoxeLibre/mods/ENTITIES/mobs_mc/shulker.lua

81 lines
2.0 KiB
Lua
Raw Normal View History

2017-07-05 03:15:46 +02:00
--MCmobs v0.2
--maikerumine
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
local S = minetest.get_translator("mobs_mc")
2017-07-05 03:15:46 +02:00
--###################
--################### SHULKER
--###################
-- animation 45-80 is transition between passive and attack stance
mobs:register_mob("mobs_mc:shulker", {
type = "monster",
2020-04-11 02:46:03 +02:00
spawn_class = "hostile",
2017-07-05 03:15:46 +02:00
attack_type = "shoot",
shoot_interval = 0.5,
arrow = "mobs_mc:shulkerbullet",
shoot_offset = 0.5,
passive = false,
hp_min = 30,
hp_max = 30,
armor = 150,
collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.99, 0.5},
visual = "mesh",
mesh = "mobs_mc_shulker.b3d",
textures = { "mobs_mc_endergolem.png", },
-- TODO: sounds
2017-07-05 03:15:46 +02:00
-- TODO: Make shulker dye-able
visual_size = {x=3, y=3},
walk_chance = 0,
jump = false,
drops = {
{name = mobs_mc.items.shulker_shell,
chance = 1,
min = 0,
max = 1,},
},
animation = {
stand_speed = 25, walk_speed = 25, run_speed = 50, punch_speed = 25,
speed_normal = 25, speed_run = 50,
stand_start = 0, stand_end = 45,
walk_start = 0, walk_end = 45,
run_start = 0, run_end = 45,
punch_start = 80, punch_end = 100,
},
view_range = 16,
fear_height = 4,
})
-- bullet arrow (weapon)
mobs:register_arrow("mobs_mc:shulkerbullet", {
visual = "sprite",
visual_size = {x = 0.25, y = 0.25},
textures = {"mobs_mc_shulkerbullet.png"},
velocity = 6,
hit_player = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 4},
}, nil)
end,
2019-03-11 13:25:06 +01:00
hit_mob = function(self, mob)
mob:punch(self.object, 1.0, {
2017-07-05 03:15:46 +02:00
full_punch_interval = 1.0,
damage_groups = {fleshy = 4},
}, nil)
end,
hit_node = function(self, pos, node)
end
})
2019-03-16 00:21:17 +01:00
mobs:register_egg("mobs_mc:shulker", S("Schulker"), "mobs_mc_spawn_icon_shulker.png", 0)
2017-07-05 03:15:46 +02:00
2017-09-13 23:13:47 +02:00
mobs:spawn_specific("mobs_mc:shulker", mobs_mc.spawn.end_city, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 5000, 2, mobs_mc.spawn_height.end_min, mobs_mc.spawn_height.end_max)