The story and my setup...
So I wanted to make a NB build that can stay invisible indefinitely. I think it's very helpful while farming mats, because of the run speed boost and not having to waste time on mounting while still reaching comparable movement speed. With 5p
Seducer set (1 heavy, 1 medium, 2 light and staff), 5p
Warlock set (jewelry and 2 light) and 1p
Shadowrend, with 157 magicka regen on the necklace and 203 spell cost reduction on both rings I get 2580 passive magicka regeneration (without the warlock 5p bonus). With this setup
Shadow Cloak (the NB invisibility spell) costs 3076 magicka, and lasts 2.9 seconds due to
a Shadow tree passive. My character is also a High Elf and has 75 CP in Arcanist (14%). I set up a macro on my mouse that recasts Shadow Cloak every 2.8 seconds (and I verified that it is indeed 2.8 seconds).
Now to my actual problem...
With a magicka cost of 3076 and the spell being used every 2.8 seconds, the average magicka usage would be:
3076 / 2.8 * 2 = 2198 (rounded up)
My passive regen is 2580, so 382 higher than what should be required to keep recasting Shadow Cloak, so I would expect my magicka bar to always be full. But when I actually tested it, the regeneration was so much lower (or the spell cost so much higher) that despite the warlock 5p bonus I ran out of magicka in 5:24 minutes, and couldn't recast it any more.
I also have another warlock necklace that has a 203 magicka cost reduction enchant, so I swapped that one in. With this setup I have 2332 regen and 2910 spell cost, which means an expected cost per 2s of 2079, meaning my regen is 253 above what would be required to keep it up. However with this setup, I do lose magicka until the warlock 5p kicks in, and this time it's actually sufficient to make me invisible permanently (presumably because of the higher ratio of the restored magicka from 5p warlock compared to the spell cost). But still, with my current setup the magicka bar should never get low enough to trigger the warlock set in the first place.
Am I missing something about how regeneration is supposed to work? Or is it a bug with displayed regeneration or some of the multipliers not working properly (CP, High Elf passive)?