AiTurnContext.OpponentIds was everyone-except-self, so in team games the AI would attack its own allies and score them as enemy material. The game model already has TeamIndex on PlayerState and GameState.GetEnemyIds() / AreAllies() helpers — the AI just never used them. - AiTurnContext: use state.GetEnemyIds() so OpponentIds excludes allies (fixes attack targeting, threat detection, positional advance) - MaterialScore: use state.AreAllies() so allied units/ArchSpirit score positively instead of as enemy material - PositionalScore: skip allied players when collecting enemy positions Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>