summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-20 00:14:41 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-20 00:14:41 +0000
commit10088136800dfcdaa0fcbc07a8232bc8170eaa05 (patch)
tree0dcb14e24cb544995d0283f56737d0186f9347a9 /crawl-ref/source/item_use.cc
parent9cce2935d8da7147bebe3d4aeb4a4283b779f798 (diff)
downloadcrawl-ref-10088136800dfcdaa0fcbc07a8232bc8170eaa05.tar.gz
crawl-ref-10088136800dfcdaa0fcbc07a8232bc8170eaa05.zip
Clean-up of options in init.txt and crawl_options.txt
courtesy of maiermirk (1829976, 1831190). This includes a lot of spacing changes, updates of some examples and moving around some options into more sensible groupings. Highlights: * add returning weapons to fire_order list and allow fire_order to use += on new lines (This should solve the second part of 1829475.) * heap_brand now defaults to "reverse" * detected_item_colour defaults to green Also s/artifact/artefact. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2874 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 3e048b4b97..6920fdf814 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -1241,6 +1241,11 @@ static bool fire_item_matches(const item_def &item, unsigned fire_type)
else if (item.base_type == OBJ_WEAPONS
&& is_throwable(item, you.body_size()))
{
+ if ((fire_type & FIRE_RETURNING) && item.special == SPWPN_RETURNING
+ && item_ident(item, ISFLAG_KNOW_TYPE))
+ {
+ return (true);
+ }
if ((fire_type & FIRE_DAGGER) && item.sub_type == WPN_DAGGER)
return (true);
if ((fire_type & FIRE_SPEAR) && item.sub_type == WPN_SPEAR)
@@ -2337,6 +2342,10 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
msg::stream << item.name(DESC_CAP_THE) << " returns to your pack!"
<< std::endl;
+
+ // Player saw the item return
+ if (!is_artefact(you.inv[throw_2]))
+ set_ident_flags(you.inv[throw_2], ISFLAG_KNOW_TYPE);
}
else
dec_inv_item_quantity( throw_2, 1 );