Fix Shulker spawnegg typo
[MineClone/MineClone2.git] / mods / ENTITIES / mobs_mc / shulker.lua
blob0f38f68a3a45a2328802d338f752270e98535738
1 --MCmobs v0.2
2 --maikerumine
3 --made for MC like Survival game
4 --License for code WTFPL and otherwise stated in readmes
6 local S = minetest.get_translator("mobs_mc")
8 --###################
9 --################### SHULKER
10 --###################
12 -- animation 45-80 is transition between passive and attack stance
14 mobs:register_mob("mobs_mc:shulker", {
15 type = "monster",
16 spawn_class = "hostile",
17 attack_type = "shoot",
18 shoot_interval = 0.5,
19 arrow = "mobs_mc:shulkerbullet",
20 shoot_offset = 0.5,
21 passive = false,
22 hp_min = 30,
23 hp_max = 30,
24 armor = 150,
25 collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.99, 0.5},
26 visual = "mesh",
27 mesh = "mobs_mc_shulker.b3d",
28 textures = { "mobs_mc_endergolem.png", },
29 -- TODO: sounds
30 -- TODO: Make shulker dye-able
31 visual_size = {x=3, y=3},
32 walk_chance = 0,
33 jump = false,
34 drops = {
35 {name = mobs_mc.items.shulker_shell,
36 chance = 1,
37 min = 0,
38 max = 1,},
40 animation = {
41 stand_speed = 25, walk_speed = 25, run_speed = 50, punch_speed = 25,
42 speed_normal = 25, speed_run = 50,
43 stand_start = 0, stand_end = 45,
44 walk_start = 0, walk_end = 45,
45 run_start = 0, run_end = 45,
46 punch_start = 80, punch_end = 100,
48 view_range = 16,
49 fear_height = 4,
52 -- bullet arrow (weapon)
53 mobs:register_arrow("mobs_mc:shulkerbullet", {
54 visual = "sprite",
55 visual_size = {x = 0.25, y = 0.25},
56 textures = {"mobs_mc_shulkerbullet.png"},
57 velocity = 6,
59 hit_player = function(self, player)
60 player:punch(self.object, 1.0, {
61 full_punch_interval = 1.0,
62 damage_groups = {fleshy = 4},
63 }, nil)
64 end,
66 hit_mob = function(self, mob)
67 mob:punch(self.object, 1.0, {
68 full_punch_interval = 1.0,
69 damage_groups = {fleshy = 4},
70 }, nil)
71 end,
73 hit_node = function(self, pos, node)
74 end
78 mobs:register_egg("mobs_mc:shulker", S("Shulker"), "mobs_mc_spawn_icon_shulker.png", 0)
80 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)