summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-29 22:41:14 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-29 22:41:14 +0000
commit2540d1003bb76a86c1c068f5834b04673ffd6f30 (patch)
treeadfa4721430aeebb307b3e36bd81d94f9e403b72 /crawl-ref/source/spl-cast.cc
parent2b2a5958399c551e7643237bc6b519d299bad164 (diff)
downloadcrawl-ref-2540d1003bb76a86c1c068f5834b04673ffd6f30.tar.gz
crawl-ref-2540d1003bb76a86c1c068f5834b04673ffd6f30.zip
Added a spell inspection screen, bound to 'I'.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1694 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r--crawl-ref/source/spl-cast.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 7936fbaa76..cf0fdeadb3 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -24,6 +24,7 @@
#include "beam.h"
#include "cloud.h"
+#include "describe.h"
#include "effects.h"
#include "fight.h"
#include "food.h"
@@ -545,6 +546,24 @@ int spell_enhancement( unsigned int typeflags )
return (enhanced);
} // end spell_enhancement()
+void inspect_spells()
+{
+ if (!you.spell_no)
+ {
+ mpr("You don't know any spells.");
+ return;
+ }
+
+ // Maybe we should honour auto_list here, but if you want the
+ // description, you probably want the listing, too.
+ int keyin = list_spells();
+ if ( isalpha(keyin) )
+ {
+ describe_spell(get_spell_by_letter(keyin));
+ redraw_screen();
+ }
+}
+
// returns false if spell failed, and true otherwise
bool cast_a_spell()
{