summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/religion.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-25 19:05:13 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-25 19:05:13 +0000
commit3797cd88dfd7d37ab3c8f0118f34bb2962c2ae3b (patch)
tree80f489741c31e7c3bd160f2315e144d0923cf89f /crawl-ref/source/religion.cc
parent8a218b4239b5e4966f1821590d02818ef0556e77 (diff)
downloadcrawl-ref-3797cd88dfd7d37ab3c8f0118f34bb2962c2ae3b.tar.gz
crawl-ref-3797cd88dfd7d37ab3c8f0118f34bb2962c2ae3b.zip
Rearrange the order of a few functions.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5242 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r--crawl-ref/source/religion.cc83
1 files changed, 42 insertions, 41 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 4b44211074..871dd819a4 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -103,6 +103,7 @@ enum piety_gain_t
PIETY_NONE, PIETY_SOME, PIETY_LOTS,
NUM_PIETY_GAIN
};
+
static const char *_Sacrifice_Messages[NUM_GODS][NUM_PIETY_GAIN] =
{
// No god
@@ -380,6 +381,40 @@ static bool _make_god_gifts_hostile(bool level_only = true);
static void _print_sacrifice_message(god_type, const item_def &,
piety_gain_t, bool = false);
+/////////////////////////////////////////////////////////////////////
+// god_conduct_trigger
+
+god_conduct_trigger::god_conduct_trigger(
+ conduct_type c, int pg, bool kn, const monsters *vict)
+ : conduct(c), pgain(pg), known(kn), enabled(true), victim(NULL)
+{
+ if (vict)
+ {
+ victim.reset(new monsters);
+ *(victim.get()) = *vict;
+ }
+}
+
+void god_conduct_trigger::set(conduct_type c, int pg, bool kn,
+ const monsters *vict)
+{
+ conduct = c;
+ pgain = pg;
+ known = kn;
+ victim.reset(NULL);
+ if (vict)
+ {
+ victim.reset(new monsters);
+ *victim.get() = *vict;
+ }
+}
+
+god_conduct_trigger::~god_conduct_trigger()
+{
+ if (enabled && conduct != NUM_CONDUCTS)
+ did_god_conduct(conduct, pgain, known, victim.get());
+}
+
bool is_evil_god(god_type god)
{
return
@@ -398,19 +433,19 @@ bool is_good_god(god_type god)
god == GOD_ELYVILON;
}
-bool is_priest_god(god_type god)
+bool is_chaotic_god(god_type god)
{
return
- god == GOD_ZIN ||
- god == GOD_YREDELEMNUL ||
- god == GOD_BEOGH;
+ god == GOD_MAKHLEB ||
+ god == GOD_XOM;
}
-bool is_chaotic_god(god_type god)
+bool is_priest_god(god_type god)
{
return
- god == GOD_MAKHLEB ||
- god == GOD_XOM;
+ god == GOD_ZIN ||
+ god == GOD_YREDELEMNUL ||
+ god == GOD_BEOGH;
}
void dec_penance(god_type god, int val)
@@ -5411,37 +5446,3 @@ bool tso_unchivalric_attack_safe_monster(const actor *act)
const mon_holy_type holiness = act->holiness();
return (holiness != MH_NATURAL && holiness != MH_HOLY);
}
-
-/////////////////////////////////////////////////////////////////////
-// god_conduct_trigger
-
-god_conduct_trigger::god_conduct_trigger(
- conduct_type c, int pg, bool kn, const monsters *vict)
- : conduct(c), pgain(pg), known(kn), enabled(true), victim(NULL)
-{
- if (vict)
- {
- victim.reset(new monsters);
- *(victim.get()) = *vict;
- }
-}
-
-void god_conduct_trigger::set(conduct_type c, int pg, bool kn,
- const monsters *vict)
-{
- conduct = c;
- pgain = pg;
- known = kn;
- victim.reset(NULL);
- if (vict)
- {
- victim.reset(new monsters);
- *victim.get() = *vict;
- }
-}
-
-god_conduct_trigger::~god_conduct_trigger()
-{
- if (enabled && conduct != NUM_CONDUCTS)
- did_god_conduct(conduct, pgain, known, victim.get());
-}