diff options
author | Brendan Hickey <brendan@bhickey.net> | 2013-07-28 00:31:07 -0700 |
---|---|---|
committer | Brendan Hickey <brendan@bhickey.net> | 2013-07-28 00:37:53 -0700 |
commit | cc0fb03b9eee93cd3fbfb7b9ea40c8b1bfa7a872 (patch) | |
tree | 2534d2f5cac007ec674bc966576f0d47542d17b0 /crawl-ref/source/spl-selfench.cc | |
parent | 772cbec2479d6b59ccb91cad149c7edf8968cf6f (diff) | |
download | crawl-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/spl-selfench.cc')
-rw-r--r-- | crawl-ref/source/spl-selfench.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/spl-selfench.cc b/crawl-ref/source/spl-selfench.cc index 57f7a55e5d..5dd04a511d 100644 --- a/crawl-ref/source/spl-selfench.cc +++ b/crawl-ref/source/spl-selfench.cc @@ -16,6 +16,7 @@ #include "libutil.h" #include "message.h" #include "misc.h" +#include "religion.h" #include "shout.h" #include "spl-cast.h" #include "spl-transloc.h" @@ -28,7 +29,7 @@ int allowed_deaths_door_hp(void) { int hp = you.skill(SK_NECROMANCY) / 2; - if (you.religion == GOD_KIKUBAAQUDGHA && !player_under_penance()) + if (you_worship(GOD_KIKUBAAQUDGHA) && !player_under_penance()) hp += you.piety / 15; return max(hp, 1); |