diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-08 04:29:50 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-08 04:29:50 +0000 |
commit | 835386081ecfabc9e442ce6cc1139fae06564651 (patch) | |
tree | ec56759ac399d0ea30d268cec8d2b0eb51fbd8f8 /crawl-ref/source/spells2.cc | |
parent | f9b3fccde9594e3ba99a93a8652416f32e662f8d (diff) | |
download | crawl-ref-835386081ecfabc9e442ce6cc1139fae06564651.tar.gz crawl-ref-835386081ecfabc9e442ce6cc1139fae06564651.zip |
Clean up handling of angered monsters.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5579 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r-- | crawl-ref/source/spells2.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index 520c1e3feb..2371d051f8 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -1627,15 +1627,11 @@ bool cast_summon_small_mammals(int pow, bool god_gift) switch (pow_spent) { case 75: case 74: case 38: + mon = MONS_ORANGE_RAT; // If you worship a good god, don't summon an evil small // mammal. - // XXX: There should be a better way to do this, using - // player_angers_monster(). - if (!is_good_god(you.religion)) - { - mon = MONS_ORANGE_RAT; + if (!player_will_anger_monster(mon)) break; - } case 65: case 64: case 63: case 27: case 26: case 25: mon = MONS_GREEN_RAT; @@ -1643,11 +1639,11 @@ bool cast_summon_small_mammals(int pow, bool god_gift) case 57: case 56: case 55: case 54: case 53: case 52: case 20: case 18: case 16: case 14: case 12: case 10: - mon = coinflip() ? MONS_QUOKKA : MONS_GREY_RAT; + mon = (coinflip()) ? MONS_QUOKKA : MONS_GREY_RAT; break; default: - mon = coinflip() ? MONS_GIANT_BAT : MONS_RAT; + mon = (coinflip()) ? MONS_GIANT_BAT : MONS_RAT; break; } |