diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-19 22:54:50 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-19 22:54:50 +0000 |
commit | 5e4ca0912ae656b9e2a55b95027ebc6f483a01a6 (patch) | |
tree | 244cdb883d9dbb22695b4a8e13bde9bbb5a47046 /crawl-ref/source/transfor.cc | |
parent | bb7663ad4d03b1e36d1cbc28d797a19dfe39bbd0 (diff) | |
download | crawl-ref-5e4ca0912ae656b9e2a55b95027ebc6f483a01a6.tar.gz crawl-ref-5e4ca0912ae656b9e2a55b95027ebc6f483a01a6.zip |
Fixing a number of bugs on throwing nets, so it's all in
all a net improvement. ;)
I'm reusing item.plus2 as a marker for trapping
monsters or not. AFAIK, missiles don't need those,
and it makes stacking so much easier.
Gladiators start with Throwing skill 1, except for
Kobolds (don't get a net) who get an additional level
at Dodging.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2149 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/transfor.cc')
-rw-r--r-- | crawl-ref/source/transfor.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc index 26a17daca1..bed7d87ef8 100644 --- a/crawl-ref/source/transfor.cc +++ b/crawl-ref/source/transfor.cc @@ -29,6 +29,7 @@ #include "player.h" #include "skills2.h" #include "stuff.h" +#include "traps.h" void drop_everything(void); void extra_hp(int amount_extra); @@ -336,6 +337,15 @@ bool transform(int pow, transformation_type which_trans) you.symbol = 'D'; you.colour = GREEN; + + if (you.attribute[ATTR_HELD]) + { + mpr("The net rips apart!"); + you.attribute[ATTR_HELD] = 0; + int net = get_trapping_net(you.x_pos, you.y_pos); + if (net != NON_ITEM) + destroy_item(net); + } return (true); case TRAN_LICH: @@ -401,6 +411,15 @@ bool transform(int pow, transformation_type which_trans) modify_stat( STAT_DEXTERITY, 8, true ); you.symbol = '#'; you.colour = DARKGREY; + + if (you.attribute[ATTR_HELD]) + { + mpr("You drift through the net!"); + you.attribute[ATTR_HELD] = 0; + int net = get_trapping_net(you.x_pos, you.y_pos); + if (net != NON_ITEM) + remove_item_stationary(mitm[net]); + } return (true); case TRAN_SERPENT_OF_HELL: |