summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source')
-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,