diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-04-13 20:40:39 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-04-13 20:40:39 +0000 |
commit | 9fecb788095cc5315ef5f1485e0b736563a21460 (patch) | |
tree | 4dd717741b428607d8b91ce4a5dd05044c2e0d2f /crawl-ref/source/player.cc | |
parent | cab797009b47f77520b8db9f8b427ba9ea14f63c (diff) | |
download | crawl-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/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index ba506a7fa7..3a04aaecda 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -335,6 +335,11 @@ bool move_player_to_grid( const coord_def& p, bool stepped, bool allow_shift, else pct = 50; + // When the effect is still strong, the chance to actually catch + // a stair is smaller. (Assuming the duration starts out at 1000.) + const int dur = std::max(0, you.duration[DUR_REPEL_STAIRS_MOVE] - 700); + pct += dur/10; + if (x_chance_in_y(pct, 100)) { if (slide_feature_over(you.pos(), coord_def(-1, -1), false)) @@ -346,6 +351,9 @@ bool move_player_to_grid( const coord_def& p, bool stepped, bool allow_shift, mprf("%s slides away as you move %s it!", stair_str.c_str(), prep.c_str()); + + if (player_in_a_dangerous_place() && one_chance_in(5)) + xom_is_stimulated(32); } } } |