summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/it_use2.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-10 16:07:30 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-10 16:07:30 +0000
commit9112dd81fb46fbeeec6f46fe40ecaf1bcae42da3 (patch)
tree42a9689b56051fccb17889328a4a542e6351cc64 /crawl-ref/source/it_use2.cc
parent4fdf65ba2dcb33d11e73742fe31ce4f85a27baf2 (diff)
downloadcrawl-ref-9112dd81fb46fbeeec6f46fe40ecaf1bcae42da3.tar.gz
crawl-ref-9112dd81fb46fbeeec6f46fe40ecaf1bcae42da3.zip
Fix 1920778: mons_open_door() not respecting gates
Also fixed several cases where secret doors would be described as rock walls regardless of their actual type, and gates are now described correctly as well. This means that viewing them also prints, e.g. "An open gate." or "A closed large door." without further information since there are no database entries for these specific cases. (Not the entries for simple doors are any more exhaustive.) Fix 1910729: Yredelmnul's Drain Life not waking monsters, using ncampion's solution. Also default greedy_explore to true. (FR 1911112) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3584 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/it_use2.cc')
-rw-r--r--crawl-ref/source/it_use2.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc
index 36a4b8caba..07d652883f 100644
--- a/crawl-ref/source/it_use2.cc
+++ b/crawl-ref/source/it_use2.cc
@@ -48,7 +48,6 @@ bool potion_effect( potion_type pot_eff, int pow )
{
bool effect = true; // current behaviour is all potions id on quaffing
bool was_known = item_type_known(OBJ_POTIONS, (int) pot_eff);
- int new_value = 0;
if (pow > 150)
pow = 150;
@@ -289,8 +288,9 @@ bool potion_effect( potion_type pot_eff, int pow )
break; // I'll let this slip past robe of archmagi
case POT_MAGIC:
+ {
mpr( "You feel magical!" );
- new_value = 5 + random2avg(19, 2);
+ int new_value = 5 + random2avg(19, 2);
// increase intrinsic MP points
if (you.magic_points + new_value > you.max_magic_points)
@@ -301,7 +301,7 @@ bool potion_effect( potion_type pot_eff, int pow )
inc_mp( new_value, true );
break;
-
+ }
case POT_RESTORE_ABILITIES:
{
bool nothing_happens = true;