View Single Post
Old March 16, 2020, 13:22   #3
wobbly
Veteran
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,346
wobbly is on a distinguished road
gencave.c
I don't think the odds in the note actually match the function.

Code:
		/* We generate a rarity number to figure out how exotic to make the
		 * room. This number has a depth/DUN_UNUSUAL chance of being > 0,
		 * a depth^2/DUN_UNUSUAL^2 chance of being > 1, up to MAX_RARITY. */
		i = 0;
		rarity = 0;
		while (i == rarity && i < dun->profile->max_rarity) {
			if (randint0(dun_unusual) < 50 + c->depth / 2) rarity++;
			i++;
		}
wobbly is offline   Reply With Quote