[WIP] Lluita contra jefe.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user