diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-28 15:03:06 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-28 15:03:06 +0000 |
commit | 32525cca511f64ddc4ef4921f887e64038cdd428 (patch) | |
tree | 62772d4931ef9e619681937b2b263b33a35632f5 /crawl-ref/source/mutation.cc | |
parent | c1752a109ffb7604ba6b3bbc3de8818b2f139435 (diff) | |
download | crawl-ref-32525cca511f64ddc4ef4921f887e64038cdd428.tar.gz crawl-ref-32525cca511f64ddc4ef4921f887e64038cdd428.zip |
Allow god gift mutations to override less than 3 levels of the mutation
resistance mutation.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4745 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mutation.cc')
-rw-r--r-- | crawl-ref/source/mutation.cc | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc index 7dbdfa46b5..d299d3088d 100644 --- a/crawl-ref/source/mutation.cc +++ b/crawl-ref/source/mutation.cc @@ -1662,12 +1662,13 @@ bool mutate(mutation_type which_mutation, bool failMsg, if (!force_mutation) { - // God gifts override amulets of resist mutation. - if ((wearing_amulet(AMU_RESIST_MUTATION) - && !one_chance_in(10) && !god_gift) - || player_mutation_level(MUT_MUTATION_RESISTANCE) == 3 + // God gifts override amulets of resist mutation and less than 3 + // levels of the mutation resistance mutation. + if (player_mutation_level(MUT_MUTATION_RESISTANCE) == 3 + || ((wearing_amulet(AMU_RESIST_MUTATION) + && !one_chance_in(10) || player_mutation_level(MUT_MUTATION_RESISTANCE) - && !one_chance_in(3)) + && !one_chance_in(3)) && !god_gift)) { mpr("You feel odd for a moment.", MSGCH_MUTATION); return false; @@ -2185,15 +2186,17 @@ int how_mutated(bool all, bool levels) } // end how_mutated() bool delete_mutation(mutation_type which_mutation, - bool force_mutation) + bool force_mutation, bool god_gift) { mutation_type mutat = which_mutation; if (!force_mutation) { - if (player_mutation_level(MUT_MUTATION_RESISTANCE) > 1 - && (player_mutation_level(MUT_MUTATION_RESISTANCE) == 3 - || coinflip())) + // God gifts override less than 3 levels of the mutation + // resistance mutation. + if (player_mutation_level(MUT_MUTATION_RESISTANCE) == 3 + || ((player_mutation_level(MUT_MUTATION_RESISTANCE) > 1 + && coinflip()) && !god_gift)) { mpr("You feel rather odd for a moment.", MSGCH_MUTATION); return false; |