diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-25 13:45:00 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-25 13:45:00 +0000 |
commit | b141fc02667821e0673eb96219214cdbc080d854 (patch) | |
tree | 8fe35fe3432ac122bd24f03d1a1626a2cac6814c /crawl-ref/source/player.cc | |
parent | ce96d334e703f1a087a62b55dd5dd82f35fe5e1e (diff) | |
download | crawl-ref-b141fc02667821e0673eb96219214cdbc080d854.tar.gz crawl-ref-b141fc02667821e0673eb96219214cdbc080d854.zip |
Implemented 1617200: Changed armour skill training. Once the original EV
penalty is gone (i.e., at an armour skill of 3 * EV penalty), passive
training will train stealth instead of armour (as if the player were wearing
light armour); also, getting hit in this situation can train both dodging and
armour.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@705 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, 9 insertions, 3 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index d1bc61c891..90aaa62a3d 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -1722,12 +1722,18 @@ bool is_light_armour( const item_def &item ) } } -bool player_light_armour(void) +bool player_light_armour(bool with_skill) { - if (you.equip[EQ_BODY_ARMOUR] == -1) + const int arm = you.equip[EQ_BODY_ARMOUR]; + + if (arm == -1) + return true; + + if (with_skill && + property(you.inv[arm], PARM_EVASION) + you.skills[SK_ARMOUR]/3 >= 0) return true; - return (is_light_armour( you.inv[you.equip[EQ_BODY_ARMOUR]] )); + return (is_light_armour(you.inv[arm])); } // end player_light_armour() // |