summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells1.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-21 07:30:33 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-21 07:30:33 +0000
commit9b55168648a4ddc1887d0ae560ec00d8f1ff3b23 (patch)
treee4c268b925a397f19f74cb6e4bbc3f6378a12c01 /crawl-ref/source/spells1.cc
parent98e3c24887ee5a4670cf58eaa614084a720b5853 (diff)
downloadcrawl-ref-9b55168648a4ddc1887d0ae560ec00d8f1ff3b23.tar.gz
crawl-ref-9b55168648a4ddc1887d0ae560ec00d8f1ff3b23.zip
Fix 1941612: Zapping wands known to be empty shouldn't cost a turn, but
empty wands with unknown charges should cost a turn. Experimentally add a "Really fire through friendly creature?" prompt when a beam tracer passes through a friend. This currently uses the existing monster tracer and probably has huge problems because of this. In any case, it appears to only work sometimes, though consistently for wands in my testing, possibly because the range is fixed (?) when compared to spells. (This is part of FR 1962548.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5171 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells1.cc')
-rw-r--r--crawl-ref/source/spells1.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index 2c0b92a1ee..309023e596 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -435,8 +435,10 @@ void identify(int power, int item_slot)
do
{
if (item_slot == -1)
+ {
item_slot = prompt_invent_item( "Identify which item?", MT_INVLIST,
OSEL_UNIDENT, true, true, false );
+ }
if (item_slot == PROMPT_ABORT)
{
canned_msg( MSG_OK );
@@ -445,7 +447,7 @@ void identify(int power, int item_slot)
item_def& item(you.inv[item_slot]);
- if ( fully_identified(item) )
+ if (fully_identified(item))
{
mpr("Choose an unidentified item, or Esc to abort.");
if ( Options.auto_list )
@@ -454,7 +456,7 @@ void identify(int power, int item_slot)
continue;
}
- if ( !is_artefact(item) )
+ if (!is_artefact(item))
set_ident_type( item.base_type, item.sub_type, ID_KNOWN_TYPE );
set_ident_flags( item, ISFLAG_IDENT_MASK );