summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/traps.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-14 15:00:11 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-14 15:00:11 +0000
commitee2afdbd1610f7a204808056bf1a5826085b89c8 (patch)
treedebd3aee3946d707716e13b86e53d3b8539a29a0 /crawl-ref/source/traps.cc
parent4d430b2328d6922783a0dd256428de1585691eb9 (diff)
downloadcrawl-ref-ee2afdbd1610f7a204808056bf1a5826085b89c8.tar.gz
crawl-ref-ee2afdbd1610f7a204808056bf1a5826085b89c8.zip
FR 1962016: Make hydra headedness more obvious.
You now get messages like "The seven-headed hydra bites." and "You slice the 12-headed hydra." FR 1963606: Take a note when you pick up a rune (or the Orb!) for the first time. There are a couple of other files I changed, but I can't remember any big stuff, so it was probably just cleanup. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5029 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/traps.cc')
-rw-r--r--crawl-ref/source/traps.cc19
1 files changed, 8 insertions, 11 deletions
diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc
index 4f2c4ca6fc..c55a50d2b9 100644
--- a/crawl-ref/source/traps.cc
+++ b/crawl-ref/source/traps.cc
@@ -382,7 +382,7 @@ void handle_traps(trap_type trt, int i, bool trap_known)
if (trap_known && one_chance_in(3))
mpr("You avoid triggering a blade trap.");
else if (random2limit(player_evasion(), 40)
- + (random2(you.dex) / 3) + (trap_known ? 3 : 0) > 8)
+ + (random2(you.dex) / 3) + (trap_known ? 3 : 0) > 8)
{
mpr("A huge blade swings just past you!");
}
@@ -402,7 +402,7 @@ void handle_traps(trap_type trt, int i, bool trap_known)
else
{
if (random2limit(player_evasion(), 40)
- + (random2(you.dex) / 3) + (trap_known ? 3 : 0) > 12)
+ + (random2(you.dex) / 3) + (trap_known ? 3 : 0) > 12)
{
mpr("A net drops to the ground!");
}
@@ -447,13 +447,10 @@ void handle_traps(trap_type trt, int i, bool trap_known)
return;
}
- if (!you.do_shaft())
+ if (!you.do_shaft() && !trap_known)
{
- if (!trap_known)
- {
- grd[you.x_pos][you.y_pos] = DNGN_UNDISCOVERED_TRAP;
- return;
- }
+ grd[you.x_pos][you.y_pos] = DNGN_UNDISCOVERED_TRAP;
+ return;
}
break;
@@ -471,7 +468,7 @@ void handle_traps(trap_type trt, int i, bool trap_known)
if (!trap_known) // Now you know...
exercise(SK_TRAPS_DOORS, ((coinflip()) ? 2 : 1));
-} // end handle_traps()
+}
void destroy_trap( const coord_def& pos )
{
@@ -528,8 +525,8 @@ void disarm_trap( struct dist &disa )
exercise(SK_TRAPS_DOORS, 1 + random2(you.your_level / 5));
else
{
- if (env.trap[i].type == TRAP_NET &&
- (env.trap[i].x != you.x_pos || env.trap[i].y != you.y_pos))
+ if (env.trap[i].type == TRAP_NET
+ && (env.trap[i].x != you.x_pos || env.trap[i].y != you.y_pos))
{
if (coinflip())
return;