smart_mobs/dungeonmaster.lua

89 lines
1.9 KiB
Lua
Raw Permalink Normal View History

2014-11-09 11:13:11 -08:00
-- Dungeon Master by PilzAdam
2014-11-09 11:13:11 -08:00
mobs:register_mob("mobs:dungeon_master", {
type = "monster",
passive = false,
damage = 4,
attack_type = "dogshoot",
reach = 3,
shoot_interval = 2.5,
arrow = "mobs:fireball",
2015-07-06 06:07:40 -07:00
shoot_offset = 1,
2015-04-09 08:09:10 -07:00
hp_min = 12,
hp_max = 35,
armor = 60,
collisionbox = {-0.7, -1, -0.7, 0.7, 1.6, 0.7},
2014-11-09 11:13:11 -08:00
visual = "mesh",
mesh = "mobs_dungeon_master.b3d",
textures = {
{"mobs_dungeon_master.png"},
{"mobs_dungeon_master2.png"},
{"mobs_dungeon_master3.png"},
2014-12-03 11:45:18 -08:00
},
2014-11-09 11:13:11 -08:00
makes_footstep_sound = true,
sounds = {
random = "mobs_dungeonmaster",
shoot_attack = "mobs_fireball",
},
2014-11-09 11:13:11 -08:00
walk_velocity = 1,
run_velocity = 3,
jump = true,
view_range = 15,
2014-11-09 11:13:11 -08:00
drops = {
{name = "default:mese_crystal_fragment",
2015-07-03 07:18:28 -07:00
chance = 1, min = 1, max = 3},
2014-11-09 11:13:11 -08:00
{name = "default:diamond",
2015-07-03 07:18:28 -07:00
chance = 4, min = 1, max = 1},
2014-11-09 11:13:11 -08:00
{name = "default:mese_crystal",
2015-07-03 07:18:28 -07:00
chance = 2, min = 1, max = 2},
2015-10-12 02:00:47 -07:00
{name = "default:diamondblock",
2015-07-03 07:18:28 -07:00
chance = 30, min = 1, max = 1},
2014-11-09 11:13:11 -08:00
},
water_damage = 1,
lava_damage = 1,
light_damage = 0,
fear_height = 3,
2014-11-09 11:13:11 -08:00
animation = {
2015-07-03 07:18:28 -07: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,
},
2014-11-09 11:13:11 -08:00
})
2015-04-09 08:09:10 -07:00
mobs:register_spawn("mobs:dungeon_master", {"default:stone"}, 7, 0, 7000, 2, -70)
2015-04-09 08:09:10 -07:00
2015-02-20 08:37:36 -08:00
mobs:register_egg("mobs:dungeon_master", "Dungeon Master", "fire_basic_flame.png", 1)
2014-11-09 11:13:11 -08:00
2015-04-09 08:09:10 -07:00
-- fireball (weapon)
2014-11-09 11:13:11 -08:00
mobs:register_arrow("mobs:fireball", {
visual = "sprite",
2015-07-03 07:18:28 -07:00
visual_size = {x = 1, y = 1},
2014-11-09 11:13:11 -08:00
textures = {"mobs_fireball.png"},
2015-04-04 02:43:17 -07:00
velocity = 6,
2014-11-09 11:13:11 -08:00
-- direct hit, no fire... just plenty of pain
hit_player = function(self, player)
player:punch(self.object, 1.0, {
2015-07-03 07:18:28 -07:00
full_punch_interval = 1.0,
damage_groups = {fleshy = 8},
2015-09-08 11:02:53 -07:00
}, nil)
2015-04-04 01:57:00 -07:00
end,
hit_mob = function(self, player)
player:punch(self.object, 1.0, {
2015-07-03 07:18:28 -07:00
full_punch_interval = 1.0,
damage_groups = {fleshy = 8},
2015-09-08 11:02:53 -07:00
}, nil)
2014-11-09 11:13:11 -08:00
end,
-- node hit, bursts into flame
2014-11-09 11:13:11 -08:00
hit_node = function(self, pos, node)
mobs:explosion(pos, 1, 1, 0)
2014-11-09 11:13:11 -08:00
end
2015-07-03 07:18:28 -07:00
})