Browse files

Added the new files needed in preparation of the last dungeon scene.

I'll finish that and wire them once I'm done with the map content.
  • Loading branch information...
1 parent f505563 commit fa68c5e5c8a7c1db7c69f665f663cb2eccb668ea Yohann Ferreira committed Dec 20, 2012
View
14 LICENSES
@@ -1,7 +1,7 @@
Licenses
========
-Last update: 2012.12.07
+Last update: 2012.12.19
This file is listing all the files licenses from the point of the fork
from the Allacrost project.
@@ -27,6 +27,9 @@ art/map_locations_borders.xcf GPLv2
art/white wolf.xcf CC by SA 3.0, GPLv2 Bertram, based on two sources: http://opengameart.org/content/the-wolf, and: http://opengameart.org/content/gray-wolf from Buch (OGA)
art/fenrir_patrick_thompson_ccbysa30.xcf CC by SA 3.0 Patrick Thompson (PK Illustration) - http://opengameart.org/content/fenrir-wolf-sprite-injuries
art/item_template.png CC by SA 3.0 Bertram
+art/lightning1.xcf CC by SA 3.0 Bertram
+art/lightning2.xcf CC by SA 3.0 Bertram
+art/lightning3.xcf CC by SA 3.0 Bertram
dat/global.lua GPLv2 or later Bertram (Completely redone it.)
@@ -54,6 +57,7 @@ dat/effects/emotes.lua GPLv2 or later
dat/effects/particles/rain.lua GPLv2 or later roos + Bertram modifications
dat/effects/particles/snow.lua GPLv2 or later roos + Bertram modifications
dat/effects/particles/blue_firework.lua GPLv2 or later roos + Bertram modifications
+dat/effects/particles/crystal_appearance.lua GPLv2 or later roos + Bertram modifications
dat/effects/particles/defensive_stance.lua GPLv2 or later Bertram
dat/effects/particles/explosion.lua GPLv2 or later roos + Bertram modifications
dat/effects/particles/fire.lua GPLv2 or later roos + Bertram modifications
@@ -62,8 +66,16 @@ dat/effects/particles/heal_particle.lua GPLv2 or later
dat/effects/particles/wave_spell.lua GPLv2 or later Bertram
dat/maps/*.lua GPLv2 or later Bertram
+
dat/maps/layna_forest/wolfpain_necklace.png CC by SA 3.0 Bertram - adapted from Scrittl's work (OGA) - http://opengameart.org/content/armor-icons-32x32-px-painterly
+dat/maps/layna_forest/crystal_appearance/blue_lightning1.png CC by SA 3.0 Bertram
+dat/maps/layna_forest/crystal_appearance/blue_lightning2.png CC by SA 3.0 Bertram
+dat/maps/layna_forest/crystal_appearance/blue_lightning3.png CC by SA 3.0 Bertram
+dat/maps/layna_forest/crystal_appearance/crystal_shadow.png CC by SA 3.0 Len + Bertram modifications
+dat/maps/layna_forest/crystal_appearance/layna_forest_crystal_appearance_anim.lua GPLv2 Bertram
+dat/maps/layna_forest/crystal_appearance/vortex.png CC by SA 3.0 Bertram
+
dat/objects/arm_armor.lua GPLv2 or later Allacrost + Bertram
dat/objects/head_armor.lua GPLv2 or later Allacrost + Bertram
dat/objects/items.lua GPLv2 or later Allacrost + Bertram
View
BIN art/lightning1.xcf
Binary file not shown.
View
BIN art/lightning2.xcf
Binary file not shown.
View
BIN art/lightning3.xcf
Binary file not shown.
View
107 dat/effects/particles/crystal_appearance.lua
@@ -0,0 +1,107 @@
+-- Crystal appearance
+-- Author: roos, modifications by Bertram for crystal appearance
+
+systems = {}
+
+systems[0] =
+{
+ emitter =
+ {
+ x=0,
+ y=0,
+ x2=0,
+ y2=0,
+ center_x=0,
+ center_y=0,
+ x_variation=0,
+ y_variation=0,
+ radius=30,
+ shape='CIRCLE',
+ omnidirectional=true,
+ orientation=0,
+ outer_cone=0,
+ inner_cone=0,
+ initial_speed=200,
+ initial_speed_variation=0,
+ emission_rate=3800,
+ start_time=0,
+ emitter_mode='one shot',
+ spin='COUNTERCLOCKWISE'
+ },
+
+ keyframes =
+ {
+ { -- keyframe 1
+ size_x=0.3,
+ size_y=0.3,
+ color={0,1,1,1},
+ rotation_speed=0,
+ size_variation_x=0,
+ size_variation_y=0,
+ rotation_speed_variation=0,
+ color_variation={.7,.3,.3,0},
+ time=0
+ },
+
+ { -- keyframe 2
+ size_x=0.6,
+ size_y=0.6,
+ color={0,0,1,0},
+ rotation_speed=0,
+ size_variation_x=0,
+ size_variation_y=0,
+ rotation_speed_variation=0,
+ color_variation={.1,.3, .3,0},
+ time=1.0
+ }
+
+ },
+
+ animation_frames =
+ {
+ 'img/effects/fire.png'
+ },
+ animation_frame_times =
+ {
+ 16
+ },
+ enabled = true,
+ blend_mode = 13,
+ system_lifetime = 10,
+ particle_lifetime = 0.4,
+ particle_lifetime_variation = 0.00,
+ max_particles = 300,
+ damping = 1,
+ damping_variation = 0,
+ acceleration_x = 0,
+ acceleration_y = 2530,
+ acceleration_variation_x = 0,
+ acceleration_variation_y = 0,
+ wind_velocity_x = 0,
+ wind_velocity_y = 0,
+ wind_velocity_variation_x = 0,
+ wind_velocity_variation_y = 0,
+ wave_motion_used = true,
+ wave_length = .5,
+ wave_length_variation = 0,
+ wave_amplitude = 0,
+ wave_amplitude_variation = 0,
+ tangential_acceleration = 7880,
+ tangential_acceleration_variation = 0,
+ radial_acceleration = 0,
+ radial_acceleration_variation = 0,
+ user_defined_attractor = false,
+ attractor_falloff = 0,
+ rotation_used = true,
+ rotate_to_velocity = true,
+ speed_scale_used = true,
+ speed_scale = 0.005,
+ min_speed_scale = 1.0,
+ max_speed_scale = 20.0,
+ smooth_animation = false,
+ modify_stencil = false,
+ stencil_op = 'INCR',
+ use_stencil = false,
+ scene_lighting = 0.0,
+ random_initial_angle = false
+}
View
BIN dat/maps/layna_forest/crystal_appearance/blue_lightning1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN dat/maps/layna_forest/crystal_appearance/blue_lightning2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN dat/maps/layna_forest/crystal_appearance/blue_lightning3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN dat/maps/layna_forest/crystal_appearance/crystal_shadow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
245 dat/maps/layna_forest/crystal_appearance/layna_forest_crystal_appearance_anim.lua
@@ -0,0 +1,245 @@
+------------------------------------------------------------------------------[[
+-- Filename: layna_forest_crystal_appearance_anim.lua
+--
+-- Description: Display an image of the stone sign text, in the actual
+-- scripture seen by the characters for 5 seconds with fade in/out.
+------------------------------------------------------------------------------]]
+
+local ns = {}
+setmetatable(ns, {__index = _G})
+layna_forest_crystal_appearance_anim = ns;
+setfenv(1, ns);
+
+local crystal_shadow_id = 0;
+local lightning1_id = 0;
+local lightning2_id = 0;
+local lightning3_id = 0;
+local vortex_id = 0;
+
+local display_time = 0;
+
+local lightning_time = 0;
+local lightning1_triggered = false;
+local lightning2_triggered = false;
+local lightning3_triggered = false;
+local lightning4_triggered = false;
+local lightning5_triggered = false;
+local lightning6_triggered = false;
+local lightning7_triggered = false;
+local lightning8_triggered = false;
+local lightning9_triggered = false;
+
+local tremor_triggered = false;
+
+function Initialize(map_instance)
+ Map = map_instance;
+
+ Script = Map:GetScriptSupervisor();
+ Effects = Map:GetEffectSupervisor();
+
+ crystal_shadow_id = Script:AddImage("dat/maps/layna_forest/crystal_appearance/crystal_shadow.png", 20.0, 31.0);
+
+ lightning1_id = Script:AddImage("dat/maps/layna_forest/crystal_appearance/blue_lightning1.png", 248.0, 400.0);
+ lightning2_id = Script:AddImage("dat/maps/layna_forest/crystal_appearance/blue_lightning2.png", 118.0, 400.0);
+ lightning3_id = Script:AddImage("dat/maps/layna_forest/crystal_appearance/blue_lightning3.png", 171.0, 400.0);
+
+ vortex_id = Script:AddImage("dat/maps/layna_forest/crystal_appearance/vortex.png", 386.0, 207.0);
+
+ display_time = 0;
+end
+
+function Update()
+ -- Only show the image if requested by the events
+ if (GlobalManager:DoesEventExist("story", "layna_forest_crystal_appearance") == false) then
+ return;
+ end
+
+ if (GlobalManager:GetEventValue("story", "layna_forest_crystal_appearance") == 0) then
+ return;
+ end
+
+ local time_expired = SystemManager:GetUpdateTime();
+
+ -- Handle the timer
+ display_time = display_time + time_expired;
+ lightning_time = lightning_time + time_expired;
+
+ -- Start the timer
+ if (display_time > 15000) then
+ display_time = 0;
+ -- Disable the event at the end of it
+ GlobalManager:SetEventValue("story", "layna_forest_crystal_appearance", 0);
+ end
+
+ if (tremor_triggered == false and display_time >= 2000) then
+ -- Trigger a tremor
+ VideoManager:ShakeScreen(0.6, 13000, hoa_video.GameVideo.VIDEO_FALLOFF_GRADUAL);
+ AudioManager:PlaySound("snd/rumble.wav");
+
+ -- Fade out the "music"
+ AudioManager:FadeOutAllMusic(2000);
+
+ -- trigger also the particle effect
+ Map:GetParticleManager():AddParticleEffect("dat/effects/particles/crystal_appearance.lua", 512.0, 282.0);
+
+ tremor_triggered = true;
+ end
+
+end
+
+-- Draw the lightning effects
+function _DrawLightnings()
+ -- trigger the lightnings
+ if (lightning_time >= 2000 and lightning_time <= 2300) then
+ Script:DrawImage(lightning1_id, 470, 282.0, hoa_video.Color(1.0, 1.0, 1.0, 1.0));
+ if (lightning1_triggered == false) then
+ lightning1_triggered = true;
+ AudioManager:PlaySound("snd/lightning.wav");
+ end
+ end
+
+ if (lightning_time >= 3000 and lightning_time <= 3300) then
+ Script:DrawImage(lightning2_id, 550, 282.0, hoa_video.Color(1.0, 1.0, 1.0, 1.0));
+ if (lightning2_triggered == false) then
+ lightning2_triggered = true;
+ AudioManager:PlaySound("snd/thunder.wav");
+ end
+ end
+
+ if (lightning_time >= 3500 and lightning_time <= 3800) then
+ Script:DrawImage(lightning3_id, 500, 280.0, hoa_video.Color(1.0, 1.0, 1.0, 1.0));
+ if (lightning3_triggered == false) then
+ lightning3_triggered = true;
+ AudioManager:PlaySound("snd/lightning.wav");
+ end
+ end
+
+ if (lightning_time >= 4000 and lightning_time <= 4300) then
+ Script:DrawImage(lightning2_id, 490, 278.0, hoa_video.Color(1.0, 1.0, 1.0, 1.0));
+ if (lightning4_triggered == false) then
+ lightning4_triggered = true;
+ AudioManager:PlaySound("snd/thunder.wav");
+ end
+ end
+
+ if (lightning_time >= 4200 and lightning_time <= 4500) then
+ Script:DrawImage(lightning1_id, 570, 284.0, hoa_video.Color(1.0, 1.0, 1.0, 1.0));
+ if (lightning5_triggered == false) then
+ lightning5_triggered = true;
+ AudioManager:PlaySound("snd/lightning.wav");
+ end
+ end
+
+ if (lightning_time >= 4400 and lightning_time <= 4700) then
+ Script:DrawImage(lightning3_id, 400, 280.0, hoa_video.Color(1.0, 1.0, 1.0, 1.0));
+ if (lightning6_triggered == false) then
+ lightning6_triggered = true;
+ AudioManager:PlaySound("snd/lightning.wav");
+ end
+ end
+
+ if (lightning_time >= 4800 and lightning_time <= 5200) then
+ Script:DrawImage(lightning2_id, 520, 278.0, hoa_video.Color(1.0, 1.0, 1.0, 1.0));
+ if (lightning7_triggered == false) then
+ lightning7_triggered = true;
+ AudioManager:PlaySound("snd/thunder.wav");
+ end
+ end
+
+ if (lightning_time >= 5000 and lightning_time <= 5300) then
+ Script:DrawImage(lightning1_id, 480, 280.0, hoa_video.Color(1.0, 1.0, 1.0, 1.0));
+ if (lightning8_triggered == false) then
+ lightning8_triggered = true;
+ AudioManager:PlaySound("snd/lightning.wav");
+ end
+ end
+
+ if (lightning_time >= 5200 and lightning_time <= 5400) then
+ Script:DrawImage(lightning2_id, 530, 284.0, hoa_video.Color(1.0, 1.0, 1.0, 1.0));
+ if (lightning9_triggered == false) then
+ lightning9_triggered = true;
+ AudioManager:PlaySound("snd/thunder.wav");
+ end
+ elseif (lightning_time > 5400) then
+ -- loop the last lightnings until the effect is gone
+ lightning_time = 4000;
+ lightning4_triggered = false;
+ lightning5_triggered = false;
+ lightning6_triggered = false;
+ lightning7_triggered = false;
+ lightning8_triggered = false;
+ lightning9_triggered = false;
+ end
+end
+
+function DrawPostEffects()
+ -- Only show the image if requested by the events
+ if (GlobalManager:DoesEventExist("story", "layna_forest_crystal_appearance") == false) then
+ return;
+ end
+
+ if (GlobalManager:GetEventValue("story", "layna_forest_crystal_appearance") == 0) then
+ return;
+ end
+
+ _DrawLightnings();
+
+ -- Apply a dark overlay first.
+ local overlay_alpha = 0.8;
+ if (display_time >= 0 and display_time <= 2500) then
+ overlay_alpha = 0.8 * (display_time / 2500);
+ Map:GetEffectSupervisor():EnableLightingOverlay(hoa_video.Color(0.0, 0.0, 0.0, overlay_alpha));
+ elseif (display_time > 2500 and display_time <= 6500) then
+ overlay_alpha = 0.8;
+ Map:GetEffectSupervisor():EnableLightingOverlay(hoa_video.Color(0.0, 0.0, 0.0, overlay_alpha));
+ elseif (display_time > 6500 and display_time <= 8000) then
+ overlay_alpha = 0.8 - (display_time - 6500) / (8000 - 6500);
+ Map:GetEffectSupervisor():EnableLightingOverlay(hoa_video.Color(0.0, 0.0, 0.0, overlay_alpha));
+ elseif (overlay_alpha > 0.0 and display_time > 8000) then
+ overlay_alpha = 0.0;
+ Map:GetEffectSupervisor():DisableLightingOverlay();
+ end
+
+ -- Then show the vortex
+ -- TODO: Show the vortex particle effect.
+ local vortex_alpha = 0.0;
+ local crystal_alpha = 0.0;
+ if (display_time >= 4000 and display_time <= 5000) then
+ vortex_alpha = 0.2 * (display_time - 4000) / (5000 - 4000);
+ crystal_alpha = (display_time - 4000) / (5000 - 4000);
+ Script:DrawImage(vortex_id, 532, 384.0, hoa_video.Color(1.0, 1.0, 1.0, vortex_alpha));
+ Script:DrawImage(crystal_shadow_id, 512, 280.0, hoa_video.Color(1.0, 1.0, 1.0, crystal_alpha));
+ elseif (display_time > 5000 and display_time <= 6500) then
+ vortex_alpha = 0.2;
+ crystal_alpha = 1.0;
+ Script:DrawImage(vortex_id, 532, 384.0, hoa_video.Color(1.0, 1.0, 1.0, vortex_alpha));
+ Script:DrawImage(crystal_shadow_id, 512, 280.0, hoa_video.Color(1.0, 1.0, 1.0, crystal_alpha));
+ elseif (display_time > 6500 and display_time <= 10600) then
+ vortex_alpha = 0.2 - 0.2 * (display_time - 6500) / (10600 - 6500);
+ crystal_alpha = 1.0 - (display_time - 6500) / (10600 - 6500);
+ Script:DrawImage(vortex_id, 532, 384.0, hoa_video.Color(1.0, 1.0, 1.0, vortex_alpha));
+ Script:DrawImage(crystal_shadow_id, 512, 280.0, hoa_video.Color(1.0, 1.0, 1.0, crystal_alpha));
+ elseif (vortex_alpha > 0.0 and display_time > 10600) then
+ vortex_alpha = 0.0;
+ crystal_alpha = 0.0;
+ end
+
+
+ -- Then apply a white flash
+ local flash_alpha = 0.0;
+ if (display_time >= 8000 and display_time <= 8500) then
+ flash_alpha = 1.0 * (display_time - 8000) / (8500 - 8000);
+ Map:GetEffectSupervisor():EnableLightingOverlay(hoa_video.Color(1.0, 1.0, 1.0, flash_alpha));
+ elseif (display_time > 8500 and display_time <= 11000) then
+ flash_alpha = 1.0;
+ Map:GetEffectSupervisor():EnableLightingOverlay(hoa_video.Color(1.0, 1.0, 1.0, flash_alpha));
+ elseif (display_time > 11000 and display_time <= 15000) then
+ flash_alpha = 1.0 - (display_time - 11000) / (15000 - 11000);
+ Map:GetEffectSupervisor():EnableLightingOverlay(hoa_video.Color(1.0, 1.0, 1.0, flash_alpha));
+ elseif (flash_alpha > -1.0 and display_time > 15000) then
+ flash_alpha = -1.0;
+ Map:GetEffectSupervisor():DisableLightingOverlay();
+ Map:GetParticleManager():StopAll(false);
+ end
+
+end
View
BIN dat/maps/layna_forest/crystal_appearance/vortex.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fa68c5e

Please sign in to comment.