summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mutation.cc
diff options
context:
space:
mode:
authorStefan O'Rear <stefanor@cox.net>2009-10-25 23:24:53 -0700
committerDarshan Shaligram <dshaligram@users.sourceforge.net>2009-10-26 13:40:46 +0530
commit270ec5c73a1bf0f0514a8a8f95d4c191424b03bb (patch)
treeecc16bbd461cbff6a20be10dac2a998670e278bf /crawl-ref/source/mutation.cc
parentad0e497ea4314b08bafe3fd74b32ee9e8d42e1c4 (diff)
downloadcrawl-ref-270ec5c73a1bf0f0514a8a8f95d4c191424b03bb.tar.gz
crawl-ref-270ec5c73a1bf0f0514a8a8f95d4c191424b03bb.zip
Nerf early mutation gain
After concerns from James Meickle and watching a few characters on CDO, I've instated two small nerfs: * It is not possible to have a long run of mutations in the early game; you are capped at 3 mutations per 4 levels. * Tier 1 mutations do not start to appear until level 12; tier 2 mutations do not start until level 6. Signed-off-by: Darshan Shaligram <dshaligram@users.sourceforge.net>
Diffstat (limited to 'crawl-ref/source/mutation.cc')
-rw-r--r--crawl-ref/source/mutation.cc23
1 files changed, 18 insertions, 5 deletions
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index b234b86f40..65a42c9403 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -2701,10 +2701,10 @@ try_again:
{
mutation_type muts[6];
- muts[0] = RANDOM_ELEMENT(body_muts);
- muts[1] = RANDOM_ELEMENT(awesome_muts);
+ muts[0] = RANDOM_ELEMENT(awesome_muts);
+ muts[1] = RANDOM_ELEMENT(great_muts);
muts[2] = RANDOM_ELEMENT(great_muts);
- muts[3] = RANDOM_ELEMENT(great_muts);
+ muts[3] = RANDOM_ELEMENT(body_muts);
muts[4] = RANDOM_ELEMENT(good_muts);
muts[5] = RANDOM_ELEMENT(good_muts);
@@ -2747,16 +2747,29 @@ try_again:
for (int level = 2; level <= 27; ++level)
{
+ // To reduce variance a bit, cap mutations per level at 0.75.
+ // This has the side effect of forcing no mutation at XL2.
+ if ((ngiven + 1) * 4 > (level - 1) * 3)
+ continue;
+
// We want 18 (6*3) random attempts to raise or add a mutation
// in the 26 level ups. The following check is equivalent to
// taking a string of 18 1s and 8 0s and shuffling it.
-
if (x_chance_in_y(18 - ngiven, 28 - level))
{
int available_facets[6];
int navailable_facets = 0;
- for (int i = 0; i < 6; ++i)
+ int first_facet;
+
+ if (level >= 12)
+ first_facet = 0; // At or above 12 all mutations are available
+ else if (level >= 6)
+ first_facet = 1; // The awesome mutation does not show up before 12
+ else
+ first_facet = 3; // Only body and good mutations are eligible at start
+
+ for (int i = first_facet; i < 6; ++i)
if (given[i] != 3)
available_facets[navailable_facets++] = i;