diff --git a/bundle/main.lua b/bundle/main.lua index 752dc2d..7b78b3a 100644 --- a/bundle/main.lua +++ b/bundle/main.lua @@ -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 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) <= 5 and math.random() < 0.7 then + -- If at max 5 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 @@ -723,9 +723,13 @@ function drawCavern() 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.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.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 else tile = remembered_cavern[tile_x][tile_y]