summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/xom.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/xom.cc')
-rw-r--r--crawl-ref/source/xom.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index 82abc823f1..66745cc71c 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -280,7 +280,8 @@ void xom_tick()
xom_acts(abs(you.piety - MAX_PIETY/2), tension);
return;
}
- else if (you.gift_timeout <= 1 && x_chance_in_y(chance-1, 4))
+ else if (you.gift_timeout <= 1 && chance > 0
+ && x_chance_in_y(chance-1, 4))
{
// During tension, Xom may briefly forget about being bored.
const int interest = random2(chance*15);