From ce8b57822e05def892bca46e7e724bc6625d73ba Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sun, 29 Mar 2009 19:42:25 +0000 Subject: * 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 --- crawl-ref/source/player.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/player.cc') 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; -- cgit v1.2.3-54-g00ecf