This commit is contained in:
aozhiwei 2022-09-06 17:33:23 +08:00
parent 21d98161a7
commit b578baee22

View File

@ -350,7 +350,12 @@ float BattleDataContext::CalcDmg(Creature* target, Bullet* bullet)
float BattleDataContext::CalcDmg(Obstacle* target, Bullet* bullet)
{
float total_atk = GetTotalAtk(bullet);
float normal_dmg = total_atk * (1 - 0 / 1000);
float crit = IsCrit() ? GetCritRate() : 0;
float dodge = IsDodge() ? GetDodgeRuduce() : 0;
float finaly_dmg = normal_dmg * (1.0f + crit + dodge);
return finaly_dmg;
}
float BattleDataContext::GetTotalAtk(Bullet* bullet)