190 lines
5.9 KiB
C++
190 lines
5.9 KiB
C++
#pragma once
|
|
|
|
#include "mt/macro.h"
|
|
#include "mtb/Parameter.h"
|
|
|
|
namespace mt
|
|
{
|
|
struct RankMatchConf
|
|
{
|
|
RoomType_e room_type = RoomType_Rank1;
|
|
int min_level = 0;
|
|
int max_level = 0;
|
|
int min_elo = 0;
|
|
int max_elo = 0;
|
|
int hero_min_lv = 0;
|
|
int hero_max_lv = 0;
|
|
};
|
|
|
|
DECLARE_NAME_TABLE(Param, mtb::Parameter,
|
|
"parameter@parameter.json",
|
|
"param_name")
|
|
public:
|
|
struct S {
|
|
int android_auto_combine_team = 1;
|
|
int gas_inactive_time = 10;
|
|
int rank_gas_inactive_time = 40;
|
|
int master_rank_gas_inactive_time = 60;
|
|
float kill_param = 0.0f;
|
|
float rank_param = 0.0f;
|
|
int fighting_mode = 0;
|
|
float max_oil = 0.0f;
|
|
float max_mount_horse_distance = 100.0f;
|
|
int early_parachute_jump = 0;
|
|
int pickup_weapon_replace_type = 0;
|
|
std::vector<float> performance_score_weight_4V4;
|
|
std::vector<float> performance_score_weight_BR;
|
|
|
|
int downed_relive_recover_hp = 0;
|
|
|
|
int level0room_shua_robot_min_time = 0;
|
|
int level0room_shua_robot_max_time = 0;
|
|
int level0room_shua_robot_min_num = 0;
|
|
int level0room_shua_robot_max_num = 0;
|
|
int level0room_die_robot_min_time = 0;
|
|
int level0room_die_robot_max_time = 0;
|
|
int level0room_die_robot_min_num = 0;
|
|
int level0room_die_robot_max_num = 0;
|
|
int level0room_robot_water = 0;
|
|
int level0room_robot_protect_time = 0;
|
|
int level0room_robot_autodie_time = 0;
|
|
int level0room_robot_autodie_distance = 0;
|
|
|
|
int level1room_shua_robot_min_time = 0;
|
|
int level1room_shua_robot_max_time = 0;
|
|
int level1room_shua_robot_min_num = 0;
|
|
int level1room_shua_robot_max_num = 0;
|
|
int level1room_die_robot_min_time = 0;
|
|
int level1room_die_robot_max_time = 0;
|
|
int level1room_die_robot_min_num = 0;
|
|
int level1room_die_robot_max_num = 0;
|
|
int level1room_robot_water = 0;
|
|
int level1room_robot_autodie_time = 0;
|
|
int level1room_robot_autodie_distance = 0;
|
|
std::string level1room_born_point;
|
|
|
|
double water_move_coefficient = 0.75f;
|
|
|
|
int view_objects_out_distance = 580;
|
|
int view_objects_in_distance = 580;
|
|
|
|
int incubator_base_length = 580;
|
|
int incubator_rand_length = 100;
|
|
int incubator_canset_distance = 100;
|
|
|
|
int refresh_view_time = 8;
|
|
|
|
int teammate_kill_color = 0xFFFF00;
|
|
int teammate_bekill_color = 0xFF0000;
|
|
|
|
int self_kill_color = 0xFFFF00;
|
|
int self_bekill_color = 0xFF0000;
|
|
|
|
int teammate_kill_color1 = 0xff0000;
|
|
int teammate_kill_color2 = 0x0F0FFF;
|
|
|
|
int other_kill_color1 = 0xFFFFFF;
|
|
int other_kill_color2 = 0xFFFFFF;
|
|
|
|
int map_cell_width = 64 * 8;
|
|
int bullet_planck_step_length = 15;
|
|
const mt::Hero* human_meta = nullptr;
|
|
const mt::Hero* android_meta = nullptr;
|
|
|
|
int prebattle_can_use_skill = 0;
|
|
int watchable = 0;
|
|
int prebattle_combine_team = 1;
|
|
|
|
int match_team_time = 0;
|
|
int match_robot_time = 0;
|
|
int match_choose_time = 0;
|
|
int match_lock_time = 0;
|
|
|
|
int dive_oxygen_total = 0;
|
|
int dive_oxygen_consume = 0;
|
|
int dive_hp_consume = 0;
|
|
int dive_explosion_dmg_switch = 0;
|
|
int inwater_oxygen_recover = 0;
|
|
|
|
int revive_time = 15;
|
|
|
|
int move_step_len = 80;
|
|
|
|
int box_open_delay = 0;
|
|
|
|
int compose_mode = 1;
|
|
float sand_table_move_speed = 500;
|
|
float wait_cloud_time = 3;
|
|
|
|
std::vector<float> robot_placement;
|
|
int robot_placement_time = 360;
|
|
std::vector<float> robot_placement_type;
|
|
|
|
std::vector<int> boss_skill_order;
|
|
int starroad_max = 0;
|
|
std::vector<int> star_get_nums;
|
|
|
|
int pre_client_shot = 0;
|
|
|
|
int mid_room_max_rank = 0;
|
|
int new_room_max_level = 5;
|
|
int mid_room_max_level = 10;
|
|
|
|
int rank_mode_wait_time = 0;
|
|
int rank_mode_min_player = 0;
|
|
|
|
int downed_switch = 0;
|
|
int bullet_through_wall_check = 1;
|
|
int revive_count = 1;
|
|
int pvp_revive_time = 10;
|
|
|
|
int nature_recover_hp_switch = 0;
|
|
int nature_recover_hp_idletime = 3;
|
|
int nature_recover_hp_interval = 1;
|
|
float nature_recover_hp_rate = 0.1f;
|
|
|
|
float battle_gain_exp_radium = 0;
|
|
float battle_gain_exp_rate_killer = 0;
|
|
float battle_gain_exp_rate_teammate = 0;
|
|
|
|
int battle_auto_ready_min_time = 0;
|
|
int battle_auto_ready_max_time = 0;
|
|
|
|
int battling_disengage_time = 0;
|
|
int battling_detection_range = 0;
|
|
int battling_grass_hide_delay_time = 0;
|
|
|
|
int frag_dinshen_time = 1200;
|
|
float magma_dec_hp_rate = 0.1;
|
|
|
|
float battle_score_param0 = 0.0f;
|
|
float battle_score_param1 = 0.0f;
|
|
|
|
float battle_event_end_loss_rate_win = 0.0f;
|
|
float battle_event_end_loss_rate_dead = 0.5f;
|
|
float battle_event_end_loss_rate_quit = 1.0f;
|
|
|
|
std::vector<float> block_effect_range;
|
|
std::vector<float> crit_effect_range;
|
|
|
|
std::vector<std::shared_ptr<RankMatchConf>> rank_mode_confs;
|
|
};
|
|
static void StaticPostInit();
|
|
static const S& s() { return s_; };
|
|
|
|
static int GetIntParam(const std::string& param_name, int def_val = 0);
|
|
static double GetFloatParam(const std::string& param_name, double def_val = 0.0f);
|
|
static std::string GetStringParam(const std::string& param_name, const char* def_val = "");
|
|
static int GetStarNum(int rank);
|
|
static const RankMatchConf* GetRankModeConfByElo(int elo);
|
|
static const RankMatchConf* GetRankModeConfByHeroLv(int hero_lv);
|
|
static const RankMatchConf* GetRankModeConfByRoomType(int room_type);
|
|
static int RandHeroLv(int room_type);
|
|
static int GetCritEffect(float E);
|
|
static int GetBlockEffect(float E);
|
|
private:
|
|
static S s_;
|
|
};
|
|
|
|
}
|