diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-10 16:00:33 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-10 16:00:33 +0000 |
commit | 8694b881d08a2baa880d013c753a7ae24323e887 (patch) | |
tree | 35aa966dc912aa91c56982597b25c8cbad7b0913 /crawl-ref/source/spells2.cc | |
parent | f6b8a1eea325bf2a8e9e81bf8d57c84d22787e6c (diff) | |
download | crawl-ref-8694b881d08a2baa880d013c753a7ae24323e887.tar.gz crawl-ref-8694b881d08a2baa880d013c753a7ae24323e887.zip |
Clean up handling of orange rats in cast_summon_small_mammals().
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5704 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r-- | crawl-ref/source/spells2.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index c7867a2fe6..68da716c12 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -1066,12 +1066,9 @@ bool cast_summon_small_mammals(int pow, bool god_gift) switch (pow_spent) { - // If you worship a good god, don't summon an evil small mammal - // (in this case, the orange rat). case 75: case 74: case 38: mon = MONS_ORANGE_RAT; - if (!player_will_anger_monster(mon)) - break; + break; case 65: case 64: case 63: case 27: case 26: case 25: mon = MONS_GREEN_RAT; @@ -1087,6 +1084,11 @@ bool cast_summon_small_mammals(int pow, bool god_gift) break; } + // If you worship a good god, don't summon an evil small mammal + // (in this case, the orange rat). + if (player_will_anger_monster(mon)) + continue; + pow_left -= pow_spent; count++; |