Make villager stand still if there is near player
[MineClone/MineClone2.git] / mods / ENTITIES / mobs_mc / skeleton_wither.lua
blob144d37cf13dd19057f46f0144484f21c58e4f144
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 --###################
11 --################### WITHER SKELETON
12 --###################
14 mobs:register_mob("mobs_mc:witherskeleton", {
15 type = "monster",
16 hp_min = 20,
17 hp_max = 20,
18 pathfinding = 1,
19 group_attack = true,
20 collisionbox = {-0.35, -0.01, -0.35, 0.35, 2.39, 0.35},
21 visual = "mesh",
22 mesh = "mobs_mc_witherskeleton.b3d",
23 textures = {
25 "default_tool_stonesword.png", -- sword
26 "mobs_mc_wither_skeleton.png", -- wither skeleton
29 visual_size = {x=3.6, y=3.6},
30 makes_footstep_sound = true,
31 sounds = {
32 random = "skeleton1",
33 death = "skeletondeath",
34 damage = "skeletonhurt1",
35 distance = 16,
37 walk_velocity = 1.2,
38 run_velocity = 2.4,
39 damage = 7,
40 reach = 2,
41 drops = {
42 {name = mobs_mc.items.coal,
43 chance = 1,
44 min = 0,
45 max = 1,},
46 {name = mobs_mc.items.bone,
47 chance = 1,
48 min = 0,
49 max = 2,},
51 -- Head
52 {name = mobs_mc.items.head_wither_skeleton,
53 chance = 40, -- 2.5% chance
54 min = 1,
55 max = 1,},
57 animation = {
58 stand_start = 0,
59 stand_end = 40,
60 stand_speed = 15,
61 walk_start = 40,
62 walk_end = 60,
63 walk_speed = 15,
64 run_start = 40,
65 run_end = 60,
66 run_speed = 30,
67 shoot_start = 70,
68 shoot_end = 90,
69 punch_start = 110,
70 punch_end = 130,
71 punch_speed = 25,
72 die_start = 160,
73 die_end = 170,
74 die_speed = 15,
75 die_loop = false,
77 water_damage = 0,
78 lava_damage = 0,
79 light_damage = 0,
80 view_range = 16,
81 attack_type = "dogfight",
82 arrow = "mobs_mc:arrow_entity",
83 shoot_interval = 2.5,
84 shoot_offset = 1,
85 dogshoot_switch = 1,
86 dogshoot_count_max =0.5,
87 blood_amount = 0,
88 fear_height = 4,
91 --spawn
92 mobs:spawn_specific("mobs_mc:witherskeleton", mobs_mc.spawn.nether_fortress, {"air"}, 0, 7, 30, 5000, 5, mobs_mc.spawn_height.nether_min, mobs_mc.spawn_height.nether_max)
94 -- spawn eggs
95 mobs:register_egg("mobs_mc:witherskeleton", S("Wither Skeleton"), "mobs_mc_spawn_icon_witherskeleton.png", 0)
97 if minetest.settings:get_bool("log_mods") then
98 minetest.log("action", "MC Wither Skeleton loaded")
99 end