1
This commit is contained in:
parent
b23dcf72f5
commit
352121bda8
@ -81,6 +81,12 @@ void CallFuncBuff::Activate()
|
||||
ProcAddHp();
|
||||
}
|
||||
break;
|
||||
case BuffCallFunc_e::kAddMaxHp:
|
||||
{
|
||||
hold_param2_ = meta->GetBuffParam2(this);
|
||||
ProcAddMaxHp();
|
||||
}
|
||||
break;
|
||||
case BuffCallFunc_e::kFlashMoveToPos:
|
||||
{
|
||||
hold_param2_ = meta->GetBuffParam2(this);
|
||||
@ -847,3 +853,10 @@ void CallFuncBuff::DecSkillCd()
|
||||
skill->Accelerate(-dec_time);
|
||||
}
|
||||
}
|
||||
|
||||
void CallFuncBuff::ProcAddMaxHp()
|
||||
{
|
||||
if (!owner->dead && !owner->downed) {
|
||||
owner->SetMaxHP(owner->GetMaxHP() + hold_param2_);
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,8 @@ A8_DECLARE_CLASS_ENUM(BuffCallFunc_e, int,
|
||||
kSummonObstacleSpecDistance = 25,
|
||||
kClearSummonObstacle = 26,
|
||||
kDecSkillCd = 27,
|
||||
kRefreshHp = 28
|
||||
kRefreshHp = 28,
|
||||
kAddMaxHp = 29,
|
||||
);
|
||||
|
||||
|
||||
@ -44,6 +45,7 @@ class CallFuncBuff : public Buff
|
||||
void ProcFlashMove();
|
||||
void ProcAddEnergyShield();
|
||||
void ProcAddHp();
|
||||
void ProcAddMaxHp();
|
||||
void ProcFlashMoveToPos();
|
||||
void ProcLightCircle();
|
||||
void ProcSyncProp();
|
||||
|
@ -99,6 +99,14 @@ public:
|
||||
double result = context_.buff->owner->GetMaxHP();
|
||||
return std::make_shared<a8::lisp::Value>(a8::lisp::Atom(result));
|
||||
});
|
||||
RegisterCProc
|
||||
(
|
||||
"myself.get_init_max_hp",
|
||||
[this] (const a8::lisp::List& params) -> std::shared_ptr<a8::lisp::Value>
|
||||
{
|
||||
double result = context_.buff->owner->GetBattleContext()->GetMaxHP();
|
||||
return std::make_shared<a8::lisp::Value>(a8::lisp::Atom(result));
|
||||
});
|
||||
RegisterCProc
|
||||
(
|
||||
"caster.get_hero_atk",
|
||||
|
Loading…
x
Reference in New Issue
Block a user