summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/hiscores.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-30 22:48:14 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-30 22:48:14 +0000
commit729187802bdeec65565d5024b7ef0df7e53e715a (patch)
tree26d29ab11bf83660add51049e09062b7e3d14359 /crawl-ref/source/hiscores.cc
parent3845e58bd6712c5ee75ca4a74f0a1813c94b09e4 (diff)
downloadcrawl-ref-729187802bdeec65565d5024b7ef0df7e53e715a.tar.gz
crawl-ref-729187802bdeec65565d5024b7ef0df7e53e715a.zip
Unarmed title is based on base, not modified, stats [1821727]
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2694 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/hiscores.cc')
-rw-r--r--crawl-ref/source/hiscores.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc
index ee9cc0a3e6..179ab7a4ce 100644
--- a/crawl-ref/source/hiscores.cc
+++ b/crawl-ref/source/hiscores.cc
@@ -32,6 +32,7 @@
#include <stdio.h>
#include <ctype.h>
#include <unistd.h>
+#include <algorithm>
#include <memory>
#include "AppHdr.h"
@@ -985,9 +986,9 @@ void scorefile_entry::init()
final_hp = you.hp;
final_max_hp = you.hp_max;
final_max_max_hp = you.hp_max + player_rotted();
- str = you.strength;
- intel = you.intel;
- dex = you.dex;
+ str = std::max(you.strength - stat_modifier(STAT_STRENGTH), 1);
+ intel = std::max(you.intel - stat_modifier(STAT_INTELLIGENCE), 1);
+ dex = std::max(you.dex - stat_modifier(STAT_DEXTERITY), 1);
god = you.religion;
if (you.religion != GOD_NO_GOD)