So, to put any further conspiracy theories to rest, here is the code that generates our gems:
if (bInitialSetup)
{
var nRoll:int = m_pPuzzleBoard.m_GemRNG.percentile();
m_nType = Math.floor(nRoll / 15);
}
else
{
m_nType = m_pPuzzleBoard.m_GemRNG.range(0, PuzzleGem.GEM_TYPES - 1);
}
Where m_GemRNG is standard Mersenne Twister RNG that knows nothing about the board or your masteries or troops or anything.
Gem types 0 through 5 are Blue, Green, Red, Yellow, Purple & Brown, respectively
Gem type 6 is a Skull.
As you can see, during board setup we reduce the chance of a skull to 10%, while other gem types are 15% (so we don’t overly advantage the first player). After that, it’s all even chances.
That’s it! Simplest code ever. Copied straight from our codebase.
No dirty tricks happening at all. Anything else you might imagine is simply recall bias or a small sample size and a run of bad luck (which any RNG, even a relatively good one like the Mersenne Twister, can supply).
The ONLY reasons these values will be changed after generation are:
- The combo breaker is on & we want to stop the AI player getting a lucky drop
- During board setup, we might change a gem so the board doesn’t start with any matches on it.