diff options
author | Neil Moore <neil@s-z.org> | 2013-11-20 17:35:28 -0500 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2013-11-20 17:37:52 -0500 |
commit | 9a7e074a0e9ca08fcb782b02c5ce79d4b5902d9e (patch) | |
tree | bb0038089f0e6b0a0838cda3d33b084321d68eb5 /crawl-ref/source/dbg-util.cc | |
parent | 99e57c105cffc2f381a9b3517fa39663075e3959 (diff) | |
download | crawl-ref-9a7e074a0e9ca08fcb782b02c5ce79d4b5902d9e.tar.gz crawl-ref-9a7e074a0e9ca08fcb782b02c5ce79d4b5902d9e.zip |
Allow setting negative or zero base stats with &@ (#7761)
You can still set them to any value that fits in an int8_t [-128, 127].
The *modified* stat can never exceed 72, but there is no such cap on the
low end.
Diffstat (limited to 'crawl-ref/source/dbg-util.cc')
-rw-r--r-- | crawl-ref/source/dbg-util.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/dbg-util.cc b/crawl-ref/source/dbg-util.cc index b7e46dedba..fac55f12a1 100644 --- a/crawl-ref/source/dbg-util.cc +++ b/crawl-ref/source/dbg-util.cc @@ -395,9 +395,9 @@ string debug_art_val_str(const item_def& item) int debug_cap_stat(int stat) { - return stat < 1 ? 1 : - stat > 127 ? 127 - : stat; + return stat < -128 ? -128 : + stat > 127 ? 127 + : stat; } #ifdef DEBUG |