forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
event.h
51 lines (43 loc) · 777 Bytes
/
event.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
#ifndef _EVENT_H_
#define _EVENT_H_
#include "faction.h"
#include "line.h"
class game;
enum event_type {
EVENT_NULL,
EVENT_HELP,
EVENT_WANTED,
EVENT_ROBOT_ATTACK,
EVENT_SPAWN_WYRMS,
EVENT_AMIGARA,
EVENT_ROOTS_DIE,
EVENT_TEMPLE_OPEN,
EVENT_TEMPLE_FLOOD,
EVENT_TEMPLE_SPAWN,
EVENT_DIM,
EVENT_ARTIFACT_LIGHT,
NUM_EVENT_TYPES
};
struct event {
event_type type;
int turn;
int faction_id;
point map_point;
event() {
type = EVENT_NULL;
turn = 0;
faction_id = -1;
map_point.x = -1;
map_point.y = -1;
}
event(event_type e_t, int t, int f_id, int x, int y) {
type = e_t;
turn = t;
faction_id = f_id;
map_point.x = x;
map_point.y = y;
}
void actualize(game *g); // When the time runs out
void per_turn(game *g); // Every turn
};
#endif