diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-10-02 14:46:20 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-10-02 14:46:20 +0000 |
commit | 6d11b49783c6d9c56851a09291f51bfa321d7694 (patch) | |
tree | 9205c5f61a379c4e355ad53b89efa022c0e6a8aa /crawl-ref/source/religion.cc | |
parent | 65b90b3a218495b887fa9053b4d90a74382cc71e (diff) | |
download | crawl-ref-6d11b49783c6d9c56851a09291f51bfa321d7694.tar.gz crawl-ref-6d11b49783c6d9c56851a09291f51bfa321d7694.zip |
Simplify.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7080 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r-- | crawl-ref/source/religion.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index ee3c88255c..10dc786da3 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -739,6 +739,12 @@ void dec_penance(int val) dec_penance(you.religion, val); } +bool zin_sustenance(bool actual) +{ + return (you.piety >= piety_breakpoint(0) + && (!actual || you.hunger_state == HS_STARVING)); +} + bool yred_injury_mirror(bool actual) { return (you.religion == GOD_YREDELEMNUL && !player_under_penance() @@ -1724,8 +1730,7 @@ static void _do_god_gift(bool prayed_for) case GOD_ZIN: //jmf: this "good" god will feed you (a la Nethack) - if (you.hunger_state == HS_STARVING - && you.piety >= piety_breakpoint(0)) + if (zin_sustenance()) { god_speaks(you.religion, "Your stomach feels content."); set_hunger(6000, true); |