[WIP] Lluita contra jefe.

This commit is contained in:
2026-04-08 23:04:23 +02:00
parent cbf265fe4d
commit 0a682b2440
8 changed files with 168 additions and 82 deletions

View File

@@ -138,28 +138,29 @@ function arc_set_tile_by_index(hab,index,tile)
arc_set_tile(world_x, world_y, tile)
end
function arc_get_tile(world_x,world_y)
function arc_get_tile(world_x,world_y, debug)
local map_x, map_y = coords.world_to_mini_tile(world_x,world_y)
if debug then print(map_x..", "..map_y) end
return map.tile(map_x,map_y)
end
function arc_check_tile(world_x,world_y)
function arc_check_tile(world_x,world_y,debug)
-- tiletype => void=0 / nonpc=1 / stair=2 /
-- switch=3 / half=4 / block=5
local tile=map_to_editor_tile(arc_get_tile(world_x, world_y))
local tile=map_to_editor_tile(arc_get_tile(world_x, world_y, debug))
if tile<8 then
return tiletype.half
return tiletype.half, tile
elseif tile<15 then
return tiletype.stair
return tiletype.stair, tile
elseif tile==15 then
return tiletype.switch
return tiletype.switch, tile
elseif tile<64 then
return tiletype.block
return tiletype.block, tile
elseif tile==111 then
return tiletype.nonpc
return tiletype.nonpc, tile
else
return tiletype.void
return tiletype.void, tile
end
end