forked from cataclysmbnteam/Cataclysm-BN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
disease.h
38 lines (33 loc) · 1.06 KB
/
disease.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
#pragma once
#ifndef CATA_SRC_DISEASE_H
#define CATA_SRC_DISEASE_H
#include <optional>
#include <set>
#include <string>
#include <vector>
#include "bodypart.h"
#include "calendar.h"
#include "type_id.h"
class JsonObject;
class disease_type
{
public:
static void load_disease_type( const JsonObject &jo, const std::string &src );
void load( const JsonObject &jo, const std::string & );
static const std::vector<disease_type> &get_all();
static void check_disease_consistency();
static void reset();
diseasetype_id id;
bool was_loaded = false;
time_duration min_duration = 1_turns;
time_duration max_duration = 1_turns;
int min_intensity = 1;
int max_intensity = 1;
/**Affected body parts*/
std::set<body_part> affected_bodyparts;
/**If not empty this sets the health threshold above which you're immune to the disease*/
std::optional<int> health_threshold;
/**effect applied by this disease*/
efftype_id symptoms;
};
#endif // CATA_SRC_DISEASE_H