summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/files.cc
diff options
context:
space:
mode:
authorChris Campbell <chriscampbell89@gmail.com>2014-03-30 04:07:40 +0100
committerChris Campbell <chriscampbell89@gmail.com>2014-04-03 14:12:54 +0100
commitb999a6f53cd2a0990672b31796d9ae3a1d9bfa46 (patch)
treea0909a984a2095fe33679a7f10281041b44dc2d1 /crawl-ref/source/files.cc
parentbb6752c796fbcc8c7bb9e82ff2bc772eeac75cc2 (diff)
downloadcrawl-ref-b999a6f53cd2a0990672b31796d9ae3a1d9bfa46.tar.gz
crawl-ref-b999a6f53cd2a0990672b31796d9ae3a1d9bfa46.zip
Let Xom occasionally give stealth or make noise upon entering a new level
Only rarely, and only upon entering a level for the first time. Randomly pick between providing a fairly long-duration stealth boost or making a loud noise.
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r--crawl-ref/source/files.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index 2453fa1e41..4061669fc5 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -95,6 +95,7 @@
#include "version.h"
#include "view.h"
#include "viewgeom.h"
+#include "xom.h"
#ifdef __ANDROID__
#include <android/log.h>
@@ -1492,6 +1493,9 @@ bool load_level(dungeon_feature_type stair_taken, load_mode_type load_mode,
}
ash_detect_portals(is_map_persistent());
+
+ if (just_created_level)
+ xom_new_level_noise_or_stealth();
}
// Initialize halos, etc.
invalidate_agrid(true);