This is a formula used for deciding if gambling on pets trying to get legendary. Put in the amount a legendary pet sells for. Then put in the amount it takes to buy the resources to craft the pet. It uses the chance that you have a 40% chance of legendary but I am planning on making that modifiable.
This is a work in progress.