summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.h
diff options
context:
space:
mode:
authorelliptic <hyperelliptical@gmail.com>2014-05-14 03:53:31 -0400
committerelliptic <hyperelliptical@gmail.com>2014-05-14 04:03:26 -0400
commit8b15fbdb43eb0ee52b97be2f14c054238e45735a (patch)
tree0701609b00eca91defdece47a94ab3a65dc97ed7 /crawl-ref/source/player.h
parent5152fba6f8daa055ed72bbd62dd5389cc7acacbe (diff)
downloadcrawl-ref-8b15fbdb43eb0ee52b97be2f14c054238e45735a.tar.gz
crawl-ref-8b15fbdb43eb0ee52b97be2f14c054238e45735a.zip
Fix rounding errors with drained skills.
Previously you could have a drained skill display as 10.5 on the m screen but have you.skill(SK_blah) return 9 for it because of inconsistent rounding. This fixes that issue, though I wonder if it might be simpler to just use a fixed large scale during all the skill calculations and then convert to the requested scale at the end.
Diffstat (limited to 'crawl-ref/source/player.h')
-rw-r--r--crawl-ref/source/player.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h
index ae26b86ce1..60f1b8950f 100644
--- a/crawl-ref/source/player.h
+++ b/crawl-ref/source/player.h
@@ -701,7 +701,8 @@ public:
int shield_tohit_penalty(bool random_factor, int scale = 1) const;
bool wearing_light_armour(bool with_skill = false) const;
- int skill(skill_type skill, int scale =1, bool real = false) const;
+ int skill(skill_type skill, int scale =1,
+ bool real = false, bool drained = true) const;
bool do_shaft();