summaryrefslogtreecommitdiffstats
path: root/stone_soup/crawl-ref/source/spl-book.h
blob: d6aa2843bc89d7bf3e1a08e561b6085f5ec38e6a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
 *  File:       spl-book.h
 *  Summary:    Some spellbook related functions.
 *  Written by: Josh Fishman
 *
 *  Change History (most recent first):
 *
 * 22mar2000   jmf   Created
 */


#ifndef SPL_BOOK_H
#define SPL_BOOK_H

#include "externs.h"
#include "FixVec.h"


// used in dungeon.cc, it_use3.cc, spl-book.cc, spl-book.h - {dlb}
#define SPELLBOOK_SIZE 9
// used in spl-book.cc, spl-book.h - {dlb}
#define NUMBER_SPELLBOOKS 60


// updated 24may2000 {dlb}
/* ***********************************************************************
 * called from: dungeon - effects - shopping
 * *********************************************************************** */
char book_rarity(unsigned char which_book);


// updated 24may2000 {dlb}
/* ***********************************************************************
 * called from: it_use3 - item_use - spl-book
 * *********************************************************************** */
bool is_valid_spell_in_book( unsigned int splbook, int spell );


// updated 24may2000 {dlb}
/* ***********************************************************************
 * called from: it_use3 - item_use - spl-book
 * *********************************************************************** */
unsigned char read_book( item_def &item, int action );


// updated 24may2000 {dlb}
/* ***********************************************************************
 * called from: acr
 * *********************************************************************** */
bool learn_spell(void);


// updated 24may2000 {dlb}
/* ***********************************************************************
 * called from: it_use3 - item_use - spl-book
 * *********************************************************************** */
int which_spell_in_book(int sbook_type, int spl);

int staff_spell( int zap_device_2 );

bool undead_cannot_memorise(unsigned char spell, unsigned char being);

unsigned char spellbook_contents( item_def &book, int action,
                                  formatted_string *fs = NULL );

int count_staff_spells(const item_def &item, bool need_id);

#endif