Version 0.42.1
[MineClone/MineClone2.git] / mods / ENTITIES / mobs_mc / squid.lua
blob721f861b84efd65ae990b9f371cebcc43a49063c
1 -- v1.1
3 --###################
4 --################### SQUID
5 --###################
7 -- intllib
8 local MP = minetest.get_modpath(minetest.get_current_modname())
9 local S, NS = dofile(MP.."/intllib.lua")
11 mobs:register_mob("mobs_mc:squid", {
12 type = "animal",
13 can_despawn = true,
14 passive = true,
15 hp_min = 10,
16 hp_max = 10,
17 armor = 100,
18 -- FIXME: If the squid is near the floor, it turns black
19 collisionbox = {-0.4, 0.1, -0.4, 0.4, 0.9, 0.4},
20 visual = "mesh",
21 mesh = "mobs_mc_squid.b3d",
22 textures = {
23 {"mobs_mc_squid.png"}
25 sounds = {
26 damage = "mobs_mc_squid_hurt",
27 death = "mobs_mc_squid_hurt",
28 -- TODO: sounds: random, damage, death
29 distance = 16,
31 animation = {
32 stand_start = 1,
33 stand_end = 60,
34 walk_start = 1,
35 walk_end = 60,
36 run_start = 1,
37 run_end = 60,
39 drops = {
40 {name = mobs_mc.items.black_dye,
41 chance = 1,
42 min = 1,
43 max = 3,},
45 visual_size = {x=1.75, y=1.75},
46 makes_footstep_sound = false,
47 stepheight = 0.1,
48 fly = true,
49 fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source },
50 jump = false,
51 fall_speed = 0.5,
52 view_range = 16,
53 water_damage = 0,
54 lava_damage = 4,
55 light_damage = 0,
56 runaway = true,
57 fear_height = 4,
58 blood_texture = "mobs_mc_squid_blood.png",
61 -- TODO: Behaviour: squirt
63 -- Spawn near the water surface
65 local water = mobs_mc.spawn_height.water
66 --name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height
67 mobs:spawn_specific("mobs_mc:squid", mobs_mc.spawn.water, {mobs_mc.items.water_source}, 0, minetest.LIGHT_MAX+1, 30, 5500, 3, water-16, water)
69 -- compatibility
70 mobs:alias_mob("mobs:squid", "mobs_mc:squid")
72 -- spawn eggs
73 mobs:register_egg("mobs_mc:squid", S("Squid"), "mobs_mc_spawn_icon_squid.png", 0)