summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-12-04 09:14:26 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-12-04 09:18:30 +0100
commit24fa1749d2dc82f57d5ce04655f8d934ea767d14 (patch)
tree053b2b82d4ef3c7bfdafd61164d6b519077ebc4e /crawl-ref/source/player.cc
parent83a78c65abdbfa995225122be56548a75d46f0ff (diff)
downloadcrawl-ref-24fa1749d2dc82f57d5ce04655f8d934ea767d14.tar.gz
crawl-ref-24fa1749d2dc82f57d5ce04655f8d934ea767d14.zip
De-duplicate magic res and stealth adjective choice.
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc30
1 files changed, 3 insertions, 27 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index e69dc3c94d..3f43ea3bdd 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -3792,36 +3792,12 @@ void display_char_status()
// magic resistance
const int mr = you.res_magic();
- mprf("You are %s resistant to magic.",
- (mr < 10) ? "not" :
- (mr < 30) ? "slightly" :
- (mr < 60) ? "somewhat" :
- (mr < 90) ? "quite" :
- (mr < 120) ? "very" :
- (mr < 150) ? "extremely" :
- (mr < 190) ? "extraordinarily" :
- (mr < 240) ? "incredibly" :
- (mr < 300) ? "uncannily"
- : "almost entirely");
+ mprf("You are %s resistant to magic.", magic_res_adjective(mr).c_str());
// character evaluates their ability to sneak around:
- const int ustealth = check_stealth();
-
- mprf("You feel %sstealthy.",
- (ustealth < 10) ? "extremely un" :
- (ustealth < 30) ? "very un" :
- (ustealth < 60) ? "un" :
- (ustealth < 90) ? "fairly " :
- (ustealth < 120) ? "" :
- (ustealth < 160) ? "quite " :
- (ustealth < 220) ? "very " :
- (ustealth < 300) ? "extremely " :
- (ustealth < 400) ? "extraordinarily " :
- (ustealth < 520) ? "incredibly "
- : "uncannily ");
-
+ mprf("You feel %s.", stealth_desc(check_stealth()).c_str());
#if DEBUG_DIAGNOSTICS
- mprf("stealth: %d", ustealth);
+ mprf("stealth: %d", check_stealth());
#endif
}