Update helptext of obsidian
[MineClone/MineClone2.git] / mods / ENTITIES / mobs_mc / guardian.lua
blobb5c736c2772a604c4aaa67ebf78e50a62dbe3ec1
1 -- v1.4
3 --###################
4 --################### GUARDIAN
5 --###################
7 local S = minetest.get_translator("mobs_mc")
9 mobs:register_mob("mobs_mc:guardian", {
10 type = "monster",
11 spawn_class = "hostile",
12 hp_min = 30,
13 hp_max = 30,
14 breath_max = -1,
15 passive = false,
16 attack_type = "dogfight",
17 pathfinding = 1,
18 view_range = 16,
19 walk_velocity = 2,
20 run_velocity = 4,
21 damage = 6,
22 reach = 3,
23 collisionbox = {-0.425, 0.25, -0.425, 0.425, 1.1, 0.425},
24 visual = "mesh",
25 mesh = "mobs_mc_guardian.b3d",
26 textures = {
27 {"mobs_mc_guardian.png"},
29 visual_size = {x=3, y=3},
30 sounds = {
31 damage = "mobs_mc_squid_hurt",
32 -- TODO: more and better sounds
33 distance = 16,
35 animation = {
36 stand_speed = 25, walk_speed = 25, run_speed = 50,
37 stand_start = 0, stand_end = 20,
38 walk_start = 0, walk_end = 20,
39 run_start = 0, run_end = 20,
41 drops = {
42 -- Greatly increased amounts of prismarine
43 {name = mobs_mc.items.prismarine_shard,
44 chance = 1,
45 min = 0,
46 max = 32,},
47 -- TODO: Reduce of drops when ocean monument is ready.
49 -- The following drops are approximations
50 -- Fish / prismarine crystal
51 {name = mobs_mc.items.fish_raw,
52 chance = 4,
53 min = 1,
54 max = 1,},
55 {name = mobs_mc.items.prismarine_crystals,
56 chance = 4,
57 min = 1,
58 max = 2,},
60 -- Rare drop: fish
61 {name = mobs_mc.items.fish_raw,
62 chance = 160, -- 2.5% / 4
63 min = 1,
64 max = 1,},
65 {name = mobs_mc.items.salmon_raw,
66 chance = 160,
67 min = 1,
68 max = 1,},
69 {name = mobs_mc.items.clownfish_raw,
70 chance = 160,
71 min = 1,
72 max = 1,},
73 {name = mobs_mc.items.pufferfish_raw,
74 chance = 160,
75 min = 1,
76 max = 1,},
78 fly = true,
79 fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source },
80 jump = false,
81 view_range = 16,
84 -- Spawning disabled due to size issues
85 -- TODO: Re-enable spawning
86 --mobs:spawn_specific("mobs_mc:guardian", mobs_mc.spawn.water, mobs_mc.spawn_water, 0, minetest.LIGHT_MAX+1, 30, 25000, 2, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.water - 10)
88 -- spawn eggs
89 mobs:register_egg("mobs_mc:guardian", S("Guardian"), "mobs_mc_spawn_icon_guardian.png", 0)