Make slimes not quite so aggressive
This commit is contained in:
parent
3303c52fbc
commit
15e449736b
|
@ -608,8 +608,8 @@ function moveSlimes()
|
|||
|
||||
local to_player_dx = player_x - slime.x
|
||||
local to_player_dy = player_y - slime.y
|
||||
if math.abs(to_player_dx) + math.abs(to_player_dy) <= 7 then
|
||||
-- If at max 7 moves away from player, book for it
|
||||
if math.abs(to_player_dx) + math.abs(to_player_dy) <= 7 and math.random() < 0.7 then
|
||||
-- If at max 7 moves away from player, book for it (likely)
|
||||
if math.abs(to_player_dx) > math.abs(to_player_dy) then
|
||||
-- Needs to move more in the horizontal direction → move horizontally
|
||||
if to_player_dx < 0 then
|
||||
|
|
Loading…
Reference in New Issue