This commit is contained in:
aozhiwei 2023-04-10 19:15:21 +08:00
parent 69a000d24f
commit 14f5be9e86

View File

@ -651,7 +651,7 @@ float BattleDataContext::CalcDmg(Creature* target, IBullet* bullet)
DistanceDmgAdditionBuff* spec_buff = (DistanceDmgAdditionBuff*)buff;
float distance = owner_.Get()->GetPos().Distance2D2(target->GetPos());
if (distance > spec_buff->distance && spec_buff->distance > 0.00001f) {
dmg_addition += std::max(10.0f, (distance / spec_buff->distance) * spec_buff->add);
dmg_addition += std::min(10.0f, (distance / spec_buff->distance) * spec_buff->add);
} else {
dmg_addition += spec_buff->min_add;
}