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")
7 local mod_bows
= minetest
.get_modpath("mcl_bows") ~= nil
9 mobs
:register_mob("mobs_mc:illusioner", {
11 spawn_class
= "hostile",
12 attack_type
= "shoot",
15 arrow
= "mcl_bows:arrow_entity",
16 shoot_arrow
= function(self
, pos
, dir
)
18 -- 1-4 damage per arrow
19 local dmg
= math
.random(1, 4)
20 mcl_bows
.shoot_arrow("mcl_bows:arrow", pos
, dir
, self
.object
:get_yaw(), self
.object
, nil, dmg
)
25 collisionbox
= {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
27 mesh
= "mobs_mc_illusioner.b3d",
29 "mobs_mc_illusionist.png",
30 "mobs_mc_illusionist.png", --hat
37 visual_size
= {x
=3, y
=3},
55 -- 120-140 magic arm swinging, 140-150 transition between magic to bow shooting
61 mobs
:register_egg("mobs_mc:illusioner", S("Illusioner"), "mobs_mc_spawn_icon_illusioner.png", 0)