Sounds like a massive pain, especially if you change your mind later.
Change your mind in what sense? You don't get to change your mind in the current version either, once you've cast Time Stop, it's cast... the issue is that Time Stop isn't limited as it should be, so this flag limits spell-casting during Time Stop.
I can see three parts of the work to be done for my idea to be feasible:
1. Changing all the spells to check this variable would best be done by writing a global function and inserting that global function in each spell to be restricted, e.g. IsTimeStopRestricted();
then each spell script would be altered thus:
if (IsTimeStopRestricted()); //is True -> restrict spells
{display message saying "You can't cast this spell during Time Stop!"}
else. //is False -> don't restrict spell
{leave spell script to run as usual}
endif.2. Knowing when to set the boolean value
bIsCastingTimeStop on the character is, I think, easy: you put the hook inside the Time Stop spell script at the appropriate place, set bIsCastingTimeStop = True; ... I will try to check the spell script, though.
3. The biggest pain I can see is then clearing the
bIsCastingTimeStop variable. (Cuz obviously you want to reset it to False, otherwise, the Mage is stuck unable to cast Time Stop-restricted spells even after Time Stop has ended.) I don't know where you can hang that exit condition -- if you can set it to reset at the end of the Time Stop countdown, or if you need to resort to more complicated coding. That indeed might be the issue that breaks my idea.