diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-08 12:12:19 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-08 12:12:19 +0000 |
commit | 4f3558feb5639ff93e46a0795d94d638ef0c89fc (patch) | |
tree | 1b42eb5e474a7054dac54a5d50798914b3d99962 /crawl-ref/source/traps.cc | |
parent | 06b226a27e7c8f2a9ce8928311fcdfcb7c6a2f79 (diff) | |
download | crawl-ref-4f3558feb5639ff93e46a0795d94d638ef0c89fc.tar.gz crawl-ref-4f3558feb5639ff93e46a0795d94d638ef0c89fc.zip |
Added Water card. Might need some rebalancing.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4127 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/traps.cc')
-rw-r--r-- | crawl-ref/source/traps.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc index d2d2d30dbf..50473e468b 100644 --- a/crawl-ref/source/traps.cc +++ b/crawl-ref/source/traps.cc @@ -471,6 +471,20 @@ void handle_traps(trap_type trt, int i, bool trap_known) exercise(SK_TRAPS_DOORS, ((coinflip()) ? 2 : 1)); } // end handle_traps() +void destroy_trap( const coord_def& pos ) +{ + for ( int i = 0; i < MAX_TRAPS; ++i ) + { + if ( env.trap[i].x == pos.x && env.trap[i].y == pos.y && + env.trap[i].type != TRAP_UNASSIGNED ) + { + grd(pos) = DNGN_FLOOR; + env.trap[i].type = TRAP_UNASSIGNED; + return; + } + } +} + void disarm_trap( struct dist &disa ) { if (you.duration[DUR_BERSERKER]) |