This commit is contained in:
aozhiwei 2024-04-23 16:04:58 +08:00
parent 909f9804ea
commit 08681a006a
3 changed files with 17 additions and 4 deletions

View File

@ -270,6 +270,15 @@ namespace mt
s_.star_get_nums.push_back(a8::XValue(str).GetInt());
}
}
{
std::vector<std::string> strings;
a8::Split(GetStringParam("performance_score_range"), strings, '|');
if (strings.size() != 2) {
A8_ABORT();
}
s_.battle_score_param0 = a8::XValue(strings[0]).GetDouble();
s_.battle_score_param1 = a8::XValue(strings[1]).GetDouble();
}
{
{
auto p = std::make_shared<mt::RankMatchConf>();

View File

@ -149,6 +149,9 @@ namespace mt
int frag_dinshen_time = 1200;
float magma_dec_hp_rate = 0.1;
float battle_score_param0 = 0.0f;
float battle_score_param1 = 0.0f;
std::vector<float> block_effect_range;
std::vector<float> crit_effect_range;

View File

@ -4050,8 +4050,8 @@ bool Room::IsNoPlane()
void Room::CalcMvp()
{
float param0 = 0.0f;
float param1 = 0.0f;
float param0 = mt::Param::s().battle_score_param0;
float param1 = mt::Param::s().battle_score_param1;
float max_kill = 0;
float max_assist = 0;
@ -4123,9 +4123,10 @@ void Room::CalcMvp()
}
float battle_score = 0.0f;
if (IsMobaModeRoom()) {
battle_score = std::round((kill_sco + assist_sco + damage_sco + recover_sco + alive_sco) * 100.0f) / 100.0f;
} else {
battle_score = std::round((kill_sco + assist_sco + damage_sco + recover_sco + level_sco) * 100.0f) / 100.0f;
} else {
battle_score = std::round((kill_sco + assist_sco + damage_sco + recover_sco + alive_sco) * 100.0f) / 100.0f;
}
hum->stats->battle_score = battle_score;
return true;