# Equal chance for Mana dropping in battles?

**URL:** <https://community.gemsofwar.com/t/equal-chance-for-mana-dropping-in-battles/3427>\
**Category:** Gameplay Chat (PlayStation 4/Xbox One)\
**Created:** [February 3, 2016, 5:28am UTC](https://community.gemsofwar.com/t/equal-chance-for-mana-dropping-in-battles/3427 "2016-02-03T05:28:03Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![Sirrian](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/sirrian/32/35758_2.png) [@Sirrian](https://community.gemsofwar.com/u/Sirrian)\
**Post date:** [February 4, 2016, 5:57am UTC](https://community.gemsofwar.com/t/equal-chance-for-mana-dropping-in-battles/3427/16 "2016-02-04T05:57:06Z")

</div>

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:

1. The combo breaker is on & we want to stop the AI player getting a lucky drop
2. During board setup, we might change a gem so the board doesn’t start with any matches on it.

---

_[View the full topic](https://community.gemsofwar.com/t/equal-chance-for-mana-dropping-in-battles/3427)._
