MineClone2/mods/ENTITIES/mobs_mc/guardian.lua

106 lines
2.5 KiB
Lua
Raw Normal View History

2017-07-05 04:15:46 +03:00
--###################
--################### GUARDIAN
--###################
local S = minetest.get_translator("mobs_mc")
2017-07-05 04:15:46 +03:00
2022-05-25 15:44:49 +03:00
mcl_mobs:register_mob("mobs_mc:guardian", {
2021-04-25 18:30:15 +03:00
description = S("Guardian"),
2017-07-05 04:15:46 +03:00
type = "monster",
2020-04-11 03:46:03 +03:00
spawn_class = "hostile",
2017-07-05 04:15:46 +03:00
hp_min = 30,
hp_max = 30,
2020-12-06 16:46:42 +02:00
xp_min = 10,
xp_max = 10,
2019-10-02 19:31:16 +03:00
breath_max = -1,
passive = false,
attack_type = "dogfight",
2017-07-05 04:15:46 +03:00
pathfinding = 1,
view_range = 16,
walk_velocity = 2,
run_velocity = 4,
damage = 6,
2017-07-26 01:26:18 +03:00
reach = 3,
2017-07-05 04:15:46 +03:00
collisionbox = {-0.425, 0.25, -0.425, 0.425, 1.1, 0.425},
visual = "mesh",
mesh = "mobs_mc_guardian.b3d",
textures = {
{"mobs_mc_guardian.png"},
},
visual_size = {x=3, y=3},
sounds = {
2020-12-05 22:22:59 +02:00
random = "mobs_mc_guardian_random",
war_cry = "mobs_mc_guardian_random",
damage = {name="mobs_mc_guardian_hurt", gain=0.3},
death = "mobs_mc_guardian_death",
flop = "mobs_mc_squid_flop",
2017-07-05 04:15:46 +03:00
distance = 16,
},
animation = {
stand_speed = 25, walk_speed = 25, run_speed = 50,
stand_start = 0, stand_end = 20,
walk_start = 0, walk_end = 20,
run_start = 0, run_end = 20,
},
drops = {
2019-12-18 22:55:22 +02:00
-- Greatly increased amounts of prismarine
2017-07-05 04:15:46 +03:00
{name = mobs_mc.items.prismarine_shard,
chance = 1,
min = 0,
2020-12-23 18:41:42 +02:00
max = 32,
looting = "common",},
2019-12-18 22:55:22 +02:00
-- TODO: Reduce of drops when ocean monument is ready.
2017-07-05 04:15:46 +03:00
-- The following drops are approximations
-- Fish / prismarine crystal
{name = mobs_mc.items.fish_raw,
chance = 4,
min = 1,
2020-12-23 18:41:42 +02:00
max = 1,
looting = "common",},
2017-07-05 04:15:46 +03:00
{name = mobs_mc.items.prismarine_crystals,
chance = 4,
min = 1,
2020-12-23 18:41:42 +02:00
max = 2,
looting = "common",},
2017-07-05 04:15:46 +03:00
-- Rare drop: fish
{name = mobs_mc.items.fish_raw,
chance = 160, -- 2.5% / 4
min = 1,
2020-12-23 18:41:42 +02:00
max = 1,
looting = "rare",
looting_factor = 0.0025,},
2017-07-05 04:15:46 +03:00
{name = mobs_mc.items.salmon_raw,
chance = 160,
min = 1,
2020-12-23 18:41:42 +02:00
max = 1,
looting = "rare",
looting_factor = 0.0025,},
2017-07-05 04:15:46 +03:00
{name = mobs_mc.items.clownfish_raw,
chance = 160,
min = 1,
2020-12-23 18:41:42 +02:00
max = 1,
looting = "rare",
looting_factor = 0.0025,},
2017-07-05 04:15:46 +03:00
{name = mobs_mc.items.pufferfish_raw,
chance = 160,
min = 1,
2020-12-23 18:41:42 +02:00
max = 1,
looting = "rare",
looting_factor = 0.0025,},
2017-07-05 04:15:46 +03:00
},
fly = true,
makes_footstep_sound = false,
2017-11-30 16:36:17 +02:00
fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source },
jump = false,
view_range = 16,
2017-07-05 04:15:46 +03:00
})
2020-05-08 18:44:27 +03:00
-- Spawning disabled due to size issues
-- TODO: Re-enable spawning
2022-05-25 15:44:49 +03:00
--mcl_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)
2017-07-05 04:15:46 +03:00
-- spawn eggs
2022-05-25 15:44:49 +03:00
mcl_mobs:register_egg("mobs_mc:guardian", S("Guardian"), "mobs_mc_spawn_icon_guardian.png", 0)