1
This commit is contained in:
parent
d07e83656a
commit
7d4c63c8b9
@ -668,6 +668,16 @@ float BattleDataContext::CalcDmg(Obstacle* target, IBullet* bullet)
|
||||
return finaly_dmg;
|
||||
}
|
||||
|
||||
float BattleDataContext::CalcReceiveDmg(Creature* sender, float normal_dmg)
|
||||
{
|
||||
float finaly_dmg = normal_dmg;
|
||||
finaly_dmg *= (1 + sender.Get()->GetAbility()->GetAttrAddition(kHVAT_Dmg)); //连加
|
||||
finaly_dmg *= GetAbility()->GetAttrRuduce(kHVAT_Dmg); //(1-减免) 连乘
|
||||
|
||||
finaly_dmg = std::max(1.0f, finaly_dmg);
|
||||
return std::round(finaly_dmg);
|
||||
}
|
||||
|
||||
float BattleDataContext::CalcDmg(Explosion* e)
|
||||
{
|
||||
g_calc_dmg_context = {0};
|
||||
|
@ -68,6 +68,7 @@ struct BattleDataContext
|
||||
float GetDrugEfficacyPct();
|
||||
float GetTenacityPct();
|
||||
float GetRecoverHpAdd();
|
||||
float CalcReceiveDmg(Creature* sender, float normal_dmg);
|
||||
|
||||
void SetReviveCoin(int num);
|
||||
int GetReviveCoin();
|
||||
|
@ -323,6 +323,7 @@ int SkillHelper::GetYlzRecoverHp(Creature* sender, Creature* target, const mt::S
|
||||
float hp =
|
||||
skill_meta->_number_meta->resume() +
|
||||
skill_meta->_number_meta->resume_addition() * sender->GetBattleContext()->GetHeroTotalAtk();
|
||||
hp *= 1.0f + sender->GetBattleContext()->GetRecoverHpAdd();
|
||||
return hp;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user