Hey guys, I'm back.
I brought this to my little nerd group and we tried it out for the random treasure generating.
The problem happens around lines 517 and 1013.
No matter the input, the loop tries to go into "Earth" components. I had it as an elseif statement earlier, with no success.
Also, if one tries to run the program to get more than one piece of treasure and they both land on getting components, it no longer even asks if you want Earth or Celestial. It goes with the one you put in the first time, but that's a problem for another time. The first one's much more important.