That’s not a bug, it’s a feature. Like how the tzathoth devouring 5 times in a row over 2 games in raid out of 5 casts. Rng swings too much in this game, and while it may swing our way once in a while, we have the capability to strategize and weigh the options we have. The AI just goes meh and wins through RNG at times that make it near impossible to win.
The devour will remove the barrier, but the troop will not be devoured. Some troops skirt this rule by dealing damage then having a chance to devour in two different steps with the damage always removing the barrier before the devour is checked (notably, Kraken). Also of note is that a devour attempt will remove a barrier before devour immunity is checked.
What mithran said about barrier, I thought you meant that a troop that can be devoured that does not have barrier active. The feature not bug comment was under the assumption that you meant multiple castings on an unbarriered troop failed every single time.
The joke was that there have been many debates on RNG in the form of cascades, status effects, and spells with a devour chance. Every time people go back and forth about recall bias, how the luck system is balanced or unbalanced, often leading to a dev saying everything was working as intended. I know in games I’ve played that were plagued by bugs or inconsistencies, it was joked to be a “feature” rather than a bug.
Thank you Kylemator for your long reply! I know the theory about RNG. But what I am posting here is more like a found and debug process. It might be simply that Dwarven Gate has some hidden code, functionally work as immune to devours.