summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-23 22:40:45 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-23 22:40:45 +0000
commitea9b36154067b4b24fa9deaf34185bf75f1fbdfc (patch)
tree6a56c103ab57859ee42bf1cda683b3d6e34ce101 /crawl-ref/source
parent3ded41cea48f5d33c8a4fb27b09e4e190f1fdf00 (diff)
downloadcrawl-ref-ea9b36154067b4b24fa9deaf34185bf75f1fbdfc.tar.gz
crawl-ref-ea9b36154067b4b24fa9deaf34185bf75f1fbdfc.zip
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
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/xom.cc10
1 files changed, 7 insertions, 3 deletions
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<potion_type>(
- 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;