For me, this mission is undoubtedly the most difficult in the entire game, including all the expansions. The main thing is to survive the first few weeks, and then it will become much easier.
And why does Railag only have spells up to level four? In this mission, Railag and Shadia should have all possible spells, except in rare cases.
I'll tell you how I completed it, as I recently replayed the campaigns on Hero difficulty.
I developed Railag with Chaos, Summoning, Education, and Spellcraft, although I was only able to get Spellcraft in this mission. Shadia was developed in the same way, but with Darkness instead of Summoning. I think Summoning is a very useful skill in this campaign. Thanks to it, I completed the fifth mission by going straight through the garrisons, instead of taking detours. And in general, there are situations where even a Phoenix is more effective than Chaos. In the last mission, the Swarm was very helpful, especially with Railag's special ability.
In this mission, I divided the army, giving the majority to Railag and a smaller part to Shadia. Railag took the castle, and again, the Phoenix was more effective here. I immediately sent Shadia down to capture the mines, because even with such a siege, you can't forget about the economy and upgrading the castle, preferably upgrading it to Hydras as soon as possible. Then I hired secondary heroes for scouting. Railag replenished his mana and immediately went to capture the second castle. Then, according to the script, a Demon should appear, but in version 1.6, the scripts are a mess, and the Demons didn't appear at all, but just stood there. If the Demon had also appeared, it would have been even worse, and as it was, it was a constant siege by high-level Warlocks.
The same problem occurred in the fifth mission for Isabel, when Agrael and other Demons didn't come to besiege the castle, and also in the third mission for Faelan, when the Necrophages attacked sporadically, and because of this, the quest to liberate the area didn't open until I went out and attacked them myself.
Next, buy as much of the available army as possible and defend against the high-level Warlocks, preferably in the castle, and continue to gather mines as much as possible, it's good if you can quickly get upgraded Hydras. After defeating the enemy heroes, don't forget to check the taverns, as sometimes the defeated heroes come there. If you buy a few, the mission is practically complete. You can safely send Railag in one direction and Shadia in another, and the purchased Warlocks 20+ will be able to defend the castle and capture even more mines. By the way, you can send one of the purchased low-level heroes as quickly as possible to the portal, where there are a lot of gold chests, although there is a risk of encountering an enemy. When you buy enough Warlocks 20+, the computer will often be running around with low-level heroes, often not Warlocks, and it will no longer be difficult to win, just capture one castle after another.
But before the third mission, it's advisable to upgrade all the skills to the Expert level, so that you can learn all the possible spells in the second mission. Also, max out the Unstoppable skill, as there will often be Warlocks with a high resistance skill. And of course, Arcane Wave, and Elemental Sense are also useful, and you definitely need Education and Magic Affinity, as you will be very short on mana. Spellcraft is also desirable, but I wasn't lucky.
That's how I completed it. The main thing is to survive for at least two weeks, until you defeat several enemies and buy at least some of the defeated Warlocks, and then everything will be easier.
If it doesn't work out, I can recommend a few good videos on YouTube about completing the campaigns, they helped me in some missions when I started playing on Hero difficulty.
Probably, I need to replay the second mission, as the hero's skills were developed very poorly.
Падение Грифона 136x136
Рельеф - 40%
Скрипты - 15%
Геймплей - 20%