summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-01-07 22:39:38 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-01-07 22:39:38 +0000
commit317ed72d9c13b94bb069e7de2d128339aa7ad555 (patch)
tree5a847f8b8d88fd063c28d3d28aefe878b0acb7e3 /crawl-ref/source/player.cc
parent0710410f6d4155fafb7687f481d7a1876d320e1f (diff)
downloadcrawl-ref-317ed72d9c13b94bb069e7de2d128339aa7ad555.tar.gz
crawl-ref-317ed72d9c13b94bb069e7de2d128339aa7ad555.zip
Added magic resistance feedback to '@'.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@800 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 47aa9a8633..5fe3a6c35d 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -3118,6 +3118,19 @@ void display_char_status(void)
mpr(info);
+ // magic resistance
+ const int mr = player_res_magic();
+ snprintf(info, INFO_SIZE, "You are %s resistant to magic.",
+ (mr < 10) ? "not" :
+ (mr < 25) ? "slightly" :
+ (mr < 50) ? "somewhat" :
+ (mr < 75) ? "considerably" :
+ (mr < 100) ? "quite" :
+ (mr < 120) ? "very" :
+ (mr < 140) ? "extremely" :
+ "incredibly");
+ mpr(info);
+
// character evaluates their ability to sneak around:
const int ustealth = check_stealth();