Baldur's Gate 2 had Friendly Fire for sure. For NWN though, it was optional. On easy and normal difficulty, friendly fire (from fireball) wouldn't affect your teammates. But if you went up to D&D Hardcore, or the next difficulty up (forgot what it was), then friendly fire was enabled fully.