So you want breeding to have 50% chance of success and 50% chance of failure? You may want to use the mt_rand() function to generate random number at equal chance, a typical way of doing this is:
PHP Code:
$rand = mt_rand(0,1); //Generate a random number between 0 and 1
if($rand == 0){
// codes to execute for successful breeding.
}
else{
// shows an error message saying breeding has failed.
}
Hopefully this is the correct interpretation of your request.