1 #pragma once 2 #ifndef CATA_SRC_DISEASE_H 3 #define CATA_SRC_DISEASE_H 4 5 #include <iosfwd> 6 #include <new> 7 #include <set> 8 #include <vector> 9 10 #include "calendar.h" 11 #include "optional.h" 12 #include "type_id.h" 13 14 class JsonObject; 15 16 class disease_type 17 { 18 public: 19 static void load_disease_type( const JsonObject &jo, const std::string &src ); 20 void load( const JsonObject &jo, const std::string & ); 21 static const std::vector<disease_type> &get_all(); 22 static void check_disease_consistency(); 23 bool was_loaded = false; 24 25 diseasetype_id id; 26 time_duration min_duration = 1_turns; 27 time_duration max_duration = 1_turns; 28 int min_intensity = 1; 29 int max_intensity = 1; 30 /**Affected body parts*/ 31 std::set<bodypart_str_id> affected_bodyparts; 32 /**If not empty this sets the health threshold above which you're immune to the disease*/ 33 cata::optional<int> health_threshold; 34 /**effect applied by this disease*/ 35 efftype_id symptoms; 36 37 }; 38 #endif // CATA_SRC_DISEASE_H 39 40