From e5c35dd08e149f985c77be908cfc3e9c69f2d13e Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Sat, 24 Oct 2009 22:12:10 -0700 Subject: 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. --- crawl-ref/source/player.cc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'crawl-ref/source/player.cc') 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); -- cgit v1.2.3-54-g00ecf