diff options
author | Stefan O'Rear <stefanor@cox.net> | 2009-11-08 05:13:41 -0800 |
---|---|---|
committer | Stefan O'Rear <stefanor@cox.net> | 2009-11-08 05:14:12 -0800 |
commit | 5562dfc2a3dd500be1a98a02703eb37496b5fb8e (patch) | |
tree | 9d77c45ff9b2c0040d8c669bfff05a86966b29d7 /crawl-ref/source/player.cc | |
parent | 5d78f4fbac5120ebee12c73624ded022abc3c933 (diff) | |
download | crawl-ref-5562dfc2a3dd500be1a98a02703eb37496b5fb8e.tar.gz crawl-ref-5562dfc2a3dd500be1a98a02703eb37496b5fb8e.zip |
Relax the one mutation per level rule for DS
Breaks saves.
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 59a20295ac..07ba1e784a 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -3180,10 +3180,24 @@ void level_change(bool skip_attribute_increase) break; case SP_DEMONSPAWN: - if (you.demon_trait[you.experience_level - 2] != NUM_MUTATIONS) { - mpr("Your demonic ancestry asserts itself...", MSGCH_INTRINSIC_GAIN); - perma_mutate(you.demon_trait[you.experience_level - 2], 1); + bool gave_message = false; + + for (unsigned i = 0; i < you.demonic_traits.size(); ++i) + { + if (you.demonic_traits[i].level_gained + == you.experience_level) + { + if (!gave_message) + { + mpr("Your demonic ancestry asserts itself...", + MSGCH_INTRINSIC_GAIN); + + gave_message = true; + } + perma_mutate(you.demonic_traits[i].mutation, 1); + } + } } if (!(you.experience_level % 4)) @@ -5572,7 +5586,7 @@ void player::init() mutation.init(0); demon_pow.init(0); - demon_trait.init(NUM_MUTATIONS); + demonic_traits.clear(); had_book.init(false); |