...
 
Commits (2)
......@@ -12,6 +12,7 @@ function enemy:on_created()
enemy:set_life(1)
enemy:set_damage(1)
enemy:set_invincible()
self:set_obstacle_behavior("flying")
sprite = enemy:create_sprite("enemies/" .. enemy:get_breed())
end
......
This diff is collapsed.
......@@ -3,7 +3,7 @@ properties{
y = 240,
width = 2240,
height = 1920,
min_layer = 0,
min_layer = -1,
max_layer = 2,
world = "dungeon_3",
floor = 1,
......@@ -11,6 +11,24 @@ properties{
music = "dungeon_1",
}
tile{
layer = 0,
x = 984,
y = 936,
width = 272,
height = 24,
pattern = "wall.2-2",
}
tile{
layer = 0,
x = 1112,
y = 944,
width = 16,
height = 16,
pattern = "floor.12-1",
}
tile{
layer = 0,
x = 992,
......@@ -443,15 +461,6 @@ tile{
pattern = "wall.3-2",
}
tile{
layer = 0,
x = 984,
y = 936,
width = 272,
height = 24,
pattern = "wall.2-2",
}
tile{
layer = 0,
x = 984,
......@@ -1118,6 +1127,33 @@ tile{
pattern = "1592",
}
tile{
layer = 0,
x = 1040,
y = 552,
width = 8,
height = 8,
pattern = "bones.1",
}
tile{
layer = 0,
x = 1048,
y = 552,
width = 8,
height = 8,
pattern = "bones.6",
}
tile{
layer = 0,
x = 1048,
y = 544,
width = 8,
height = 8,
pattern = "bones.2",
}
destination{
name = "from_1f",
layer = 0,
......@@ -1275,6 +1311,7 @@ wall{
}
door{
name = "boss_door_4",
layer = 0,
x = 1112,
y = 456,
......@@ -1283,6 +1320,7 @@ door{
}
door{
name = "boss_door_3",
layer = 0,
x = 1112,
y = 488,
......@@ -1325,6 +1363,7 @@ teletransporter{
width = 16,
height = 16,
destination_map = "out/d2",
destination = "from_dungeon_3_2f",
}
destination{
......@@ -1343,6 +1382,8 @@ enemy{
direction = 0,
breed = "alttp/stalfos_knight",
savegame_variable = "d3_boss",
treasure_name = "heart_container",
treasure_savegame_variable = "d3_heart_container",
}
door{
......@@ -1416,6 +1457,15 @@ custom_entity{
sprite = "entities/pedestal",
}
pickable{
name = "graal",
layer = 0,
x = 1120,
y = 349,
treasure_name = "graal",
treasure_savegame_variable = "d3_graal",
}
tile{
layer = 1,
x = 1080,
......
......@@ -2,6 +2,7 @@ local map = ...
local game = map:get_game()
local fighting_boss = false
local music_id = map:get_music()
function map:on_started()
......@@ -23,4 +24,28 @@ function start_boss_sensor:on_activated()
fighting_boss = true
end)
end
end
function map:on_obtained_treasure(item, variant, savegame_variable)
if item:get_name() == "heart_container" then
sol.audio.play_music(music_id)
map:open_doors("boss_door")
elseif item:get_name() == "graal" then
game:set_dungeon_finished()
hero:set_direction(3)
hero:start_victory(function()
game:start_dialog("dungeon_finished_save", function(answer)
sol.audio.play_sound("danger")
if answer == 3 then
game:save()
end
hero:unfreeze()
end)
end)
end
end
\ No newline at end of file
This diff is collapsed.
......@@ -306,17 +306,8 @@ tile{
}
tile{
layer = 0,
x = 32,
y = 32,
width = 256,
height = 176,
pattern = "floor.12-1",
}
tile{
layer = 0,
x = 112,
layer = -1,
x = 120,
y = 504,
width = 8,
height = 24,
......@@ -324,8 +315,8 @@ tile{
}
tile{
layer = 0,
x = 136,
layer = -1,
x = 144,
y = 504,
width = 8,
height = 24,
......@@ -333,8 +324,8 @@ tile{
}
tile{
layer = 0,
x = 120,
layer = -1,
x = 128,
y = 504,
width = 16,
height = 24,
......@@ -342,7 +333,7 @@ tile{
}
tile{
layer = 0,
layer = -1,
x = 184,
y = 496,
width = 8,
......@@ -351,7 +342,7 @@ tile{
}
tile{
layer = 0,
layer = -1,
x = 168,
y = 496,
width = 16,
......@@ -360,7 +351,7 @@ tile{
}
tile{
layer = 0,
layer = -1,
x = 160,
y = 496,
width = 8,
......@@ -368,40 +359,29 @@ tile{
pattern = "stairs_inner_up.2.border.1-1",
}
tile{
layer = 0,
x = 64,
y = 496,
width = 8,
height = 24,
pattern = "stairs_down.2.border.2-1",
}
tile{
layer = 0,
x = 72,
y = 496,
width = 16,
height = 24,
pattern = "stairs_down.2-1",
stairs{
layer = -1,
x = 128,
y = 504,
direction = 1,
subtype = 4,
}
tile{
layer = 0,
x = 88,
y = 496,
width = 8,
height = 24,
pattern = "stairs_down.2.border.3-1",
stairs{
layer = -1,
x = 168,
y = 504,
direction = 3,
subtype = 4,
}
tile{
layer = 0,
x = 64,
y = 520,
width = 32,
height = 8,
pattern = "stairs_down.2.border.1-1",
x = 32,
y = 32,
width = 256,
height = 176,
pattern = "floor.12-1",
}
tile{
......@@ -431,87 +411,6 @@ tile{
pattern = "torch_big.bottom",
}
tile{
layer = 0,
x = 40,
y = 496,
width = 8,
height = 8,
pattern = "stairs_inner_up.1.top.border.2-1",
}
tile{
layer = 0,
x = 24,
y = 496,
width = 16,
height = 8,
pattern = "stairs_inner_up.1.top-1",
}
tile{
layer = 0,
x = 16,
y = 496,
width = 8,
height = 8,
pattern = "stairs_inner_up.1.top.border.1-1",
}
tile{
layer = 0,
x = 16,
y = 504,
width = 8,
height = 24,
pattern = "stairs_inner_up.1.border.1-1",
}
tile{
layer = 0,
x = 40,
y = 504,
width = 8,
height = 24,
pattern = "stairs_inner_up.1.border.2-1",
}
tile{
layer = 0,
x = 24,
y = 504,
width = 16,
height = 24,
pattern = "stairs_inner_up.1-1",
}
tile{
layer = 0,
x = 136,
y = 496,
width = 8,
height = 8,
pattern = "stairs_inner_up.1.top.border.2-1",
}
tile{
layer = 0,
x = 120,
y = 496,
width = 16,
height = 8,
pattern = "stairs_inner_up.1.top-1",
}
tile{
layer = 0,
x = 112,
y = 496,
width = 8,
height = 8,
pattern = "stairs_inner_up.1.top.border.1-1",
}
tile{
layer = 0,
x = 40,
......@@ -1016,33 +915,6 @@ tile{
pattern = "door.3",
}
tile{
layer = 0,
x = 184,
y = 520,
width = 8,
height = 8,
pattern = "stairs_inner_up.2.top.border.2-1",
}
tile{
layer = 0,
x = 160,
y = 520,
width = 8,
height = 8,
pattern = "stairs_inner_up.2.top.border.1-1",
}
tile{
layer = 0,
x = 168,
y = 520,
width = 16,
height = 8,
pattern = "stairs_inner_up.2.top-1",
}
tile{
layer = 0,
x = 24,
......@@ -2186,20 +2058,175 @@ tile{
pattern = "floor.15-1",
}
stairs{
tile{
layer = 0,
x = 80,
y = 600,
width = 8,
height = 8,
pattern = "bones.1",
}
tile{
layer = 0,
x = 88,
y = 600,
width = 8,
height = 8,
pattern = "bones.6",
}
tile{
layer = 0,
x = 88,
y = 592,
width = 8,
height = 8,
pattern = "bones.2",
}
tile{
layer = 0,
x = 144,
y = 496,
width = 8,
height = 8,
pattern = "stairs_inner_up.1.top.border.2-1",
}
tile{
layer = 0,
x = 128,
y = 496,
width = 16,
height = 8,
pattern = "stairs_inner_up.1.top-1",
}
tile{
layer = 0,
x = 120,
y = 504,
direction = 1,
subtype = 4,
y = 496,
width = 8,
height = 8,
pattern = "stairs_inner_up.1.top.border.1-1",
}
stairs{
tile{
layer = 0,
x = 184,
y = 520,
width = 8,
height = 8,
pattern = "stairs_inner_up.2.top.border.2-1",
}
tile{
layer = 0,
x = 160,
y = 520,
width = 8,
height = 8,
pattern = "stairs_inner_up.2.top.border.1-1",
}
tile{
layer = 0,
x = 168,
y = 520,
width = 16,
height = 8,
pattern = "stairs_inner_up.2.top-1",
}
tile{
layer = 0,
x = 40,
y = 496,
width = 8,
height = 8,
pattern = "stairs_inner_up.1.top.border.2-1",
}
tile{
layer = 0,
x = 24,
y = 496,
width = 16,
height = 8,
pattern = "stairs_inner_up.1.top-1",
}
tile{
layer = 0,
x = 16,
y = 496,
width = 8,
height = 8,
pattern = "stairs_inner_up.1.top.border.1-1",
}
tile{
layer = 0,
x = 16,
y = 504,
direction = 3,
subtype = 4,
width = 8,
height = 24,
pattern = "stairs_inner_up.1.border.1-1",
}
tile{
layer = 0,
x = 40,
y = 504,
width = 8,
height = 24,
pattern = "stairs_inner_up.1.border.2-1",
}
tile{
layer = 0,
x = 24,
y = 504,
width = 16,
height = 24,
pattern = "stairs_inner_up.1-1",
}
tile{
layer = 0,
x = 64,
y = 496,
width = 8,
height = 24,
pattern = "stairs_down.2.border.2-1",
}
tile{
layer = 0,
x = 72,
y = 496,
width = 16,
height = 24,
pattern = "stairs_down.2-1",
}
tile{
layer = 0,
x = 88,
y = 496,
width = 8,
height = 24,
pattern = "stairs_down.2.border.3-1",
}
tile{
layer = 0,
x = 64,
y = 520,
width = 32,
height = 8,
pattern = "stairs_down.2.border.1-1",
}
destructible{
......@@ -2584,19 +2611,6 @@ custom_entity{
model = "torch",
}
wall{
layer = 0,
x = 24,
y = 496,
width = 16,
height = 8,
stops_hero = true,
stops_npcs = true,
stops_enemies = true,
stops_blocks = true,
stops_projectiles = true,
}
wall{
layer = 0,
x = 480,
......@@ -2634,9 +2648,9 @@ dynamic_tile{
layer = 0,
x = 504,
y = 376,
pattern = "wall.3-2",
width = 24,
height = 32,
pattern = "wall.3-2",
}
dynamic_tile{
......@@ -2644,9 +2658,9 @@ dynamic_tile{
layer = 0,
x = 480,
y = 376,
pattern = "wall.4-2",
width = 24,
height = 32,
pattern = "wall.4-2",
}
wall{
......@@ -2712,9 +2726,9 @@ dynamic_tile{
layer = 0,
x = 488,
y = 264,
pattern = "wall.2-2",
width = 32,
height = 24,
pattern = "wall.2-2",
}
dynamic_tile{
......@@ -2722,9 +2736,74 @@ dynamic_tile{
layer = 0,
x = 488,
y = 288,
pattern = "wall.1-2",
width = 32,
height = 24,
pattern = "wall.1-2",
}
wall{
layer = 0,
x = 24,
y = 496,
width = 16,
height = 8,
stops_hero = true,
stops_npcs = true,
stops_enemies = true,
stops_blocks = true,
stops_projectiles = true,
}
destination{
name = "from_1f_sw",
layer = 0,
x = 32,
y = 525,
direction = 3,
}
teletransporter{
layer = 0,
x = 24,
y = 512,
width = 16,
height = 16,
destination_map = "dungeons/3/1f",
destination = "from_b1_sw",
}
stairs{
layer = 0,
x = 24,
y = 512,
direction = 1,
subtype = 2,
}
destination{
name = "from_b1_c",
layer = 0,
x = 80,
y = 509,
direction = 1,
}
teletransporter{
layer = 0,
x = 72,
y = 496,
width = 16,
height = 16,
destination_map = "dungeons/3/b1",
destination = "from_1f_c",
}
stairs{
layer = 0,
x = 72,
y = 496,
direction = 3,
subtype = 3,
}
tile{
......@@ -3092,9 +3171,9 @@ dynamic_tile{
layer = 1,
x = 496,
y = 376,
pattern = "door_top.blast.4-2",
width = 8,
height = 32,
pattern = "door_top.blast.4-2",
}
dynamic_tile{
......@@ -3102,9 +3181,9 @@ dynamic_tile{
layer = 1,
x = 504,
y = 376,
pattern = "door_top.blast.3-2",
width = 8,
height = 32,
pattern = "door_top.blast.3-2",
}
dynamic_tile{
......@@ -3112,9 +3191,9 @@ dynamic_tile{
layer = 1,
x = 488,
y = 280,
pattern = "door_top.blast.2-2",
width = 32,
height = 8,
pattern = "door_top.blast.2-2",
}
dynamic_tile{
......@@ -3122,9 +3201,9 @@ dynamic_tile{
layer = 1,
x = 488,
y = 288,
pattern = "door_top.blast.1-2",
width = 32,
height = 8,
pattern = "door_top.blast.1-2",
}
tile{
......
......@@ -3684,6 +3684,78 @@ dynamic_tile{
pattern = "dungeon_b.stairs.bottom",
}
teletransporter{
layer = -1,
x = 568,
y = 472,
width = 16,
height = 16,
destination_map = "dungeons/3/1f",
destination = "from_outside",
}
destination{
name = "from_dungeon_3",
layer = -1,
x = 576,
y = 501,
direction = 3,
}
destination{
name = "from_dungeon_3_w",
layer = -1,
x = 520,
y = 413,
direction = 3,
}
destination{
name = "from_dungeon_3_e",
layer = -1,
x = 632,
y = 413,
direction = 3,
}
destination{
name = "from_dungeon_3_2f",
layer = -1,
x = 576,
y = 341,
direction = 3,
}
teletransporter{
layer = -1,
x = 512,
y = 384,
width = 16,
height = 16,
destination_map = "dungeons/3/1f",
destination = "from_outside_w",
}
teletransporter{
layer = -1,
x = 624,
y = 384,
width = 16,
height = 16,
destination_map = "dungeons/3/1f",
destination = "from_outside_e",
}
teletransporter{
layer = -1,
x = 568,
y = 312,
width = 16,
height = 16,
destination_map = "dungeons/3/2f",
destination = "from_outside_2",
}
tile{
layer = 0,
x = 176,
......
......@@ -724,4 +724,12 @@ file{ path = "maps/caves/passage_to_latouane/1f.dat", author = "Franck Jousseaum
file{ path = "maps/caves/passage_to_latouane/1f.lua", author = "Christopho", license = "GPL v3" }
file{ path = "maps/caves/passage_to_latouane/2f.dat", author = "Franck Jousseaume, Vincent Jouillat", license = "CC BY-SA 4.0" }
file{ path = "maps/caves/passage_to_latouane/2f.lua", author = "Christopho", license = "GPL v3" }
file{ path = "maps/dungeons/3/1f.dat", author = "Franck Jousseaume, Vincent Jouillat", license = "CC BY-SA 4.0" }
file{ path = "maps/dungeons/3/1f.lua", author = "Franck Jousseaume", license = "GPL v3" }
file{ path = "maps/dungeons/3/2f.dat", author = "Franck Jousseaume, Vincent Jouillat", license = "CC BY-SA 4.0" }
file{ path = "maps/dungeons/3/2f.lua", author = "Franck Jousseaume", license = "GPL v3" }
file{ path = "maps/dungeons/3/b1.dat", author = "Franck Jousseaume, Vincent Jouillat", license = "CC BY-SA 4.0" }
file{ path = "maps/dungeons/3/b1.lua", author = "Franck Jousseaume", license = "GPL v3" }
file{ path = "maps/dungeons/3/store.dat", author = "Franck Jousseaume, Vincent Jouillat", license = "CC BY-SA 4.0" }
file{ path = "maps/dungeons/3/store.lua", author = "Franck Jousseaume", license = "GPL v3" }
file{ path = "sprites/entities/doors/door_out_weak_wall.dat", author = "Christopho", license = "CC BY-SA 4.0" }