1
0
Fork 0
DigWorks/mods/ENTITIES/mobs_mc/witch.lua

110 lines
2.9 KiB
Lua
Raw Normal View History

2017-07-05 03:15:46 +02:00
--MCmobs v0.2
--maikerumine
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
local S = minetest.get_translator("mobs_mc")
2017-07-05 03:15:46 +02:00
--###################
--################### WITCH
--###################
2022-05-25 14:44:49 +02:00
mcl_mobs:register_mob("mobs_mc:witch", {
2021-04-25 17:30:15 +02:00
description = S("Witch"),
2017-07-05 03:15:46 +02:00
type = "monster",
2020-04-11 02:46:03 +02:00
spawn_class = "hostile",
2017-07-05 03:15:46 +02:00
hp_min = 26,
hp_max = 26,
2020-12-06 15:46:42 +01:00
xp_min = 5,
xp_max = 5,
2017-07-05 03:15:46 +02: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"},
},
visual_size = {x=2.75, y=2.75},
2017-07-05 03:15:46 +02:00
makes_footstep_sound = true,
damage = 2,
2017-07-26 00:26:18 +02:00
reach = 2,
2017-07-05 03:15:46 +02:00
walk_velocity = 1.2,
run_velocity = 2.4,
2017-07-12 22:09:37 +02:00
pathfinding = 1,
2017-07-05 03:15:46 +02:00
group_attack = true,
attack_type = "dogshoot",
2019-12-10 01:01:04 +01:00
arrow = "mobs_mc:potion_arrow",
2017-07-05 03:15:46 +02:00
shoot_interval = 2.5,
shoot_offset = 1,
dogshoot_switch = 1,
dogshoot_count_max =1.8,
max_drops = 3,
drops = {
2022-05-25 23:25:15 +02: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 03:15:46 +02:00
},
-- TODO: sounds
2017-07-05 03:15:46 +02: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 01:01:04 +01:00
-- potion projectile (EXPERIMENTAL)
2022-05-25 14:44:49 +02:00
mcl_mobs:register_arrow("mobs_mc:potion_arrow", {
2017-07-05 03:15:46 +02: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 13:25:06 +01:00
hit_mob = function(self, mob)
mob:punch(self.object, 1.0, {
2017-07-05 03:15:46 +02: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 16:17:29 +01:00
--TODO
2017-07-05 03:15:46 +02:00
end
})
-- TODO: Spawn when witch works properly <- eventually -j4i
2022-05-25 23:25:15 +02: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 03:15:46 +02:00
-- spawn eggs
mcl_mobs:register_egg("mobs_mc:witch", S("Witch"), "#340000", "#51a03e", 0, true)
2021-03-07 00:42:34 +01:00
mcl_wip.register_wip_item("mobs_mc:witch")