From 6d11b49783c6d9c56851a09291f51bfa321d7694 Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 2 Oct 2008 14:46:20 +0000 Subject: Simplify. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7080 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/religion.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/religion.cc') 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); -- cgit v1.2.3-54-g00ecf