-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaffect.h
More file actions
88 lines (74 loc) · 2.86 KB
/
affect.h
File metadata and controls
88 lines (74 loc) · 2.86 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
#ifndef twf_affect_h
#define twf_affect_h
// For Aff.Char.
#define APPLY_NONE 0
#define APPLY_STR 1
#define APPLY_DEX 2
#define APPLY_INT 3
#define APPLY_WIS 4
#define APPLY_CON 5
#define APPLY_MAGIC 6
#define APPLY_FIRE 7
#define APPLY_COLD 8
#define APPLY_SHOCK 9
#define APPLY_MIND 10
#define APPLY_AGE 11
#define APPLY_MANA 12
#define APPLY_HIT 13
#define APPLY_MOVE 14
#define APPLY_AC 17
#define APPLY_HITROLL 18
#define APPLY_DAMROLL 19
#define APPLY_MANA_REGEN 20
#define APPLY_HIT_REGEN 21
#define APPLY_MOVE_REGEN 22
#define APPLY_ACID 23
#define APPLY_POISON 24
#define MAX_AFF_LOCATION 25
#define AFFECT_INTS 3
// For Aff.Room.
#define APPLY_BOTH_SIDES 1
class affect_data
{
public:
char_data* leech;
visible_data *target;
int type;
int duration;
int level;
int location;
int modifier;
int leech_regen;
int leech_max;
affect_data( );
affect_data( const affect_data& );
~affect_data( );
};
bool add_affect ( char_data*, affect_data* );
void add_affect ( obj_data*&, affect_data* );
void add_affect ( room_data*, affect_data* );
int affect_level ( const char_data*, int, affect_data* = 0 );
int affect_level ( const room_data*, int, const exit_data* = 0 );
int affect_duration ( const char_data*, int );
void init_affects ( char_data*, int = 0, int = -1 );
void modify_affect ( char_data*, affect_data*, bool, bool = true );
bool strip_affect ( char_data*, int, bool = true );
bool strip_affect ( obj_data*&, int, bool = true );
int shorten_affect ( char_data*, int, int, bool = true );
void remove_affect ( char_data* );
void remove_affect ( char_data*, affect_data*, bool = true );
void remove_affect ( obj_data* );
void remove_affect ( obj_data*&, affect_data*, bool = true );
void remove_affect ( room_data* );
void remove_affect ( room_data*, affect_data*, bool = true );
void read_affects ( FILE*, obj_clss_data* );
void read_affects ( FILE*, obj_data* );
void read_affects ( FILE*, char_data* );
void write_affects ( FILE*, obj_clss_data* );
void write_affects ( FILE*, obj_data* );
void write_affects ( FILE*, char_data* );
inline int affect_delay( )
{
return number_range( PULSE_TICK/2, 3*PULSE_TICK/2 );
}
#endif // twf_affect_h