summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-12-05 15:22:45 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-12-05 15:22:45 +0000
commit16af0422e54e97a9f6ca2f275ed51c19775b7b80 (patch)
treef79a02b6c9c260028df0bd894511f965c51e0b01 /crawl-ref/source
parent376d7d8be0443ac004a1fe5d88f56325497d1921 (diff)
downloadcrawl-ref-16af0422e54e97a9f6ca2f275ed51c19775b7b80.tar.gz
crawl-ref-16af0422e54e97a9f6ca2f275ed51c19775b7b80.zip
Travel will now avoid deep water unless you're permanently safe in it.
Failing to displace a monster triggers an interrupt. Fixed up autoinscription a bit more. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3004 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/describe.cc2
-rw-r--r--crawl-ref/source/monstuff.cc2
-rw-r--r--crawl-ref/source/player.cc4
-rw-r--r--crawl-ref/source/player.h2
-rw-r--r--crawl-ref/source/travel.cc2
5 files changed, 7 insertions, 5 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 83869abced..203f12826f 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -254,7 +254,7 @@ static std::vector<std::string> randart_propnames( const item_def& item )
switch ( propdescs[i].spell_out )
{
case 0:
- work << val << ' ' << propdescs[i].name;
+ work << std::showpos << val << propdescs[i].name;
break;
case 1:
{
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index a851a5e73d..750542c040 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -1556,6 +1556,8 @@ bool swap_places(monsters *monster)
// Might not be ideal, but it's better that insta-killing
// the monster... maybe try for a short blinki instead? -- bwr
simple_monster_message( monster, " resists." );
+ // FIXME: AI_HIT_MONSTER isn't ideal.
+ interrupt_activity( AI_HIT_MONSTER, monster );
}
return (swap);
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 65917af34b..917f95518c 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -352,9 +352,9 @@ bool player_in_water(void)
return (you.in_water());
}
-bool player_likes_water(void)
+bool player_likes_water(bool permanently)
{
- return (player_can_swim() || beogh_water_walk());
+ return (player_can_swim() || (!permanently && beogh_water_walk()));
}
bool player_is_swimming(void)
diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h
index a012a4b470..b066a1b515 100644
--- a/crawl-ref/source/player.h
+++ b/crawl-ref/source/player.h
@@ -172,7 +172,7 @@ int player_mental_clarity(bool calc_unid = true);
bool player_can_smell();
bool player_can_swim();
-bool player_likes_water();
+bool player_likes_water(bool permanently = false);
/* ***********************************************************************
* called from: fight - files - ouch
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index c6b3ccbb53..11b4df5e7c 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -483,7 +483,7 @@ void init_travel_terrain_check(bool check_race_equip)
if (check_race_equip)
{
// Swimmers get deep water.
- signed char water = player_likes_water()? TRAVERSABLE : IMPASSABLE;
+ signed char water = player_likes_water(true)? TRAVERSABLE : IMPASSABLE;
// If the player has overridden deep water already, we'll respect that.
set_pass_feature(DNGN_DEEP_WATER, water);