1
This commit is contained in:
parent
68fc4d2f57
commit
179d5fea84
@ -689,7 +689,13 @@ float BattleDataContext::CalcDmg(Creature* target, IBullet* bullet)
|
|||||||
}
|
}
|
||||||
dmg_addition += owner_.Get()->GetAbility()->GetAttrAddition(kHVAT_Dmg);
|
dmg_addition += owner_.Get()->GetAbility()->GetAttrAddition(kHVAT_Dmg);
|
||||||
finaly_dmg *= (1 + dmg_addition); //连加
|
finaly_dmg *= (1 + dmg_addition); //连加
|
||||||
|
#if 1
|
||||||
|
if (target->GetAbility()->GetAttrRuduce(kHVAT_Dmg) > 0.0001) {
|
||||||
|
finaly_dmg *= target->GetAbility()->GetAttrRuduce(kHVAT_Dmg); //(1-减免) 连乘
|
||||||
|
}
|
||||||
|
#else
|
||||||
finaly_dmg *= (1 - target->GetAbility()->GetAttrRuduce(kHVAT_Dmg)); //(1-减免) 连乘
|
finaly_dmg *= (1 - target->GetAbility()->GetAttrRuduce(kHVAT_Dmg)); //(1-减免) 连乘
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
if (owner_.Get()->IsAndroid() && owner_.Get()->AsAndroid()->robot_meta->dmg_ratio() > 0.0001f) {
|
if (owner_.Get()->IsAndroid() && owner_.Get()->AsAndroid()->robot_meta->dmg_ratio() > 0.0001f) {
|
||||||
@ -741,7 +747,13 @@ float BattleDataContext::CalcReceiveDmg(Creature* sender, float normal_dmg)
|
|||||||
(1 - owner_.Get()->GetBattleContext()->GetDef() / (sender->GetBattleContext()->GetDef() + 200));
|
(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)); //连加
|
||||||
|
#if 1
|
||||||
|
if (owner_.Get()->GetAbility()->GetAttrRuduce(kHVAT_Dmg) > 0.0001) {
|
||||||
|
finaly_dmg *= owner_.Get()->GetAbility()->GetAttrRuduce(kHVAT_Dmg); //(1-减免) 连乘
|
||||||
|
}
|
||||||
|
#else
|
||||||
finaly_dmg *= (1 - owner_.Get()->GetAbility()->GetAttrRuduce(kHVAT_Dmg)); //(1-减免) 连乘
|
finaly_dmg *= (1 - owner_.Get()->GetAbility()->GetAttrRuduce(kHVAT_Dmg)); //(1-减免) 连乘
|
||||||
|
#endif
|
||||||
|
|
||||||
finaly_dmg = std::max(1.0f, finaly_dmg);
|
finaly_dmg = std::max(1.0f, finaly_dmg);
|
||||||
return std::round(finaly_dmg);
|
return std::round(finaly_dmg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user