summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-19 00:59:06 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-19 00:59:06 +0000
commit312dc18d5eb1785e8fd4169e6fd72fedf8abb244 (patch)
tree09e3c272785e6858ac7011372f791c14508ca424
parenta3376d9f0045cecc075ea0e4e4a60e2c462d5fc4 (diff)
downloadcrawl-ref-312dc18d5eb1785e8fd4169e6fd72fedf8abb244.tar.gz
crawl-ref-312dc18d5eb1785e8fd4169e6fd72fedf8abb244.zip
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
-rw-r--r--crawl-ref/source/itemprop.cc3
-rw-r--r--crawl-ref/source/mon-util.cc2
-rw-r--r--crawl-ref/source/mstuff2.cc8
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 )