summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells4.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/spells4.cc')
-rw-r--r--crawl-ref/source/spells4.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 6ad9864151..d1d7bf83f8 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -2989,6 +2989,17 @@ int cast_apportation(int pow)
(mitm[ item ].quantity > 1) ? "s" : "" );
}
done = 1;
+
+ // if we apport a net, free the monster under it
+ if (mitm[item].base_type == OBJ_MISSILES
+ && mitm[item].sub_type == MI_THROWING_NET)
+ {
+ int mon = mgrd[ beam.tx ][ beam.ty ];
+ if (mon != NON_MONSTER && mons_is_caught(&menv[mon]))
+ {
+ (&menv[mon])->del_ench(ENCH_CAUGHT, true);
+ }
+ }
}
else
mpr( "The spell fails." );