summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-03 20:43:20 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-03 20:43:20 +0000
commit537041db917da5d1ba30dd7c39283e0e8d8e2854 (patch)
treed0a6b49f91a11ed429430f8d15d3087ec3d91fd5 /crawl-ref
parent09c586c9f0a5e8dc3abc20b7928b1474641077e1 (diff)
downloadcrawl-ref-537041db917da5d1ba30dd7c39283e0e8d8e2854.tar.gz
crawl-ref-537041db917da5d1ba30dd7c39283e0e8d8e2854.zip
Simplify yet again.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7373 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/religion.cc22
-rw-r--r--crawl-ref/source/religion.h6
2 files changed, 17 insertions, 11 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index bce9bc8bbd..257fc99e70 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -2238,20 +2238,18 @@ void god_speaks(god_type god, const char *mesg)
mpr(mesg, MSGCH_GOD, god);
}
-bool do_god_vengeance(conduct_type thing_done)
+bool do_god_revenge(conduct_type thing_done)
{
bool retval = false;
switch (thing_done)
{
case DID_DESTROY_ORCISH_IDOL:
- retval = true;
- beogh_idol_revenge();
+ retval = beogh_idol_revenge();
break;
case DID_KILL_HOLY:
case DID_HOLY_KILLED_BY_SERVANT:
- retval = true;
- tso_holy_revenge();
+ retval = tso_holy_revenge();
break;
default:
break;
@@ -2912,7 +2910,7 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known,
}
#endif
- do_god_vengeance(thing_done);
+ do_god_revenge(thing_done);
return (ret);
}
@@ -4940,7 +4938,7 @@ static std::string _get_beogh_speech(const std::string key)
}
// Destroying orcish idols (a.k.a. idols of Beogh) may anger Beogh.
-void beogh_idol_revenge()
+bool beogh_idol_revenge()
{
god_acting gdact(GOD_BEOGH, true);
@@ -4960,7 +4958,11 @@ void beogh_idol_revenge()
revenge = _get_beogh_speech("idol other").c_str();
god_smites_you(GOD_BEOGH, revenge);
+
+ return (true);
}
+
+ return (false);
}
static void _print_good_god_neutral_holy_being_speech(const std::string key,
@@ -5052,7 +5054,7 @@ static std::string _get_tso_speech(const std::string key)
}
// Killing holy beings may anger TSO.
-void tso_holy_revenge()
+bool tso_holy_revenge()
{
god_acting gdact(GOD_SHINING_ONE, true);
@@ -5068,7 +5070,11 @@ void tso_holy_revenge()
revenge = _get_tso_speech("holy other").c_str();
tso_blasts_cleansing_flame(revenge);
+
+ return (true);
}
+
+ return (false);
}
void yred_make_enslaved_soul(monsters *mon, bool force_hostile,
diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h
index 4d13e2a7b7..d9619f5a59 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);
-bool do_god_vengeance(conduct_type thing_done);
+bool do_god_revenge(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,
@@ -99,10 +99,10 @@ void divine_retribution(god_type god);
bool zin_sustenance(bool actual = true);
bool yred_injury_mirror(bool actual = true);
bool beogh_water_walk();
-void beogh_idol_revenge();
+bool beogh_idol_revenge();
void good_god_holy_attitude_change(monsters *holy);
void tso_blasts_cleansing_flame(const char *message = NULL);
-void tso_holy_revenge();
+bool tso_holy_revenge();
void yred_make_enslaved_soul(monsters *mon, bool force_hostile = false,
bool quiet = false, bool allow_fail = true);
void beogh_convert_orc(monsters *orc, bool emergency,