angband/angband — pull request #91 by artes-liberales (2011-10-09 11:27:13+00:00)
Title: #1171 Turn off "Study" message when there are no available spells in currently carried books (second try)

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

Changes in:

xtra3.c (in prt_study)
player/player.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.