summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 5697133c4a..b5c9e6bb40 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -36,6 +36,7 @@
#include "coordit.h"
#include "database.h"
#include "delay.h"
+#include "dgn-shoals.h"
#include "directn.h"
#include "dgnevent.h"
#include "directn.h"
@@ -2888,14 +2889,15 @@ bool i_feel_safe(bool announce, bool want_move, bool just_monsters, int range)
// check clouds
if (in_bounds(you.pos()) && env.cgrid(you.pos()) != EMPTY_CLOUD)
{
- const cloud_type type = env.cloud[env.cgrid(you.pos())].type;
+ const int cloudidx = env.cgrid(you.pos());
+ const cloud_type type = env.cloud[cloudidx].type;
if (is_damaging_cloud(type, want_move))
{
if (announce)
{
mprf(MSGCH_WARN, "You're standing in a cloud of %s!",
- cloud_name(type).c_str());
+ cloud_name(cloudidx).c_str());
}
return (false);
}
@@ -3092,6 +3094,7 @@ void run_environment_effects()
}
run_corruption_effects(you.time_taken);
+ shoals_apply_tides(div_rand_round(you.time_taken, 10));
}
coord_def pick_adjacent_free_square(const coord_def& p)