Auto-translated
I'm currently playing through this mission in version 3.0. Frida has a specialization from the Tribes of the East faction – when any light magic spell is cast, Divine Retribution randomly hits an enemy. I captured the castle on the 2nd day of the 2nd week. I built mage guilds in the castles. I had very bad luck. In both castles, Divine Retribution was detrimental (I figured this out after the garrison was deployed) and almost useless due to its weak magic, Holy Word. Before this, Divine Retribution hit without fail (a feature?). After it appeared in the spellbook, the specialization started working as described (randomly).
I don't remember how Frida's specialization worked in the original game. I think that before she got Divine Retribution, it didn't work at all.