summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-30 05:19:26 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-30 05:19:26 +0000
commit2405abe691e056d6ded4ed495c30090651b8a010 (patch)
treec4d181c192b77f1ec7d00ce2d589bb377af71a2b /crawl-ref
parente9c49344ae30fe4e976bb4695c4c0d22d0af802d (diff)
downloadcrawl-ref-2405abe691e056d6ded4ed495c30090651b8a010.tar.gz
crawl-ref-2405abe691e056d6ded4ed495c30090651b8a010.zip
Simplify.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7074 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/describe.cc2
-rw-r--r--crawl-ref/source/ouch.cc2
-rw-r--r--crawl-ref/source/religion.cc5
-rw-r--r--crawl-ref/source/religion.h2
4 files changed, 6 insertions, 5 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index d11bee2fa9..a488a4aa3a 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -3143,7 +3143,7 @@ void describe_god( god_type which_god, bool give_title )
}
else if (which_god == GOD_YREDELEMNUL)
{
- if (yred_injury_mirror())
+ if (yred_injury_mirror(false))
{
have_any = true;
cprintf("%s mirrors your injuries on your foes "
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index 0495e0faa9..d4e85d8e44 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -795,7 +795,7 @@ static void _yred_mirrors_injury(int dam, int death_source)
if (dam <= 0 || invalid_monster_index(death_source))
return;
- if (yred_injury_mirror() && you.duration[DUR_PRAYER])
+ if (yred_injury_mirror())
{
simple_god_message(" mirrors your injury!");
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 2de56b7124..7dd3501b04 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -739,10 +739,11 @@ void dec_penance(int val)
dec_penance(you.religion, val);
}
-bool yred_injury_mirror()
+bool yred_injury_mirror(bool actual)
{
return (you.religion == GOD_YREDELEMNUL && !player_under_penance()
- && you.piety >= piety_breakpoint(0));
+ && you.piety >= piety_breakpoint(0)
+ && (!actual || you.duration[DUR_PRAYER]));
}
bool beogh_water_walk()
diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h
index 34dfaf8b47..3a1700734b 100644
--- a/crawl-ref/source/religion.h
+++ b/crawl-ref/source/religion.h
@@ -94,7 +94,7 @@ 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 yred_injury_mirror();
+bool yred_injury_mirror(bool actual = true);
bool beogh_water_walk();
void beogh_idol_revenge();
void good_god_holy_attitude_change(monsters *holy);