Quote:
Originally Posted by Hall of Famer
You can also do database integration by creating a new field in table prefix.adoptables that stores the number of babies a specific species can produce. It can get quite tricky for interspecies breeding though, so I do not recommend it at this moment.
|
I know you aren't feeling well but I need this. I need to keep the rares and ultra rares from breeding more than 1 at a time.
I figured out a difficult and probably source consuming way....
Code:
else{
if ($female->type == 'Cake Dragon') $num = mt_rand(0, 1);
else if ($female->type == 'Sun-up Dragon') $num = mt_rand(0, 1);
else if ($female->type == 'Sundown Dragon') $num = mt_rand(0, 1);
else if ($female->type == 'Bastet Dragon') $num = mt_rand(0, 1);
else if ($male->type == 'Cake Dragon') $num = mt_rand(0, 1);
else if ($male->type == 'Sun-up Dragon') $num = mt_rand(0, 1);
else if ($male->type == 'Sundown Dragon') $num = mt_rand(0, 1);
else if ($male->type == 'Bastet Dragon') $num = mt_rand(0, 1);
else if ($female->type == 'Aqua Dragon') $num = mt_rand(0, 4);
else if ($female->type == 'Cow Amphiptere Dragon') $num = mt_rand(0, 4);
else if ($male->type == 'Aqua Dragon') $num = mt_rand(0, 4);
else if ($male->type == 'Cow Amphiptere Dragon') $num = mt_rand(0, 4);
else $num = mt_rand(0, 5);
for($i = 0;$i<$num;$i++){
I wanted to just use the rarity variable that is in the adoptables table but I wasn't sure how to call it?