summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-03 20:39:33 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-03 20:39:33 +0000
commit09c586c9f0a5e8dc3abc20b7928b1474641077e1 (patch)
tree2a3060a634b6b13d120df407d69febb1110b31bf /crawl-ref
parentaf6cb48eda2b91fa76f8a1ad27a5dc1917a57870 (diff)
downloadcrawl-ref-09c586c9f0a5e8dc3abc20b7928b1474641077e1.tar.gz
crawl-ref-09c586c9f0a5e8dc3abc20b7928b1474641077e1.zip
Simplify again.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7372 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/religion.cc23
-rw-r--r--crawl-ref/source/religion.h2
2 files changed, 14 insertions, 11 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 512c29a470..bce9bc8bbd 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -2238,23 +2238,26 @@ void god_speaks(god_type god, const char *mesg)
mpr(mesg, MSGCH_GOD, god);
}
-god_type do_god_vengeance(conduct_type thing_done)
+bool do_god_vengeance(conduct_type thing_done)
{
- god_type god = GOD_NO_GOD;
+ bool retval = false;
- if (thing_done == DID_DESTROY_ORCISH_IDOL)
+ switch (thing_done)
{
- god = GOD_BEOGH;
+ case DID_DESTROY_ORCISH_IDOL:
+ retval = true;
beogh_idol_revenge();
- }
- else if (thing_done == DID_KILL_HOLY
- || thing_done == DID_HOLY_KILLED_BY_SERVANT)
- {
- god = GOD_SHINING_ONE;
+ break;
+ case DID_KILL_HOLY:
+ case DID_HOLY_KILLED_BY_SERVANT:
+ retval = true;
tso_holy_revenge();
+ break;
+ default:
+ break;
}
- return (god);
+ return (retval);
}
// This function is the merger of done_good() and naughty().
diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h
index e0fe410e96..4d13e2a7b7 100644
--- a/crawl-ref/source/religion.h
+++ b/crawl-ref/source/religion.h
@@ -63,7 +63,7 @@ std::string get_god_dislikes(god_type which_god, bool verbose = false);
void dec_penance(int val);
void dec_penance(god_type god, int val);
-god_type do_god_vengeance(conduct_type thing_done);
+bool do_god_vengeance(conduct_type thing_done);
bool did_god_conduct(conduct_type thing_done, int pgain, bool known = true,
const monsters *victim = NULL);
void set_attack_conducts(god_conduct_trigger conduct[3], const monsters *mon,