1
This commit is contained in:
parent
d456784353
commit
e428043c6a
@ -2,6 +2,8 @@
|
||||
|
||||
#include "lispenv.h"
|
||||
#include "buff.h"
|
||||
#include "battledatacontext.h"
|
||||
#include "creature.h"
|
||||
|
||||
#include "mt/Skill.h"
|
||||
#include "mt/SkillNumber.h"
|
||||
@ -26,6 +28,25 @@ public:
|
||||
result = context_.buff->skill_meta->_number_meta->GetAttrByIdx(idx);
|
||||
return std::make_shared<a8::lisp::Value>(a8::lisp::Atom(result));
|
||||
});
|
||||
RegisterCProc
|
||||
(
|
||||
"!myself.get_hero_atk",
|
||||
[this] (const a8::lisp::List& params) -> std::shared_ptr<a8::lisp::Value>
|
||||
{
|
||||
double result = context_.buff->owner->GetBattleContext()->GetHeroTotalAtk();
|
||||
return std::make_shared<a8::lisp::Value>(a8::lisp::Atom(result));
|
||||
});
|
||||
RegisterCProc
|
||||
(
|
||||
"!caster.get_hero_atk",
|
||||
[this] (const a8::lisp::List& params) -> std::shared_ptr<a8::lisp::Value>
|
||||
{
|
||||
double result = 0.0f;
|
||||
if (context_.buff->GetCaster().Get()) {
|
||||
context_.buff->GetCaster().Get()->GetBattleContext()->GetHeroTotalAtk();
|
||||
}
|
||||
return std::make_shared<a8::lisp::Value>(a8::lisp::Atom(result));
|
||||
});
|
||||
}
|
||||
|
||||
float Eval(std::shared_ptr<a8::lisp::Value> expr,
|
||||
|
Loading…
x
Reference in New Issue
Block a user