123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- #ifndef __CONSTANTS_BANK_H
- #define __CONSTANTS_BANK_H
- #include <vector>
- #include <set>
- #include <map>
- struct ConstantsBank {
- size_t max_permafeats;
- size_t max_bones;
- tag_t player_species;
- double starvation_damage;
- tag_t grave;
- tag_t pit;
- tag_t bad_grave;
- tag_t ghost;
- std::set<tag_t> money;
- tag_t unique_item;
- struct slot_t {
- tag_t slot;
- std::string label;
- std::string name;
- char letter;
- slot_t() : letter(' ') {}
- };
- std::vector<slot_t> slots;
- tag_t money_slot;
- struct shortcut_t {
- std::vector< std::pair<tag_t, unsigned char> > slot_keypress;
- std::string fail_message;
- std::string help_message;
- };
- std::map<unsigned char, shortcut_t> shortcuts;
-
- unsigned int uniques_timeout;
- double min_money_value;
- std::vector<ui_symbols_t> ui_symbols;
- size_t max_celauto_cells;
- struct achievement_t {
- tag_t genus;
- unsigned int kills;
- unsigned int priority;
- std::string label;
- tag_t summon;
- achievement_t() : kills(0), priority(0) {}
- };
- std::map<tag_t, achievement_t> achievements;
- std::map<tag_t, std::string> genus_names;
- size_t achievement_trigger_rate;
- struct ailment_t {
- std::map<tag_t,double> inc_stat;
- damage::attacks_t attacks;
- unsigned int level;
- std::string name;
- unsigned int triggers;
- bool oneshot;
- ailment_t() : level(0), triggers(1), oneshot(false) {}
- };
- std::map<tag_t, ailment_t> ailments;
- unsigned int max_ailments;
- mean_deviation_t treasure_chance;
- double monetary_supply_base;
- mean_deviation_t bonus_a_items;
- mean_deviation_t bonus_b_items;
- struct flavor_moon_frequency_t {
- double height;
- mean_deviation_t curve;
- flavor_moon_frequency_t() : height(0), curve(0, 1) {}
- };
- std::map<tag_t,flavor_moon_frequency_t> flavor_moon_frequency;
- unsigned int player_level_cap;
- struct starsigns_t {
- time_t zero;
- unsigned int nday;
- unsigned int nsign;
- std::map<unsigned int, std::string> names;
- starsigns_t() : zero(0), nday(13), nsign(20) {}
- };
- starsigns_t starsigns;
- unsigned int ai_radius;
- std::vector<tag_t> hud_stats_order;
- std::vector<tag_t> hud_counts_order;
- struct luck_stat_t {
- tag_t stat;
- double factor;
- double threshold;
- luck_stat_t() : factor(1), threshold(0) {}
- };
- luck_stat_t luck;
- tag_t rest_count;
- tag_t digging_count;
- ConstantsBank() : max_permafeats(150), max_bones(1000),
- starvation_damage(0), uniques_timeout(0),
- min_money_value(0.01), max_celauto_cells(1000),
- achievement_trigger_rate(15),
- max_ailments(6u),
- monetary_supply_base(1e6),
- player_level_cap(12),
- ai_radius(30) {}
- };
- inline ConstantsBank& __constants__() {
- static ConstantsBank ret;
- return ret;
- }
- inline const ConstantsBank& constants() {
- return __constants__();
- }
- #endif
|