diff options
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); |