diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-15 22:46:43 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-15 22:46:43 +0000 |
commit | e7a22ae2c3721277180443d930d110edb7e180b8 (patch) | |
tree | 431769e55e76872ed810fb77b9a68da015a604a3 /crawl-ref/source/spl-cast.cc | |
parent | dc0f066ad0fa14a48e652914b9a27e626f5eded1 (diff) | |
download | crawl-ref-e7a22ae2c3721277180443d930d110edb7e180b8.tar.gz crawl-ref-e7a22ae2c3721277180443d930d110edb7e180b8.zip |
Apply commit r6569 to 0.4 trunk.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6570 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 6364789e5f..35b27a7a07 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -1019,9 +1019,11 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) { potion = prompt_invent_item("Throw which potion?", MT_INVLIST, OBJ_POTIONS); - if (potion == -1) + + if (prompt_failed(potion)) return (SPRET_ABORT); - else if (you.inv[potion].base_type != OBJ_POTIONS) + + if (you.inv[potion].base_type != OBJ_POTIONS) { mpr("This spell works only on potions!"); return (SPRET_ABORT); |