Fixed SMART_ACTION_CALL_CASTEDCREATUREORGO, thanks @Vincent-Michael. Also re-tweaked BuildSAIPhase.
Adding a database diagnose tool. WIP
Updated output.