summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-04 02:37:13 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-04 02:37:13 +0000
commit58f3401b46ad29dc5937599ffd7fb975c27bf7d6 (patch)
tree3eda3356bb6ba830104e80fdd931d81e3e80833a /crawl-ref
parent8152dfbf1c24aa7c89aa3129938abf1bb45b2b30 (diff)
downloadcrawl-ref-58f3401b46ad29dc5937599ffd7fb975c27bf7d6.tar.gz
crawl-ref-58f3401b46ad29dc5937599ffd7fb975c27bf7d6.zip
Make some god-related functions static.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7378 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/religion.cc32
-rw-r--r--crawl-ref/source/religion.h6
2 files changed, 18 insertions, 20 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index b8fc3692b1..c8cb4fe9a7 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -365,6 +365,11 @@ static bool _chaotic_beings_attitude_change();
static bool _magic_users_attitude_change();
static bool _yred_slaves_abandon_you();
static bool _beogh_followers_abandon_you();
+static void _god_smites_you(god_type god, const char *message = NULL,
+ kill_method_type death_type = NUM_KILLBY);
+static bool _beogh_idol_revenge();
+static void _tso_blasts_cleansing_flame(const char *message = NULL);
+static bool _tso_holy_revenge();
static void _altar_prayer();
static void _dock_piety(int piety_loss, int penance);
static bool _make_god_gifts_disappear(bool level_only = true);
@@ -2238,18 +2243,18 @@ void god_speaks(god_type god, const char *mesg)
mpr(mesg, MSGCH_GOD, god);
}
-bool do_god_revenge(conduct_type thing_done)
+static bool _do_god_revenge(conduct_type thing_done)
{
bool retval = false;
switch (thing_done)
{
case DID_DESTROY_ORCISH_IDOL:
- retval = beogh_idol_revenge();
+ retval = _beogh_idol_revenge();
break;
case DID_KILL_HOLY:
case DID_HOLY_KILLED_BY_SERVANT:
- retval = tso_holy_revenge();
+ retval = _tso_holy_revenge();
break;
default:
break;
@@ -2915,7 +2920,7 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known,
}
#endif
- do_god_revenge(thing_done);
+ _do_god_revenge(thing_done);
return (retval);
}
@@ -3600,7 +3605,7 @@ static bool _tso_retribution()
}
case 3:
case 4: // cleansing flame (2/7)
- tso_blasts_cleansing_flame();
+ _tso_blasts_cleansing_flame();
break;
case 5:
case 6: // either noisiness or silence (2/7)
@@ -4045,7 +4050,7 @@ static bool _beogh_retribution()
{
case 0: // smiting (25%)
case 1:
- god_smites_you(GOD_BEOGH);
+ _god_smites_you(GOD_BEOGH);
break;
case 2: // send out one or two dancing weapons (12.5%)
@@ -4943,7 +4948,7 @@ static std::string _get_beogh_speech(const std::string key)
}
// Destroying orcish idols (a.k.a. idols of Beogh) may anger Beogh.
-bool beogh_idol_revenge()
+static bool _beogh_idol_revenge()
{
god_acting gdact(GOD_BEOGH, true);
@@ -4962,7 +4967,7 @@ bool beogh_idol_revenge()
else
revenge = _get_beogh_speech("idol other").c_str();
- god_smites_you(GOD_BEOGH, revenge);
+ _god_smites_you(GOD_BEOGH, revenge);
return (true);
}
@@ -5009,7 +5014,7 @@ void good_god_holy_attitude_change(monsters *holy)
behaviour_event(holy, ME_ALERT, MHITNOT);
}
-void tso_blasts_cleansing_flame(const char *message)
+static void _tso_blasts_cleansing_flame(const char *message)
{
// TSO won't protect you from his own cleansing flame, and Xom is too
// capricious to protect you from it.
@@ -5059,7 +5064,7 @@ static std::string _get_tso_speech(const std::string key)
}
// Killing holy beings may anger TSO.
-bool tso_holy_revenge()
+static bool _tso_holy_revenge()
{
god_acting gdact(GOD_SHINING_ONE, true);
@@ -5075,7 +5080,7 @@ bool tso_holy_revenge()
else
revenge = _get_tso_speech("holy other").c_str();
- tso_blasts_cleansing_flame(revenge);
+ _tso_blasts_cleansing_flame(revenge);
return (true);
}
@@ -6116,9 +6121,8 @@ harm_protection_type god_protects_from_harm(god_type god, bool actual)
return (HPT_NONE);
}
-void god_smites_you(god_type god, const char *message,
- kill_method_type death_type)
-
+static void _god_smites_you(god_type god, const char *message,
+ kill_method_type death_type)
{
ASSERT(god != GOD_NO_GOD);
diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h
index d9619f5a59..540eece8db 100644
--- a/crawl-ref/source/religion.h
+++ b/crawl-ref/source/religion.h
@@ -63,7 +63,6 @@ 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_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,
@@ -92,17 +91,12 @@ bool god_hates_killing(god_type god, const monsters* mon);
bool god_likes_butchery(god_type god);
bool god_hates_butchery(god_type god);
harm_protection_type god_protects_from_harm(god_type god, bool actual = true);
-void god_smites_you(god_type god, const char *message = NULL,
- kill_method_type death_type = NUM_KILLBY);
void divine_retribution(god_type god);
bool zin_sustenance(bool actual = true);
bool yred_injury_mirror(bool actual = true);
bool beogh_water_walk();
-bool beogh_idol_revenge();
void good_god_holy_attitude_change(monsters *holy);
-void tso_blasts_cleansing_flame(const char *message = NULL);
-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,