angband/angband — pull request #90 by artes-liberales (2011-10-08 22:11:03+00:00)
Title: #1171 Turn off "Study" message when there are no available spells in currently carried books

When there are no available spells in carried books,
the study message is now displayed in a darker grey colour.

Changes in:

xtra3.c (in prt_study)
player/p_util.h
player/p_util.c	(New function: player_can_study_book)

Related functions for reference:

cmd-obj.c (do_cmd_study_spell, do_cmd_study_book)
ui-spell.c (textui_obj_study)
obj-ui.c (get_item)
calc.c (calc_spells)
z-term.h (text colours)

Note: When the player has learned all possible spells,
the number of spells to learn will be 0, so the study
message will not be displayed at all. This was already
working and did not need to be fixed in this patch.