diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-26 13:41:10 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-26 13:41:10 +0000 |
commit | d6db41124871b21f6da082e80d976a71495b6996 (patch) | |
tree | ec1a93fb80830dcf3b73a65d86e7657aa7a3bfbf /crawl-ref/source/player.cc | |
parent | 61cae4a761c2f72cda44ae269c7007b37a0c14a7 (diff) | |
download | crawl-ref-d6db41124871b21f6da082e80d976a71495b6996.tar.gz crawl-ref-d6db41124871b21f6da082e80d976a71495b6996.zip |
Fix the character selecting omitting letters for restricted classes (as
opposed to banned ones). Tweak the code to enforce wearable body armour
and shield types for all species.
I'm afraid the skills need to be adjusted as well, probably in more
detail, but I'm rather clueless on that account.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6147 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 227d7c11b2..9803ed1b75 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -6147,18 +6147,22 @@ int player::shield_bonus() const int stat = 0; if (const item_def *sh = const_cast<player*>(this)->shield()) + { stat = sh->sub_type == ARM_BUCKLER? dex : sh->sub_type == ARM_LARGE_SHIELD? (3 * strength + dex) / 4: (dex + strength) / 2; + } else + { // Condensation shield is guided by the mind. stat = intel / 2; + } - return random2(shield_class) - + (random2(stat) / 4) - + (random2(skill_bump(SK_SHIELDS)) / 4) - - 1; + return (random2(shield_class) + + (random2(stat) / 4) + + (random2(skill_bump(SK_SHIELDS)) / 4) + - 1); } int player::shield_bypass_ability(int tohit) const |