This commit is contained in:
aozhiwei 2024-05-16 14:35:22 +08:00
parent 1da6231116
commit 15b3a997e7
3 changed files with 10 additions and 5 deletions

View File

@ -374,7 +374,7 @@ void Ability::GMClearAttr()
std::vector<std::string> Ability::GMShowAttrs()
{
std::vector<std::string> strings;
strings.push_back(a8::Format("curr_hp:%f max_hp:%f atk:%f def:%f block:%f crit:%f level:%d exp:%f",
strings.push_back(a8::Format("curr_hp:%f max_hp:%f atk:%f def:%f block:%f crit:%f level:%d exp:%f speed:%f",
{
owner_.Get()->GetHP(),
owner_.Get()->GetNetData()->GetMaxHP(),
@ -383,7 +383,8 @@ std::vector<std::string> Ability::GMShowAttrs()
owner_.Get()->GetNetData()->GetBlock(),
owner_.Get()->GetNetData()->GetCrit(),
owner_.Get()->GetHeroLevel(),
owner_.Get()->GetHeroExp()
owner_.Get()->GetHeroExp(),
owner_.Get()->GetSpeed()
}));
{
std::vector<std::string> tmp_strings;

View File

@ -3429,8 +3429,12 @@ float Creature::InternalGetSpeed()
ruduce = 1.0f - ruduce;
}
addition += GetAbility()->GetAttrAddition(kHAT_vSpeedRateIn);
#if 1
ruduce = std::min(ruduce, GetAbility()->GetAttrRuduce(kHAT_vSpeedRateIn));
#else
ruduce = std::max(ruduce, GetAbility()->GetAttrRuduce(kHAT_vSpeedRateIn));
float rate = addition - ruduce;
#endif
float rate = addition + ruduce;
finaly_speed *= 1.0f + rate;
#ifdef MYDEBUG
if (IsPlayer() && finaly_speed > 500) {

View File

@ -681,7 +681,7 @@ void Trigger::EnterBattleMode()
if (buff_id > 0) {
owner_->TryAddBuff(owner_, buff_id, buff->skill_meta);
} else {
owner_->ClearBuffById(buff_id);
owner_->ClearBuffById(-buff_id);
}
}
});
@ -697,7 +697,7 @@ void Trigger::LeaveBattleMode()
if (buff_id > 0) {
owner_->TryAddBuff(owner_, buff_id, buff->skill_meta);
} else {
owner_->ClearBuffById(buff_id);
owner_->ClearBuffById(-buff_id);
}
}
});