This commit is contained in:
aozhiwei 2024-01-05 17:38:12 +08:00
parent ade8d12bc1
commit c604e4c6e1

View File

@ -127,10 +127,7 @@ public:
#endif
}
private:
void DefaultInit(Creature* c)
{
void RecalcHp()
{
float pHealRateAm = 0.0f; //加基础点数属性绝对值
float pHealthAm_Add = 0.0f; //buff或者养成的属性
@ -161,6 +158,8 @@ private:
hp_ = (hero_meta->GetBasicMeta()->vOrigHealth() * (1 + pHealth / hero_meta->GetBasicMeta()->pBaseHealth() + vHealthAm)) *
(1 + vHealthRateSe) * (1 + vHealthRateIn);
}
void RecalcAttack()
{
float pAttackAm = 0.0f;
float pAttackAm_Add = 0.0f;
@ -192,6 +191,8 @@ private:
atk_ = (hero_meta->GetBasicMeta()->vOrigAttack() * (1 + pAttack / hero_meta->GetBasicMeta()->pBaseAttack()) + vAttackAm) *
(1 + vAttackRateSe) * (1 + vAttackRateIn);
}
void RecalcDef()
{
float pDefendAm = 0.0f;
float pDefendAm_Add = 0.0f;
@ -208,6 +209,8 @@ private:
def_ = (hero_meta->GetBasicMeta()->vOrigDefend() + pDefendAm) *
(1 + pDefendRateSe) * (1 + pDefendRateIn);
}
void RecalcBlock()
{
float pBlockAm = 0.0f;
float pBlockAm_Add = 0.0f;
@ -229,6 +232,8 @@ private:
block_ = vBlock;
}
void RecalcCrit()
{
float pCritAm = 0.0f;
float pCritAm_Add = 0.0f;
@ -249,6 +254,16 @@ private:
vCrit = (1 + hero_meta->GetBasicMeta()->vOrigCrit()) * (1 + pCrit / hero_meta->GetBasicMeta()->pBaseCrit()) - 1;
crit_ = vCrit;
}
private:
void DefaultInit(Creature* c)
{
RecalcHp();
RecalcAttack();
RecalcDef();
RecalcBlock();
RecalcCrit();
}
void DtoInit(Creature* c)