This commit is contained in:
aozhiwei 2023-06-29 16:14:54 +08:00
parent 68d1ed0543
commit 95a25be38b
15 changed files with 411 additions and 124 deletions

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!--EXPORTED BY TOOL, DON'T MODIFY IT!-->
<!--Source File: android_attack_new.xml-->
<behavior name="android_attack_new" agenttype="AndroidAgent" version="5">
<node class="Selector" id="0">
<node class="Sequence" id="1">
<node class="Action" id="3">
<property Method="Self.BaseAgent::SelectUseableSkill(1:0)" />
<property ResultOption="BT_INVALID" />
</node>
<node class="Action" id="4">
<property Method="Self.BaseAgent::DoSkill(int Self.BaseAgent::selected_skill_id)" />
<property ResultOption="BT_INVALID" />
</node>
</node>
<node class="Action" id="5">
<property Method="Self.BaseAgent::CoShot()" />
<property ResultOption="BT_INVALID" />
</node>
<node class="Action" id="2">
<property Method="Self.BaseAgent::CoMoveToCurrentTarget(60)" />
<property ResultOption="BT_INVALID" />
</node>
</node>
</behavior>

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<!--EXPORTED BY TOOL, DON'T MODIFY IT!-->
<!--Source File: android_chase_to_kill.xml-->
<behavior name="android_chase_to_kill" agenttype="AndroidAgent" version="5">
<pars>
<par name="_$local_task_param_$_0" type="int" value="0" />
</pars>
<node class="Task" id="0">
<property Prototype="Self.BaseAgent::ChaseToKill(0)" />
<property IsHTN="false" />
<node class="Sequence" id="1">
<node class="Action" id="2">
<property Method="Self.BaseAgent::SetCurrentTarget(int Self.AndroidAgent::_$local_task_param_$_0)" />
<property ResultOption="BT_SUCCESS" />
</node>
<node class="DecoratorLoop" id="3">
<property Count="const int -1" />
<property DecorateWhenChildEnds="true" />
<property DoneWithinFrame="false" />
<attachment class="Precondition" id="4" flag="precondition">
<property BinaryOperator="And" />
<property Operator="Equal" />
<property Opl="Self.BaseAgent::CurrentTargetIsValid()" />
<property Opr2="const bool true" />
<property Phase="Both" />
</attachment>
<node class="IfElse" id="5">
<node class="Condition" id="6">
<property Operator="Equal" />
<property Opl="Self.BaseAgent::CurrentTargetMoveCanReach()" />
<property Opr="const bool true" />
</node>
<node class="ReferencedBehavior" id="8">
<property ReferenceBehavior="const string &quot;android_attack_new&quot;" />
</node>
<node class="Action" id="7">
<property Method="Self.BaseAgent::CoFindPathToCurrentTarget(100)" />
<property ResultOption="BT_INVALID" />
</node>
</node>
</node>
</node>
</node>
</behavior>

View File

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="utf-8"?>
<!--EXPORTED BY TOOL, DON'T MODIFY IT!-->
<!--Source File: android_craze_mode.xml-->
<behavior name="android_craze_mode" agenttype="AndroidAgent" version="5">
<node class="Sequence" id="0">
<node class="DecoratorLoop" id="4">
<property Count="const int -1" />
<property DecorateWhenChildEnds="true" />
<property DoneWithinFrame="false" />
<attachment class="Precondition" id="5" flag="precondition">
<property BinaryOperator="And" />
<property Operator="Equal" />
<property Opl="Self.AndroidAgent::IsCrazeModePrepareMode()" />
<property Opr2="const bool true" />
<property Phase="Enter" />
</attachment>
<attachment class="Event" id="10" flag="event">
<property ReferenceFilename="android_attack" />
<property Task="Self.BaseAgent::OnAttacked(0,0)" />
<property TriggeredOnce="false" />
<property TriggerMode="Return" />
</attachment>
<node class="IfElse" id="6">
<node class="Condition" id="7">
<property Operator="Equal" />
<property Opl="Self.BaseAgent::IsNearGas(50)" />
<property Opr="const bool true" />
</node>
<node class="ReferencedBehavior" id="8">
<property ReferenceBehavior="const string &quot;android_run_gas&quot;" />
</node>
<node class="Action" id="9">
<property Method="Self.AndroidAgent::DoRandomWalk()" />
<property ResultOption="BT_INVALID" />
</node>
</node>
</node>
<node class="DecoratorLoop" id="1">
<property Count="const int -1" />
<property DecorateWhenChildEnds="true" />
<property DoneWithinFrame="false" />
<attachment class="Precondition" id="2" flag="precondition">
<property BinaryOperator="And" />
<property Operator="Equal" />
<property Opl="Self.BaseAgent::IsDead()" />
<property Opr2="const bool false" />
<property Phase="Both" />
</attachment>
<attachment class="Precondition" id="3" flag="precondition">
<property BinaryOperator="And" />
<property Operator="Equal" />
<property Opl="Self.BaseAgent::IsGameOver()" />
<property Opr2="const bool false" />
<property Phase="Both" />
</attachment>
<node class="IfElse" id="11">
<node class="Condition" id="12">
<property Operator="Greater" />
<property Opl="Self.BaseAgent::GetSafeAreaRadius()" />
<property Opr="const float 300" />
</node>
<node class="IfElse" id="13">
<node class="Condition" id="14">
<property Operator="Equal" />
<property Opl="Self.BaseAgent::IsNearGas(50)" />
<property Opr="const bool true" />
</node>
<node class="ReferencedBehavior" id="15">
<property ReferenceBehavior="const string &quot;android_run_gas&quot;" />
</node>
<node class="IfElse" id="16">
<node class="Condition" id="17">
<property Operator="Equal" />
<property Opl="Self.BaseAgent::FindEnemy(300)" />
<property Opr="const behaviac::EBTStatus BT_SUCCESS" />
</node>
<node class="ReferencedBehavior" id="18">
<property ReferenceBehavior="const string &quot;android_chase_to_kill&quot;" />
<property Task="Self.BaseAgent::ChaseToKill(int Self.BaseAgent::find_enemy_target_uniid)" />
</node>
<node class="Noop" id="22" />
</node>
</node>
<node class="IfElse" id="19">
<node class="Condition" id="20">
<property Operator="Equal" />
<property Opl="Self.BaseAgent::FindEnemy(300)" />
<property Opr="const behaviac::EBTStatus BT_SUCCESS" />
</node>
<node class="ReferencedBehavior" id="21">
<property ReferenceBehavior="const string &quot;android_chase_to_kill&quot;" />
<property Task="Self.BaseAgent::ChaseToKill(int Self.BaseAgent::find_enemy_target_uniid)" />
</node>
<node class="Noop" id="23" />
</node>
</node>
</node>
</node>
</behavior>

