SPELLBOOKS

The spellbooks will have color based on Sinister's color documentation,
but the color is not set by the creator of the spellbook since one
spellbook can have many spells on it. The color is on the spell and
the color for the spellbook is calculated from the colors in the
spells that are stored in spellbooks. Example if we have spellbook
that have 3 medium blue spells then the color will be 'blue' and if
it contains one medium black spell and 3 medium blue spells then the
color may be dark blue. Also the power of the spell will affect example
if there is 3 small blue spells and one great black spell then the
spellbook will be blackish rather than blue.

Short description for the spellbook will be following form:

  a <color> spellbook "<title>"

Example:

  a dark yellow spellbook "art of polymorphosis"

One spellbook can contain up to 1000 pages of spells. All spells have
levels of 1-10. 10 is most greatest and 1 is small and powerless. Level 10
spell will take one full book (1000 pages) and when level 1 spell takes
only 10 pages. So one spellbook can contain from 10 level 1 spells to
1 level 10 spell. However level 1-10 spells are considered as 'normal'
but there is also extremely rare spells that can be over level 10 to
infinite level and those spells will take 1000 pages for one level,
so if we have level 20 spell it will take 10 books.

All spellbooks will be extremely valuable. The cost for spellbook
is average level of spells * (pages / 10) gold pieces plus certain %
depending on shopkeeper. So if we have full book of level 1 spells the
cost is 100 gps and book of level 10 spell is 1000 gps.

Spellbooks can be less than 1000 pages long of course and therefore
they will weight less. It is automagically determined how many pages
is in the book. If we create object with only one level 1 spell then
the spellbook will have 100 pages and it will be cheap too only 10
gold pieces.

However it is not only 10 gold pieces to pay if user wants to learn
one level 1 spell. He needs skills to cast magic and they can cost
much in money and time. And also because spellbooks are rare the
cost for spellbook can be *much* more expensive. At least in the
beginning when there is no many spells. I think we are going to
do automagic value calculating for items too if so then price
can be still more expensive depending on material and such things,
maybe age of item can also affect.

Example spellbook would be like this:

--
inherit SPELLBOOK;

create_spellbook ()
{
  set_title ("magical defense");

  add_spell ("dispel magic");
  add_spell ("shelter");
  add_spell ("soul shield");
}
--

Above example will create spellbook with short description of:

  a blue spellbook "magical defense"

Containing spells: dispel magic (level 2), shelter (level 4) and
                   soul shield (level 3)

It contains (2+4+3)*100 pages == 900 pages (270 gps) and it is
readable everyone who knows certain magical skills on certain
percent otherwise scary things will happen.


