Deaggressify slimes even more
This commit is contained in:
parent
15e449736b
commit
2be9ed6202
|
@ -608,8 +608,8 @@ function moveSlimes()
|
||||||
|
|
||||||
local to_player_dx = player_x - slime.x
|
local to_player_dx = player_x - slime.x
|
||||||
local to_player_dy = player_y - slime.y
|
local to_player_dy = player_y - slime.y
|
||||||
if math.abs(to_player_dx) + math.abs(to_player_dy) <= 7 and math.random() < 0.7 then
|
if math.abs(to_player_dx) + math.abs(to_player_dy) <= 5 and math.random() < 0.7 then
|
||||||
-- If at max 7 moves away from player, book for it (likely)
|
-- If at max 5 moves away from player, book for it (likely)
|
||||||
if math.abs(to_player_dx) > math.abs(to_player_dy) then
|
if math.abs(to_player_dx) > math.abs(to_player_dy) then
|
||||||
-- Needs to move more in the horizontal direction → move horizontally
|
-- Needs to move more in the horizontal direction → move horizontally
|
||||||
if to_player_dx < 0 then
|
if to_player_dx < 0 then
|
||||||
|
@ -723,9 +723,13 @@ function drawCavern()
|
||||||
love.graphics.setColor(0, 0, 1)
|
love.graphics.setColor(0, 0, 1)
|
||||||
love.graphics.ellipse('fill', x + 0.5 * x_scale, y + 0.5 * y_scale, 0.8 * x_scale/2, 0.8 * y_scale/2)
|
love.graphics.ellipse('fill', x + 0.5 * x_scale, y + 0.5 * y_scale, 0.8 * x_scale/2, 0.8 * y_scale/2)
|
||||||
love.graphics.rectangle('fill', x + 0.1 * x_scale , y + 0.5 * y_scale, 0.8 * x_scale, 0.8 * y_scale/2)
|
love.graphics.rectangle('fill', x + 0.1 * x_scale , y + 0.5 * y_scale, 0.8 * x_scale, 0.8 * y_scale/2)
|
||||||
else
|
elseif tile == tiletypes.unknown then
|
||||||
love.graphics.setColor(1, 0.5, 0.5)
|
love.graphics.setColor(1, 0.5, 0.5)
|
||||||
love.graphics.rectangle('fill', x, y, x_scale, y_scale)
|
love.graphics.rectangle('fill', x, y, x_scale, y_scale)
|
||||||
|
else
|
||||||
|
print("Impossible tile!!!")
|
||||||
|
love.graphics.setColor(1, 0, 0)
|
||||||
|
love.graphics.rectangle('fill', x, y, x_scale, y_scale)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
tile = remembered_cavern[tile_x][tile_y]
|
tile = remembered_cavern[tile_x][tile_y]
|
||||||
|
|
Loading…
Reference in New Issue