diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-29 19:42:25 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-29 19:42:25 +0000 |
commit | ce8b57822e05def892bca46e7e724bc6625d73ba (patch) | |
tree | 033beef59721cd41a6900e874d10ea78d8a4fb1e /crawl-ref/source/player.cc | |
parent | 996361d167065bc29bef5da248e3d18bd0d9cbab (diff) | |
download | crawl-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/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 13 |
1 files changed, 11 insertions, 2 deletions
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; |