candidate: Generally , two attempts are awarded when the player is fouled in the act of shooting ( three attempts are awarded in the case of three - point shot ) , fouled flagrantly , or when the opposing team fouls while over the foul limit .