In this fantasy world magic users are called rankers are graded into three grades:
1,soldier grade (Anyone with a magic weapon can become one.)
2,champion grade (requires years of training, only one in a thousand can reach this level)
3,general grade (Very very rare. A nation will be super power if it can have more than hundred general grade rankers.)
Anyone above this power level will not be participating directly in battles, (like nuclear deterrent). This group will not be relevant to the question, just mentioning for completeness.
So, the gun technology was fairly undeveloped due to availability of magic.
-No Automatic reload.
-No precise sniping etc.,
A soldier grade ranker is similar to ancient warriors on earth with slightly powerful cold weapons. Mostly they will be killed if he/she meets a gun wielding enemy as rankers don't use guns (as they will be obsolete in later stages).
A Champion grade ranker can use powerful magics and can kill a gun wielding enemy before the bullet is fired. But even they will be in trouble if they meet a gun wielding enemy battalion. In front of hundreds of bullets, they cannot do much individually. At most they will kill tens of enemies before dying.
General grade rankers have domains of their own and can easily stop large number of projectiles as long as they don't contain large amount of energy (like a cannon shell). Of course, they have limits and will be defeated if you keep on sending human waves against them. However, it would take thousands of soldiers to kill a single General grade ranker.
Now my question is: What will be the composition and deployment patterns of troops in such a scenario?
Cost of arming a soldier with gun is equal to a magic weapon.
General grade experts are equally matched on both sides.
Clarification about abilities:
Rankers need catalysts to use magic. Catalysts can only be procured from dungeons. So most of the times rankers has to learn magic compatible with available catalysts than vice-versa.
Depending on the method of usage of the catalyst, rankers are generally two types. Warriors who embed the catalyst in some kind of melee weapon and mages who use catalyst directly.
Warriors use magic as an enhancement to their strength, so they use magic spells with little or no activation times and spend lot of money on making a perfect weapon for their catalyst.
Mages on the other hand design complicated magic spells to extract the maximum output from the catalyst.
These are only rough styles and every ranker is a mix of the two styles. Warriors also have flashy and powerful abilities and mages can cast instant spells.
Clarifications about stamina and other requirements for magic:
In this world there are three kinds of energy good, bad, neutral (called rajas). Gods and demons use good and bad kinds of energy. Humans manipulate rajas using catalysts. This is called magic, with different magic systems corresponding to different methods of manipulating the rajas.
Every mortal ranker (i.e not a singularity) has some kind of limit in usage of rajas. If a general grade ranker used too much magic for too long he/she would need some rest before being able to use magic. If they forcefully try to use magic in that time it will cripple or even kill the user.
Also Catalysts also have limits on their maximum output and will be destroyed if overloaded.
Info about magic weapons:
People need training before using catalyst or they would go mad. That is one the reasons soldier grade rankers use magic weapons (contains traces of catalyst) to get used before using the real thing.
Magic weapons are made from materials mined from dungeons. Even normal resources contains some traces of rajas. For example iron ore found in a dungeon can be extra hard or super light.
As said earlier, magic weapons are just slightly stronger than normal cold weapons. They generally don't rust or break down easily. May have resistance to temperature changes etc.
Only nations with huge manpower can take control of dungeon and mine resources from it.
Relative strength of grades
A General level is not invincible (A next grade of rankers called Singularities would take that honor). A group of twenty champion grade rankers can battle a general by attrition. Especially if the champions have abilities that counter General's domain.
As I mentioned generals are very rare and are treated as strategic assets. Every loss of a general grade expert will be a blow to nation's overall strength. In fact, most of the noble clans were headed by a general grade expert.
About tech level
Very crude guns with a need to reload manually after every shot. Mobile cannons were recently invented but not well received as most of the champions can do the same thing much faster.
It should be noted that the backwardness of technology is not due to lack of knowledge but rather lack of interest in the field. So no large scale assembly lines and standardized equipment. Magic can do what science can do and even what it cannot do. Especially since dungeons are a constant source of fear to the society, the powers that gained from dungeons are source of admiration.
Medical field is developed but is a hybrid between science and magic. In fact, dungeons were ingrained so deeply in the culture that development of technology mostly means finding new methods to use catalysts.
The singularities (above general grade) are legendary existences in this world. They can reportedly even bend space and time. Legends about them inspire every youngster to become a ranker.
They are bound by an restriction to not fight in this world. If they break the restriction a heavenly tribulation will descend from sky.
It is said that singularities are resistant to passage of time. The possibility of immortality is another reason many people take the path of magic.
A related question which can make this question more clear. Warfare-in-the-presence-of-magic-users