2. Spell A requires 1 hidden resource A (Can be cast by all but...)
Yeah the trick is i'm trying to figure out a way to do it so that the spell doesn't appear in the (strategic) spell book to human players... and I think a spell that requires a hidden resource will be visible. Still that's better than what I have far.
I'm sure a Requires UnitStat will hide the spell from players so i'm trying to figure out how to bump that for an AI Sov. What i'm thinking is similar to what you've suggested.... need to make use of the <IsAIOnlyUnit>1</IsAIOnlyUnit> somehow.
I'm thinking, create new UnitStat, default value 1. The AI Spell needs a value of 2 to cast (minimum).
An AIOnly unit could have an Ability that does something like set A_NewUnitStat, Value 100.... I think that will double the UnitStat value to 2 for all units.
The trick being what unit to give the ability... I tried creating AI pioneers a while back to do something like this but it didn't seem to work, from memory the AI kept building the default pioneers... not sure how to influence that.
I dunno it's all a bit tricky... various workarounds that can work, but in some cases the AI won't figure it out. I'm tempted just to create a spell call "DON'T CAST ME - AI ONLY", and if the players wants to stuff things up by casting it so be it.
I really wish we had AI only spells and events though.