Esempio n. 1
0
        protected void use_weapons(Game_Unit battler_1, Game_Unit battler_2)
        {
            // Weapon Use
            for (int i = 0; i < Weapon_1_Uses; i++)
            {
                battler_1.weapon_use();
            }
            for (int i = 0; i < Weapon_2_Uses; i++)
            {
                battler_2.weapon_use();
            }

            if (battler_1.using_siege_engine)
            {
                // Put siege engine in reload state
                if (Constants.Gameplay.SIEGE_RELOADING)
                {
                    Global.game_map.get_siege(battler_1.loc).fire();
                }
            }
            else if (battler_1.is_weapon_broke())
            {
                battler_1.actor.discard_weapon();
            }

            if (battler_2 != null)
            {
                if (battler_2.using_siege_engine)
                {
                    // Put siege engine in reload state
                    if (Constants.Gameplay.SIEGE_RELOADING)
                    {
                        Global.game_map.get_siege(battler_2.loc).fire();
                    }
                }
                else if (battler_2.is_weapon_broke())
                {
                    battler_2.actor.discard_weapon();
                }
            }

            fix_unusable_items(battler_1, battler_2);
        }