diff --git a/spawners_mobs/_material/fire_bolt.xcf b/spawners_mobs/_material/fire_bolt.xcf new file mode 100644 index 0000000..7d3bf93 Binary files /dev/null and b/spawners_mobs/_material/fire_bolt.xcf differ diff --git a/spawners_mobs/_material/spawners_mobs_mummy_shoot.ogg b/spawners_mobs/_material/spawners_mobs_mummy_shoot.ogg new file mode 100644 index 0000000..1696c65 Binary files /dev/null and b/spawners_mobs/_material/spawners_mobs_mummy_shoot.ogg differ diff --git a/spawners_mobs/mob_balrog.lua b/spawners_mobs/mob_balrog.lua index cd68f5d..3b98b55 100644 --- a/spawners_mobs/mob_balrog.lua +++ b/spawners_mobs/mob_balrog.lua @@ -7,7 +7,12 @@ local balrog_def = { hp_min = 1000, hp_max = 1250, pathfinding = false, - attack_type = "dogfight", + attack_type = "dogshoot", + shoot_interval = 0.6, + dogshoot_switch = 1, + dogshoot_count_max = 10, + shoot_offset = 1, + arrow = "spawners_mobs:balrog_firebolt", reach = 5, damage = 10, armor = 100, @@ -24,6 +29,7 @@ local balrog_def = { sounds = { death = "spawners_mobs_howl", attack = "spawners_mobs_stone_death", + shoot_attack = "spawners_mobs_fireball", }, walk_velocity = 3, run_velocity = 4, @@ -161,3 +167,33 @@ mobs:register_mob("spawners_mobs:balrog", balrog_def) -- }) mobs:register_egg("spawners_mobs:balrog", "balrog", "default_coal_block.png", 1, true) + +-- shooting +mobs:register_arrow("spawners_mobs:balrog_firebolt", { + visual = "sprite", + visual_size = {x = 1, y = 1}, + textures = {"spawners_mobs_firebolt.png"}, + velocity = 15, + -- tail = 1, + -- tail_texture = "spawners_mobs_black_skull.png", + -- tail_size = 10, + + -- 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 = 8}, + }, nil) + end, + + hit_mob = function(self, player) + player:punch(self.object, 1.0, { + full_punch_interval = 1.0, + damage_groups = {fleshy = 8}, + }, nil) + end, + + hit_node = function(self, pos, node) + -- minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z}, {name="default:lava_flowing"}) + end +}) diff --git a/spawners_mobs/sounds/spawners_mobs_fireball.ogg b/spawners_mobs/sounds/spawners_mobs_fireball.ogg new file mode 100644 index 0000000..bdc4ac2 Binary files /dev/null and b/spawners_mobs/sounds/spawners_mobs_fireball.ogg differ diff --git a/spawners_mobs/sounds/spawners_mobs_mummy_shoot.ogg b/spawners_mobs/sounds/spawners_mobs_mummy_shoot.ogg index 1696c65..2c35957 100644 Binary files a/spawners_mobs/sounds/spawners_mobs_mummy_shoot.ogg and b/spawners_mobs/sounds/spawners_mobs_mummy_shoot.ogg differ diff --git a/spawners_mobs/textures/spawners_mobs_firebolt.png b/spawners_mobs/textures/spawners_mobs_firebolt.png new file mode 100644 index 0000000..1aa87c9 Binary files /dev/null and b/spawners_mobs/textures/spawners_mobs_firebolt.png differ