This commit is contained in:
aozhiwei 2022-09-06 13:15:14 +08:00
parent 12e7379012
commit b78facb844
2 changed files with 3 additions and 2 deletions

View File

@ -268,7 +268,7 @@ void BattleDataContext::CalcBattleStat(struct PlayerStats* stats)
}
}
float BattleDataContext::CalcDmg(Creature* target, int weapon_uniid)
float BattleDataContext::CalcDmg(Creature* target, Bullet* bullet)
{
float total_atk = (GetTotalAtk() / 100 + 1) * GetWeaponAtk();
float normal_dmg = total_atk * (1 - target->GetBattleContext()->GetDef() / 1000);

View File

@ -20,6 +20,7 @@ namespace MetaData
}
class Creature;
class Bullet;
struct PlayerStats;
struct BattleDataContext
{
@ -47,7 +48,7 @@ struct BattleDataContext
void CalcBattleStat(struct PlayerStats* stats);
float CalcDmg(Creature* target, int weapon_uniid);
float CalcDmg(Creature* target, Bullet* bullet);
float GetDef();