View File

@ -8,99 +8,84 @@
<property Opl="Self.BaseAgent::IsGameOver()" />
<property Opr="const bool true" />
</node>
<node class="False" id="7" />
<node class="Selector" id="0">
<node class="Noop" id="3" />
<node class="IfElse" id="4">
<node class="Condition" id="1">
<property Operator="Equal" />
<property Opl="Self.AndroidAgent::GetState()" />
<property Opr="const State_e kPreBattle" />
<property Opl="Self.AndroidAgent::IsCrazeMode()" />
<property Opr="const bool true" />
</node>
<node class="SelectorProbability" id="6">
<node class="DecoratorWeight" id="8">
<node class="ReferencedBehavior" id="2">
<property ReferenceBehavior="const string &quot;android_craze_mode&quot;" />
</node>
<node class="SelectorProbability" id="5">
<node class="DecoratorWeight" id="7">
<property DecorateWhenChildEnds="false" />
<property Weight="const int 30" />
<attachment class="Event" id="16" flag="event">
<attachment class="Event" id="27" flag="event">
<property ReferenceFilename="android_attack" />
<property Task="Self.BaseAgent::OnAttacked(0,0)" />
<property TriggeredOnce="false" />
<property TriggerMode="Return" />
</attachment>
<node class="Action" id="9">
<node class="Action" id="19">
<property Method="Self.AndroidAgent::DoIdle(2000,4000)" />
<property ResultOption="BT_INVALID" />
</node>
</node>
<node class="DecoratorWeight" id="10">
<node class="DecoratorWeight" id="28">
<property DecorateWhenChildEnds="false" />
<property Weight="const int 50" />
<attachment class="Event" id="25" flag="event">
<attachment class="Event" id="30" flag="event">
<property ReferenceFilename="android_attack" />
<property Task="Self.BaseAgent::OnAttacked(0,0)" />
<property TriggeredOnce="false" />
<property TriggerMode="Return" />
</attachment>
<node class="Action" id="11">
<node class="Action" id="29">
<property Method="Self.AndroidAgent::DoRandomWalk()" />
<property ResultOption="BT_INVALID" />
</node>
</node>
<node class="DecoratorWeight" id="12">
<node class="DecoratorWeight" id="31">
<property DecorateWhenChildEnds="false" />
<property Weight="const int 20" />
<attachment class="Event" id="26" flag="event">
<attachment class="Event" id="33" flag="event">
<property ReferenceFilename="android_attack" />
<property Task="Self.BaseAgent::OnAttacked(0,0)" />
<property TriggeredOnce="false" />
<property TriggerMode="Return" />
</attachment>
<node class="Action" id="13">
<node class="Action" id="32">
<property Method="Self.AndroidAgent::DoRandomShot()" />
<property ResultOption="BT_INVALID" />
</node>
</node>
<node class="DecoratorWeight" id="14">
<node class="DecoratorWeight" id="34">
<property DecorateWhenChildEnds="false" />
<property Weight="const int 5" />
<node class="Action" id="15">
<node class="Action" id="35">
<property Method="Self.AndroidAgent::DoAttack()" />
<property ResultOption="BT_INVALID" />
</node>
</node>
<node class="DecoratorWeight" id="20">
<node class="DecoratorWeight" id="37">
<property DecorateWhenChildEnds="false" />
<property Weight="const int 1" />
<node class="IfElse" id="21">
<node class="Condition" id="22">
<node class="IfElse" id="38">
<node class="Condition" id="39">
<property Operator="Equal" />
<property Opl="Self.BaseAgent::HasTarget(200)" />
<property Opr="const bool true" />
</node>
<node class="Action" id="23">
<node class="Action" id="40">
<property Method="Self.AndroidAgent::DoPursuit()" />
<property ResultOption="BT_INVALID" />
</node>
<node class="False" id="24" />
<node class="False" id="41" />
</node>
</node>
</node>
<node class="True" id="19" />
</node>
<node class="Condition" id="2">
<property Operator="Equal" />
<property Opl="Self.AndroidAgent::GetState()" />
<property Opr="const State_e kFly" />
</node>
<node class="Condition" id="3">
<property Operator="Equal" />
<property Opl="Self.AndroidAgent::GetState()" />
<property Opr="const State_e kJump" />
</node>
<node class="Condition" id="5">
<property Operator="Equal" />
<property Opl="Self.AndroidAgent::GetState()" />
<property Opr="const State_e kBattling" />
</node>
</node>
</node>
</behavior>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--EXPORTED BY TOOL, DON'T MODIFY IT!-->
<!--Source File: android_run_gas.xml-->
<behavior name="android_run_gas" agenttype="AndroidAgent" version="5">
<node class="IfElse" id="0">
<node class="Condition" id="1">
<property Operator="GreaterEqual" />
<property Opl="Self.BaseAgent::GetSafeAreaRadius()" />
<property Opr="const float 300" />
</node>
<node class="Noop" id="3" />
<node class="Action" id="2">
<property Method="Self.BaseAgent::CoRunGas()" />
<property ResultOption="BT_INVALID" />
</node>
</node>
</behavior>

