Add bow shooting sound when mob fires an arrow
[MineClone/MineClone2.git] / mods / ENTITIES / mobs_mc / villager_illusioner.lua
blobe6d1b2c919a377ee6009b1ac64890e322428df20
1 --MCmobs v0.4
2 --maikerumine
3 --made for MC like Survival game
4 --License for code WTFPL and otherwise stated in readmes
6 -- intllib
7 local MP = minetest.get_modpath(minetest.get_current_modname())
8 local S, NS = dofile(MP.."/intllib.lua")
10 mobs:register_mob("mobs_mc:illusioner", {
11 type = "monster",
12 attack_type = "shoot",
13 shoot_interval = 0.5,
14 arrow = "mobs_mc:arrow_entity",
15 shoot_offset = 1.5,
16 hp_min = 32,
17 hp_max = 32,
18 collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
19 visual = "mesh",
20 mesh = "mobs_mc_illusioner.b3d",
21 textures = { {
22 "mobs_mc_illusionist.png",
23 "mobs_mc_illusionist.png", --hat
24 "mcl_bows_bow.png",
25 }, },
26 sounds = {
27 -- TODO: more sounds
28 shoot_attack = "mcl_bows_bow_shoot",
29 distance = 16,
31 visual_size = {x=3, y=3},
32 walk_velocity = 0.6,
33 run_velocity = 2,
34 jump = true,
35 animation = {
36 stand_speed = 25,
37 stand_start = 40,
38 stand_end = 59,
39 walk_speed = 25,
40 walk_start = 0,
41 walk_end = 40,
42 run_speed = 25,
43 shoot_start = 150,
44 shoot_end = 170,
45 die_speed = 15,
46 die_start = 170,
47 die_end = 180,
48 die_loop = false,
49 -- 120-140 magic arm swinging, 140-150 transition between magic to bow shooting
51 view_range = 16,
52 fear_height = 4,
53 lava_damage = 4,
56 mobs:register_egg("mobs_mc:illusioner", S("Illusioner"), "mobs_mc_spawn_icon_illusioner.png", 0)
58 if minetest.settings:get_bool("log_mods") then
59 minetest.log("action", "MC Illusioner loaded")
60 end