2015-04-11 21:54:04 +02:00
|
|
|
|
|
|
|
-- Dungeon Master by PilzAdam
|
|
|
|
|
|
|
|
mobs:register_mob("mobs:dungeon_master", {
|
2015-04-20 23:07:51 +02:00
|
|
|
-- animal, monster, npc, barbarian
|
2015-04-11 21:54:04 +02:00
|
|
|
type = "monster",
|
2015-04-20 23:07:51 +02:00
|
|
|
-- aggressive, shoots fireballs at player, deal 13 damages
|
2015-04-11 21:54:04 +02:00
|
|
|
passive = false,
|
2016-02-18 18:34:19 +01:00
|
|
|
pathfinding = true,
|
2015-07-13 23:12:30 +02:00
|
|
|
damage = 12,
|
2015-09-30 03:43:51 +02:00
|
|
|
attack_type = "dogshoot",
|
|
|
|
reach = 3,
|
2015-04-11 21:54:04 +02:00
|
|
|
shoot_interval = 2.5,
|
|
|
|
arrow = "mobs:fireball",
|
2015-07-16 00:15:56 +02:00
|
|
|
shoot_offset = 1,
|
2015-04-11 21:54:04 +02:00
|
|
|
-- health & armor
|
2015-10-08 09:51:14 +02:00
|
|
|
hp_min = 50,
|
|
|
|
hp_max = 60,
|
2015-09-25 21:38:03 +02:00
|
|
|
armor = 80,
|
2015-04-20 23:07:51 +02:00
|
|
|
-- textures and model
|
2015-07-16 00:15:56 +02:00
|
|
|
collisionbox = {-0.7, -1, -0.7, 0.7, 1.6, 0.7},
|
2015-04-11 21:54:04 +02:00
|
|
|
visual = "mesh",
|
2015-07-15 23:31:54 +02:00
|
|
|
mesh = "mobs_dungeon_master.b3d",
|
2015-04-11 21:54:04 +02:00
|
|
|
textures = {
|
|
|
|
{"mobs_dungeon_master.png"},
|
|
|
|
{"mobs_dungeon_master_cobblestone.png"},
|
|
|
|
{"mobs_dungeon_master_strangewhite.png"},
|
|
|
|
},
|
|
|
|
blood_texture = "mobs_blood.png",
|
|
|
|
-- sounds
|
|
|
|
makes_footstep_sound = true,
|
|
|
|
sounds = {
|
|
|
|
random = "mobs_dungeonmaster",
|
2015-09-30 03:43:51 +02:00
|
|
|
shoot_attack = "mobs_fireball",
|
2015-04-11 21:54:04 +02:00
|
|
|
},
|
2015-04-20 23:07:51 +02:00
|
|
|
-- speed and jump
|
2015-04-11 21:54:04 +02:00
|
|
|
walk_velocity = 1,
|
|
|
|
run_velocity = 2,
|
|
|
|
jump = false,
|
|
|
|
view_range = 16,
|
2015-08-18 17:09:53 +02:00
|
|
|
knock_back = 0.05, -- Very small knockback
|
2015-04-11 21:54:04 +02:00
|
|
|
-- drops mese or diamond when dead
|
|
|
|
drops = {
|
2016-02-10 05:02:17 +01:00
|
|
|
{name = "mobs:dungeon_master_blood", chance = 2, min = 1, max = 2,},
|
|
|
|
{name = "default:diamond", chance = 4, min = 1, max = 3,},
|
|
|
|
{name = "default:mese_crystal", chance = 4, min = 3, max = 6,},
|
|
|
|
{name = "mobs:dungeon_master_diamond", chance = 6, min = 1, max = 1,},
|
|
|
|
{name = "maptools:gold_coin", chance = 20, min = 1, max = 1,},
|
|
|
|
{name = "default:diamondblock", chance = 33, min = 1, max = 1,},
|
2015-04-11 21:54:04 +02:00
|
|
|
},
|
2015-04-20 23:07:51 +02:00
|
|
|
-- damaged by
|
2015-04-11 21:54:04 +02:00
|
|
|
water_damage = 1,
|
|
|
|
lava_damage = 1,
|
|
|
|
light_damage = 0,
|
2015-12-18 21:13:20 +01:00
|
|
|
fear_height = 3,
|
2015-04-20 23:07:51 +02:00
|
|
|
-- model animation
|
2015-04-11 21:54:04 +02:00
|
|
|
animation = {
|
2015-12-18 21:13:20 +01:00
|
|
|
stand_start = 0,
|
|
|
|
stand_end = 19,
|
|
|
|
walk_start = 20,
|
|
|
|
walk_end = 35,
|
|
|
|
punch_start = 36,
|
|
|
|
punch_end = 48,
|
|
|
|
speed_normal = 15,
|
|
|
|
speed_run = 15,
|
2015-04-11 21:54:04 +02:00
|
|
|
},
|
|
|
|
})
|
|
|
|
-- spawn on stone between 20 and -1 light, 1 in 7000 chance, 1 dungeon master in area starting at -100 and below
|
2015-07-21 21:57:32 +02:00
|
|
|
mobs:spawn_specific("mobs:dungeon_master", {"default:stone", "default:sandstone", "nether:netherrack"}, {"air"}, -1, 20, 30, 7000, 1, -31000, -250, false)
|
2015-04-11 21:54:04 +02:00
|
|
|
-- register spawn egg
|
2015-08-17 22:52:29 +02:00
|
|
|
mobs:register_egg("mobs:dungeon_master", "Dungeon Master", "mobs_dongeon_master_inv.png", 1)
|
2015-04-11 21:54:04 +02:00
|
|
|
|
|
|
|
-- fireball (weapon)
|
|
|
|
mobs:register_arrow("mobs:fireball", {
|
|
|
|
visual = "sprite",
|
2015-08-18 17:09:53 +02:00
|
|
|
visual_size = {x = 1, y = 1},
|
2015-04-11 21:54:04 +02:00
|
|
|
textures = {"mobs_fireball.png"},
|
|
|
|
velocity = 6,
|
|
|
|
|
|
|
|
-- direct hit, no fire... just plenty of pain
|
|
|
|
hit_player = function(self, player)
|
2015-09-14 18:53:48 +02:00
|
|
|
player:punch(self.object, 1.0, {
|
2015-08-18 17:09:53 +02:00
|
|
|
full_punch_interval = 1.0,
|
|
|
|
damage_groups = {fleshy = 12},
|
2015-09-14 18:53:48 +02:00
|
|
|
}, nil)
|
2015-04-11 21:54:04 +02:00
|
|
|
end,
|
|
|
|
|
|
|
|
hit_mob = function(self, player)
|
2015-09-14 18:53:48 +02:00
|
|
|
player:punch(self.object, 1.0, {
|
2015-08-18 17:09:53 +02:00
|
|
|
full_punch_interval = 1.0,
|
|
|
|
damage_groups = {fleshy = 12},
|
2015-09-14 18:53:48 +02:00
|
|
|
}, nil)
|
2015-04-11 21:54:04 +02:00
|
|
|
end,
|
|
|
|
|
2016-02-01 12:45:12 +01:00
|
|
|
-- node hit, bursts into flame
|
2015-04-11 21:54:04 +02:00
|
|
|
hit_node = function(self, pos, node)
|
2015-04-21 11:54:43 +02:00
|
|
|
mobs:explosion(pos, 1, 1, 0)
|
2015-04-11 21:54:04 +02:00
|
|
|
end
|
|
|
|
})
|
2015-06-28 00:17:30 +02:00
|
|
|
|
|
|
|
minetest.register_craftitem("mobs:dungeon_master_blood", {
|
|
|
|
description = "Dungeon Master Blood",
|
|
|
|
inventory_image = "mobs_dungeon_master_blood.png",
|
|
|
|
groups = {magic = 1},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("mobs:dungeon_master_diamond", {
|
|
|
|
description = "Dungeon Master Diamond",
|
|
|
|
inventory_image = "mobs_dungeon_master_diamond.png",
|
|
|
|
groups = {magic = 1},
|
|
|
|
})
|