-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpotion.h
More file actions
101 lines (92 loc) · 2.23 KB
/
potion.h
File metadata and controls
101 lines (92 loc) · 2.23 KB
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
/* =============================================================================
* PROGRAM: ularn
* FILENAME: potion.h
*
* DESCRIPTION:
* This module contains definitions and functions for handling potions.
*
* =============================================================================
* EXPORTED VARIABLES
*
* potionname : The name of each potion
*
* =============================================================================
* EXPORTED FUNCTIONS
*
* newpotion : Function to create a new potion with the required probabilities
* quaffpotion : Function to process quaffing a potion.
*
* =============================================================================
*/
#ifndef __POTION_H
# define __POTION_H
# define MAXPOTION 35 /* maximum number of potions that are possible */
/*** Potions ***/
# define PSLEEP 0
# define PHEALING 1
# define PRAISELEVEL 2
# define PINCABILITY 3
# define PWISDOM 4
# define PSTRENGTH 5
# define PCHARISMA 6
# define PDIZZINESS 7
# define PLEARNING 8
# define PGOLDDET 9
# define PMONSTDET 10
# define PFORGETFUL 11
# define PWATER 12
# define PBLINDNESS 13
# define PCONFUSION 14
# define PHEROISM 15
# define PSTURDINESS 16
# define PGIANTSTR 17
# define PFIRERESIST 18
# define PTREASURE 19
# define PINSTHEAL 20
# define PCUREDIANTH 21
# define PPOISON 22
# define PSEEINVIS 23
# define P_MAX 23 /* Greatest defined potion number */
/*
* The amount to boost ability scores for a potion of heroism
*/
# define PHEROISM_BOOST 11
/*
* The amount to boos strength for apotion of giant strength
*/
# define PGIANTSTR_BOOST 21
/*
* Names of all potions
*/
extern char *potionname[MAXPOTION];
/* =============================================================================
* FUNCTION: newpotion
*
* DESCRIPTION:
* Function return a potion # created with probability of occurrence
*
* PARAMETERS:
*
* None.
*
* RETURN VALUE:
*
* The potion number as defined above.
*/
int newpotion(void);
/* =============================================================================
* FUNCTION: quaffpotion
*
* DESCRIPTION:
* Function to handle the effects of drinking a potion.
*
* PARAMETERS:
*
* pot : The potion number.
*
* RETURN VALUE:
*
* None.
*/
void quaffpotion(int pot);
#endif