-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscroll.h
108 lines (100 loc) · 2.43 KB
/
scroll.h
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/* =============================================================================
* PROGRAM: ularn
* FILENAME: scroll.h
*
* DESCRIPTION:
* This module handles the processing for scrolls and books.
*
* =============================================================================
* EXPORTED VARIABLES
*
* scrollname : The name of each scroll.
*
* =============================================================================
* EXPORTED FUNCTIONS
*
* newscroll : Function to create a new scroll # with the correct probability
* read_scroll : Function to process reading a scroll.
* readbook : Function to process reading a book.
*
* =============================================================================
*/
#ifndef __SCROLL_H
# define __SCROLL_H
# define MAXSCROLL 28 /* maximum number of scrolls that are possible */
/*** Scrolls ***/
# define SENCHANTARM 0
# define SENCHANTWEAP 1
# define SENLIGHTEN 2
# define SBLANK 3
# define SCREATEMONST 4
# define SCREATEITEM 5
# define SAGGMONST 6
# define STIMEWARP 7
# define STELEPORT 8
# define SAWARENESS 9
# define SHASTEMONST 10
# define SMONSTHEAL 11
# define SSPIRITPROT 12
# define SUNDEADPROT 13
# define SSTEALTH 14
# define SMAGICMAP 15
# define SHOLDMONST 16
# define SGEMPERFECT 17
# define SSPELLEXT 18
# define SIDENTIFY 19
# define SREMCURSE 20
# define SANNIHILATE 21
# define SPULVERIZE 22
# define SLIFEPROT 23
# define S_MAX 23 /* Greatest defined scroll number */
/*
* Names of all scrolls
*/
extern char *scrollname[MAXSCROLL];
/* =============================================================================
* FUNCTION: newscroll
*
* DESCRIPTION:
* Function to create scroll #s with the correct probability of occurence.
*
* PARAMETERS:
*
* None.
*
* RETURN VALUE:
*
* The scroll number as defined above.
*/
int newscroll(void);
/* =============================================================================
* FUNCTION: read_scroll
*
* DESCRIPTION:
* Function to perform the processing of the effect of reading a scroll.
*
* PARAMETERS:
*
* typ : The type of scroll to read.
*
* RETURN VALUE:
*
* None.
*/
void read_scroll(int typ);
/* =============================================================================
* FUNCTION: readbook
*
* DESCRIPTION:
* Function to read a book.
*
* PARAMETERS:
*
* arg : The dungeon level of the book (stored in itemarg for the book).
*
* RETURN VALUE:
*
* None.
*/
void readbook(int arg);
#endif