2017-07-05 04:15:46 +03:00
|
|
|
--MCmobs v0.2
|
|
|
|
--maikerumine
|
|
|
|
--made for MC like Survival game
|
|
|
|
--License for code WTFPL and otherwise stated in readmes
|
|
|
|
|
2022-02-13 22:40:12 +02:00
|
|
|
local S = minetest.get_translator("mobs_mc")
|
2017-07-05 04:15:46 +03:00
|
|
|
|
|
|
|
--###################
|
|
|
|
--################### WITCH
|
|
|
|
--###################
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 15:44:49 +03:00
|
|
|
mcl_mobs:register_mob("mobs_mc:witch", {
|
2021-04-25 18:30:15 +03:00
|
|
|
description = S("Witch"),
|
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 = 26,
|
|
|
|
hp_max = 26,
|
2020-12-06 16:46:42 +02:00
|
|
|
xp_min = 5,
|
|
|
|
xp_max = 5,
|
2017-07-05 04:15:46 +03: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 15:32:02 +02:00
|
|
|
visual_size = {x=2.75, y=2.75},
|
2017-07-05 04:15:46 +03:00
|
|
|
makes_footstep_sound = true,
|
|
|
|
damage = 2,
|
2017-07-26 01:26:18 +03:00
|
|
|
reach = 2,
|
2017-07-05 04:15:46 +03:00
|
|
|
walk_velocity = 1.2,
|
|
|
|
run_velocity = 2.4,
|
2017-07-12 23:09:37 +03:00
|
|
|
pathfinding = 1,
|
2017-07-05 04:15:46 +03:00
|
|
|
group_attack = true,
|
2022-02-13 22:40:12 +02:00
|
|
|
attack_type = "dogshoot",
|
2019-12-10 02:01:04 +02:00
|
|
|
arrow = "mobs_mc:potion_arrow",
|
2017-07-05 04:15:46 +03:00
|
|
|
shoot_interval = 2.5,
|
|
|
|
shoot_offset = 1,
|
|
|
|
dogshoot_switch = 1,
|
|
|
|
dogshoot_count_max =1.8,
|
|
|
|
max_drops = 3,
|
|
|
|
drops = {
|
2022-05-26 00:25:15 +03:00
|
|
|
{name = "mcl_potions:glass_bottle", chance = 8, min = 0, max = 2, looting = "common",},
|
|
|
|
{name = "mcl_nether:glowstone_dust", chance = 8, min = 0, max = 2, looting = "common",},
|
|
|
|
{name = "mcl_mobitems:gunpowder", chance = 8, min = 0, max = 2, looting = "common",},
|
|
|
|
{name = "mesecons:redstone", chance = 8, min = 0, max = 2, looting = "common",},
|
|
|
|
{name = "mcl_mobitems:spider_eye", chance = 8, min = 0, max = 2, looting = "common",},
|
|
|
|
{name = "mcl_core:sugar", chance = 8, min = 0, max = 2, looting = "common",},
|
|
|
|
{name = "mcl_core:stick", chance = 4, min = 0, max = 2, looting = "common",},
|
2017-07-05 04:15:46 +03:00
|
|
|
},
|
2018-09-14 17:27:58 +03:00
|
|
|
-- TODO: sounds
|
2017-07-05 04:15:46 +03: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 02:01:04 +02:00
|
|
|
-- potion projectile (EXPERIMENTAL)
|
2022-05-25 15:44:49 +03:00
|
|
|
mcl_mobs:register_arrow("mobs_mc:potion_arrow", {
|
2017-07-05 04:15:46 +03: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 14:25:06 +02:00
|
|
|
hit_mob = function(self, mob)
|
|
|
|
mob:punch(self.object, 1.0, {
|
2017-07-05 04:15:46 +03: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 17:17:29 +02:00
|
|
|
--TODO
|
2017-07-05 04:15:46 +03:00
|
|
|
end
|
|
|
|
})
|
|
|
|
|
2021-04-07 19:47:40 +03:00
|
|
|
-- TODO: Spawn when witch works properly <- eventually -j4i
|
2022-05-26 00:25:15 +03:00
|
|
|
--mcl_mobs:spawn_specific("mobs_mc:witch", { "mcl_core:jungletree", "mcl_core:jungleleaves", "mcl_flowers:fern", "mcl_core:vine" }, {"air"}, 0, minetest.LIGHT_MAX-6, 12, 20000, 2, mobs_mc.water_level-6, mcl_vars.mg_overworld_max)
|
2017-07-05 04:15:46 +03:00
|
|
|
|
|
|
|
-- spawn eggs
|
2022-10-03 20:52:22 +03:00
|
|
|
mcl_mobs:register_egg("mobs_mc:witch", S("Witch"), "#340000", "#51a03e", 0, true)
|
2021-03-07 01:42:34 +02:00
|
|
|
|
|
|
|
mcl_wip.register_wip_item("mobs_mc:witch")
|