forked from VoxeLibre/VoxeLibre
Fix skeleton arrows.
This commit is contained in:
parent
b0da96611e
commit
b7abaad98f
|
@ -2865,7 +2865,7 @@ local do_states = function(self, dtime)
|
|||
|
||||
if 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
|
||||
|
||||
self.timer = 0
|
||||
|
|
|
@ -90,9 +90,10 @@ local skeleton = {
|
|||
arrow = "mcl_bows:arrow_entity",
|
||||
shoot_arrow = function(self, pos, dir)
|
||||
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)
|
||||
-- 1-4 damage per arrow
|
||||
local dmg = math.random(1, 4)
|
||||
local power = 26
|
||||
mcl_bows.shoot_arrow("mcl_bows:arrow", pos, dir, self.object:get_yaw(), self.object, power, dmg)
|
||||
end
|
||||
end,
|
||||
shoot_interval = 2,
|
||||
|
|
Loading…
Reference in New Issue