2017-07-05 01:15:46 +00:00
|
|
|
--MCmobs v0.2
|
|
|
|
--maikerumine
|
|
|
|
--made for MC like Survival game
|
|
|
|
--License for code WTFPL and otherwise stated in readmes
|
|
|
|
|
2019-03-07 19:43:39 +00:00
|
|
|
local S = minetest.get_translator("mobs_mc")
|
2017-07-05 01:15:46 +00:00
|
|
|
|
|
|
|
--###################
|
|
|
|
--################### WITCH
|
|
|
|
--###################
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mobs:register_mob("mobs_mc:witch", {
|
2021-05-09 00:55:12 +00:00
|
|
|
description = S("Witch"),
|
2017-07-05 01:15:46 +00:00
|
|
|
type = "monster",
|
2020-04-11 00:46:03 +00:00
|
|
|
spawn_class = "hostile",
|
2017-07-05 01:15:46 +00:00
|
|
|
hp_min = 26,
|
|
|
|
hp_max = 26,
|
2020-12-06 14:46:42 +00:00
|
|
|
xp_min = 5,
|
|
|
|
xp_max = 5,
|
2017-07-05 01:15:46 +00:00
|
|
|
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
|
|
|
|
visual = "mesh",
|
|
|
|
mesh = "mobs_mc_witch.b3d",
|
|
|
|
textures = {
|
|
|
|
{"mobs_mc_witch.png"},
|
|
|
|
},
|
2021-03-19 13:32:02 +00:00
|
|
|
visual_size = {x=2.75, y=2.75},
|
2017-07-05 01:15:46 +00:00
|
|
|
makes_footstep_sound = true,
|
|
|
|
damage = 2,
|
2017-07-25 22:26:18 +00:00
|
|
|
reach = 2,
|
2017-07-05 01:15:46 +00:00
|
|
|
walk_velocity = 1.2,
|
|
|
|
run_velocity = 2.4,
|
2017-07-12 20:09:37 +00:00
|
|
|
pathfinding = 1,
|
2017-07-05 01:15:46 +00:00
|
|
|
group_attack = true,
|
2021-05-09 00:55:12 +00:00
|
|
|
attack_type = "projectile",
|
2019-12-10 00:01:04 +00:00
|
|
|
arrow = "mobs_mc:potion_arrow",
|
2017-07-05 01:15:46 +00:00
|
|
|
shoot_interval = 2.5,
|
|
|
|
shoot_offset = 1,
|
|
|
|
dogshoot_switch = 1,
|
|
|
|
dogshoot_count_max =1.8,
|
|
|
|
max_drops = 3,
|
|
|
|
drops = {
|
2020-12-23 16:41:42 +00:00
|
|
|
{name = mobs_mc.items.glass_bottle, chance = 8, min = 0, max = 2, looting = "common",},
|
|
|
|
{name = mobs_mc.items.glowstone_dust, chance = 8, min = 0, max = 2, looting = "common",},
|
|
|
|
{name = mobs_mc.items.gunpowder, chance = 8, min = 0, max = 2, looting = "common",},
|
|
|
|
{name = mobs_mc.items.redstone, chance = 8, min = 0, max = 2, looting = "common",},
|
|
|
|
{name = mobs_mc.items.spider_eye, chance = 8, min = 0, max = 2, looting = "common",},
|
|
|
|
{name = mobs_mc.items.sugar, chance = 8, min = 0, max = 2, looting = "common",},
|
|
|
|
{name = mobs_mc.items.stick, chance = 4, min = 0, max = 2, looting = "common",},
|
2017-07-05 01:15:46 +00:00
|
|
|
},
|
2018-09-14 14:27:58 +00:00
|
|
|
-- TODO: sounds
|
2017-07-05 01:15:46 +00:00
|
|
|
animation = {
|
|
|
|
speed_normal = 30,
|
|
|
|
speed_run = 60,
|
|
|
|
stand_start = 0,
|
|
|
|
stand_end = 0,
|
|
|
|
walk_start = 0,
|
|
|
|
walk_end = 40,
|
|
|
|
run_start = 0,
|
|
|
|
run_end = 40,
|
|
|
|
hurt_start = 85,
|
|
|
|
hurt_end = 115,
|
|
|
|
death_start = 117,
|
|
|
|
death_end = 145,
|
|
|
|
shoot_start = 50,
|
|
|
|
shoot_end = 82,
|
|
|
|
},
|
|
|
|
view_range = 16,
|
|
|
|
fear_height = 4,
|
|
|
|
})
|
|
|
|
|
2019-12-10 00:01:04 +00:00
|
|
|
-- potion projectile (EXPERIMENTAL)
|
|
|
|
mobs:register_arrow("mobs_mc:potion_arrow", {
|
2017-07-05 01:15:46 +00:00
|
|
|
visual = "sprite",
|
|
|
|
visual_size = {x = 0.5, y = 0.5},
|
|
|
|
--textures = {"vessels_glass_bottle.png"}, --TODO fix to else if default
|
|
|
|
textures = {"mcl_potions_dragon_breath.png"},
|
|
|
|
velocity = 6,
|
|
|
|
|
|
|
|
-- direct hit, no fire... just plenty of pain
|
|
|
|
hit_player = function(self, player)
|
|
|
|
player:punch(self.object, 1.0, {
|
|
|
|
full_punch_interval = 1.0,
|
|
|
|
damage_groups = {fleshy = 2},
|
|
|
|
}, nil)
|
|
|
|
end,
|
|
|
|
|
2019-03-11 12:25:06 +00:00
|
|
|
hit_mob = function(self, mob)
|
|
|
|
mob:punch(self.object, 1.0, {
|
2017-07-05 01:15:46 +00:00
|
|
|
full_punch_interval = 1.0,
|
|
|
|
damage_groups = {fleshy = 2},
|
|
|
|
}, nil)
|
|
|
|
end,
|
|
|
|
|
|
|
|
-- node hit, bursts into flame
|
|
|
|
hit_node = function(self, pos, node)
|
2020-01-30 15:17:29 +00:00
|
|
|
--TODO
|
2017-07-05 01:15:46 +00:00
|
|
|
end
|
|
|
|
})
|
|
|
|
|
2021-04-07 16:47:40 +00:00
|
|
|
-- TODO: Spawn when witch works properly <- eventually -j4i
|
2017-08-16 20:08:17 +00:00
|
|
|
--mobs:spawn_specific("mobs_mc:witch", mobs_mc.spawn.jungle, {"air"}, 0, minetest.LIGHT_MAX-6, 12, 20000, 2, mobs_mc.spawn_height.water-6, mobs_mc.spawn_height.overworld_max)
|
2017-07-05 01:15:46 +00:00
|
|
|
|
|
|
|
-- spawn eggs
|
2019-12-10 23:46:55 +00:00
|
|
|
mobs:register_egg("mobs_mc:witch", S("Witch"), "mobs_mc_spawn_icon_witch.png", 0, true)
|
2021-03-06 23:42:34 +00:00
|
|
|
|
|
|
|
mcl_wip.register_wip_item("mobs_mc:witch")
|