This commit is contained in:
aozhiwei 2023-03-29 10:17:01 +08:00
parent 7d4c63c8b9
commit 2022d44c72
2 changed files with 3 additions and 2 deletions

View File

@ -671,8 +671,8 @@ float BattleDataContext::CalcDmg(Obstacle* target, IBullet* bullet)
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 *= (1 + sender->GetAbility()->GetAttrAddition(kHVAT_Dmg)); //连加
finaly_dmg *= owner_.Get()->GetAbility()->GetAttrRuduce(kHVAT_Dmg); //(1-减免) 连乘
finaly_dmg = std::max(1.0f, finaly_dmg);
return std::round(finaly_dmg);

View File

@ -854,6 +854,7 @@ void RoomObstacle::ActiveMedicalStation()
float damage = SkillHelper::GetYlzDamage(master.Get(),
c,
skill_meta);
damage = c->GetBattleContext()->CalcReceiveDmg(master.Get(), damage);
float dmg_out = 0.0f;
c->DecHP(damage,
master.Get()->GetUniId(),