From bd7b5f7cce46775dacee51b639e6278780e8dcc0 Mon Sep 17 00:00:00 2001 From: dolorous Date: Sat, 23 May 2009 21:52:44 +0000 Subject: Add sanity checks. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9811 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells1.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/spells1.cc') diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc index 7724d0112f..284cbf92e5 100644 --- a/crawl-ref/source/spells1.cc +++ b/crawl-ref/source/spells1.cc @@ -777,7 +777,8 @@ static int _healing_spell(int healed, bool divine_ability, mons_pacify(monster); // Give a small piety return. - gain_piety(pgain); + if (pgain > 0) + gain_piety(pgain); } } @@ -805,7 +806,8 @@ static int _healing_spell(int healed, bool divine_ability, "creature."); // Give a small piety return. - gain_piety(pgain); + if (pgain > 0) + gain_piety(pgain); } } -- cgit v1.2.3-54-g00ecf