summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/godpassive.cc
diff options
context:
space:
mode:
authorpubby <pubby8@gmail.com>2013-08-31 16:40:44 -0500
committerpubby <pubby8@gmail.com>2013-08-31 16:49:50 -0500
commit65c58ed6ccd53a9a080255ee37e131123ac65e96 (patch)
treed4a3d59267fa5c14ae7573b91f7dac9b66955159 /crawl-ref/source/godpassive.cc
parentc4b51221cd6f40f90127768df0e2e1ad7ed7310e (diff)
parent70ca29ee15926336c0ab2369cb25743a9e510e08 (diff)
downloadcrawl-ref-65c58ed6ccd53a9a080255ee37e131123ac65e96.tar.gz
crawl-ref-65c58ed6ccd53a9a080255ee37e131123ac65e96.zip
Merge branch 'master' into dwants
Conflicts: crawl-ref/docs/crawl_manual.reST crawl-ref/source/abl-show.cc crawl-ref/source/dat/descript/ability.txt crawl-ref/source/delay.cc crawl-ref/source/enum.h crawl-ref/source/main.cc crawl-ref/source/mon-cast.cc crawl-ref/source/mon-gear.cc crawl-ref/source/mon-spll.h crawl-ref/source/mutation-data.h crawl-ref/source/mutation.cc crawl-ref/source/ng-restr.cc crawl-ref/source/ng-setup.cc crawl-ref/source/output.cc crawl-ref/source/player-act.cc crawl-ref/source/player.cc crawl-ref/source/species.cc crawl-ref/source/spl-data.h crawl-ref/source/wiz-you.cc
Diffstat (limited to 'crawl-ref/source/godpassive.cc')
-rw-r--r--crawl-ref/source/godpassive.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/crawl-ref/source/godpassive.cc b/crawl-ref/source/godpassive.cc
index 8f7f7111e8..09e170cc01 100644
--- a/crawl-ref/source/godpassive.cc
+++ b/crawl-ref/source/godpassive.cc
@@ -28,7 +28,7 @@
int che_stat_boost(int piety)
{
- if (you.religion != GOD_CHEIBRIADOS || you.penance[GOD_CHEIBRIADOS])
+ if (!you_worship(GOD_CHEIBRIADOS) || you.penance[GOD_CHEIBRIADOS])
return 0;
if (piety < 30) // Since you've already begun to slow down.
return 1;
@@ -41,7 +41,7 @@ int che_stat_boost(int piety)
void jiyva_eat_offlevel_items()
{
// For wizard mode 'J' command
- if (you.religion != GOD_JIYVA)
+ if (!you_worship(GOD_JIYVA))
return;
if (crawl_state.game_is_sprint())
@@ -55,10 +55,10 @@ void jiyva_eat_offlevel_items()
const int branch = random2(NUM_BRANCHES);
int js = JS_NONE;
- // Choose level based on main dungeon depth so that levels short branches
- // aren't picked more often.
+ // Choose level based on main dungeon depth so that levels of
+ // short branches aren't picked more often.
ASSERT(brdepth[branch] <= MAX_BRANCH_DEPTH);
- const int level = random2(MAX_BRANCH_DEPTH) + 1;
+ const int level = random2(MAX_BRANCH_DEPTH) + 1;
const level_id lid(static_cast<branch_type>(branch), level);
@@ -105,7 +105,7 @@ void jiyva_eat_offlevel_items()
void jiyva_slurp_bonus(int item_value, int *js)
{
- if (you.penance[GOD_JIYVA])
+ if (player_under_penance(GOD_JIYVA))
return;
if (you.piety >= piety_breakpoint(1)
@@ -167,7 +167,7 @@ static bool _two_handed()
void ash_check_bondage(bool msg)
{
- if (you.religion != GOD_ASHENZARI)
+ if (!you_worship(GOD_ASHENZARI))
return;
int cursed[NUM_ET] = {0}, slots[NUM_ET] = {0};
@@ -381,7 +381,7 @@ static bool _jewel_auto_id(const item_def& item)
case RING_INTELLIGENCE:
return !!item.plus;
case AMU_FAITH:
- return (you.religion != GOD_NO_GOD);
+ return (!you_worship(GOD_NO_GOD));
case AMU_THE_GOURMAND:
return (you.species != SP_MUMMY
&& player_mutation_level(MUT_HERBIVOROUS) < 3);
@@ -406,7 +406,7 @@ bool god_id_item(item_def& item, bool silent)
iflags_t old_ided = item.flags & ISFLAG_IDENT_MASK;
iflags_t ided = 0;
- if (you.religion == GOD_ASHENZARI)
+ if (you_worship(GOD_ASHENZARI))
{
// Don't identify runes or the orb, since this has no gameplay purpose
// and might mess up other things.
@@ -464,7 +464,7 @@ bool god_id_item(item_def& item, bool silent)
ided |= ISFLAG_EQ_JEWELLERY_MASK;
}
}
- else if (you.religion == GOD_ELYVILON)
+ else if (you_worship(GOD_ELYVILON))
{
if ((item.base_type == OBJ_STAVES || item.base_type == OBJ_RODS)
&& (is_evil_item(item) || is_unholy_item(item)))
@@ -510,7 +510,7 @@ bool god_id_item(item_def& item, bool silent)
void ash_id_monster_equipment(monster* mon)
{
- if (you.religion != GOD_ASHENZARI)
+ if (!you_worship(GOD_ASHENZARI))
return;
bool id = false;
@@ -585,7 +585,7 @@ static bool _check_portal(coord_def where)
int ash_detect_portals(bool all)
{
- if (you.religion != GOD_ASHENZARI)
+ if (!you_worship(GOD_ASHENZARI))
return 0;
int portals_found = 0;