summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-03-15 15:57:09 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-03-15 15:57:09 +0000
commita4eeadad7a56f796ffdb5be66eaaec6f44cf941a (patch)
treea57c9bf3d2cde02805aff6d9cbb55704cff27ecc /crawl-ref/source
parent0bf320d438eef9ce01601eaf023d60015980a2da (diff)
downloadcrawl-ref-a4eeadad7a56f796ffdb5be66eaaec6f44cf941a.tar.gz
crawl-ref-a4eeadad7a56f796ffdb5be66eaaec6f44cf941a.zip
Added !f inscription per 1680734.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1041 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/enum.h1
-rw-r--r--crawl-ref/source/item_use.cc10
2 files changed, 9 insertions, 2 deletions
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 5b5da96304..8ea5a59621 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2745,6 +2745,7 @@ enum operation_types
OPER_ZAP = 'z',
OPER_THROW = 't',
OPER_EXAMINE = 'v',
+ OPER_FIRE = 'f',
OPER_ANY = 0
};
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 2cb6d9f5a0..3e7d167c8a 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -1130,9 +1130,15 @@ static int try_finding_missile( int sub_type )
if (!is_valid_item( you.inv[i] ))
continue;
+ // In theory, we should do two passes, first trying
+ // to find a non-warning-inscribed item, then looping
+ // through the warning-inscribed ones. Seems unlikely
+ // to matter much.
+
// consider melee weapons that can also be thrown
- if (you.inv[i].base_type == OBJ_MISSILES
- && you.inv[i].sub_type == sub_type)
+ if (you.inv[i].base_type == OBJ_MISSILES &&
+ you.inv[i].sub_type == sub_type &&
+ check_warning_inscriptions(you.inv[i], OPER_FIRE))
{
break;
}