2017-07-05 04:15:46 +03:00
|
|
|
-- v1.1
|
|
|
|
|
|
|
|
--###################
|
|
|
|
--################### SQUID
|
|
|
|
--###################
|
|
|
|
|
2019-03-07 22:43:39 +03:00
|
|
|
local S = minetest.get_translator("mobs_mc")
|
2017-07-05 04:15:46 +03:00
|
|
|
|
|
|
|
mobs:register_mob("mobs_mc:squid", {
|
|
|
|
type = "animal",
|
2020-04-11 03:46:03 +03:00
|
|
|
spawn_class = "water",
|
2018-09-14 15:48:48 +03:00
|
|
|
can_despawn = true,
|
2017-07-05 04:15:46 +03:00
|
|
|
passive = true,
|
|
|
|
hp_min = 10,
|
|
|
|
hp_max = 10,
|
2020-12-06 17:46:42 +03:00
|
|
|
xp_min = 1,
|
|
|
|
xp_max = 3,
|
2017-07-05 04:15:46 +03:00
|
|
|
armor = 100,
|
|
|
|
-- FIXME: If the squid is near the floor, it turns black
|
2020-02-20 00:28:18 +03:00
|
|
|
collisionbox = {-0.4, 0.0, -0.4, 0.4, 0.9, 0.4},
|
2017-07-05 04:15:46 +03:00
|
|
|
visual = "mesh",
|
|
|
|
mesh = "mobs_mc_squid.b3d",
|
|
|
|
textures = {
|
|
|
|
{"mobs_mc_squid.png"}
|
|
|
|
},
|
|
|
|
sounds = {
|
2020-12-07 05:01:04 +03:00
|
|
|
damage = {name="mobs_mc_squid_hurt", gain=0.3},
|
|
|
|
death = {name="mobs_mc_squid_death", gain=0.4},
|
2020-12-05 23:33:37 +03:00
|
|
|
flop = "mobs_mc_squid_flop",
|
2020-12-07 05:01:04 +03:00
|
|
|
-- TODO: sounds: random
|
2017-07-05 04:15:46 +03:00
|
|
|
distance = 16,
|
|
|
|
},
|
|
|
|
animation = {
|
|
|
|
stand_start = 1,
|
|
|
|
stand_end = 60,
|
|
|
|
walk_start = 1,
|
|
|
|
walk_end = 60,
|
|
|
|
run_start = 1,
|
|
|
|
run_end = 60,
|
|
|
|
},
|
|
|
|
drops = {
|
|
|
|
{name = mobs_mc.items.black_dye,
|
|
|
|
chance = 1,
|
|
|
|
min = 1,
|
2020-12-23 19:41:42 +03:00
|
|
|
max = 3,
|
|
|
|
looting = "common",},
|
2017-07-05 04:15:46 +03:00
|
|
|
},
|
2020-02-20 00:28:18 +03:00
|
|
|
visual_size = {x=3, y=3},
|
2017-07-05 04:15:46 +03:00
|
|
|
makes_footstep_sound = false,
|
|
|
|
fly = true,
|
2017-11-30 17:36:17 +03:00
|
|
|
fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source },
|
2019-10-02 19:31:16 +03:00
|
|
|
breathes_in_water = true,
|
2018-01-07 20:03:03 +03:00
|
|
|
jump = false,
|
2017-07-05 04:15:46 +03:00
|
|
|
view_range = 16,
|
|
|
|
runaway = true,
|
|
|
|
fear_height = 4,
|
|
|
|
})
|
|
|
|
|
2018-09-14 17:27:58 +03:00
|
|
|
-- TODO: Behaviour: squirt
|
|
|
|
|
2017-07-05 04:15:46 +03:00
|
|
|
-- Spawn near the water surface
|
|
|
|
|
2017-08-16 23:08:17 +03:00
|
|
|
local water = mobs_mc.spawn_height.water
|
2017-07-05 04:15:46 +03:00
|
|
|
--name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height
|
2021-04-07 18:20:56 +03:00
|
|
|
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)
|
2017-07-05 04:15:46 +03:00
|
|
|
|
|
|
|
-- spawn eggs
|
|
|
|
mobs:register_egg("mobs_mc:squid", S("Squid"), "mobs_mc_spawn_icon_squid.png", 0)
|