summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-29 19:42:25 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-29 19:42:25 +0000
commitce8b57822e05def892bca46e7e724bc6625d73ba (patch)
tree033beef59721cd41a6900e874d10ea78d8a4fb1e /crawl-ref
parent996361d167065bc29bef5da248e3d18bd0d9cbab (diff)
downloadcrawl-ref-ce8b57822e05def892bca46e7e724bc6625d73ba.tar.gz
crawl-ref-ce8b57822e05def892bca46e7e724bc6625d73ba.zip
* Merfolk may wear heavy armour while swimming, though their armour
penalty is doubled in deep water. * Change "zombified ally" -> "mindless thrall" (and only count friendly monsters). * Call trackers_init_new_level() earlier, in load(), so that TileNewLevel() can use the correct travel information when drawing exclusions on the minimap. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9566 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/docs/changes.stone_soup3
-rw-r--r--crawl-ref/source/command.cc2
-rw-r--r--crawl-ref/source/describe.cc2
-rw-r--r--crawl-ref/source/enum.h12
-rw-r--r--crawl-ref/source/fight.cc11
-rw-r--r--crawl-ref/source/files.cc15
-rw-r--r--crawl-ref/source/item_use.cc12
-rw-r--r--crawl-ref/source/itemprop.cc9
-rw-r--r--crawl-ref/source/misc.cc12
-rw-r--r--crawl-ref/source/player.cc13
-rw-r--r--crawl-ref/source/tilepick.cc4
-rw-r--r--crawl-ref/source/tilesdl.cc6
-rw-r--r--crawl-ref/source/travel.h1
-rw-r--r--crawl-ref/source/view.cc2
-rw-r--r--crawl-ref/source/xom.cc1
15 files changed, 46 insertions, 59 deletions
diff --git a/crawl-ref/docs/changes.stone_soup b/crawl-ref/docs/changes.stone_soup
index 720527408a..4f89bf1f5f 100644
--- a/crawl-ref/docs/changes.stone_soup
+++ b/crawl-ref/docs/changes.stone_soup
@@ -60,6 +60,7 @@ Monsters
* Implemented monster miscasts caused by Zot traps or mummy curses.
* Make all allies (including zombies) avoid Zot traps known to the player.
* Ghosts don't get holy wrath branded attacks anymore.
+* Monsters will now shout when woken, unless stabbed.
* Monsters will now drink !healing to cure confusion, etc.
* Allies no longer mind being teleported by the player.
* Retain the teleportation enchantment on polymorphed monsters.
@@ -112,7 +113,7 @@ Items
* Ammo that IDs through throwing now merges in your pack instantaneously.
* ?immolation doesn't burn scrolls anymore.
* ?summoning creates a permanent abomination.
-* ?fear don't turn allies hostile anymore.
+* ?fear doesn't turn allies hostile anymore.
* ?random uselessness now autoIDs.
* ?vorpalise weapon now fixes temporary brands instead of EWIII.
* Nemelex-gifted decks now ID after drawing one card.
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index 08e930e2b0..6014528aae 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -1410,7 +1410,7 @@ static bool _do_description(std::string key, std::string type,
linebreak_string2(footer, width - 1);
inf.footer = footer;
- inf.title = key;
+ inf.title = key;
print_description(inf);
return (true);
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 80d45c124e..0455c808c8 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -1638,7 +1638,7 @@ void append_spells(std::string &desc, const item_def &item)
if (stype == SPELL_NO_SPELL)
continue;
- std::string name = (is_memorised(stype)) ? "*" : "";
+ std::string name = (is_memorised(stype) ? "*" : "");
name += spell_title(stype);
desc += name;
for (unsigned int i = 0; i < 35 - name.length(); i++)
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 478b36d1ad..b20e911d3f 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -1533,30 +1533,30 @@ enum map_marker_type
enum map_feature
{
- MF_UNSEEN,
+ MF_UNSEEN, // 0
MF_FLOOR,
MF_WALL,
MF_MAP_FLOOR,
MF_MAP_WALL,
- MF_DOOR,
+ MF_DOOR, // 5
MF_ITEM,
MF_MONS_HOSTILE,
MF_MONS_FRIENDLY,
MF_MONS_NEUTRAL,
- MF_MONS_NO_EXP,
+ MF_MONS_NO_EXP, // 10
MF_STAIR_UP,
MF_STAIR_DOWN,
MF_STAIR_BRANCH,
MF_FEATURE,
- MF_WATER,
+ MF_WATER, // 15
MF_LAVA,
MF_TRAP,
MF_EXCL_ROOT,
MF_EXCL,
- MF_PLAYER,
+ MF_PLAYER, // 20
MF_MAX,
- MF_SKIP
+ MF_SKIP // 22
};
enum menu_type
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index f19d487dbb..ac73a80723 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -221,8 +221,15 @@ int calc_heavy_armour_penalty( bool random_factor )
// Heavy armour modifiers for PARM_EVASION.
if (player_wearing_slot(EQ_BODY_ARMOUR))
{
- const int ev_pen = property( you.inv[you.equip[EQ_BODY_ARMOUR]],
- PARM_EVASION );
+ int ev_pen = property( you.inv[you.equip[EQ_BODY_ARMOUR]],
+ PARM_EVASION );
+
+ // Wearing heavy armour in water is particularly cumbersome.
+ if (you.species == SP_MERFOLK && grd(you.pos()) == DNGN_DEEP_WATER
+ && player_is_swimming())
+ {
+ ev_pen *= 2;
+ }
if (ev_pen < 0 && maybe_random2(you.skills[SK_ARMOUR],
random_factor) < abs(ev_pen))
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index b4332c5e73..098b1cd471 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -968,7 +968,7 @@ static void _grab_followers()
if (fmenv == NULL)
continue;
- if (!mons_can_use_stairs(fmenv))
+ if (mons_wont_attack(fmenv) && !mons_can_use_stairs(fmenv))
non_stair_using_allies++;
if (fmenv->type == MONS_PLAYER_GHOST
@@ -985,9 +985,9 @@ static void _grab_followers()
{
// XXX: This assumes that the only monsters that are
// incapable of using stairs are zombified.
- mprf("Your zombified all%s stay%s behind.",
- non_stair_using_allies > 1 ? "ies" : "y",
- non_stair_using_allies > 1 ? "" : "s");
+ mprf("Your mindless thrall%s stay%s behind.",
+ non_stair_using_allies > 1 ? "s" : "",
+ non_stair_using_allies > 1 ? "" : "s");
}
memset(travel_point_distance, 0, sizeof(travel_distance_grid_t));
@@ -1249,10 +1249,15 @@ bool load( dungeon_feature_type stair_taken, load_mode_type load_mode,
place_transiting_items();
}
-#ifdef USE_TILE
+ // Tell stash-tracker and travel that we've changed levels.
if (load_mode != LOAD_VISITOR)
+ {
+ // Tell stash-tracker and travel that we've changed levels.
+ trackers_init_new_level(true);
+#ifdef USE_TILE
TileNewLevel(just_created_level);
#endif
+ }
_redraw_all();
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 97c0a958a0..b505f3aac7 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -990,18 +990,6 @@ bool can_wear_armour(const item_def &item, bool verbose, bool ignore_temporary)
return (false);
}
- // Cannot swim in heavy armour.
- if (!ignore_temporary
- && player_is_swimming()
- && slot == EQ_BODY_ARMOUR
- && !is_light_armour( item ))
- {
- if (verbose)
- mpr("You can't swim in that!");
-
- return (false);
- }
-
// Giant races and draconians.
if (player_size(PSIZE_TORSO) >= SIZE_LARGE || player_genus(GENPC_DRACONIAN))
{
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index 3cfa6f4fc1..5603d1ac76 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -1261,15 +1261,6 @@ bool check_armour_shape( const item_def &item, bool quiet )
break;
case EQ_BODY_ARMOUR:
- // Cannot swim in heavy armour.
- if (player_is_swimming() && !is_light_armour( item ))
- {
- if (!quiet)
- mpr("You can't swim in that!");
-
- return (false);
- }
-
// Draconians are human-sized, but have wings that cause problems
// with most body armours (only very flexible fit allowed).
if (player_genus( GENPC_DRACONIAN )
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 7713fd7ca3..f97da8e21f 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -1240,8 +1240,6 @@ bool merfolk_change_is_safe(bool quiet)
std::set<equipment_type> r;
r.insert(EQ_BOOTS);
- if (!player_light_armour())
- r.insert(EQ_BODY_ARMOUR);
if (check_transformation_stat_loss(r, quiet))
return (false);
@@ -1255,13 +1253,6 @@ void merfolk_start_swimming()
untransform();
remove_one_equip(EQ_BOOTS);
-
- // Perhaps a bit to easy for the player, but we allow merfolk
- // to slide out of heavy body armour freely when entering water,
- // rather than handling emcumbered swimming. -- bwr
- if (!player_light_armour())
- remove_one_equip(EQ_BODY_ARMOUR, false);
-
you.redraw_evasion = true;
}
@@ -1842,9 +1833,6 @@ void up_stairs(dungeon_feature_type force_stair,
if (you.skills[SK_TRANSLOCATIONS] > 0 && !allow_control_teleport( true ))
mpr( "You sense a powerful magical force warping space.", MSGCH_WARN );
- // Tell stash-tracker and travel that we've changed levels.
- trackers_init_new_level(true);
-
if (collect_travel_data)
{
// Update stair information for the stairs we just ascended, and the
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 5d46daf826..84cd21750d 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -2245,7 +2245,7 @@ bool player_light_armour(bool with_skill)
}
return (is_light_armour(you.inv[arm]));
-} // end player_light_armour()
+}
//
// This function returns true if the player has a radically different
@@ -2388,7 +2388,16 @@ int player_evasion()
// Merfolk get an evasion bonus in water.
if (you.swimming())
{
- const int ev_bonus = std::min(9, std::max(2, ev / 4));
+ // ... though a bit less so if swimming in heavy armour.
+ int factor = 4;
+ int min_bonus = 2;
+ if (grd(you.pos()) == DNGN_DEEP_WATER && !player_light_armour())
+ {
+ factor = 6;
+ min_bonus = 1;
+ }
+
+ const int ev_bonus = std::min(9, std::max(min_bonus, ev / factor));
ev += ev_bonus;
}
break;
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index 1dc3c418c5..a2508ebe04 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -38,8 +38,8 @@ void TileNewLevel(bool first_time)
{
tiles.clear_minimap();
- for (int y = 0; y < GYM; y++)
- for (int x = 0; x < GXM; x++)
+ for (unsigned int x = 0; x < GXM; x++)
+ for (unsigned int y = 0; y < GYM; y++)
tiles.update_minimap(x, y);
if (first_time)
diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc
index 335867182d..1eebc00ec8 100644
--- a/crawl-ref/source/tilesdl.cc
+++ b/crawl-ref/source/tilesdl.cc
@@ -390,7 +390,6 @@ void TilesFramework::load_dungeon(const coord_def &cen)
int count = 0;
for (int y = 0; y < wy; y++)
- {
for (int x = 0; x < wx; x++)
{
unsigned int fg;
@@ -412,7 +411,7 @@ void TilesFramework::load_dungeon(const coord_def &cen)
bg = env.tile_bk_bg(gc);
if (!fg && !bg)
tileidx_unseen(fg, bg, get_envmap_char(gc), gc);
- bg |= tile_unseen_flag(gc);
+ bg |= tile_unseen_flag(gc);
}
else
{
@@ -426,7 +425,6 @@ void TilesFramework::load_dungeon(const coord_def &cen)
tb[count++] = fg;
tb[count++] = bg;
}
- }
load_dungeon(tb, cen);
tiles.redraw();
@@ -1229,7 +1227,7 @@ void TilesFramework::update_minimap(int gx, int gy, map_feature f)
else if (mons_class_flag(menv[grid].type, M_NO_EXP_GAIN))
f = MF_MONS_NO_EXP;
}
- else if (f == MF_FLOOR || f == MF_MAP_FLOOR)
+ else if (f == MF_FLOOR || f == MF_MAP_FLOOR || f == MF_WATER)
{
if (is_exclude_root(gc))
f = MF_EXCL_ROOT;
diff --git a/crawl-ref/source/travel.h b/crawl-ref/source/travel.h
index 7f3a7702a3..30e104f8f8 100644
--- a/crawl-ref/source/travel.h
+++ b/crawl-ref/source/travel.h
@@ -64,7 +64,6 @@ void toggle_exclude(const coord_def &p);
void set_exclude(const coord_def &p, int radius2);
void clear_excludes();
unsigned char is_waypoint(const coord_def &p);
-void update_excludes();
bool is_exclude_root(const coord_def &p);
bool is_stair(dungeon_feature_type gridc);
bool is_travelable_stair(dungeon_feature_type gridc);
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index d641ac4f02..e4a8e60ba9 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -4147,7 +4147,7 @@ void init_feature_table( void )
Feature[i].seen_colour = BLACK; // -> no special seen map handling
Feature[i].seen_em_colour = BLACK;
Feature[i].em_colour = BLACK;
- Feature[i].minimap = MF_UNSEEN;
+ Feature[i].minimap = MF_UNSEEN;
switch (i)
{
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index 0626b35b5f..05c94a83e9 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -178,6 +178,7 @@ static void _xom_is_stimulated(int maxinterestingness,
interestingness = std::min(255, interestingness);
+#define DEBUG_XOM
#if defined(DEBUG_RELIGION) || defined(DEBUG_GIFTS) || defined(DEBUG_XOM)
mprf(MSGCH_DIAGNOSTICS,
"Xom: gift_timeout: %d, maxinterestingness = %d, interestingness = %d",