diff --git a/mods/ENTITIES/mobs_mc/skeleton+stray.lua b/mods/ENTITIES/mobs_mc/skeleton+stray.lua index bb0b8d2e0..4157f750c 100644 --- a/mods/ENTITIES/mobs_mc/skeleton+stray.lua +++ b/mods/ENTITIES/mobs_mc/skeleton+stray.lua @@ -4,6 +4,7 @@ --License for code WTFPL and otherwise stated in readmes local S = minetest.get_translator("mobs_mc") +local mod_bows = minetest.get_modpath("mcl_bows") ~= nil --################### --################### SKELETON @@ -31,7 +32,6 @@ local skeleton = { random = "mobs_mc_skeleton_random", death = "mobs_mc_skeleton_death", damage = "mobs_mc_skeleton_hurt", - shoot_attack = "mcl_bows_bow_shoot", distance = 16, }, walk_velocity = 1.2, @@ -80,10 +80,14 @@ local skeleton = { attack_type = "dogshoot", arrow = "mcl_bows:arrow_entity", shoot_arrow = function(self, pos, dir) - mcl_bows.shoot_arrow("mcl_bows:arrow", pos, dir, self.object:get_yaw(), self.object) + if mod_bows then + -- 2-4 damage per arrow + local dmg = math.max(4, math.random(2, 8)) + mcl_bows.shoot_arrow("mcl_bows:arrow", pos, dir, self.object:get_yaw(), self.object, nil, dmg) + end end, - shoot_interval = 2.5, - shoot_offset = 1, + shoot_interval = 2, + shoot_offset = 1.5, dogshoot_switch = 1, dogshoot_count_max =1.8, } diff --git a/mods/ENTITIES/mobs_mc/snowman.lua b/mods/ENTITIES/mobs_mc/snowman.lua index 48143b449..401950a34 100644 --- a/mods/ENTITIES/mobs_mc/snowman.lua +++ b/mods/ENTITIES/mobs_mc/snowman.lua @@ -8,6 +8,7 @@ local S = minetest.get_translator("mobs_mc") local snow_trail_frequency = 0.5 -- Time in seconds for checking to add a new snow trail local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false +local mod_throwing = minetest.get_modpath("mcl_throwing") ~= nil local gotten_texture = { "mobs_mc_snowman.png", @@ -51,7 +52,12 @@ mobs:register_mob("mobs_mc:snowman", { jump = true, makes_footstep_sound = true, attack_type = "shoot", - arrow = "mobs_mc:snowball_entity", + arrow = "mcl_throwing:snowball_entity", + shoot_arrow = function(self, pos, dir) + if mod_throwing then + mcl_throwing.throw("mcl_throwing:snowball", pos, dir) + end + end, shoot_interval = 1, shoot_offset = 1, animation = { diff --git a/mods/ENTITIES/mobs_mc/villager_illusioner.lua b/mods/ENTITIES/mobs_mc/villager_illusioner.lua index 82ce54a14..9c0429ec0 100644 --- a/mods/ENTITIES/mobs_mc/villager_illusioner.lua +++ b/mods/ENTITIES/mobs_mc/villager_illusioner.lua @@ -4,15 +4,20 @@ --License for code WTFPL and otherwise stated in readmes local S = minetest.get_translator("mobs_mc") +local mod_bows = minetest.get_modpath("mcl_bows") ~= nil mobs:register_mob("mobs_mc:illusioner", { type = "monster", attack_type = "shoot", - shoot_interval = 0.5, + shoot_interval = 2.5, shoot_offset = 1.5, arrow = "mcl_bows:arrow_entity", shoot_arrow = function(self, pos, dir) - mcl_bows.shoot_arrow("mcl_bows:arrow", pos, dir, self.object:get_yaw(), self.object) + if mod_bows then + -- 1-4 damage per arrow + local dmg = math.random(1, 4) + mcl_bows.shoot_arrow("mcl_bows:arrow", pos, dir, self.object:get_yaw(), self.object, nil, dmg) + end end, hp_min = 32, hp_max = 32, @@ -26,7 +31,6 @@ mobs:register_mob("mobs_mc:illusioner", { }, }, sounds = { -- TODO: more sounds - shoot_attack = "mcl_bows_bow_shoot", distance = 16, }, visual_size = {x=3, y=3},