Phase transition in the topological properties of the generalized percolation model