1
This commit is contained in:
commit
385d95c248
@ -650,11 +650,20 @@ float BattleDataContext::CalcDmg(Creature* target, IBullet* bullet)
|
||||
if (buff) {
|
||||
DistanceDmgAdditionBuff* spec_buff = (DistanceDmgAdditionBuff*)buff;
|
||||
float distance = owner_.Get()->GetPos().Distance2D2(target->GetPos());
|
||||
if (spec_buff->distance > 0.0f) {
|
||||
dmg_addition += std::max(10.0f, distance / spec_buff->distance) * spec_buff->add;
|
||||
if (distance > spec_buff->distance && spec_buff->distance > 0.00001f) {
|
||||
dmg_addition += std::max(10.0f, (distance / spec_buff->distance) * spec_buff->add);
|
||||
} else {
|
||||
dmg_addition += spec_buff->min_add;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
if (owner_.Get() && owner_.Get()->IsPlayer()) {
|
||||
owner_.Get()->SendDebugMsg(a8::Format("兔子被动 distance:%f dmg_addition:%f",
|
||||
{
|
||||
distance,
|
||||
dmg_addition
|
||||
}));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
dmg_addition += owner_.Get()->GetAbility()->GetAttrAddition(kHVAT_Dmg);
|
||||
finaly_dmg *= (1 + dmg_addition); //连加
|
||||
|
Loading…
x
Reference in New Issue
Block a user