From 2540d1003bb76a86c1c068f5834b04673ffd6f30 Mon Sep 17 00:00:00 2001 From: haranp Date: Fri, 29 Jun 2007 22:41:14 +0000 Subject: 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 --- crawl-ref/source/spl-cast.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'crawl-ref/source/spl-cast.cc') 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() { -- cgit v1.2.3-54-g00ecf