1
This commit is contained in:
parent
31ae2bceea
commit
d172bd86df
@ -79,6 +79,22 @@ namespace mt
|
||||
(float)a8::XValue(strings[2]).GetDouble()
|
||||
);
|
||||
}
|
||||
{
|
||||
std::string tmp_str = GetStringParam("crit_effect_range", "");
|
||||
std::vector<std::string> strings;
|
||||
a8::Split(tmp_str, strings, '|');
|
||||
for (auto& str : strings) {
|
||||
s_.crit_effect_range.push_back(a8::XValue(str).GetDouble());
|
||||
}
|
||||
}
|
||||
{
|
||||
std::string tmp_str = GetStringParam("block_effect_range", "");
|
||||
std::vector<std::string> strings;
|
||||
a8::Split(tmp_str, strings, '|');
|
||||
for (auto& str : strings) {
|
||||
s_.block_effect_range.push_back(a8::XValue(str).GetDouble());
|
||||
}
|
||||
}
|
||||
s_.newbie_room_hp_rate = a8::XValue(GetStringParam("newbie_room_hp_rate", "0.8")).GetDouble();
|
||||
s_.newbie_room_hero_id = a8::XValue(GetStringParam("newbie_room_hero_id", ""));
|
||||
s_.newbie_room_weapon_id = a8::XValue(GetStringParam("newbie_room_weapon_id", ""));
|
||||
@ -419,7 +435,7 @@ namespace mt
|
||||
float E_abs = std::fabs(E);
|
||||
int effect = 0;
|
||||
for (int i = 0; i < s().crit_effect_range.size(); ++i) {
|
||||
if (E_abs < s().crit_effect_range.at(i)) {
|
||||
if (E_abs <= s().crit_effect_range.at(i)) {
|
||||
effect = i +1;
|
||||
break;
|
||||
}
|
||||
@ -432,7 +448,7 @@ namespace mt
|
||||
float E_abs = std::fabs(E);
|
||||
int effect = 0;
|
||||
for (int i = 0; i < s().block_effect_range.size(); ++i) {
|
||||
if (E_abs < s().block_effect_range.at(i)) {
|
||||
if (E_abs <= s().block_effect_range.at(i)) {
|
||||
effect = i +1;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user