In the quest mode you win new cards but balancing the cards between the 5 colors, artifacts, artifact creatures, and lands is very tricky. My idea, which I’ve coded, consists of creating a smaller, balanced "bag" and then choosing randomly from it. The idea is to reduce randomness while still being random.
The colors are usually evenly distributed while allowing some unpredictability. Artifacts, lands and multicolored cards appear less often than any color. If you total the artifacts, lands and multicolored cards you will roughly get a number that is usually close to the number of white cards (or any other one color).
This got me thinking about physical booster packs, how are they created? The cards don’t seem to be randomly mixed together because you don’t seem to get duplicate cards (something that did happen when MTG Forge created purely random packs). The creation of real booster packs seems to be related with how the cards are laid out in sheets. Which also leads to the question of what algorithm does Magic Online use to generate packs?
Someone has finally done it and converted MTG Forge into an applet. The link is delvegames.com/solomtg.html The "play the game" option worked for me while the "play with images preloaded" didn’t. You can only play with preconstructed decks, the Deck Editor and Quest mode aren't implemented. Anyways, have fun :)