1
This commit is contained in:
parent
7c3102e52f
commit
9249ad09d3
@ -146,6 +146,7 @@ namespace mt
|
||||
int moba_room_time = 60 * 3;
|
||||
std::vector<std::tuple<glm::vec3, float>> moba_towers;
|
||||
int moba_tower_interval = 1;
|
||||
float moba_tower_recover_hp_rate = 0.5;
|
||||
|
||||
int nature_recover_hp_idletime = 3;
|
||||
int nature_recover_hp_interval = 1;
|
||||
|
@ -184,7 +184,13 @@ void Room::Init()
|
||||
{
|
||||
float distance = hum->GetPos().Distance2D2(std::get<0>(tuple));
|
||||
if (distance < std::get<1>(tuple)) {
|
||||
|
||||
if (!hum->dead && !hum->poisoning && !hum->downed) {
|
||||
if (hum->GetHP() + 1 < hum->GetMaxHP()) {
|
||||
hum->AddHp(hum->GetMaxHP() *
|
||||
mt::Param::s().moba_tower_recover_hp_rate);
|
||||
hum->TryAddBuff(hum, kRecoverHpEffectBuffId);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user