spl-book.cc File Reference

#include "AppHdr.h"
#include "spl-book.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iomanip>
#include "artefact.h"
#include "externs.h"
#include "species.h"
#include "cio.h"
#include "colour.h"
#include "database.h"
#include "debug.h"
#include "delay.h"
#include "food.h"
#include "format.h"
#include "godconduct.h"
#include "goditem.h"
#include "invent.h"
#include "itemname.h"
#include "itemprop.h"
#include "items.h"
#include "libutil.h"
#include "macro.h"
#include "message.h"
#include "player.h"
#include "religion.h"
#include "spl-cast.h"
#include "spl-miscast.h"
#include "spl-util.h"
#include "state.h"
#include "stuff.h"
#include "transform.h"
#include "book-data.h"

Include dependency graph for spl-book.cc:


Defines

#define SPELL_LIST_KEY   "spell_list"
#define RANDART_BOOK_TYPE_KEY   "randart_book_type"
#define RANDART_BOOK_LEVEL_KEY   "randart_book_level"
#define RANDART_BOOK_TYPE_LEVEL   "level"
#define RANDART_BOOK_TYPE_THEME   "theme"
#define NUMBER_SPELLBOOKS   sizeof(spellbook_template_array)/(sizeof(spell_type) * SPELLBOOK_SIZE)

Typedefs

typedef std::vector< spell_typespell_list
typedef std::map< spell_type, int > spells_to_books

Functions

spell_type which_spell_in_book (const item_def &book, int spl)
spell_type which_spell_in_book (int sbook_type, int spl)
int player_spell_skills ()
int spellbook_contents (item_def &book, read_book_action_type action, formatted_string *fs)
int book_rarity (uint8_t which_book)
void init_spell_rarities ()
int spell_rarity (spell_type which_spell)
bool is_valid_spell_in_book (const item_def &book, int spell)
bool is_valid_spell_in_book (int splbook, int spell)
bool player_can_memorise_from_spellbook (const item_def &book)
void mark_had_book (const item_def &book)
void mark_had_book (int booktype)
void inscribe_book_highlevel (item_def &book)
int read_book (item_def &book, read_book_action_type action)
bool you_cannot_memorise (spell_type spell)
bool you_cannot_memorise (spell_type spell, bool &undead)
bool player_can_memorise (const item_def &book)
bool has_spells_to_memorise (bool silent, int current_spell)
std::vector< spell_typeget_mem_spell_list (std::vector< int > &books)
bool can_learn_spell (bool silent)
bool learn_spell ()
std::string desc_cannot_memorise_reason (bool undead)
bool learn_spell (spell_type specspell, int book, bool is_safest_book)
bool forget_spell_from_book (spell_type spell, const item_def *book)
int count_staff_spells (const item_def &item, bool need_id)
int staff_spell (int staff)
bool is_memorised (spell_type spell)
bool make_book_level_randart (item_def &book, int level, int num_spells, std::string owner)
bool make_book_theme_randart (item_def &book, int disc1, int disc2, int num_spells, int max_levels, spell_type incl_spell, std::string owner)
void make_book_Roxanne_special (item_def *book)
bool book_has_title (const item_def &book)
bool is_dangerous_spellbook (const int book_type)
bool is_dangerous_spellbook (const item_def &book)
void destroy_spellbook (const item_def &book)

Define Documentation

#define NUMBER_SPELLBOOKS   sizeof(spellbook_template_array)/(sizeof(spell_type) * SPELLBOOK_SIZE)

#define RANDART_BOOK_LEVEL_KEY   "randart_book_level"

#define RANDART_BOOK_TYPE_KEY   "randart_book_type"

#define RANDART_BOOK_TYPE_LEVEL   "level"

#define RANDART_BOOK_TYPE_THEME   "theme"

#define SPELL_LIST_KEY   "spell_list"


Typedef Documentation

typedef std::vector<spell_type> spell_list

typedef std::map<spell_type, int> spells_to_books


Function Documentation

bool book_has_title ( const item_def book  ) 

Here is the call graph for this function:

int book_rarity ( uint8_t  which_book  ) 

bool can_learn_spell ( bool  silent  ) 

Here is the call graph for this function:

int count_staff_spells ( const item_def item,
bool  need_id 
)

Here is the call graph for this function:

std::string desc_cannot_memorise_reason ( bool  undead  ) 

Here is the call graph for this function:

void destroy_spellbook ( const item_def book  ) 

Here is the call graph for this function:

bool forget_spell_from_book ( spell_type  spell,
const item_def book 
)

Here is the call graph for this function:

std::vector<spell_type> get_mem_spell_list ( std::vector< int > &  books  ) 

bool has_spells_to_memorise ( bool  silent,
int  current_spell 
)

void init_spell_rarities (  ) 

Here is the call graph for this function:

void inscribe_book_highlevel ( item_def book  ) 

Here is the call graph for this function:

bool is_dangerous_spellbook ( const item_def book  ) 

Here is the call graph for this function:

bool is_dangerous_spellbook ( const int  book_type  ) 

bool is_memorised ( spell_type  spell  ) 

bool is_valid_spell_in_book ( int  splbook,
int  spell 
)

Here is the call graph for this function:

bool is_valid_spell_in_book ( const item_def book,
int  spell 
)

Here is the call graph for this function:

bool learn_spell ( spell_type  specspell,
int  book,
bool  is_safest_book 
)

Here is the call graph for this function:

bool learn_spell (  ) 

Here is the call graph for this function:

bool make_book_level_randart ( item_def book,
int  level,
int  num_spells,
std::string  owner 
)

Here is the call graph for this function:

void make_book_Roxanne_special ( item_def book  ) 

Here is the call graph for this function:

bool make_book_theme_randart ( item_def book,
int  disc1,
int  disc2,
int  num_spells,
int  max_levels,
spell_type  incl_spell,
std::string  owner 
)

Here is the call graph for this function:

void mark_had_book ( int  booktype  ) 

void mark_had_book ( const item_def book  ) 

Here is the call graph for this function:

bool player_can_memorise ( const item_def book  ) 

Here is the call graph for this function:

bool player_can_memorise_from_spellbook ( const item_def book  ) 

Here is the call graph for this function:

int player_spell_skills (  ) 

int read_book ( item_def book,
read_book_action_type  action 
)

Here is the call graph for this function:

int spell_rarity ( spell_type  which_spell  ) 

int spellbook_contents ( item_def book,
read_book_action_type  action,
formatted_string fs 
)

Here is the call graph for this function:

int staff_spell ( int  staff  ) 

Here is the call graph for this function:

spell_type which_spell_in_book ( int  sbook_type,
int  spl 
)

spell_type which_spell_in_book ( const item_def book,
int  spl 
)

Here is the call graph for this function:

bool you_cannot_memorise ( spell_type  spell,
bool &  undead 
)

bool you_cannot_memorise ( spell_type  spell  ) 

Here is the call graph for this function:


Generated on Thu Jan 13 13:22:45 2011 by  doxygen 1.5.6