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/tileweb.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/tileweb.cc')
-rw-r--r-- | crawl-ref/source/tileweb.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/tileweb.cc b/crawl-ref/source/tileweb.cc index 96df11bb80..1a39dfb2c0 100644 --- a/crawl-ref/source/tileweb.cc +++ b/crawl-ref/source/tileweb.cc @@ -612,21 +612,21 @@ void TilesFramework::_send_player(bool force_full) _update_string(force_full, c.species, species_name(you.species), "species"); string god = ""; - if (you.religion == GOD_JIYVA) + if (you_worship(GOD_JIYVA)) god = god_name_jiyva(true); - else if (you.religion != GOD_NO_GOD) + else if (!you_worship(GOD_NO_GOD)) god = god_name(you.religion); _update_string(force_full, c.god, god, "god"); _update_int(force_full, c.under_penance, player_under_penance(), "penance"); uint8_t prank = 0; - if (you.religion == GOD_XOM) + if (you_worship(GOD_XOM)) { if (!you.gift_timeout) prank = 2; else if (you.gift_timeout == 1) prank = 1; } - else if (you.religion != GOD_NO_GOD) + else if (!you_worship(GOD_NO_GOD)) prank = max(0, piety_rank() - 1); else if (you.char_class == JOB_MONK && you.species != SP_DEMIGOD && !had_gods()) |