diff options
author | Stefan O'Rear <stefanor@cox.net> | 2009-10-24 22:12:10 -0700 |
---|---|---|
committer | Stefan O'Rear <stefanor@cox.net> | 2009-10-24 22:38:26 -0700 |
commit | e5c35dd08e149f985c77be908cfc3e9c69f2d13e (patch) | |
tree | 67adba7b180a1908c7d960e97861740af162f8d3 /crawl-ref/source/player.cc | |
parent | 5bae81aab842d440e045a1fa061a9553589d9616 (diff) | |
download | crawl-ref-e5c35dd08e149f985c77be908cfc3e9c69f2d13e.tar.gz crawl-ref-e5c35dd08e149f985c77be908cfc3e9c69f2d13e.zip |
Roll demonspawn mutations at the start of the game.
All demonspawn mutations are now stored in the player data, and are
determined at the same time. This makes a lot of things a lot simpler.
On the other hand, it means that the influence of skills and gods on
demonspawn mutations is now broken.
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 00bce8440b..a22749f530 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -3458,15 +3458,10 @@ void level_change(bool skip_attribute_increase) break; case SP_DEMONSPAWN: - // We want 17 (6*3 - 1) random attemps to raise or add a - // mutation in the 26 level ups. The following check is - // equivalent to taking a string of 17 1s and 9 0s and - // shuffling it. - - if (x_chance_in_y(17 - you.attribute[ATTR_NUM_DEMONIC_POWERS], - 28 - you.experience_level)) + if (you.demon_trait[you.experience_level - 2] != NUM_MUTATIONS) { - demonspawn(); + mpr("Your demonic ancestry asserts itself...", MSGCH_INTRINSIC_GAIN); + perma_mutate(you.demon_trait[you.experience_level - 2], 1); } if (!(you.experience_level % 4)) @@ -5946,6 +5941,8 @@ void player::init() mutation.init(0); demon_pow.init(0); + demon_trait.init(NUM_MUTATIONS); + had_book.init(false); unique_items.init(UNIQ_NOT_EXISTS); |