summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-04 10:41:46 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-04 10:41:46 +0000
commit746b402561b6b27625c5c1ac33028da9aa846b18 (patch)
tree98f575a915c3403deeeb51fc5f4c11d4896124f0 /crawl-ref/source
parentb330585db366bb8a0ac70c3a73a1e1afd26e4a98 (diff)
downloadcrawl-ref-746b402561b6b27625c5c1ac33028da9aa846b18.tar.gz
crawl-ref-746b402561b6b27625c5c1ac33028da9aa846b18.zip
More general stuff.
- Beogh's water walk ability != swimming - monsters won't throw nets at you if you're already caught - Moved a few more messages into MSGCH_EXAMINE_FILTER. - Added information on new options. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2051 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/acr.cc4
-rw-r--r--crawl-ref/source/describe.cc4
-rw-r--r--crawl-ref/source/direct.cc23
-rw-r--r--crawl-ref/source/misc.cc4
-rw-r--r--crawl-ref/source/monstuff.cc10
-rw-r--r--crawl-ref/source/player.cc14
-rw-r--r--crawl-ref/source/player.h1
-rw-r--r--crawl-ref/source/travel.cc2
8 files changed, 47 insertions, 15 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index d934e58972..89f55868d9 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -1656,8 +1656,8 @@ void process_command( command_type cmd )
std::string msg = "Unknown command. (For a list of commands type <w>?<lightgray>.)";
print_formatted_paragraph(msg, get_number_of_cols());
}
- else
- mpr("Unknown command.");
+ else // well, not examine, but...
+ mpr("Unknown command.", MSGCH_EXAMINE_FILTER);
break;
}
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index cea8925088..f6c02817f8 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -2246,8 +2246,8 @@ static const char* describe_potion( const item_def &item )
return "A potion containing the essence of life. Vital for all living "
"creatures, as well as some undead ones.$";
case POT_RESISTANCE:
- return "A potion which grants you "
- "temporary resistance to the elements.$";
+ return "A potion which grants you temporary resistance to the elements "
+ "and poison.$";
case NUM_POTIONS:
return "A buggy potion.";
}
diff --git a/crawl-ref/source/direct.cc b/crawl-ref/source/direct.cc
index b40e0b5662..c3ea182be1 100644
--- a/crawl-ref/source/direct.cc
+++ b/crawl-ref/source/direct.cc
@@ -491,7 +491,7 @@ void direction(dist& moves, targeting_type restricts,
// Do we have a previous target?
if (you.prev_targ == MHITNOT || you.prev_targ == MHITYOU)
{
- mpr("You haven't got a previous target.");
+ mpr("You haven't got a previous target.", MSGCH_EXAMINE_FILTER);
break;
}
@@ -502,7 +502,7 @@ void direction(dist& moves, targeting_type restricts,
if (!mons_near(montarget) ||
!player_monster_visible( montarget ))
{
- mpr("You can't see that creature any more.");
+ mpr("You can't see that creature any more.", MSGCH_EXAMINE_FILTER);
}
else
{
@@ -626,7 +626,7 @@ void direction(dist& moves, targeting_type restricts,
}
else if ( moves.isTarget && !see_grid(moves.tx, moves.ty) )
{
- mpr("Sorry, you can't target what you can't see.");
+ mpr("Sorry, you can't target what you can't see.", MSGCH_EXAMINE_FILTER);
}
// Ask for confirmation if we're quitting for some odd reason
else if ( moves.isValid || moves.isCancel ||
@@ -1213,7 +1213,16 @@ void describe_floor()
if (feat.empty())
return;
- mpr((prefix + feat + suffix).c_str(), MSGCH_EXAMINE);
+ msg_channel_type channel = MSGCH_EXAMINE;
+
+ // water is not terribly important if you don't mind it
+ if ((grd[you.x_pos][you.y_pos] == DNGN_DEEP_WATER
+ || grd[you.x_pos][you.y_pos] == DNGN_SHALLOW_WATER)
+ && player_likes_water())
+ {
+ channel = MSGCH_EXAMINE_FILTER;
+ }
+ mpr((prefix + feat + suffix).c_str(), channel);
if (grid == DNGN_ENTER_LABYRINTH)
mpr("Beware, for starvation awaits!", MSGCH_EXAMINE);
}
@@ -1837,8 +1846,12 @@ static void describe_cell(int mx, int my)
else
{
msg_channel_type channel = MSGCH_EXAMINE;
- if (grd[mx][my] == DNGN_FLOOR)
+ if (grd[mx][my] == DNGN_FLOOR
+ || grd[mx][my] == DNGN_SHALLOW_WATER
+ || grd[mx][my] == DNGN_DEEP_WATER)
+ {
channel = MSGCH_EXAMINE_FILTER;
+ }
mpr(feature_desc.c_str(), channel);
}
#endif
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index d4212f73aa..ac8efb3947 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -2128,6 +2128,10 @@ bool fall_into_a_pool( int entry_x, int entry_y, bool allow_shift,
merfolk_start_swimming();
return (false);
}
+
+ // sanity check
+ if (terrain != DNGN_LAVA && beogh_water_walk())
+ return (false);
mprf("You fall into the %s!",
(terrain == DNGN_LAVA) ? "lava" :
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 25f1fc1513..574843070b 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -3538,6 +3538,16 @@ static bool handle_throw(monsters *monster, bolt & beem)
if (mon_item == NON_ITEM || !is_valid_item(mitm[mon_item]))
return (false);
+ // throwing a net at a target that is already caught would be
+ // completely useless, so bail out
+ if (mitm[mon_item].base_type == OBJ_MISSILES
+ && mitm[mon_item].sub_type == MI_THROWING_NET
+ && (beem.target_x == you.x_pos && beem.target_y == you.y_pos
+ && you.caught()))
+ {
+ return (false);
+ }
+
// If the attack needs a launcher that we can't wield, bail out.
if (launcher)
{
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 6cf1695a8e..b6b43e2d62 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -246,7 +246,7 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift,
merfolk_start_swimming();
}
}
- else if ( !player_can_swim() )
+ else if ( !player_likes_water() )
{
ASSERT( new_grid != DNGN_DEEP_WATER );
@@ -347,7 +347,7 @@ bool is_grid_dangerous(int grid)
{
return (!player_is_levitating()
&& (grid == DNGN_LAVA
- || (grid == DNGN_DEEP_WATER && !player_can_swim())));
+ || (grid == DNGN_DEEP_WATER && !player_likes_water()) ));
}
bool player_in_mappable_area( void )
@@ -370,10 +370,15 @@ bool player_in_hell( void )
bool player_in_water(void)
{
- return (!player_is_levitating()
+ return (!player_is_levitating() && !beogh_water_walk()
&& grid_is_water(grd[you.x_pos][you.y_pos]));
}
+bool player_likes_water(void)
+{
+ return (player_can_swim() || beogh_water_walk());
+}
+
bool player_is_swimming(void)
{
return you.swimming();
@@ -5010,8 +5015,7 @@ bool player::in_water() const
bool player::can_swim() const
{
- return (species == SP_MERFOLK ||
- (you.religion == GOD_BEOGH && you.piety >= piety_breakpoint(4)));
+ return (species == SP_MERFOLK);
}
bool player::swimming() const
diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h
index 4dff5056a6..fa566a5d9b 100644
--- a/crawl-ref/source/player.h
+++ b/crawl-ref/source/player.h
@@ -160,6 +160,7 @@ int player_mental_clarity(bool calc_unid = true);
bool player_can_smell();
bool player_can_swim();
+bool player_likes_water();
/* ***********************************************************************
* called from: fight - files - ouch
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 11eccfaac5..433e8878a0 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -474,7 +474,7 @@ void init_travel_terrain_check(bool check_race_equip)
if (check_race_equip)
{
// Swimmers get deep water.
- signed char water = player_can_swim()? TRAVERSABLE : IMPASSABLE;
+ signed char water = player_likes_water()? TRAVERSABLE : IMPASSABLE;
// If the player has overridden deep water already, we'll respect that.
set_pass_feature(DNGN_DEEP_WATER, water);