View File

@ -16,6 +16,12 @@ template<> inline bool BaseAgent::_Execute_Method_<METHOD_TYPE_BaseAgent_CanUseS
return this->BaseAgent::CanUseSkill(p0);
}
struct METHOD_TYPE_BaseAgent_CoShot { };
template<> inline behaviac::EBTStatus BaseAgent::_Execute_Method_<METHOD_TYPE_BaseAgent_CoShot>()
{
return this->BaseAgent::CoShot();
}
struct METHOD_TYPE_BaseAgent_CurrentTargetMoveCanReach { };
template<> inline bool BaseAgent::_Execute_Method_<METHOD_TYPE_BaseAgent_CurrentTargetMoveCanReach>()
{
@ -52,6 +58,12 @@ template<> inline bool BaseAgent::_Execute_Method_<METHOD_TYPE_BaseAgent_HasTarg
return this->BaseAgent::HasTarget(p0);
}
struct METHOD_TYPE_BaseAgent_IsNearGas { };
template<> inline bool BaseAgent::_Execute_Method_<METHOD_TYPE_BaseAgent_IsNearGas>(float p0)
{
return this->BaseAgent::IsNearGas(p0);
}
struct METHOD_TYPE_BaseAgent_MoveCanReach { };
template<> inline bool BaseAgent::_Execute_Method_<METHOD_TYPE_BaseAgent_MoveCanReach>(const glm::vec3& p0)
{

View File

@ -373,7 +373,7 @@ namespace behaviac
virtual bool load()
{
AgentMeta::SetTotalSignature(3558395884u);
AgentMeta::SetTotalSignature(1804086084u);
AgentMeta* meta = NULL;
BEHAVIAC_UNUSED_VAR(meta);
@ -396,7 +396,7 @@ namespace behaviac
meta->RegisterMethod(502968959u, BEHAVIAC_NEW CMethod_behaviac_Agent_VectorRemove());
// BaseAgent
meta = BEHAVIAC_NEW AgentMeta(3706475328u);
meta = BEHAVIAC_NEW AgentMeta(2396599608u);
AgentMeta::GetAgentMetas()[2774251291u] = meta;
meta->RegisterMemberProperty(2916366392u, BEHAVIAC_NEW CMemberProperty< int >("find_enemy_target_uniid", Set_BaseAgent_find_enemy_target_uniid, Get_BaseAgent_find_enemy_target_uniid));
meta->RegisterMemberProperty(2276820502u, BEHAVIAC_NEW CMemberProperty< int >("selected_skill_id", Set_BaseAgent_selected_skill_id, Get_BaseAgent_selected_skill_id));
@ -405,6 +405,8 @@ namespace behaviac
meta->RegisterMethod(623091365u, BEHAVIAC_NEW CAgentMethod_1< behaviac::EBTStatus, int >(FunctionPointer_BaseAgent_CoAttackTarget));
meta->RegisterMethod(1719017386u, BEHAVIAC_NEW CAgentMethod_1< behaviac::EBTStatus, float >(FunctionPointer_BaseAgent_CoFindPathToCurrentTarget));
meta->RegisterMethod(1290650388u, BEHAVIAC_NEW CAgentMethod_1< behaviac::EBTStatus, float >(FunctionPointer_BaseAgent_CoMoveToCurrentTarget));
meta->RegisterMethod(2073733328u, BEHAVIAC_NEW CAgentMethod< behaviac::EBTStatus >(FunctionPointer_BaseAgent_CoRunGas));
meta->RegisterMethod(2387086791u, BEHAVIAC_NEW CAgentMethod< behaviac::EBTStatus >(FunctionPointer_BaseAgent_CoShot));
meta->RegisterMethod(2039856097u, BEHAVIAC_NEW CAgentMethod< bool >(FunctionPointer_BaseAgent_CurrentTargetIsValid));
meta->RegisterMethod(1047842467u, BEHAVIAC_NEW CAgentMethod< bool >(FunctionPointer_BaseAgent_CurrentTargetMoveCanReach));
meta->RegisterMethod(2126763853u, BEHAVIAC_NEW CAgentMethod_1< behaviac::EBTStatus, int >(FunctionPointer_BaseAgent_DoSkill));
@ -416,9 +418,12 @@ namespace behaviac
meta->RegisterMethod(221940739u, BEHAVIAC_NEW CAgentMethod< glm::vec3 >(FunctionPointer_BaseAgent_GetFindEnemyResultTargetPos));
meta->RegisterMethod(2424678062u, BEHAVIAC_NEW CAgentMethod< int >(FunctionPointer_BaseAgent_GetFindEnemyResultTargetUniId));
meta->RegisterMethod(3533946671u, BEHAVIAC_NEW CAgentMethod< glm::vec3 >(FunctionPointer_BaseAgent_GetPos));
meta->RegisterMethod(1369696888u, BEHAVIAC_NEW CAgentMethod< float >(FunctionPointer_BaseAgent_GetSafeAreaRadius));
meta->RegisterMethod(3603629747u, BEHAVIAC_NEW CAgentMethod_1< bool, int >(FunctionPointer_BaseAgent_HasBuffEffect));
meta->RegisterMethod(3047011226u, BEHAVIAC_NEW CAgentMethod_1< bool, float >(FunctionPointer_BaseAgent_HasTarget));
meta->RegisterMethod(1054489725u, BEHAVIAC_NEW CAgentMethod< bool >(FunctionPointer_BaseAgent_IsDead));
meta->RegisterMethod(400482748u, BEHAVIAC_NEW CAgentMethod< bool >(FunctionPointer_BaseAgent_IsGameOver));
meta->RegisterMethod(550488892u, BEHAVIAC_NEW CAgentMethod_1< bool, float >(FunctionPointer_BaseAgent_IsNearGas));
meta->RegisterMethod(1045109914u, BEHAVIAC_NEW CAgentStaticMethodVoid_1<char*>(FunctionPointer_BaseAgent_LogMessage));
meta->RegisterMethod(745495888u, BEHAVIAC_NEW CMethod_BaseAgent_MoveCanReach());
meta->RegisterMethod(3111585017u, BEHAVIAC_NEW CAgentMethodVoid_2<int, int>(FunctionPointer_BaseAgent_OnAttacked) /* OnAttacked */);
@ -433,7 +438,7 @@ namespace behaviac
meta->RegisterMethod(502968959u, BEHAVIAC_NEW CMethod_behaviac_Agent_VectorRemove());
// AndroidAgent
meta = BEHAVIAC_NEW AgentMeta(683007333u);
meta = BEHAVIAC_NEW AgentMeta(1745853881u);
AgentMeta::GetAgentMetas()[2475098143u] = meta;
meta->RegisterCustomizedProperty(2916366392u, BEHAVIAC_NEW CCustomizedProperty< int >(2916366392u, "find_enemy_target_uniid", "0"));
meta->RegisterCustomizedProperty(2276820502u, BEHAVIAC_NEW CCustomizedProperty< int >(2276820502u, "selected_skill_id", "0"));
@ -442,6 +447,8 @@ namespace behaviac
meta->RegisterMethod(623091365u, BEHAVIAC_NEW CAgentMethod_1< behaviac::EBTStatus, int >(FunctionPointer_AndroidAgent_CoAttackTarget));
meta->RegisterMethod(1719017386u, BEHAVIAC_NEW CAgentMethod_1< behaviac::EBTStatus, float >(FunctionPointer_AndroidAgent_CoFindPathToCurrentTarget));
meta->RegisterMethod(1290650388u, BEHAVIAC_NEW CAgentMethod_1< behaviac::EBTStatus, float >(FunctionPointer_AndroidAgent_CoMoveToCurrentTarget));
meta->RegisterMethod(2073733328u, BEHAVIAC_NEW CAgentMethod< behaviac::EBTStatus >(FunctionPointer_AndroidAgent_CoRunGas));
meta->RegisterMethod(2387086791u, BEHAVIAC_NEW CAgentMethod< behaviac::EBTStatus >(FunctionPointer_AndroidAgent_CoShot));
meta->RegisterMethod(2039856097u, BEHAVIAC_NEW CAgentMethod< bool >(FunctionPointer_AndroidAgent_CurrentTargetIsValid));
meta->RegisterMethod(1047842467u, BEHAVIAC_NEW CAgentMethod< bool >(FunctionPointer_AndroidAgent_CurrentTargetMoveCanReach));
meta->RegisterMethod(2886181657u, BEHAVIAC_NEW CAgentMethod< behaviac::EBTStatus >(FunctionPointer_AndroidAgent_DoAttack));
@ -458,10 +465,15 @@ namespace behaviac
meta->RegisterMethod(221940739u, BEHAVIAC_NEW CAgentMethod< glm::vec3 >(FunctionPointer_AndroidAgent_GetFindEnemyResultTargetPos));
meta->RegisterMethod(2424678062u, BEHAVIAC_NEW CAgentMethod< int >(FunctionPointer_AndroidAgent_GetFindEnemyResultTargetUniId));
meta->RegisterMethod(3533946671u, BEHAVIAC_NEW CAgentMethod< glm::vec3 >(FunctionPointer_AndroidAgent_GetPos));
meta->RegisterMethod(1369696888u, BEHAVIAC_NEW CAgentMethod< float >(FunctionPointer_AndroidAgent_GetSafeAreaRadius));
meta->RegisterMethod(1666360340u, BEHAVIAC_NEW CAgentMethod< State_e >(FunctionPointer_AndroidAgent_GetState));
meta->RegisterMethod(3603629747u, BEHAVIAC_NEW CAgentMethod_1< bool, int >(FunctionPointer_AndroidAgent_HasBuffEffect));
meta->RegisterMethod(3047011226u, BEHAVIAC_NEW CAgentMethod_1< bool, float >(FunctionPointer_AndroidAgent_HasTarget));
meta->RegisterMethod(3929552993u, BEHAVIAC_NEW CAgentMethod< bool >(FunctionPointer_AndroidAgent_IsCrazeMode));
meta->RegisterMethod(509871274u, BEHAVIAC_NEW CAgentMethod< bool >(FunctionPointer_AndroidAgent_IsCrazeModePrepareMode));
meta->RegisterMethod(1054489725u, BEHAVIAC_NEW CAgentMethod< bool >(FunctionPointer_AndroidAgent_IsDead));
meta->RegisterMethod(400482748u, BEHAVIAC_NEW CAgentMethod< bool >(FunctionPointer_AndroidAgent_IsGameOver));
meta->RegisterMethod(550488892u, BEHAVIAC_NEW CAgentMethod_1< bool, float >(FunctionPointer_AndroidAgent_IsNearGas));
meta->RegisterMethod(1045109914u, BEHAVIAC_NEW CAgentStaticMethodVoid_1<char*>(FunctionPointer_AndroidAgent_LogMessage));
meta->RegisterMethod(745495888u, BEHAVIAC_NEW CMethod_BaseAgent_MoveCanReach());
meta->RegisterMethod(3111585017u, BEHAVIAC_NEW CAgentMethodVoid_2<int, int>(FunctionPointer_AndroidAgent_OnAttacked) /* OnAttacked */);
@ -476,7 +488,7 @@ namespace behaviac
meta->RegisterMethod(502968959u, BEHAVIAC_NEW CMethod_behaviac_Agent_VectorRemove());
// HeroAgent
meta = BEHAVIAC_NEW AgentMeta(3786131989u);
meta = BEHAVIAC_NEW AgentMeta(1118740210u);
AgentMeta::GetAgentMetas()[2270112014u] = meta;
meta->RegisterMemberProperty(2916366392u, BEHAVIAC_NEW CMemberProperty< int >("find_enemy_target_uniid", Set_BaseAgent_find_enemy_target_uniid, Get_BaseAgent_find_enemy_target_uniid));
meta->RegisterMemberProperty(2276820502u, BEHAVIAC_NEW CMemberProperty< int >("selected_skill_id", Set_BaseAgent_selected_skill_id, Get_BaseAgent_selected_skill_id));
@ -485,6 +497,8 @@ namespace behaviac
meta->RegisterMethod(623091365u, BEHAVIAC_NEW CAgentMethod_1< behaviac::EBTStatus, int >(FunctionPointer_HeroAgent_CoAttackTarget));
meta->RegisterMethod(1719017386u, BEHAVIAC_NEW CAgentMethod_1< behaviac::EBTStatus, float >(FunctionPointer_HeroAgent_CoFindPathToCurrentTarget));
meta->RegisterMethod(1290650388u, BEHAVIAC_NEW CAgentMethod_1< behaviac::EBTStatus, float >(FunctionPointer_HeroAgent_CoMoveToCurrentTarget));
meta->RegisterMethod(2073733328u, BEHAVIAC_NEW CAgentMethod< behaviac::EBTStatus >(FunctionPointer_HeroAgent_CoRunGas));
meta->RegisterMethod(2387086791u, BEHAVIAC_NEW CAgentMethod< behaviac::EBTStatus >(FunctionPointer_HeroAgent_CoShot));
meta->RegisterMethod(2039856097u, BEHAVIAC_NEW CAgentMethod< bool >(FunctionPointer_HeroAgent_CurrentTargetIsValid));
meta->RegisterMethod(1047842467u, BEHAVIAC_NEW CAgentMethod< bool >(FunctionPointer_HeroAgent_CurrentTargetMoveCanReach));
meta->RegisterMethod(2886181657u, BEHAVIAC_NEW CAgentMethod< behaviac::EBTStatus >(FunctionPointer_HeroAgent_DoAttack));
@ -505,9 +519,12 @@ namespace behaviac
meta->RegisterMethod(2424678062u, BEHAVIAC_NEW CAgentMethod< int >(FunctionPointer_HeroAgent_GetFindEnemyResultTargetUniId));
meta->RegisterMethod(3721974980u, BEHAVIAC_NEW CAgentMethod< float >(FunctionPointer_HeroAgent_GetMasterDistance));
meta->RegisterMethod(3533946671u, BEHAVIAC_NEW CAgentMethod< glm::vec3 >(FunctionPointer_HeroAgent_GetPos));
meta->RegisterMethod(1369696888u, BEHAVIAC_NEW CAgentMethod< float >(FunctionPointer_HeroAgent_GetSafeAreaRadius));
meta->RegisterMethod(3603629747u, BEHAVIAC_NEW CAgentMethod_1< bool, int >(FunctionPointer_HeroAgent_HasBuffEffect));
meta->RegisterMethod(3047011226u, BEHAVIAC_NEW CAgentMethod_1< bool, float >(FunctionPointer_HeroAgent_HasTarget));
meta->RegisterMethod(1054489725u, BEHAVIAC_NEW CAgentMethod< bool >(FunctionPointer_HeroAgent_IsDead));
meta->RegisterMethod(400482748u, BEHAVIAC_NEW CAgentMethod< bool >(FunctionPointer_HeroAgent_IsGameOver));
meta->RegisterMethod(550488892u, BEHAVIAC_NEW CAgentMethod_1< bool, float >(FunctionPointer_HeroAgent_IsNearGas));
meta->RegisterMethod(1045109914u, BEHAVIAC_NEW CAgentStaticMethodVoid_1<char*>(FunctionPointer_HeroAgent_LogMessage));
meta->RegisterMethod(745495888u, BEHAVIAC_NEW CMethod_BaseAgent_MoveCanReach());
meta->RegisterMethod(3111585017u, BEHAVIAC_NEW CAgentMethodVoid_2<int, int>(FunctionPointer_HeroAgent_OnAttacked) /* OnAttacked */);

View File

@ -28,6 +28,8 @@ namespace behaviac
inline behaviac::EBTStatus FunctionPointer_BaseAgent_CoAttackTarget(Agent* self, int target_id) { return ((BaseAgent*)self)->CoAttackTarget(target_id); }
inline behaviac::EBTStatus FunctionPointer_BaseAgent_CoFindPathToCurrentTarget(Agent* self, float distance) { return ((BaseAgent*)self)->CoFindPathToCurrentTarget(distance); }
inline behaviac::EBTStatus FunctionPointer_BaseAgent_CoMoveToCurrentTarget(Agent* self, float distance) { return ((BaseAgent*)self)->CoMoveToCurrentTarget(distance); }
inline behaviac::EBTStatus FunctionPointer_BaseAgent_CoRunGas(Agent* self) { return ((BaseAgent*)self)->CoRunGas(); }
inline behaviac::EBTStatus FunctionPointer_BaseAgent_CoShot(Agent* self) { return (behaviac::EBTStatus)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_CoShot, behaviac::EBTStatus >(); }
inline bool FunctionPointer_BaseAgent_CurrentTargetIsValid(Agent* self) { return ((BaseAgent*)self)->CurrentTargetIsValid(); }
inline bool FunctionPointer_BaseAgent_CurrentTargetMoveCanReach(Agent* self) { return (bool)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_CurrentTargetMoveCanReach, bool >(); }
inline behaviac::EBTStatus FunctionPointer_BaseAgent_DoSkill(Agent* self, int skill_id) { return (behaviac::EBTStatus)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_DoSkill, behaviac::EBTStatus, int >(skill_id); }
@ -39,9 +41,12 @@ namespace behaviac
inline glm::vec3 FunctionPointer_BaseAgent_GetFindEnemyResultTargetPos(Agent* self) { return ((BaseAgent*)self)->GetFindEnemyResultTargetPos(); }
inline int FunctionPointer_BaseAgent_GetFindEnemyResultTargetUniId(Agent* self) { return ((BaseAgent*)self)->GetFindEnemyResultTargetUniId(); }
inline glm::vec3 FunctionPointer_BaseAgent_GetPos(Agent* self) { return (glm::vec3)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_GetPos, glm::vec3 >(); }
inline float FunctionPointer_BaseAgent_GetSafeAreaRadius(Agent* self) { return ((BaseAgent*)self)->GetSafeAreaRadius(); }
inline bool FunctionPointer_BaseAgent_HasBuffEffect(Agent* self, int buff_effect) { return (bool)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_HasBuffEffect, bool, int >(buff_effect); }
inline bool FunctionPointer_BaseAgent_HasTarget(Agent* self, float range) { return (bool)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_HasTarget, bool, float >(range); }
inline bool FunctionPointer_BaseAgent_IsDead(Agent* self) { return ((BaseAgent*)self)->IsDead(); }
inline bool FunctionPointer_BaseAgent_IsGameOver(Agent* self) { return ((BaseAgent*)self)->IsGameOver(); }
inline bool FunctionPointer_BaseAgent_IsNearGas(Agent* self, float distance) { return (bool)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_IsNearGas, bool, float >(distance); }
inline void FunctionPointer_BaseAgent_LogMessage(char* param0) { BaseAgent::LogMessage(param0); }
inline void FunctionPointer_BaseAgent_OnAttacked(Agent* self, int sender, int time) { } /* OnAttacked */
inline behaviac::EBTStatus FunctionPointer_BaseAgent_SelectUseableSkill(Agent* self, behaviac::vector<int> skill_ids) { return (behaviac::EBTStatus)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_SelectUseableSkill, behaviac::EBTStatus, behaviac::vector<int> >(skill_ids); }
@ -52,6 +57,8 @@ namespace behaviac
inline behaviac::EBTStatus FunctionPointer_AndroidAgent_CoAttackTarget(Agent* self, int target_id) { return ((AndroidAgent*)self)->CoAttackTarget(target_id); }
inline behaviac::EBTStatus FunctionPointer_AndroidAgent_CoFindPathToCurrentTarget(Agent* self, float distance) { return ((AndroidAgent*)self)->CoFindPathToCurrentTarget(distance); }
inline behaviac::EBTStatus FunctionPointer_AndroidAgent_CoMoveToCurrentTarget(Agent* self, float distance) { return ((AndroidAgent*)self)->CoMoveToCurrentTarget(distance); }
inline behaviac::EBTStatus FunctionPointer_AndroidAgent_CoRunGas(Agent* self) { return ((AndroidAgent*)self)->CoRunGas(); }
inline behaviac::EBTStatus FunctionPointer_AndroidAgent_CoShot(Agent* self) { return (behaviac::EBTStatus)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_CoShot, behaviac::EBTStatus >(); }
inline bool FunctionPointer_AndroidAgent_CurrentTargetIsValid(Agent* self) { return ((AndroidAgent*)self)->CurrentTargetIsValid(); }
inline bool FunctionPointer_AndroidAgent_CurrentTargetMoveCanReach(Agent* self) { return (bool)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_CurrentTargetMoveCanReach, bool >(); }
inline behaviac::EBTStatus FunctionPointer_AndroidAgent_DoAttack(Agent* self) { return ((AndroidAgent*)self)->DoAttack(); }
@ -68,10 +75,15 @@ namespace behaviac
inline glm::vec3 FunctionPointer_AndroidAgent_GetFindEnemyResultTargetPos(Agent* self) { return ((AndroidAgent*)self)->GetFindEnemyResultTargetPos(); }
inline int FunctionPointer_AndroidAgent_GetFindEnemyResultTargetUniId(Agent* self) { return ((AndroidAgent*)self)->GetFindEnemyResultTargetUniId(); }
inline glm::vec3 FunctionPointer_AndroidAgent_GetPos(Agent* self) { return (glm::vec3)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_GetPos, glm::vec3 >(); }
inline float FunctionPointer_AndroidAgent_GetSafeAreaRadius(Agent* self) { return ((AndroidAgent*)self)->GetSafeAreaRadius(); }
inline State_e FunctionPointer_AndroidAgent_GetState(Agent* self) { return (State_e)((AndroidAgent*)self)->_Execute_Method_<METHOD_TYPE_AndroidAgent_GetState, State_e >(); }
inline bool FunctionPointer_AndroidAgent_HasBuffEffect(Agent* self, int buff_effect) { return (bool)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_HasBuffEffect, bool, int >(buff_effect); }
inline bool FunctionPointer_AndroidAgent_HasTarget(Agent* self, float range) { return (bool)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_HasTarget, bool, float >(range); }
inline bool FunctionPointer_AndroidAgent_IsCrazeMode(Agent* self) { return ((AndroidAgent*)self)->IsCrazeMode(); }
inline bool FunctionPointer_AndroidAgent_IsCrazeModePrepareMode(Agent* self) { return ((AndroidAgent*)self)->IsCrazeModePrepareMode(); }
inline bool FunctionPointer_AndroidAgent_IsDead(Agent* self) { return ((AndroidAgent*)self)->IsDead(); }
inline bool FunctionPointer_AndroidAgent_IsGameOver(Agent* self) { return ((AndroidAgent*)self)->IsGameOver(); }
inline bool FunctionPointer_AndroidAgent_IsNearGas(Agent* self, float distance) { return (bool)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_IsNearGas, bool, float >(distance); }
inline void FunctionPointer_AndroidAgent_LogMessage(char* param0) { AndroidAgent::LogMessage(param0); }
inline void FunctionPointer_AndroidAgent_OnAttacked(Agent* self, int sender, int time) { } /* OnAttacked */
inline behaviac::EBTStatus FunctionPointer_AndroidAgent_SelectUseableSkill(Agent* self, behaviac::vector<int> skill_ids) { return (behaviac::EBTStatus)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_SelectUseableSkill, behaviac::EBTStatus, behaviac::vector<int> >(skill_ids); }
@ -82,6 +94,8 @@ namespace behaviac
inline behaviac::EBTStatus FunctionPointer_HeroAgent_CoAttackTarget(Agent* self, int target_id) { return ((HeroAgent*)self)->CoAttackTarget(target_id); }
inline behaviac::EBTStatus FunctionPointer_HeroAgent_CoFindPathToCurrentTarget(Agent* self, float distance) { return ((HeroAgent*)self)->CoFindPathToCurrentTarget(distance); }
inline behaviac::EBTStatus FunctionPointer_HeroAgent_CoMoveToCurrentTarget(Agent* self, float distance) { return ((HeroAgent*)self)->CoMoveToCurrentTarget(distance); }
inline behaviac::EBTStatus FunctionPointer_HeroAgent_CoRunGas(Agent* self) { return ((HeroAgent*)self)->CoRunGas(); }
inline behaviac::EBTStatus FunctionPointer_HeroAgent_CoShot(Agent* self) { return (behaviac::EBTStatus)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_CoShot, behaviac::EBTStatus >(); }
inline bool FunctionPointer_HeroAgent_CurrentTargetIsValid(Agent* self) { return ((HeroAgent*)self)->CurrentTargetIsValid(); }
inline bool FunctionPointer_HeroAgent_CurrentTargetMoveCanReach(Agent* self) { return (bool)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_CurrentTargetMoveCanReach, bool >(); }
inline behaviac::EBTStatus FunctionPointer_HeroAgent_DoAttack(Agent* self) { return (behaviac::EBTStatus)((HeroAgent*)self)->_Execute_Method_<METHOD_TYPE_HeroAgent_DoAttack, behaviac::EBTStatus >(); }
@ -102,9 +116,12 @@ namespace behaviac
inline int FunctionPointer_HeroAgent_GetFindEnemyResultTargetUniId(Agent* self) { return ((HeroAgent*)self)->GetFindEnemyResultTargetUniId(); }
inline float FunctionPointer_HeroAgent_GetMasterDistance(Agent* self) { return ((HeroAgent*)self)->GetMasterDistance(); }
inline glm::vec3 FunctionPointer_HeroAgent_GetPos(Agent* self) { return (glm::vec3)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_GetPos, glm::vec3 >(); }
inline float FunctionPointer_HeroAgent_GetSafeAreaRadius(Agent* self) { return ((HeroAgent*)self)->GetSafeAreaRadius(); }
inline bool FunctionPointer_HeroAgent_HasBuffEffect(Agent* self, int buff_effect) { return (bool)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_HasBuffEffect, bool, int >(buff_effect); }
inline bool FunctionPointer_HeroAgent_HasTarget(Agent* self, float range) { return (bool)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_HasTarget, bool, float >(range); }
inline bool FunctionPointer_HeroAgent_IsDead(Agent* self) { return ((HeroAgent*)self)->IsDead(); }
inline bool FunctionPointer_HeroAgent_IsGameOver(Agent* self) { return ((HeroAgent*)self)->IsGameOver(); }
inline bool FunctionPointer_HeroAgent_IsNearGas(Agent* self, float distance) { return (bool)((BaseAgent*)self)->_Execute_Method_<METHOD_TYPE_BaseAgent_IsNearGas, bool, float >(distance); }
inline void FunctionPointer_HeroAgent_LogMessage(char* param0) { HeroAgent::LogMessage(param0); }
inline void FunctionPointer_HeroAgent_OnAttacked(Agent* self, int sender, int time) { } /* OnAttacked */
inline void FunctionPointer_HeroAgent_OnMasterAttackTarget(Agent* self, int target_uniid) { } /* OnMasterAttackTarget */

View File

@ -13,6 +13,15 @@
<property ReferenceBehavior="const string &quot;boss_40101_chase_to_kill&quot;" />
<property Task="Self.BaseAgent::ChaseToKill(int Self.BaseAgent::find_enemy_target_uniid)" />
</node>
<node class="IfElse" id="11">
<node class="Condition" id="12">
<property Operator="Equal" />
<property Opl="Self.BaseAgent::IsNearGas(50)" />
<property Opr="const bool true" />
</node>
<node class="ReferencedBehavior" id="13">
<property ReferenceBehavior="const string &quot;boss_40101_run_gas&quot;" />
</node>
<node class="SelectorProbability" id="2">
<node class="DecoratorWeight" id="3">
<property DecorateWhenChildEnds="false" />
@ -24,7 +33,7 @@
<property TriggerMode="Return" />
</attachment>
<node class="Action" id="4">
<property Method="Self.HeroAgent::DoIdle(3000,4500)" />
<property Method="Self.HeroAgent::DoIdle(1500,3000)" />
<property ResultOption="BT_SUCCESS" />
</node>
</node>
@ -44,4 +53,5 @@
</node>
</node>
</node>
</node>
</behavior>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--EXPORTED BY TOOL, DON'T MODIFY IT!-->
<!--Source File: boss_40101_run_gas.xml-->
<behavior name="boss_40101_run_gas" agenttype="BaseAgent" version="5">
<node class="IfElse" id="0">
<node class="Condition" id="1">
<property Operator="LessEqual" />
<property Opl="Self.BaseAgent::GetSafeAreaRadius()" />
<property Opr="const float 300" />
</node>
<node class="Noop" id="3" />
<node class="Action" id="2">
<property Method="Self.BaseAgent::CoRunGas()" />
<property ResultOption="BT_INVALID" />
</node>
</node>
</behavior>

View File

@ -1,19 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--EXPORTED BY TOOL, DON'T MODIFY IT!-->
<agents version="1" signature="3558395884">
<agent type="BaseAgent" base="behaviac::Agent" signature="3706475328">
<agents version="1" signature="1804086084">
<agent type="BaseAgent" base="behaviac::Agent" signature="2396599608">
<properties>
<property name="find_enemy_target_uniid" type="int" member="false" static="false" defaultvalue="0" />
<property name="selected_skill_id" type="int" member="false" static="false" defaultvalue="0" />
</properties>
</agent>
<agent type="AndroidAgent" base="BaseAgent" signature="683007333">
<agent type="AndroidAgent" base="BaseAgent" signature="1745853881">
<properties>
<property name="find_enemy_target_uniid" type="int" member="false" static="false" defaultvalue="0" />
<property name="selected_skill_id" type="int" member="false" static="false" defaultvalue="0" />
</properties>
</agent>
<agent type="HeroAgent" base="BaseAgent" signature="3786131989">
<agent type="HeroAgent" base="BaseAgent" signature="1118740210">
<properties>
<property name="find_enemy_target_uniid" type="int" member="false" static="false" defaultvalue="0" />
<property name="selected_skill_id" type="int" member="false" static="false" defaultvalue="0" />

View File

@ -43,3 +43,15 @@ glm::vec3& AndroidAgent::AdjustShotDir(glm::vec3& shot_dir)
}
return shot_dir;
}
bool AndroidAgent::IsCrazeMode()
{
return false;
return a8::HasBitFlag(GetOwner()->status, CS_CrazeMode);
}
bool AndroidAgent::IsCrazeModePrepareMode()
{
return false;
return a8::HasBitFlag(GetOwner()->status, CS_CrazeMode);
}

