added terrain and unit masks for the AI system