Permalink
Browse files

Kept working on the cave map and related files.

The cave shape is somehow complete, but some new engine features
are needed to make it complete.
  • Loading branch information...
1 parent 8805081 commit e5e67e37e0166c879c2d584ae6d3a8c8a6686e89 Yohann Ferreira committed Nov 1, 2012
View
@@ -1,7 +1,7 @@
Licenses
========
-Last update: 2012.10.29
+Last update: 2012.11.01
This file is listing all the files licenses from the point of the fork
from the Allacrost project.
@@ -79,6 +79,7 @@ dat/tilesets/mountain_house_interior.lua GPLv2 or later
dat/tilesets/snow-tileset.lua GPLv2 or later Bertram
dat/tilesets/wood-tileset.lua GPLv2 or later Bertram
+img/ambient/dark.png CC0 Bertram
img/ambient/fog.png GPLv2 or later Bertram
img/ambient/sandstorm.png GPLv2 or later The Mana World Team + Bertram
@@ -41,19 +41,20 @@ tileset_filenames[2] = "desert_cave_ground"
tileset_filenames[3] = "desert_cave_walls"
tileset_filenames[4] = "desert_cave_walls2"
tileset_filenames[5] = "desert_cave_water"
+tileset_filenames[6] = "castle_exterior_01"
-- The map grid to indicate walkability. The size of the grid is 4x the size of the tile layer tables
-- Walkability status of tiles for 32 contexts. Zero indicates walkable for all contexts. Valid range: [0:2^32-1]
-- Example: 1 (BIN 001) = wall for first context only, 2 (BIN 010) means wall for second context only, 5 (BIN 101) means Wall for first and third context.
map_grid = {}
-map_grid[0] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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148,11 +149,11 @@ layers = {}
layers[0] = {}
layers[0].type = "ground"
layers[0].name = "Background"
-layers[0][0] = { -1, -1, 414, 298, 265, 283, 282, 283, 283, 266, 283, 300, 299, 281, 267, 284, 283, 265, 267, 267, 266, 281, 298, 282, 266, 281, 265, 411, -1, -1, -1, -1, -1, -1, -1, -1, -1, 427, 282, 281, 284, 266, 297, 266, 282, 283, 282, 281, 267, 300, 265, 284, 299, 268, 282, 281, 283, 299, 282, 259, 299, 283, 281, 297 }
-layers[0][1] = { -1, 412, 299, 259, 295, 261, 282, 267, 267, 281, 268, 281, 283, 265, 281, 282, 283, 284, 284, 265, 267, 300, 300, 268, 265, 267, 284, 444, -1, -1, -1, -1, -1, -1, -1, -1, -1, 443, 297, 282, 281, 267, 283, 265, 283, 300, 282, 282, 284, 283, 299, 265, 267, 281, 267, 259, 295, 295, 295, 295, 260, 295, 295, 295 }
-layers[0][2] = { -1, 427, 266, 275, 276, 277, 281, 282, 268, 266, 268, 281, 300, 298, 265, 297, 281, 265, 298, 281, 283, 299, 299, 300, 267, 268, 300, 299, 463, -1, -1, -1, -1, -1, -1, -1, -1, 427, 284, 299, 300, 267, 266, 283, 298, 267, 299, 297, 281, 283, 299, 283, 268, 283, 266, 275, 276, 257, 258, 258, 257, 273, 274, 257 }
-layers[0][3] = { -1, 443, 265, 291, 292, 293, 268, 267, 299, 267, 299, 281, 297, 299, 297, 266, 265, 267, 298, 281, 268, 265, 283, 299, 282, 266, 297, 284, 444, -1, -1, -1, -1, -1, -1, -1, -1, 443, 281, 281, 267, 266, 283, 268, 300, 267, 284, 282, 300, 268, 281, 267, 265, 268, 297, 275, 257, 273, 274, 257, 257, 257, 257, 257 }
-layers[0][4] = { -1, 479, 475, 476, 477, 474, 475, 476, 477, 282, 300, 297, 300, 283, 282, 298, 282, 299, 283, 282, 281, 474, 475, 476, 477, 474, 475, 476, 478, -1, -1, -1, -1, -1, -1, -1, -1, 479, 474, 475, 476, 477, 297, 299, 283, 268, 265, 284, 282, 298, 268, 266, 474, 475, 476, 477, 263, 263, 263, 292, 263, 292, 263, 292 }
+layers[0][0] = { -1, -1, 414, 298, 265, 283, 282, 283, 283, 266, 283, 300, 299, 281, 267, 275, 20, 20, 20, 277, 266, 281, 298, 282, 266, 281, 265, 411, -1, -1, -1, -1, -1, -1, -1, -1, -1, 427, 282, 281, 284, 266, 297, 266, 282, 283, 282, 281, 267, 300, 265, 284, 299, 268, 282, 281, 283, 299, 282, 259, 299, 283, 281, 297 }
+layers[0][1] = { -1, 412, 299, 259, 295, 261, 282, 267, 267, 281, 268, 281, 283, 265, 281, 280, 10, 11, 12, 278, 267, 300, 300, 268, 265, 267, 284, 444, -1, -1, -1, -1, -1, -1, -1, -1, -1, 443, 297, 282, 281, 267, 283, 265, 283, 300, 282, 282, 284, 283, 299, 265, 267, 281, 267, 259, 295, 295, 295, 295, 260, 295, 295, 295 }
+layers[0][2] = { -1, 427, 266, 275, 276, 277, 281, 282, 268, 266, 268, 281, 300, 298, 265, 275, 26, 27, 28, 277, 283, 299, 299, 300, 267, 268, 300, 299, 463, -1, -1, -1, -1, -1, -1, -1, -1, 427, 284, 299, 300, 267, 266, 283, 298, 267, 299, 297, 281, 283, 299, 283, 268, 283, 266, 275, 276, 257, 258, 258, 257, 273, 274, 257 }
+layers[0][3] = { -1, 443, 265, 291, 292, 293, 268, 267, 299, 267, 299, 281, 297, 299, 297, 280, 42, 43, 44, 277, 268, 265, 283, 299, 282, 266, 297, 284, 444, -1, -1, -1, -1, -1, -1, -1, -1, 443, 281, 281, 267, 266, 283, 268, 300, 267, 284, 282, 300, 268, 281, 267, 265, 268, 297, 275, 257, 273, 274, 257, 257, 257, 257, 257 }
+layers[0][4] = { -1, 479, 475, 476, 477, 474, 475, 476, 477, 282, 300, 297, 300, 283, 282, 291, 292, 292, 292, 293, 281, 474, 475, 476, 477, 474, 475, 476, 478, -1, -1, -1, -1, -1, -1, -1, -1, 479, 474, 475, 476, 477, 297, 299, 283, 268, 265, 284, 282, 298, 268, 266, 474, 475, 476, 477, 263, 263, 263, 292, 263, 292, 263, 292 }
layers[0][5] = { -1, 495, 491, 492, 493, 490, 491, 492, 493, 479, 475, 476, 477, 474, 475, 476, 477, 474, 475, 476, 478, 490, 491, 492, 493, 490, 491, 492, 494, -1, -1, -1, -1, -1, -1, -1, -1, 495, 490, 491, 492, 493, 479, 475, 476, 477, 474, 475, 476, 474, 475, 478, 490, 491, 492, 493, 479, 475, 476, 477, 297, 268, 268, 283 }
layers[0][6] = { -1, 511, 507, 508, 509, 506, 507, 508, 509, 495, 491, 492, 493, 490, 491, 492, 493, 490, 491, 492, 494, 506, 507, 508, 509, 506, 507, 508, 510, -1, -1, -1, -1, -1, -1, -1, -1, 511, 506, 507, 508, 509, 495, 491, 492, 493, 490, 491, 492, 490, 491, 494, 506, 507, 508, 509, 495, 491, 492, 493, 479, 475, 476, 477 }
layers[0][7] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, 511, 507, 508, 509, 506, 507, 508, 509, 506, 507, 508, 510, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 511, 507, 508, 509, 506, 507, 508, 506, 507, 510, -1, -1, -1, -1, 511, 507, 508, 509, 495, 491, 492, 493 }
@@ -252,9 +253,9 @@ layers[1][47] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
layers[2] = {}
layers[2].type = "ground"
layers[2].name = "Background 3"
-layers[2][0] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }
-layers[2][1] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }
-layers[2][2] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }
+layers[2][0] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1346, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }
+layers[2][1] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1362, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }
+layers[2][2] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1378, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }
layers[2][3] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }
layers[2][4] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }
layers[2][5] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }
@@ -374,7 +375,7 @@ function Load(m)
Map.unlimited_stamina = false;
_CreateCharacters();
--- _CreateObjects();
+ _CreateObjects();
-- _CreateEnemies();
-- Set the camera focus on hero
@@ -385,13 +386,13 @@ function Load(m)
_CreateEvents();
_CreateZones();
- -- Add a mediumly dark lightning overlay
- Map:GetEffectSupervisor():EnableLightingOverlay(hoa_video.Color(0.0, 0.0, 0.0, 0.7));
- -- Add the background and foreground animations
- Map:GetScriptSupervisor():AddScript("dat/maps/layna_forest/layna_forest_cave_1_1_background_anim.lua");
+ -- Add a mediumly dark overlay
+ Map:GetEffectSupervisor():EnableAmbientOverlay("img/ambient/dark.png", 0.0, 0.0, false);
+ -- Add the background and foreground animations
+ Map:GetScriptSupervisor():AddScript("dat/maps/layna_forest/layna_forest_cave_1_1_background_anim.lua");
- -- Add a halo, following the player to help him see what's near.
- light_halo = hoa_map.PhysicalObject();
+ -- Add a halo, following the player to help him see what's near.
+ light_halo = hoa_map.PhysicalObject();
light_halo:SetObjectID(Map.object_supervisor:GenerateObjectID());
light_halo:SetContext(hero:GetContext());
light_halo:SetPosition(hero:GetXPosition() + 1.0, hero:GetYPosition() + 5.0);
@@ -415,8 +416,8 @@ function Update()
-- Check whether the character is in one of the zones
_CheckZones();
- -- Updates the halo position
- light_halo:SetPosition(hero:GetXPosition() + 1.0, hero:GetYPosition() + 5.0);
+ -- Updates the halo position
+ light_halo:SetPosition(hero:GetXPosition() + 1.0, hero:GetYPosition() + 5.0);
end
-- Character creation
@@ -429,6 +430,29 @@ function _CreateCharacters()
Map:AddGroundObject(hero);
end
+function _CreateObjects()
+ Map:AddSavePoint(50, 6, hoa_map.MapMode.CONTEXT_01);
+
+ -- Load the spring heal effect.
+ heal_effect = hoa_map.ParticleObject("dat/effects/particles/heal_particle.lua",
+ 0, 0, hoa_map.MapMode.CONTEXT_01);
+ heal_effect:SetObjectID(Map.object_supervisor:GenerateObjectID());
+ heal_effect:Stop(); -- Don't run it until the character heals itself
+ Map:AddGroundObject(heal_effect);
+
+ -- Heal point
+ npc = CreateSprite(Map, "Butterfly", 35, 7);
+ npc:SetCollisionMask(hoa_map.MapMode.NO_COLLISION);
+ npc:SetVisible(false);
+ Map:AddGroundObject(npc);
+ dialogue = hoa_map.SpriteDialogue();
+ text = hoa_system.Translate("Your party feels better...");
+ dialogue:AddLineEvent(text, npc, "Cave heal", "");
+ DialogueManager:AddDialogue(dialogue);
+ npc:AddDialogueReference(dialogue);
+
+end
+
-- Sets common battle environment settings for enemy sprites
function _SetBattleEnvironment(enemy)
enemy:SetBattleMusicTheme("mus/Battle_Jazz.ogg");
@@ -465,6 +489,10 @@ function _CreateEvents()
event = hoa_map.MapTransitionEvent("to forest NW", "dat/maps/layna_forest/layna_forest_north_west.lua", "from_layna_cave_entrance");
EventManager:RegisterEvent(event);
+
+ -- Heal point
+ event = hoa_map.ScriptedEvent("Cave heal", "heal_party", "heal_done");
+ EventManager:RegisterEvent(event);
end
-- Create the different map zones triggering events
@@ -489,6 +517,36 @@ if (map_functions == nil) then
map_functions = {}
end
+-- Effect time used when applying the heal light effect
+local heal_effect_time = 0;
+
map_functions = {
+ heal_party = function()
+ hero:SetMoving(false);
+ -- Should be sufficient to heal anybody
+ GlobalManager:GetActiveParty():AddHitPoints(10000);
+ GlobalManager:GetActiveParty():AddSkillPoints(10000);
+ AudioManager:PlaySound("snd/heal_spell.wav");
+ heal_effect:SetPosition(hero:GetXPosition(), hero:GetYPosition());
+ heal_effect:Start();
+ heal_effect_time = 0;
+ end,
+
+ heal_done = function()
+ heal_effect_time = heal_effect_time + SystemManager:GetUpdateTime();
+
+ if (heal_effect_time < 300.0) then
+ Map:GetEffectSupervisor():EnableLightingOverlay(hoa_video.Color(0.0, 0.0, 1.0, heal_effect_time / 300.0 / 3.0));
+ return false;
+ end
+
+ if (heal_effect_time < 1000.0) then
+ Map:GetEffectSupervisor():EnableLightingOverlay(hoa_video.Color(0.0, 0.0, 1.0, ((1000.0 - heal_effect_time) / 700.0) / 3.0));
+ return false;
+ end
+ return true;
+ end,
+
+
}
Oops, something went wrong.

0 comments on commit e5e67e3

Please sign in to comment.