diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-28 23:43:00 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-28 23:43:00 +0000 |
commit | 82075a938cc268cbfb9ea9b09f3acb28f65f1e79 (patch) | |
tree | 5d838d9ae068c85c642b61b90b526fe0d1488095 /crawl-ref/source/religion.cc | |
parent | 6227494d3fee44608ba466d38a4e893e25a7d634 (diff) | |
download | crawl-ref-82075a938cc268cbfb9ea9b09f3acb28f65f1e79.tar.gz crawl-ref-82075a938cc268cbfb9ea9b09f3acb28f65f1e79.zip |
Clean up the blessing routine a bit more.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3924 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r-- | crawl-ref/source/religion.cc | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 1c7c4b0de7..946229acae 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -938,21 +938,31 @@ void bless_follower(god_type god, // get out. if (monster == NON_MONSTER) { - if (god == GOD_BEOGH && chance <= 4) + if (chance <= 4) { - bool reinforced = beogh_blessing_reinforcement(); - - if (!reinforced || coinflip()) + switch (god) { - if (beogh_blessing_reinforcement()) - reinforced = true; - } + case GOD_BEOGH: + { + bool reinforced = beogh_blessing_reinforcement(); - if (reinforced) - { - blessed = "you"; - result = "reinforcement"; - goto blessing_done; + if (!reinforced || coinflip()) + { + if (beogh_blessing_reinforcement()) + reinforced = true; + } + + if (reinforced) + { + blessed = "you"; + result = "reinforcement"; + goto blessing_done; + } + break; + } + + default: + break; } } @@ -978,6 +988,7 @@ void bless_follower(god_type god, goto blessing_done; } break; + case GOD_BEOGH: // Turn a monster into a priestly monster, if possible. if (beogh_blessing_priesthood(mon)) @@ -986,6 +997,7 @@ void bless_follower(god_type god, goto blessing_done; } break; + default: break; } |