Exemplo n.º 1
0
        protected override void update_phase_1()
        {
            base_update_phase_1();
            switch (Segment)
            {
            case 0:
                bool cont = false;
                while (!cont)
                {
                    cont = true;
                    if (!Attack_Active)
                    {
                        Active_Battler = 1;
                        add_battle_action(Battle_Actions.New_Attack);
                    }
                    bool next_attack = attack(Battler_1, Battler_2, true);
                    Battler_1.update_attack_graphics();
                    Battler_2.update_attack_graphics();
                    if (next_attack)
                    {
                        Timer    = 0;
                        Segment  = 1;
                        Can_Skip = false;
                        refresh_stats();
                    }
                }
                break;

            case 1:
                switch (Timer)
                {
                case 20:
                    Segment = 2;
                    Timer   = 0;
                    break;

                default:
                    Timer++;
                    break;
                }
                break;

            case 2:
                Phase   = 2;
                Segment = 0;
                break;
            }
        }
Exemplo n.º 2
0
        protected override bool exp_gained()
        {
            // Exp gain
            if (Battler_1.allowed_to_gain_exp() && Battler_1.actor.can_level())
            {
                int exp      = Battler_1.actor.exp;
                int exp_gain = Battler_1.dance_exp();

                if (exp_gain > 0 || Battler_1.actor.needed_levels > 0)
                {
                    create_exp_gauge(exp);
                    Exp_Gain        = exp_gain;
                    Exp_Gauge.loc.Y = Config.WINDOW_HEIGHT - 24;
                    return(true);
                }
            }
            return(false);
        }
Exemplo n.º 3
0
        public override void initialize_action(int distance)
        {
            Battler_1 = Global.game_map.units[Global.game_system.Battler_1_Id];
            Battler_2 = Global.game_map.units[Global.game_system.Battler_2_Id];

            Battler_1.preload_animations(distance);
            Battler_2.preload_animations(distance);

            Combat.battle_setup(Battler_1.id, Battler_2.id, distance, 0);
            new_combat_data(distance);
            Reverse       = Battler_2.is_opposition;
            Real_Distance = Distance = distance;
            //if (Global.data_weapons[Combat_Data.Weapon_1_Id].Max_Range <= 2 && Distance > 2)
            if (!Global.data_weapons[weapon_id(1)].Long_Range && Distance > 2) //Debug
            {
                Distance = 2;
            }
            if (Distance == 2)
            {
                Pan_Vector = Effects_Pan_Vector = new Vector2(16 * (Reverse ? -1 : 1), 0);
            }
            Can_Skip = false;
        }