From ea9b36154067b4b24fa9deaf34185bf75f1fbdfc Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 23 Apr 2009 22:40:45 +0000 Subject: Add the potion of magic to Xom's list of potion effects. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9689 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/xom.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/xom.cc') diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index 990a9d42c8..ed8c9f2371 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -1015,9 +1015,9 @@ static bool _xom_do_potion() while (true) { pot = static_cast( - random_choose(POT_HEALING, POT_HEAL_WOUNDS, POT_SPEED, - POT_MIGHT, POT_INVISIBILITY, POT_BERSERK_RAGE, - POT_EXPERIENCE, -1)); + random_choose(POT_HEALING, POT_HEAL_WOUNDS, POT_MAGIC, + POT_SPEED, POT_MIGHT, POT_INVISIBILITY, + POT_BERSERK_RAGE, POT_EXPERIENCE, -1)); bool has_effect = true; // Don't pick something that won't have an effect. @@ -1035,6 +1035,10 @@ static bool _xom_do_potion() if (you.hp == you.hp_max && player_rotted() == 0) has_effect = false; break; + case POT_MAGIC: + if (you.magic_points == you.max_magic_points) + has_effect = false; + break; case POT_BERSERK_RAGE: if (!you.can_go_berserk(false)) has_effect = false; -- cgit v1.2.3-54-g00ecf