View File

@ -13,6 +13,8 @@ public:
BEHAVIAC_DECLARE_AGENTTYPE(AndroidAgent, BaseAgent)
State_e GetState();
bool IsCrazeMode();
bool IsCrazeModePrepareMode();
behaviac::EBTStatus DoRandomWalk();
behaviac::EBTStatus DoRandomShot();

View File

@ -443,3 +443,28 @@ bool BaseAgent::ShotCanReach(const glm::vec3& target_pos)
abort();
return false;
}
behaviac::EBTStatus BaseAgent::CoShot()
{
return behaviac::BT_FAILURE;
}
bool BaseAgent::IsNearGas(float distance)
{
return GetOwner()->IsNearGas(distance);
}
behaviac::EBTStatus BaseAgent::CoRunGas()
{
return behaviac::BT_FAILURE;
}
float BaseAgent::GetSafeAreaRadius()
{
return 500;
}
bool BaseAgent::IsDead()
{
return GetOwner()->dead;
}

View File

@ -61,6 +61,9 @@ public:
glm::vec3 GetFindEnemyResultTargetPos();
void SetCurrentTarget(int target_uniid);
int GetFindEnemyResultTargetUniId();
bool IsNearGas(float distance);
float GetSafeAreaRadius();
bool IsDead();
behaviac::EBTStatus CoAttackTarget(int target_id);
behaviac::EBTStatus DoIdle(int min_time, int max_time);
@ -72,6 +75,8 @@ public:
behaviac::EBTStatus CoMoveToCurrentTarget(float distance);
behaviac::EBTStatus FindEnemy(float range);
behaviac::EBTStatus DoSkill(int skill_id);
behaviac::EBTStatus CoShot();
behaviac::EBTStatus CoRunGas();
public:
void SetOwner(Creature* owner) { owner_ = owner; };