[WIP] Lluita contra jefes. Casi implementat se serebro de la bestia

This commit is contained in:
2026-04-06 01:58:49 +02:00
parent aaf5c0fb47
commit 6ac7a811d9
7 changed files with 498 additions and 115 deletions

View File

@@ -309,43 +309,49 @@ end
function special_keys()
if key.press(key.N1) then
-- abad prev room
local hab = abad.hab-1
if hab<0 then hab=0 end
local hab_x = 4
local hab_y = 3
local abad_x, abad_y = coords.room_to_world ( hab, hab_x, hab_y)
abad:move(abad_x, abad_y)
local scr_ax, scr_ay = viewp:screen_coords(abad_x, abad_y)
-- -- abad prev room
-- local hab = abad.hab-1
-- if hab<0 then hab=0 end
-- local hab_x = 4
-- local hab_y = 3
-- local abad_x, abad_y = coords.room_to_world ( hab, hab_x, hab_y)
-- abad:move(abad_x, abad_y)
-- local scr_ax, scr_ay = viewp:screen_coords(abad_x, abad_y)
end
if key.press(key.N2) then
-- abad next room
local hab = abad.hab+1
if hab<0 then hab=0 end
local hab_x = 4
local hab_y = 3
local abad_x, abad_y = coords.room_to_world ( hab, hab_x, hab_y)
abad:move(abad_x, abad_y)
local scr_ax, scr_ay = viewp:screen_coords(abad_x, abad_y)
end
if key.press(key.N9) then
mapa_restore_backup()
set_actors_enabled_by_room(true, "boss", 44, 55)
viewp:free_move()
-- -- abad next room
-- local hab = abad.hab+1
-- if hab<0 then hab=0 end
-- local hab_x = 4
-- local hab_y = 3
-- local abad_x, abad_y = coords.room_to_world ( hab, hab_x, hab_y)
-- abad:move(abad_x, abad_y)
-- local scr_ax, scr_ay = viewp:screen_coords(abad_x, abad_y)
end
if key.press(key.N8) then
-- abad go to room
local abad_x, abad_y = coords.room_to_world ( 31, 8, 3 )
print(abad_x..", "..abad_y)
abad:move(abad_x, abad_y)
local scr_ax, scr_ay = viewp:screen_coords(abad_x, abad_y)
-- local abad_x, abad_y = coords.room_to_world ( 31, 8, 3 )
-- print(abad_x..", "..abad_y)
-- abad:move(abad_x, abad_y)
-- local scr_ax, scr_ay = viewp:screen_coords(abad_x, abad_y)
imp.mode="away"
imp.mode_cooldown = 60000
print("away")
end
if key.press(key.N9) then
-- mapa_restore_backup()
-- set_actors_enabled_by_room(true, "boss", 44, 55)
-- viewp:free_move()
imp.mode="chase"
imp.mode_cooldown = 60000
print("chase")
end
if key.press(key.N0) then
-- abad go to room
local abad_x, abad_y = coords.room_to_world ( 34, 3, 3 )
print(abad_x..", "..abad_y)
abad:move(abad_x, abad_y)
local scr_ax, scr_ay = viewp:screen_coords(abad_x, abad_y)
-- abad go to room
-- local abad_x, abad_y = coords.room_to_world ( 34, 3, 3 )
-- print(abad_x..", "..abad_y)
-- abad:move(abad_x, abad_y)
-- local scr_ax, scr_ay = viewp:screen_coords(abad_x, abad_y)
imp.init()
end
end