summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-01 21:38:06 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-01 21:38:06 +0000
commit33f39e1feb49c5f7ef0fc748e16195849627faf9 (patch)
treef3f8d209377cc52716735994388c50d75caa9827 /crawl-ref/source/spells3.cc
parent4eb30eb42d7983767085a9a7bb45556b9b1665e3 (diff)
downloadcrawl-ref-33f39e1feb49c5f7ef0fc748e16195849627faf9.tar.gz
crawl-ref-33f39e1feb49c5f7ef0fc748e16195849627faf9.zip
* Fix some issues with the new food colourings, and make it respect
Vampires' drinking habits. * Allow other channels than MSGCH_TUTORIAL to use formatted strings and use it to send a coloured string through the butcher prompt, thus visibly setting off dangerous corpses. I'd like normal corpses (no patterns in food_colouring.txt matching) not to be highlighted at all, but they're currently shown in lightgrey, that will have to be improved. * Fix Vampire mutation screen displaying poison resistance wrongly. * Add a new option force_more_message whose syntax is copied from travel_stop_message. Any message containing a regex within this listing will enforce a -More- prompt. By default, it's only enabled for "You start to lose your buoyoncy." * Tweak the messages for Kenku flying to fix 1823833. * Make Xom be amused at players teleporting in a labyrinth or when becoming (Near) Starving while in a labyrinth and with little food at their disposal. Yes, it's one of those "Something for everyone" commits. :D git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5416 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc23
1 files changed, 13 insertions, 10 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 597e5a8887..c58bf6b3a2 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -606,7 +606,7 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area )
if (scan_randarts(RAP_PREVENT_TELEPORTATION))
{
mpr("You feel a strange sense of stasis.");
- return false;
+ return (false);
}
// after this point, we're guaranteed to teleport. Kill the appropriate
@@ -624,7 +624,8 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area )
abyss_teleport( new_abyss_area );
if (you.pet_target != MHITYOU)
you.pet_target = MHITNOT;
- return true;
+
+ return (true);
}
coord_def pos(1, 0);
@@ -671,8 +672,8 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area )
you.moveto(pos.x, pos.y);
- if ((grd[you.x_pos][you.y_pos] != DNGN_FLOOR
- && grd[you.x_pos][you.y_pos] != DNGN_SHALLOW_WATER)
+ if (grd[you.x_pos][you.y_pos] != DNGN_FLOOR
+ && grd[you.x_pos][you.y_pos] != DNGN_SHALLOW_WATER
|| mgrd[you.x_pos][you.y_pos] != NON_MONSTER
|| env.cgrid[you.x_pos][you.y_pos] != EMPTY_CLOUD)
{
@@ -680,11 +681,11 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area )
}
else
{
- // controlling teleport contaminates the player -- bwr
+ // Controlling teleport contaminates the player. -- bwr
contaminate_player(1, true);
}
}
- } // end "if is_controlled"
+ } // end "if is_controlled"
if (!is_controlled)
{
@@ -695,8 +696,8 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area )
newx = random_range(X_BOUND_1 + 1, X_BOUND_2 - 1);
newy = random_range(Y_BOUND_1 + 1, Y_BOUND_2 - 1);
}
- while ((grd[newx][newy] != DNGN_FLOOR
- && grd[newx][newy] != DNGN_SHALLOW_WATER)
+ while (grd[newx][newy] != DNGN_FLOOR
+ && grd[newx][newy] != DNGN_SHALLOW_WATER
|| mgrd[newx][newy] != NON_MONSTER
|| env.cgrid[newx][newy] != EMPTY_CLOUD);
@@ -730,8 +731,10 @@ void you_teleport_now( bool allow_control, bool new_abyss_area )
// 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)
+ // Teleporting in a labyrinth is also funny, but only for non-minotaurs.
+ if (randtele
+ && (you.level_type == LEVEL_LABYRINTH && you.species != SP_MINOTAUR
+ || you.level_type != LEVEL_ABYSS && player_in_a_dangerous_place()))
{
xom_is_stimulated(255);
}