1
This commit is contained in:
commit
35f73b8344
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user