2017-01-16 17:40:08 +01:00
|
|
|
--MCmobs v0.2
|
|
|
|
--maikerumine
|
|
|
|
--made for MC like Survival game
|
|
|
|
--License for code WTFPL and otherwise stated in readmes
|
|
|
|
|
|
|
|
|
|
|
|
--dofile(minetest.get_modpath("mobs").."/api.lua")
|
|
|
|
|
|
|
|
mobs:register_mob("mobs_mc:skeleton", {
|
|
|
|
type = "monster",
|
2017-03-05 05:14:31 +01:00
|
|
|
hp_min = 20,
|
|
|
|
hp_max = 20,
|
2017-01-16 17:40:08 +01:00
|
|
|
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
|
2017-03-03 01:27:10 +01:00
|
|
|
pathfinding = 1,
|
2017-01-16 17:40:08 +01:00
|
|
|
group_attack = true,
|
|
|
|
visual = "mesh",
|
|
|
|
mesh = "mobs_skeleton.x",
|
|
|
|
textures = {
|
|
|
|
{"mobs_skeleton.png"}
|
|
|
|
},
|
|
|
|
makes_footstep_sound = true,
|
|
|
|
sounds = {
|
|
|
|
random = "skeleton1",
|
|
|
|
death = "skeletondeath",
|
|
|
|
damage = "skeletonhurt1",
|
|
|
|
},
|
|
|
|
walk_velocity = 1.2,
|
|
|
|
run_velocity = 2.4,
|
|
|
|
damage = 1,
|
2017-03-05 05:14:31 +01:00
|
|
|
armor = 100,
|
2017-01-16 17:40:08 +01:00
|
|
|
drops = {
|
2017-01-16 23:11:04 +01:00
|
|
|
{name = "mcl_throwing:arrow",
|
2017-01-16 17:40:08 +01:00
|
|
|
chance = 1,
|
|
|
|
min = 0,
|
|
|
|
max = 2,},
|
2017-02-01 17:59:15 +01:00
|
|
|
{name = "mcl_mobitems:bone",
|
2017-01-16 17:40:08 +01:00
|
|
|
chance = 1,
|
|
|
|
min = 0,
|
|
|
|
max = 2,},
|
|
|
|
},
|
|
|
|
animation = {
|
|
|
|
speed_normal = 30,
|
|
|
|
speed_run = 60,
|
|
|
|
stand_start = 0,
|
|
|
|
stand_end = 23,
|
|
|
|
walk_start = 24,
|
|
|
|
walk_end = 49,
|
|
|
|
run_start = 24,
|
|
|
|
run_end = 49,
|
|
|
|
hurt_start = 85,
|
|
|
|
hurt_end = 115,
|
|
|
|
death_start = 117,
|
|
|
|
death_end = 145,
|
|
|
|
shoot_start = 50,
|
|
|
|
shoot_end = 82,
|
|
|
|
},
|
|
|
|
drawtype = "front",
|
2017-02-23 19:52:07 +01:00
|
|
|
lava_damage = minetest.registered_nodes["mcl_core:lava_source"].damage_per_second,
|
|
|
|
-- TODO: Mob should burn only in direct sunlight
|
2017-01-16 17:40:08 +01:00
|
|
|
light_damage = 1,
|
|
|
|
view_range = 16,
|
|
|
|
attack_type = "dogshoot",
|
2017-01-16 23:11:04 +01:00
|
|
|
arrow = "mcl_throwing:arrow_entity",
|
2017-01-16 17:40:08 +01:00
|
|
|
shoot_interval = 2.5,
|
|
|
|
shoot_offset = 1,
|
|
|
|
--'dogshoot_switch' allows switching between shoot and dogfight modes inside dogshoot using timer (1 = shoot, 2 = dogfight)
|
|
|
|
--'dogshoot_count_max' number of seconds before switching above modes.
|
|
|
|
dogshoot_switch = 1,
|
|
|
|
dogshoot_count_max =3,
|
|
|
|
})
|
2017-02-20 03:00:03 +01:00
|
|
|
mobs:register_spawn("mobs_mc:skeleton", {"group:solid"}, 7, -1, 5000, 4, 31000)
|
2017-01-16 17:40:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
mobs:register_mob("mobs_mc:skeleton2", {
|
|
|
|
type = "monster",
|
2017-03-05 05:14:31 +01:00
|
|
|
hp_min = 20,
|
|
|
|
hp_max = 20,
|
|
|
|
collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3},
|
2017-03-03 01:27:10 +01:00
|
|
|
pathfinding = 1,
|
2017-03-05 05:14:31 +01:00
|
|
|
group_attack = false,
|
2017-01-16 17:40:08 +01:00
|
|
|
visual = "mesh",
|
2017-03-05 05:14:31 +01:00
|
|
|
mesh = "3d_armor_character.b3d",
|
2017-01-16 17:40:08 +01:00
|
|
|
textures = {
|
2017-03-05 05:14:31 +01:00
|
|
|
{"mobs_skeleton2.png",
|
|
|
|
"3d_armor_trans.png",
|
|
|
|
minetest.registered_items["mcl_tools:sword_stone"].inventory_image,
|
|
|
|
},
|
2017-01-16 17:40:08 +01:00
|
|
|
},
|
|
|
|
makes_footstep_sound = true,
|
|
|
|
sounds = {
|
|
|
|
random = "skeleton1",
|
|
|
|
death = "skeletondeath",
|
|
|
|
damage = "skeletonhurt1",
|
|
|
|
},
|
|
|
|
walk_velocity = 1.2,
|
|
|
|
run_velocity = 2.4,
|
2017-03-05 05:14:31 +01:00
|
|
|
damage = 7,
|
|
|
|
armor = 100,
|
2017-01-16 17:40:08 +01:00
|
|
|
drops = {
|
2017-01-31 23:32:56 +01:00
|
|
|
{name = "mcl_core:coal_lump",
|
2017-01-16 17:40:08 +01:00
|
|
|
chance = 1,
|
|
|
|
min = 0,
|
|
|
|
max = 1,},
|
2017-02-01 17:59:15 +01:00
|
|
|
{name = "mcl_mobitems:bone",
|
2017-01-16 17:40:08 +01:00
|
|
|
chance = 1,
|
|
|
|
min = 0,
|
|
|
|
max = 2,},
|
2017-01-31 10:05:32 +01:00
|
|
|
{name = "mcl_heads:wither_skeleton",
|
2017-01-16 23:11:04 +01:00
|
|
|
chance = 40,
|
|
|
|
min = 1,
|
|
|
|
max = 1,},
|
2017-01-16 17:40:08 +01:00
|
|
|
},
|
|
|
|
animation = {
|
2017-03-05 05:14:31 +01:00
|
|
|
speed_normal = 30, speed_run = 30,
|
|
|
|
stand_start = 0, stand_end = 79,
|
|
|
|
walk_start = 168, walk_end = 187,
|
|
|
|
run_start = 168, run_end = 187,
|
|
|
|
punch_start = 200, punch_end = 219,
|
2017-01-16 17:40:08 +01:00
|
|
|
},
|
|
|
|
drawtype = "front",
|
|
|
|
water_damage = 1,
|
|
|
|
lava_damage = 0,
|
|
|
|
light_damage = 0,
|
|
|
|
view_range = 16,
|
2017-03-05 05:14:31 +01:00
|
|
|
attack_type = "dogfight",
|
2017-01-16 17:40:08 +01:00
|
|
|
})
|
2017-02-27 18:53:17 +01:00
|
|
|
mobs:register_spawn("mobs_mc:skeleton2", {"group:solid"}, 7, -1, 5000, 4, -3000)
|
2017-01-16 17:40:08 +01:00
|
|
|
|
|
|
|
|
2017-01-24 02:31:49 +01:00
|
|
|
local arrows = {
|
2017-01-16 23:11:04 +01:00
|
|
|
{"mcl_throwing:arrow", "mcl_throwing:arrow_entity" },
|
2017-01-16 17:40:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
-- compatibility
|
|
|
|
mobs:alias_mob("mobs:skeleton", "mobs_mc:skeleton")
|
|
|
|
|
|
|
|
-- spawn eggs
|
2017-01-17 00:05:12 +01:00
|
|
|
mobs:register_egg("mobs_mc:skeleton", "Spawn Skeleton", "spawn_egg_skeleton.png")
|
2017-01-17 00:09:23 +01:00
|
|
|
mobs:register_egg("mobs_mc:skeleton2", "Spawn Wither Skeleton", "spawn_egg_wither_skeleton.png")
|
2017-01-16 17:40:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
if minetest.setting_get("log_mods") then
|
|
|
|
minetest.log("action", "MC Skeleton loaded")
|
|
|
|
end
|