1
This commit is contained in:
parent
c2fee3fc7b
commit
2dec30dbd5
@ -715,12 +715,22 @@ float BattleDataContext::GetMaxHP()
|
|||||||
|
|
||||||
float BattleDataContext::GetDef()
|
float BattleDataContext::GetDef()
|
||||||
{
|
{
|
||||||
return hero_ability_->GetDef();
|
float def = hero_ability_->GetDef();
|
||||||
|
def += owner_.Get()->GetAbility()->GetAttrAbs(kHAT_Def);
|
||||||
|
def *= 1.0f + owner_.Get()->GetAbility()->GetAttrRate(kHAT_Def);
|
||||||
|
def *= 1.0f + owner_.Get()->GetAbility()->GetAttrAddition(kHAT_Def) -
|
||||||
|
owner_.Get()->GetAbility()->GetAttrRuduce(kHAT_Def);
|
||||||
|
return def;
|
||||||
}
|
}
|
||||||
|
|
||||||
float BattleDataContext::GetHeroTotalAtk()
|
float BattleDataContext::GetHeroTotalAtk()
|
||||||
{
|
{
|
||||||
return hero_ability_->GetAtk();
|
float atk = hero_ability_->GetAtk();
|
||||||
|
atk += owner_.Get()->GetAbility()->GetAttrAbs(kHAT_Atk);
|
||||||
|
atk *= 1.0f + owner_.Get()->GetAbility()->GetAttrRate(kHAT_Atk);
|
||||||
|
atk *= 1.0f + owner_.Get()->GetAbility()->GetAttrAddition(kHAT_Atk) -
|
||||||
|
owner_.Get()->GetAbility()->GetAttrRuduce(kHAT_Atk);
|
||||||
|
return atk;
|
||||||
}
|
}
|
||||||
|
|
||||||
float BattleDataContext::GetWeaponAtk(IBullet* bullet)
|
float BattleDataContext::GetWeaponAtk(IBullet* bullet)
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "human.h"
|
#include "human.h"
|
||||||
#include "team.h"
|
#include "team.h"
|
||||||
#include "collision.h"
|
#include "collision.h"
|
||||||
|
#include "battledatacontext.h"
|
||||||
|
|
||||||
#include "mt/Buff.h"
|
#include "mt/Buff.h"
|
||||||
#include "mt/Skill.h"
|
#include "mt/Skill.h"
|
||||||
@ -35,7 +36,7 @@ void CallFuncBuff::Activate()
|
|||||||
hold_param2_ = meta->GetBuffParam2(this);
|
hold_param2_ = meta->GetBuffParam2(this);
|
||||||
if (GetCaster().Get()) {
|
if (GetCaster().Get()) {
|
||||||
float dmg = hold_param2_;
|
float dmg = hold_param2_;
|
||||||
dmg = owner->CalcReceiveDmg(GetCaster().Get(), dmg);
|
dmg = owner->GetBattleContext()->CalcReceiveDmg(GetCaster().Get(), dmg);
|
||||||
float dmg_out = 0.0f;
|
float dmg_out = 0.0f;
|
||||||
owner->DecHP(dmg,
|
owner->DecHP(dmg,
|
||||||
GetCaster().Get()->GetUniId(),
|
GetCaster().Get()->GetUniId(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user