1 #pragma once 2 3 #include <stdint.h> 4 5 enum UIMode 6 { 7 UI_Tactical, 8 UI_Map 9 }; 10 11 enum HotkeyModifier 12 { 13 HKMOD_None, 14 HKMOD_CTRL, 15 HKMOD_SHIFT, 16 HKMOD_ALT, 17 HKMOD_CTRL_SHIFT 18 }; 19 20 #define gamepolicy(element) (GCM->getGamePolicy()->element) 21 22 class GamePolicy 23 { 24 public: 25 /** Check if a hotkey is enabled. */ 26 virtual bool isHotkeyEnabled(UIMode mode, HotkeyModifier modifier, uint32_t key) const = 0; 27 // this could be defaulted in C++11 ~GamePolicy()28 virtual ~GamePolicy() {} 29 30 bool f_draw_item_shadow; /**< Draw shadows from the inventory items. */ 31 32 int32_t ms_per_game_cycle; /**< Milliseconds per game cycle. */ 33 int32_t ms_per_time_slice; /**< Milliseconds per time slice. */ 34 35 int32_t starting_cash_easy; 36 int32_t starting_cash_medium; 37 int32_t starting_cash_hard; 38 39 /* Battle */ 40 bool f_drop_everything; /**< Enemy drop all equipment. */ 41 bool f_all_dropped_visible; /**< All dropped equipment is visible right away. */ 42 43 bool multiple_interrupts; // can interrupt more than once per turn 44 45 int8_t enemy_weapon_minimal_status; /**< Minimal status of the enemy weapon (0 - 100). */ 46 47 bool gui_extras; /* graphical user interface cosmetic mod */ 48 bool extra_attachments; // allow more item attachments options 49 50 bool middle_mouse_look; // Look cursor with middle mouse button 51 bool can_enter_turnbased; // 'd' can start turnbased if in real-time 52 53 bool ai_better_aiming_choice; // decide where to shoot depending on to-hit probability if random choice is being made 54 bool ai_go_prone_more_often; // especially when already facing the right direction 55 int8_t threshold_cth_head; // threshold AI always take head shots, increase game difficulty 56 int8_t threshold_cth_legs; // threshold AI switch to leg shots from torso 57 58 bool avoid_ambushes; // AI able to recognize and avoid ambushes on seeing friendlies' corpses 59 bool stay_on_rooftop; // AI on guard on rooftop are disallowed to go down 60 61 int8_t enemy_elite_minimum_level; // increase challenge: minimum experience level for enemy elite soldier 62 int8_t enemy_elite_maximum_level; // maximum experience level for enemy elite soldier 63 64 bool imp_load_saved_merc_by_nickname; // IMP merc is saved and can be loaded at IMP creation if has same nickname 65 bool imp_load_keep_inventory; // IMP merc gets inventory from last save game 66 bool pablo_wont_steal; // Packages not stolen 67 68 float critical_damage_head_multiplier;//Head damage multiplier. Vanilla 1.5 69 float critical_damage_legs_multiplier;//Legs damage multiplier. Vanilla 0.5 70 int8_t chance_to_hit_minimum; //Minimum chance to hit (0 - chance_to_hit_maximum) vanilla 1 71 int8_t chance_to_hit_maximum; //Maximum chance to hit (chance_to_hit_minimum - 100) vanilla 99 72 73 /* IMP */ 74 int8_t imp_attribute_max; // IMP character attribute maximum 0 to 100, vanilla 85 75 int8_t imp_attribute_min; // IMP character attribute minimum 0 to imp_attribute_max, vanilla 35 76 int32_t imp_attribute_bonus; // IMP character attribute unallocated bonus points, vanilla 40 77 int32_t imp_attribute_zero_bonus; // IMP character attribute points given instead of imp_attribute_min, vanilla 15 78 bool imp_pick_skills_directly; // Use the IMP_SkillTrait selection screen from JA2.5, skipping the personality quiz, vanilla falase 79 80 /* M.E.R.C. */ 81 uint8_t merc_online_min_days; // The earliest day on or after which M.E.R.C. goes online 82 uint8_t merc_online_max_days; // The latest day on or before which M.E.R.C. goes online 83 84 // Difficulty / Campaign Progress 85 float progress_weight_kills; // Weight of kill count on campaign progress 86 float progress_weight_control; // Weight of area control on campaign progress 87 float progress_weight_income; // Weight of income on campaign progress 88 int8_t kills_per_point_easy; // Kills per point for difficulty Easy 89 int8_t kills_per_point_medium; // Kills per point for difficulty Medium 90 int8_t kills_per_point_hard; // Kills per point for difficulty Hard 91 int8_t progress_event_madlab_min; // Minimum first progress to trigger event Quest Madlab 92 int8_t progress_event_mike_min; // Minimum first progress to trigger event Mike 93 int8_t progress_event_iggy_min; // Minimum first progress to trigger event Iggy 94 95 int8_t unhired_merc_deaths_easy; // Maximum unhired mercs KIA difficulty Easy 96 int8_t unhired_merc_deaths_medium; // Maximum unhired mercs KIA difficulty Medium 97 int8_t unhired_merc_deaths_hard; // Maximum unhired mercs KIA difficulty Hard 98 99 //////////////////////////////////////////////////////////// 100 // 101 //////////////////////////////////////////////////////////// 102 }; 103