public void randomizeStatsWithinBST() {
		if (number == 292) {
			// Shedinja is horribly broken unless we restrict him to 1HP.
			int bst = bst() - 51;

			// Make weightings
			double atkW = RandomSource.random(), defW = RandomSource.random();
			double spaW = RandomSource.random(), spdW = RandomSource.random(), speW = RandomSource
					.random();

			double totW = atkW + defW + spaW + spdW + speW;

			hp = 1;
			attack = (int) Math.max(1, Math.round(atkW / totW * bst)) + 10;
			defense = (int) Math.max(1, Math.round(defW / totW * bst)) + 10;
			spatk = (int) Math.max(1, Math.round(spaW / totW * bst)) + 10;
			spdef = (int) Math.max(1, Math.round(spdW / totW * bst)) + 10;
			speed = (int) Math.max(1, Math.round(speW / totW * bst)) + 10;

			// Fix up special too
			special = (int) Math.ceil((spatk + spdef) / 2.0f);

		} else {
			// Minimum 20 HP, 10 everything else
			int bst = bst() - 70;

			// Make weightings
			double hpW = RandomSource.random(), atkW = RandomSource.random(), defW = RandomSource
					.random();
			double spaW = RandomSource.random(), spdW = RandomSource.random(), speW = RandomSource
					.random();

			double totW = hpW + atkW + defW + spaW + spdW + speW;

			hp = (int) Math.max(1, Math.round(hpW / totW * bst)) + 20;
			attack = (int) Math.max(1, Math.round(atkW / totW * bst)) + 10;
			defense = (int) Math.max(1, Math.round(defW / totW * bst)) + 10;
			spatk = (int) Math.max(1, Math.round(spaW / totW * bst)) + 10;
			spdef = (int) Math.max(1, Math.round(spdW / totW * bst)) + 10;
			speed = (int) Math.max(1, Math.round(speW / totW * bst)) + 10;

			// Fix up special too
			special = (int) Math.ceil((spatk + spdef) / 2.0f);
		}

		// Check for something we can't store
		if (hp > 255 || attack > 255 || defense > 255 || spatk > 255
				|| spdef > 255 || speed > 255) {
			// re roll
			randomizeStatsWithinBST();
		}

	}