This commit is contained in:
aozhiwei 2023-03-31 17:14:45 +08:00
parent 27463f3519
commit 1e23d6ecae
2 changed files with 4 additions and 2 deletions

View File

@ -679,7 +679,9 @@ float BattleDataContext::CalcDmg(Obstacle* target, IBullet* bullet)
float BattleDataContext::CalcReceiveDmg(Creature* sender, float normal_dmg) float BattleDataContext::CalcReceiveDmg(Creature* sender, float normal_dmg)
{ {
float finaly_dmg = normal_dmg; float finaly_dmg = normal_dmg *
(1 - owner_.Get()->GetBattleContext()->GetDef() / (sender->GetBattleContext()->GetDef() + 200));
finaly_dmg *= (1 + sender->GetAbility()->GetAttrAddition(kHVAT_Dmg)); //连加 finaly_dmg *= (1 + sender->GetAbility()->GetAttrAddition(kHVAT_Dmg)); //连加
finaly_dmg *= (1 - owner_.Get()->GetAbility()->GetAttrRuduce(kHVAT_Dmg)); //(1-减免) 连乘 finaly_dmg *= (1 - owner_.Get()->GetAbility()->GetAttrRuduce(kHVAT_Dmg)); //(1-减免) 连乘

View File

@ -106,7 +106,7 @@ public:
{ {
double result = 0.0f; double result = 0.0f;
if (context_.buff->GetCaster().Get()) { if (context_.buff->GetCaster().Get()) {
context_.buff->GetCaster().Get()->GetBattleContext()->GetHeroTotalAtk(); result = context_.buff->GetCaster().Get()->GetBattleContext()->GetHeroTotalAtk();
} }
return std::make_shared<a8::lisp::Value>(a8::lisp::Atom(result)); return std::make_shared<a8::lisp::Value>(a8::lisp::Atom(result));
}); });