summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/files.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-13 20:40:39 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-13 20:40:39 +0000
commit9fecb788095cc5315ef5f1485e0b736563a21460 (patch)
tree4dd717741b428607d8b91ce4a5dd05044c2e0d2f /crawl-ref/source/files.cc
parentcab797009b47f77520b8db9f8b427ba9ea14f63c (diff)
downloadcrawl-ref-9fecb788095cc5315ef5f1485e0b736563a21460.tar.gz
crawl-ref-9fecb788095cc5315ef5f1485e0b736563a21460.zip
* Add stair repelling as a bad Xom effect.
* Experimentally make tension increase the odds for good effects. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9600 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r--crawl-ref/source/files.cc24
1 files changed, 15 insertions, 9 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index 107a86b710..d6f163c63d 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -1371,24 +1371,30 @@ bool load( dungeon_feature_type stair_taken, load_mode_type load_mode,
dungeon_feature_type feat = grd(you.pos());
if (feat != DNGN_ENTER_SHOP
&& grid_stair_direction(feat) != CMD_NO_CMD
- && grid_stair_direction(stair_taken) != CMD_NO_CMD
- && coinflip()
- && slide_feature_over(you.pos(), coord_def(-1, -1), false))
+ && grid_stair_direction(stair_taken) != CMD_NO_CMD)
{
std::string stair_str =
feature_description(feat, NUM_TRAPS, false,
DESC_CAP_THE, false);
std::string verb = stair_climb_verb(feat);
- mprf("%s slides away from you right after you %s through it!",
- stair_str.c_str(), verb.c_str());
+ if (coinflip()
+ && slide_feature_over(you.pos(), coord_def(-1, -1), false))
+ {
+ mprf("%s slides away from you right after you %s through "
+ "it!", stair_str.c_str(), verb.c_str());
+ }
+
+ if (coinflip())
+ {
+ // Stairs stop fleeing from you now you actually caught one.
+ mprf("%s settles down.", stair_str.c_str(), verb.c_str());
+ you.duration[DUR_REPEL_STAIRS_MOVE] = 0;
+ you.duration[DUR_REPEL_STAIRS_CLIMB] = 0;
+ }
}
}
- // Stairs running from you is done now that you actually caught one.
- you.duration[DUR_REPEL_STAIRS_MOVE] = 0;
- you.duration[DUR_REPEL_STAIRS_CLIMB] = 0;
-
// If butchering was interrupted by switching levels (banishment)
// then switch back from butchering tool if there's no hostiles
// nearby.