From 312dc18d5eb1785e8fd4169e6fd72fedf8abb244 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 19 Nov 2007 00:59:06 +0000 Subject: Nets not trapping monster fix, and returning weapons autoid. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.3@2871 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/itemprop.cc | 3 +-- crawl-ref/source/mon-util.cc | 2 +- crawl-ref/source/mstuff2.cc | 8 +++++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 154136651f..e8414d7e53 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -470,8 +470,7 @@ void remove_item_stationary( item_def &item ) bool item_is_stationary( const item_def &item ) { - return (you.attribute[ATTR_HELD] - && item.base_type == OBJ_MISSILES + return (item.base_type == OBJ_MISSILES && item.sub_type == MI_THROWING_NET && item.plus2); } diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 237a2eaa5c..fc30799dc5 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -4159,7 +4159,7 @@ void monsters::apply_enchantment(const mon_enchant &me) break; } - int net = get_trapping_net(x,y); + int net = get_trapping_net(x,y,true); if (net == NON_ITEM) // really shouldn't happen! { diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc index 5a697ca160..a12aaf883b 100644 --- a/crawl-ref/source/mstuff2.cc +++ b/crawl-ref/source/mstuff2.cc @@ -38,6 +38,7 @@ #include "monstuff.h" #include "mon-util.h" #include "player.h" +#include "randart.h" #include "spells2.h" #include "spells4.h" #include "spl-cast.h" @@ -1359,8 +1360,13 @@ bool mons_throw(struct monsters *monster, struct bolt &pbolt, int hand_used) viewwindow(true, false); fire_beam(pbolt, NULL); msg::stream << "The weapon returns to " - << monster->name(DESC_NOCAP_THE) + << (player_monster_visible(monster)? + monster->name(DESC_NOCAP_THE) : "where it came from") << "!" << std::endl; + + // Player saw the item return + if (!is_artefact(mitm[hand_used])) + set_ident_flags(mitm[hand_used], ISFLAG_KNOW_TYPE); } if ( !really_returns ) -- cgit v1.2.3-54-g00ecf