Fix skeleton arrows.

This commit is contained in:
MysticTempest 2022-07-09 14:25:17 -05:00
parent b0da96611e
commit b7abaad98f
2 changed files with 5 additions and 4 deletions

View File

@ -2865,7 +2865,7 @@ local do_states = function(self, dtime)
if self.shoot_interval if self.shoot_interval
and self.timer > self.shoot_interval and self.timer > self.shoot_interval
and not minetest.raycast(p, self.attack:get_pos(), false, false):next() and minetest.raycast(p, self.attack:get_pos(), false, false):next()
and random(1, 100) <= 60 then and random(1, 100) <= 60 then
self.timer = 0 self.timer = 0

View File

@ -90,9 +90,10 @@ local skeleton = {
arrow = "mcl_bows:arrow_entity", arrow = "mcl_bows:arrow_entity",
shoot_arrow = function(self, pos, dir) shoot_arrow = function(self, pos, dir)
if mod_bows then if mod_bows then
-- 2-4 damage per arrow -- 1-4 damage per arrow
local dmg = math.max(4, math.random(2, 8)) local dmg = math.random(1, 4)
mcl_bows.shoot_arrow("mcl_bows:arrow", pos, dir, self.object:get_yaw(), self.object, nil, dmg) local power = 26
mcl_bows.shoot_arrow("mcl_bows:arrow", pos, dir, self.object:get_yaw(), self.object, power, dmg)
end end
end, end,
shoot_interval = 2, shoot_interval = 2,