summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/wiz-item.cc
diff options
context:
space:
mode:
authorBrendan Hickey <brendan@bhickey.net>2013-07-28 00:31:07 -0700
committerBrendan Hickey <brendan@bhickey.net>2013-07-28 00:37:53 -0700
commitcc0fb03b9eee93cd3fbfb7b9ea40c8b1bfa7a872 (patch)
tree2534d2f5cac007ec674bc966576f0d47542d17b0 /crawl-ref/source/wiz-item.cc
parent772cbec2479d6b59ccb91cad149c7edf8968cf6f (diff)
downloadcrawl-ref-cc0fb03b9eee93cd3fbfb7b9ea40c8b1bfa7a872.tar.gz
crawl-ref-cc0fb03b9eee93cd3fbfb7b9ea40c8b1bfa7a872.zip
Refactor 'you.religion' checks.
Pull 'you.religion [!=]= FOO' checks into a function: you_worship(FOO). This change is part of a large plan to clean up religion.
Diffstat (limited to 'crawl-ref/source/wiz-item.cc')
-rw-r--r--crawl-ref/source/wiz-item.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/wiz-item.cc b/crawl-ref/source/wiz-item.cc
index ffef8ee436..5235e9cc0c 100644
--- a/crawl-ref/source/wiz-item.cc
+++ b/crawl-ref/source/wiz-item.cc
@@ -703,7 +703,7 @@ void wizard_make_object_randart()
}
// Remove curse flag from item, unless worshipping Ashenzari.
- if (you.religion == GOD_ASHENZARI)
+ if (you_worship(GOD_ASHENZARI))
do_curse_item(item, true);
else
do_uncurse_item(item, false);
@@ -996,7 +996,7 @@ static void _debug_acquirement_stats(FILE *ostat)
// Print player species/profession.
string godname = "";
- if (you.religion != GOD_NO_GOD)
+ if (!you_worship(GOD_NO_GOD))
godname += " of " + god_name(you.religion);
fprintf(ostat, "%s the %s, Level %d %s %s%s\n\n",