summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 3560fbb80f..f8e6621329 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -43,7 +43,6 @@
#include "place.h"
#include "player.h"
#include "randart.h"
-#include "religion.h"
#include "spells1.h"
#include "spells4.h"
#include "spl-cast.h"
@@ -51,6 +50,7 @@
#include "stuff.h"
#include "traps.h"
#include "view.h"
+#include "xom.h"
bool cast_selective_amnesia(bool force)
{
@@ -654,10 +654,17 @@ static bool teleport_player( bool allow_control, bool new_abyss_area )
void you_teleport_now( bool allow_control, bool new_abyss_area )
{
const bool randtele = teleport_player(allow_control, new_abyss_area);
+
// Xom is amused by uncontrolled teleports that land you in a
- // dangerous place.
- if (randtele && player_in_a_dangerous_place())
+ // dangerous place, unless the player is in the Abyss and
+ // teleported to escape from all the monsters chasing him/her,
+ // since in that case the new dangerous area is almost certainly
+ // *less* dangerous than the old dangerous area.
+ if (randtele && player_in_a_dangerous_place()
+ && you.level_type != LEVEL_ABYSS)
+ {
xom_is_stimulated(255);
+ }
}
bool entomb(int powc)