well i am not sure what you are asking but i will try to explain what i think your asking.
clearly there is a if statement asking if below 94 mage it cannot be casted just make another if statement checking if brewed and below 94 can be castable quite easy don't you think?