Exemple #1
0
        protected void create_platforms()
        {
            bool right_battler_is_battler_1 = Reverse;

            Platform = new Battle_Platform(Distance > 1);

            var battler1 = Battler_1;
            var battler2 = Battler_2;

            // Skills: Swoop
            if (battler2 != null && battler1.swoop_activated)
            {
                // Use the opponent's platform for swooping attackers
                battler1 = battler2;
            }

            Game_Unit right_battler = battler1, left_battler = battler1;

            if (battler2 != null)
            {
                right_battler = Reverse ? battler1 : battler2;
                left_battler  = !Reverse ? battler1 : battler2;
            }

            int rightPlatformTerrain = right_battler.terrain_id();

            Platform.platform_2 = platform(rightPlatformTerrain, Distance);
            Platform.loc_2      = (right_battler_is_battler_1 ? Battler_1_Loc : Battler_2_Loc) + new Vector2(Distance == 1 ? -24 : -37, 94);

            int leftPlatformTerrain = left_battler.terrain_id();

            Platform.platform_1 = platform(leftPlatformTerrain, Distance);
            Platform.loc_1      = Platform.loc_2 + new Vector2(Distance == 1 ? -87 : -(154 + (Distance == 2 ? 0 : 270)), 0);
        }
Exemple #2
0
        protected virtual void update_phase_3()
        {
            if (!Global.game_system.is_loss() && (Combat_Data == null || !Combat_Data.game_over))
            {
                if (Timer == 0)
                {
                    if (!Global.game_temp.boss_theme || Combat_Data.kill)
                    {
                        Global.Audio.BgmFadeOut(45);
                        Global.game_temp.boss_theme = false;
                    }
                }
                if (Timer == 34)
                {
                    if (Global.game_temp.boss_theme)
                    {
                        Global.game_temp.boss_theme = false;
                    }
                    else
                    {
                        Global.game_state.resume_turn_theme(true);
                    }
                }
            }
            bool cont = false;

            while (!cont)
            {
                cont = true;
                switch (Timer)
                {
                // Darken background
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                case 6:
                    if (is_battle_bg_visible)
                    {
                        Black_Fill.tint = new Color(0, 0, 0, (int)MathHelper.Min((Timer + 1) * 32, 255));
                        Weather_Opacity = (15 - Timer) / 16f;
                    }
                    else
                    {
                        cont = false;
                    }
                    Timer++;
                    break;

                // Dispose background
                case 7:
                    White_Screen = null;
                    if (is_battle_bg_visible)
                    {
                        Black_Fill.tint = new Color(0, 0, 0, 255);
                        Background      = null;
                        Black_Backing   = null;

                        Weather_Opacity = (15 - Timer) / 16f;
                    }
                    else
                    {
                        cont = false;
                    }
                    Timer++;
                    break;

                case 8:
                case 9:
                    if (is_battle_bg_visible)
                    {
                        Weather_Opacity = (15 - Timer) / 16f;
                    }
                    else
                    {
                        cont = false;
                    }
                    Timer++;
                    break;

                // Lighten background
                case 10:
                case 11:
                case 12:
                case 13:
                case 14:
                case 15:
                case 16:
                    if (is_battle_bg_visible)
                    {
                        Black_Fill.tint = new Color(0, 0, 0, (int)MathHelper.Min((17 - Timer) * 32, 255));
                        if (Timer <= 15)
                        {
                            Weather_Opacity = (15 - Timer) / 16f;
                        }
                    }
                    else
                    {
                        cont = false;
                    }
                    Timer++;
                    break;

                // Battlers move back to map sprites
                case 17:
                    Black_Fill                = null;
                    Battler_1_Sprite.loc.Y    = 104;
                    Battler_1_Sprite.offset.Y = 120;
                    Battler_1_Loc             = Battler_1_Sprite.loc;
                    if (Battler_2_Sprite != null)
                    {
                        Battler_2_Sprite.loc.Y    = 104;
                        Battler_2_Sprite.offset.Y = 120;
                        Battler_2_Loc             = Battler_2_Sprite.loc;
                    }

                    Platform_Effect_1        = new Sprite(battle_content.Load <Texture2D>(@"Graphics/White_Square"));
                    Platform_Effect_1.offset = new Vector2(8, 8);
                    if (Battler_2 != null && Distance > 1)
                    {
                        Platform_Effect_2        = new Sprite(battle_content.Load <Texture2D>(@"Graphics/White_Square"));
                        Platform_Effect_2.offset = new Vector2(8, 8);
                    }

                    battle_sprite_setup(27 - Timer);
                    Timer++;
                    break;

                // HUD moves off
                case 18:
                    battle_sprite_setup(27 - Timer);
                    HUD.go_away();
                    Timer++;
                    break;

                case 19:
                    battle_sprite_setup(27 - Timer);
                    Timer++;
                    break;

                // Platforms start to move off
                case 20:
                case 21:
                    battle_sprite_setup(27 - Timer);
                    Platform.add_y(41 - Timer);
                    Timer++;
                    break;

                case 22:
                case 23:
                case 24:
                    battle_sprite_setup(27 - Timer);
                    Platform.add_y(39 - Timer);
                    Timer++;
                    break;

                case 25:
                case 26:
                    battle_sprite_setup(27 - Timer);
                    Platform.add_y(37 - Timer);
                    Timer++;
                    break;

                // Dispose platforms
                case 27:
                    battle_sprite_setup(27 - Timer);
                    Platform          = null;
                    Platform_Effect_1 = null;
                    Platform_Effect_2 = null;
                    Timer++;
                    break;

                case 28:
                    Battler_1_Sprite.visible = false;
                    if (Battler_2_Sprite != null)
                    {
                        Battler_2_Sprite.visible = false;
                    }
                    Timer++;
                    break;

                case 29:
                case 30:
                case 31:
                case 32:
                case 33:
                    Timer++;
                    break;

                case 34:
                    battle_end();
                    Timer++;
                    break;
                }
            }
        }
 protected void initialize_images()
 {
     // Background
     Background              = new Sprite(Global.Content.Load <Texture2D>(@"Graphics/Pictures/Preparation_Background"));
     Background.mirrored     = true;
     Background.loc          = new Vector2(0, -80);
     Background.offset       = new Vector2(Config.WINDOW_WIDTH, 0);
     Background.stereoscopic = Config.REEL_BG_DEPTH;
     // Platform
     Platform       = new Battle_Platform(false);
     Platform.loc_1 = new Vector2(133 + 127 - 87, 88);
     Platform.loc_2 = new Vector2(133 + 127, 88);
     // Black_Screen
     Black_Screen           = new Sprite(Global.Content.Load <Texture2D>(@"Graphics/White_Square"));
     Black_Screen.dest_rect = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
     Black_Screen.tint      = new Color(0, 0, 0, 0);
     White_Screen           = new Sprite(Global.Content.Load <Texture2D>(@"Graphics/White_Square"));
     White_Screen.dest_rect = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
     White_Screen.opacity   = 0;
     White_Flash            = new Sprite(Global.Content.Load <Texture2D>(@"Graphics/White_Square"));
     White_Flash.dest_rect  = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
     Title_Black            = new Sprite(Global.Content.Load <Texture2D>(@"Graphics/White_Square"));
     Title_Black.dest_rect  = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
     Title_Black.tint       = new Color(0, 0, 0, 0);
     Black_Bar1             = new Sprite(Global.Content.Load <Texture2D>(@"Graphics/White_Square"));
     Black_Bar1.tint        = new Color(0, 0, 0, 255);
     Black_Bar1.visible     = false;
     Black_Bar2             = new Sprite(Global.Content.Load <Texture2D>(@"Graphics/White_Square"));
     Black_Bar2.tint        = new Color(0, 0, 0, 255);
     Black_Bar2.visible     = false;
     // Class Banner
     Class_Banner              = new Sprite(Global.Content.Load <Texture2D>(@"Graphics/Pictures/Class Reel Banner"));
     Class_Banner.loc          = new Vector2(Config.WINDOW_WIDTH / 2, Config.WINDOW_HEIGHT / 2 + 24);
     Class_Banner.opacity      = 0;
     Class_Banner.stereoscopic = Config.REEL_NAME_PLAQUE_DEPTH;
     // Text Background
     Text_Bg              = new Sprite(Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Class_Reel_Window"));
     Text_Bg.loc          = new Vector2(80, 144);
     Text_Bg.stereoscopic = Config.REEL_TEXT_BOX_DEPTH;
     // Name
     Name     = new TextSprite();
     Name.loc = new Vector2(248, 8);
     Name.SetFont(Config.REEL_FONT, Global.Content);
     Name_Bg             = new TextSprite();
     Name_Bg.loc         = new Vector2(248, 8);
     Name_Bg.draw_offset = new Vector2(2, 2);
     Name_Bg.SetFont(Config.REEL_FONT, Global.Content);
     Name_Bg.tint = new Color(0, 0, 0, 255);
     // Stat Bars
     for (int i = 0; i < Stat_Bars.Length; i++)
     {
         Stat_Bars[i]              = new Class_Reel_Stat_Bars();
         Stat_Bars[i].loc          = new Vector2(0, 16 + 16 * i);
         Stat_Bars[i].stereoscopic = Config.REEL_STATS_DEPTH;
     }
     // Stat Labels
     for (int i = 0; i < Stat_Bars.Length; i++)
     {
         Stat_Labels[i]     = new TextSprite();
         Stat_Labels[i].loc = new Vector2(8, 8 + 16 * i);
         Stat_Labels[i].SetFont(Config.UI_FONT, Global.Content, "Yellow");
         Stat_Labels[i].stereoscopic = Config.REEL_STATS_DEPTH;
     }
     Stat_Labels[0].text = "HP";
     Stat_Labels[2].text = "Skl";
     Stat_Labels[3].text = "Spd";
     if (Class_Reel_Data.SKIP_LCK)
     {
         Stat_Labels[4].text = "Def";
         Stat_Labels[5].text = "Res";
         Stat_Labels[6].text = "Con";
     }
     else
     {
         Stat_Labels[4].text = "Lck";
         Stat_Labels[5].text = "Def";
         Stat_Labels[6].text = "Res";
     }
     // Stat Labels
     for (int i = 0; i < Stat_Values.Length; i++)
     {
         Stat_Values[i]     = new RightAdjustedText();
         Stat_Values[i].loc = new Vector2(48, 8 + 16 * i);
         Stat_Values[i].SetFont(Config.UI_FONT, Global.Content, "White");
         Stat_Values[i].stereoscopic = Config.REEL_STATS_DEPTH;
     }
 }