diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-13 15:46:38 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-13 15:46:38 +0000 |
commit | e7f07ca39819b9370578f0ceb71ba86f0ce8e801 (patch) | |
tree | 7f9c0c11b92ad6524ac66301da32aba9d27aa8cc /crawl-ref | |
parent | 5d5987a633370a1bebf888f950bc5519864bc9ca (diff) | |
download | crawl-ref-e7f07ca39819b9370578f0ceb71ba86f0ce8e801.tar.gz crawl-ref-e7f07ca39819b9370578f0ceb71ba86f0ce8e801.zip |
Make mutations from god-given spell miscasts count as god-given
mutations.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10207 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/mutation.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc index 8a405e183d..c8561d0878 100644 --- a/crawl-ref/source/mutation.cc +++ b/crawl-ref/source/mutation.cc @@ -2041,6 +2041,16 @@ bool mutate(mutation_type which_mutation, bool failMsg, { ASSERT(!non_fatal || _is_random(which_mutation)); + if (!god_gift) + { + const god_type god = + (crawl_state.is_god_acting()) ? crawl_state.which_god_acting() + : GOD_NO_GOD; + + if (god != GOD_NO_GOD) + god_gift = true; + } + if (demonspawn) force_mutation = true; @@ -2208,6 +2218,7 @@ bool mutate(mutation_type which_mutation, bool failMsg, return (true); if (rc == -1) return (false); + ASSERT(rc == 0); const unsigned int old_talents = your_talents(false).size(); @@ -2394,6 +2405,16 @@ bool delete_mutation(mutation_type which_mutation, bool failMsg, { ASSERT(!non_fatal || _is_random(which_mutation)); + if (!god_gift) + { + const god_type god = + (crawl_state.is_god_acting()) ? crawl_state.which_god_acting() + : GOD_NO_GOD; + + if (god != GOD_NO_GOD) + god_gift = true; + } + mutation_type mutat = which_mutation; if (!force_mutation) |