From 747eee0fa57dbd7e6155a0e79ce644fe5c3ef391 Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Sat, 19 Dec 2009 21:35:32 +0100 Subject: Raise minimum xp level for Xom's animated weapon event. Under penance, this is always allowed. --- crawl-ref/source/xom.cc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/xom.cc') diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index 0c56cbac40..a2c7a4d227 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -3163,6 +3163,17 @@ static int _xom_draining_torment_effect(int sever, bool debug = false) return (rc); } +static bool _has_min_animated_weapon_level() +{ + if (you.penance[GOD_XOM]) + return (true); + + if (_xom_is_bored()) + return (you.max_level >= 4); + + return (you.max_level >= 7); +} + static int _xom_summon_hostiles(int sever, bool debug = false) { bool rc = false; @@ -3170,8 +3181,9 @@ static int _xom_summon_hostiles(int sever, bool debug = false) int result = XOM_DID_NOTHING; - // Nasty, but fun. Only allow for xp >= 4. - if (player_weapon_wielded() && you.max_level >= 4 && one_chance_in(4)) + // Nasty, but fun. + if (player_weapon_wielded() && _has_min_animated_weapon_level() + && one_chance_in(4)) { if (debug) return (XOM_BAD_ANIMATE_WPN); -- cgit v1.2.3-54-g00ecf