diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-19 00:44:33 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-19 00:44:33 +0000 |
commit | 6a93b55183ada2559d026ae0dd57a295ae1807f4 (patch) | |
tree | a799d303426ff88218aa1fc227c62109ae06ba3f /crawl-ref | |
parent | 79c0d3c73800dfb4ca8baa1d54dd7c3fba3f7308 (diff) | |
download | crawl-ref-6a93b55183ada2559d026ae0dd57a295ae1807f4.tar.gz crawl-ref-6a93b55183ada2559d026ae0dd57a295ae1807f4.zip |
Fix a net bug that was responsible for never (!) entrapping monsters. Whoops...
Also autoID a weapon of returning the player actually sees returning.
(Bug 1830129)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2870 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/itemprop.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/mon-util.cc | 2 | ||||
-rw-r--r-- | 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 17d6f1df0c..8786bae35d 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -491,8 +491,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 0c1d290cf6..b2cf201708 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -4422,7 +4422,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 eb6dd494b0..e895d2fae1 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" @@ -1423,8 +1424,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 ) |