diff options
author | elliptic <hyperelliptical@gmail.com> | 2014-05-14 03:53:31 -0400 |
---|---|---|
committer | elliptic <hyperelliptical@gmail.com> | 2014-05-14 04:03:26 -0400 |
commit | 8b15fbdb43eb0ee52b97be2f14c054238e45735a (patch) | |
tree | 0701609b00eca91defdece47a94ab3a65dc97ed7 /crawl-ref/source/actor.h | |
parent | 5152fba6f8daa055ed72bbd62dd5389cc7acacbe (diff) | |
download | crawl-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/actor.h')
-rw-r--r-- | crawl-ref/source/actor.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/actor.h b/crawl-ref/source/actor.h index dbf07bddf0..ab996adcee 100644 --- a/crawl-ref/source/actor.h +++ b/crawl-ref/source/actor.h @@ -238,7 +238,8 @@ public: virtual int beam_resists(bolt &beam, int hurted, bool doEffects, string source = "") = 0; - virtual int skill(skill_type sk, int scale = 1, bool real = false) const = 0; + virtual int skill(skill_type sk, int scale = 1, + bool real = false, bool drained = true) const = 0; int skill_rdiv(skill_type sk, int mult = 1, int div = 1) const; virtual int stat_hp() const = 0; |