game2006/server/bin/exported/task/ChaseToKill.xml
aozhiwei 958b62c93c 1
2023-11-15 14:25:40 +08:00

413 lines
21 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<!--EXPORTED BY TOOL, DON'T MODIFY IT!-->
<!--Source File: task\ChaseToKill.xml-->
<behavior name="task/ChaseToKill" agenttype="HeroAgent" version="5">
<pars>
<par name="_$local_task_param_$_0" type="int" value="0" />
<par name="_$local_task_param_$_1" type="int" value="0" />
<par name="_$local_task_param_$_2" type="int" value="0" />
</pars>
<node class="Task" id="0">
<property Prototype="Self.HeroAgent::ChaseToKill(0,0,0)" />
<property IsHTN="false" />
<node class="Sequence" id="1">
<node class="Assignment" id="2">
<property CastRight="false" />
<property Opl="int Self.HeroAgent::_$local_task_param_$_0" />
<property Opr="const int 0" />
</node>
<node class="Action" id="7">
<property Method="Self.HeroAgent::ResetShotTimes()" />
<property ResultOption="BT_SUCCESS" />
</node>
<node class="Action" id="8">
<property Method="Self.HeroAgent::ResetUseSkillTimes()" />
<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="NotEqual" />
<property Opl="Self.HeroAgent::IsDead()" />
<property Opr2="const bool true" />
<property Phase="Both" />
</attachment>
<attachment class="Precondition" id="5" flag="precondition">
<property BinaryOperator="And" />
<property Operator="Equal" />
<property Opl="current_target_agent.TargetAgent::IsValid()" />
<property Opr2="const bool true" />
<property Phase="Both" />
</attachment>
<node class="Sequence" id="6">
<node class="Selector" id="108">
<node class="ReferencedBehavior" id="106">
<property ReferenceBehavior="const string &quot;task/Pickup&quot;" />
<property Task="Self.HeroAgent::PickupItem(0,0,{x=0;y=0;z=0;})" />
</node>
<node class="True" id="107" />
</node>
<node class="Selector" id="100">
<node class="IfElse" id="9">
<node class="Condition" id="10">
<property Operator="Equal" />
<property Opl="Self.HeroAgent::TargetInShotRange()" />
<property Opr="const bool true" />
</node>
<node class="IfElse" id="11">
<node class="Sequence" id="77">
<node class="Action" id="80">
<property Method="Self.HeroAgent::DebugOut(&quot;ddddd可射击嘛&quot;,0,0,0)" />
<property ResultOption="BT_INVALID" />
</node>
<node class="Action" id="12">
<property Method="Self.HeroAgent::CoShotCurrentTargetRaycast()" />
<property ResultOption="BT_INVALID" />
</node>
<node class="Or" id="84">
<node class="And" id="68">
<node class="Condition" id="78">
<property Operator="Equal" />
<property Opl="current_target_agent.TargetAgent::HasBuffEffect(kBET_InGrass)" />
<property Opr="const bool false" />
</node>
<node class="Condition" id="79">
<property Operator="Equal" />
<property Opl="current_target_agent.TargetAgent::HasBuffEffect(kBET_Hide)" />
<property Opr="const bool false" />
</node>
</node>
<node class="And" id="85">
<node class="Or" id="86">
<node class="Condition" id="87">
<property Operator="Equal" />
<property Opl="current_target_agent.TargetAgent::HasBuffEffect(kBET_InGrass)" />
<property Opr="const bool true" />
</node>
<node class="Condition" id="88">
<property Operator="Equal" />
<property Opl="current_target_agent.TargetAgent::HasBuffEffect(kBET_Hide)" />
<property Opr="const bool true" />
</node>
</node>
<node class="Condition" id="89">
<property Operator="LessEqual" />
<property Opl="Self.HeroAgent::GetTargetManhattanDistance()" />
<property Opr="const float 80" />
</node>
</node>
</node>
</node>
<node class="IfElse" id="13">
<node class="Condition" id="14">
<property Operator="Equal" />
<property Opl="Self.HeroAgent::HasUseableSkill()" />
<property Opr="const bool true" />
</node>
<node class="Sequence" id="15">
<node class="Action" id="83">
<property Method="Self.HeroAgent::DebugOut(&quot;ddddd发技能&quot;,0,0,0)" />
<property ResultOption="BT_INVALID" />
</node>
<node class="ReferencedBehavior" id="38">
<property ReferenceBehavior="Self.HeroAgent::GetSkillBtFile()" />
</node>
</node>
<node class="IfElse" id="26">
<node class="Condition" id="27">
<property Operator="Equal" />
<property Opl="Self.HeroAgent::CanShot()" />
<property Opr="const bool false" />
</node>
<node class="IfElse" id="36">
<node class="True" id="22" />
<node class="Sequence" id="17">
<node class="Action" id="76">
<property Method="Self.HeroAgent::DebugOut(&quot;ddddd要战斗走位了&quot;,0,0,0)" />
<property ResultOption="BT_INVALID" />
</node>
<node class="Condition" id="28">
<property Operator="Equal" />
<property Opl="Self.HeroAgent::IsMoving()" />
<property Opr="const bool false" />
</node>
<node class="ReferencedBehavior" id="29">
<property ReferenceBehavior="const string &quot;task/BattleMove&quot;" />
<property Task="Self.HeroAgent::BattleMove({x=0;y=0;z=0;})" />
</node>
</node>
<node class="Sequence" id="81">
<node class="Action" id="82">
<property Method="Self.HeroAgent::DebugOut(&quot;ddddd空操作1&quot;,0,0,0)" />
<property ResultOption="BT_INVALID" />
</node>
<node class="Noop" id="37" />
</node>
</node>
<node class="IfElse" id="33">
<node class="False" id="34" />
<node class="Sequence" id="90">
<node class="Action" id="91">
<property Method="Self.HeroAgent::DebugOut(&quot;ddddd空操作2&quot;,0,0,0)" />
<property ResultOption="BT_INVALID" />
</node>
<node class="Noop" id="35" />
</node>
<node class="Sequence" id="16">
<node class="Action" id="75">
<property Method="Self.HeroAgent::DebugOut(&quot;ddddd要射击了&quot;,0,0,0)" />
<property ResultOption="BT_INVALID" />
</node>
<node class="Assignment" id="19">
<property CastRight="false" />
<property Opl="glm::vec3 Self.HeroAgent::tmp_point0" />
<property Opr="Self.HeroAgent::GetTargetDir()" />
</node>
<node class="Action" id="20">
<property Method="Self.HeroAgent::SetAttackDir(glm::vec3 Self.HeroAgent::tmp_point0)" />
<property ResultOption="BT_SUCCESS" />
</node>
<node class="Action" id="104">
<property Method="Self.HeroAgent::SetBulletAngleOffset(0,30)" />
<property ResultOption="BT_SUCCESS" />
</node>
<node class="Action" id="18">
<property Method="Self.HeroAgent::ShotNormal(glm::vec3 Self.HeroAgent::tmp_point0)" />
<property ResultOption="BT_SUCCESS" />
</node>
</node>
</node>
</node>
</node>
<node class="IfElse" id="21">
<node class="Condition" id="30">
<property Operator="Less" />
<property Opl="Self.HeroAgent::GetTargetManhattanDistance()" />
<property Opr="const float 80" />
</node>
<node class="Sequence" id="92">
<node class="Action" id="93">
<property Method="Self.HeroAgent::DebugOut(&quot;ddddd不可射击随机走&quot;,0,0,0)" />
<property ResultOption="BT_INVALID" />
</node>
<node class="SelectorProbability" id="97">
<node class="DecoratorWeight" id="98">
<property DecorateWhenChildEnds="false" />
<property Weight="const int 50" />
<node class="ReferencedBehavior" id="31">
<property ReferenceBehavior="const string &quot;task/RandomWalk&quot;" />
<property Task="Self.HeroAgent::RandomWalk(0,0,{x=0;y=0;z=0;})" />
</node>
</node>
<node class="DecoratorWeight" id="99">
<property DecorateWhenChildEnds="false" />
<property Weight="const int 50" />
<node class="ReferencedBehavior" id="96">
<property ReferenceBehavior="const string &quot;task/RandomShot&quot;" />
<property Task="Self.HeroAgent::RandomShot(0,0,{x=0;y=0;z=0;})" />
</node>
</node>
</node>
</node>
<node class="Sequence" id="94">
<node class="Action" id="95">
<property Method="Self.HeroAgent::DebugOut(&quot;ddddd不可射击寻路&quot;,0,0,0)" />
<property ResultOption="BT_INVALID" />
</node>
<node class="ReferencedBehavior" id="32">
<property ReferenceBehavior="const string &quot;function/FnFindPathToTarget&quot;" />
</node>
</node>
</node>
</node>
<node class="ReferencedBehavior" id="24">
<property ReferenceBehavior="const string &quot;function/FnFindPathToTarget&quot;" />
</node>
</node>
<node class="True" id="101" />
</node>
<node class="Action" id="102">
<property Method="Self.HeroAgent::DebugOut(&quot;ddddd是否走逃跑逻辑&quot;,0,0,0)" />
<property ResultOption="BT_INVALID" />
</node>
<node class="IfElse" id="23">
<attachment class="Precondition" id="45" flag="precondition">
<property BinaryOperator="And" />
<property Operator="Equal" />
<property Opl="Self.HeroAgent::IsDead()" />
<property Opr2="const bool false" />
<property Phase="Both" />
</attachment>
<attachment class="Precondition" id="46" flag="precondition">
<property BinaryOperator="And" />
<property Operator="Equal" />
<property Opl="current_target_agent.TargetAgent::IsValid()" />
<property Opr2="const bool true" />
<property Phase="Both" />
</attachment>
<node class="Sequence" id="39">
<attachment class="Precondition" id="51" flag="precondition">
<property BinaryOperator="And" />
<property Operator="LessEqual" />
<property Opl="Self.HeroAgent::GetHPRate()" />
<property Opr2="const float 0.3" />
<property Phase="Both" />
</attachment>
<attachment class="Precondition" id="52" flag="precondition">
<property BinaryOperator="And" />
<property Operator="GreaterEqual" />
<property Opl="current_target_agent.TargetAgent::GetHPRate()" />
<property Opr2="const float 0.33" />
<property Phase="Both" />
</attachment>
<node class="Condition" id="49">
<property Operator="Greater" />
<property Opl="Self.HeroAgent::GetAliveEnemyNum()" />
<property Opr="const int 1" />
</node>
<node class="Condition" id="50">
<property Operator="Greater" />
<property Opl="Self.HeroAgent::GetSafeAreaRadius()" />
<property Opr="const float 350" />
</node>
</node>
<node class="ReferencedBehavior" id="40">
<property ReferenceBehavior="const string &quot;task/RunAway&quot;" />
<property Task="Self.HeroAgent::RunAway({x=0;y=0;z=0;})" />
</node>
<node class="Noop" id="41" />
</node>
<node class="Action" id="103">
<property Method="Self.HeroAgent::DebugOut(&quot;ddddd是否走切换目标逻辑&quot;,0,0,0)" />
<property ResultOption="BT_INVALID" />
</node>
<node class="IfElse" id="25">
<attachment class="Precondition" id="47" flag="precondition">
<property BinaryOperator="And" />
<property Operator="Equal" />
<property Opl="Self.HeroAgent::IsDead()" />
<property Opr2="const bool false" />
<property Phase="Both" />
</attachment>
<attachment class="Precondition" id="48" flag="precondition">
<property BinaryOperator="And" />
<property Operator="Equal" />
<property Opl="current_target_agent.TargetAgent::IsValid()" />
<property Opr2="const bool true" />
<property Phase="Both" />
</attachment>
<attachment class="Precondition" id="55" flag="precondition">
<property BinaryOperator="And" />
<property Operator="Greater" />
<property Opl="Self.HeroAgent::GetAliveEnemyNum()" />
<property Opr2="const int 1" />
<property Phase="Both" />
</attachment>
<attachment class="Precondition" id="56" flag="precondition">
<property BinaryOperator="And" />
<property Operator="Greater" />
<property Opl="Self.HeroAgent::GetSafeAreaRadius()" />
<property Opr2="const float 350" />
<property Phase="Both" />
</attachment>
<node class="Selector" id="42">
<node class="Condition" id="53">
<property Operator="Greater" />
<property Opl="Self.HeroAgent::GetLastAttackPassTime()" />
<property Opr="Self.BaseAgent::RandRange(5000,8000)" />
</node>
<node class="Condition" id="54">
<property Operator="Equal" />
<property Opl="Self.HeroAgent::TargetInRange(550)" />
<property Opr="const bool false" />
</node>
</node>
<node class="Action" id="43">
<property Method="current_target_agent.TargetAgent::Abandon(2,3)" />
<property ResultOption="BT_SUCCESS" />
</node>
<node class="Noop" id="44" />
</node>
<node class="IfElse" id="57">
<attachment class="Precondition" id="58" flag="precondition">
<property BinaryOperator="And" />
<property Operator="Equal" />
<property Opl="Self.HeroAgent::IsDead()" />
<property Opr2="const bool false" />
<property Phase="Both" />
</attachment>
<attachment class="Precondition" id="59" flag="precondition">
<property BinaryOperator="And" />
<property Operator="Equal" />
<property Opl="current_target_agent.TargetAgent::IsValid()" />
<property Opr2="const bool true" />
<property Phase="Both" />
</attachment>
<attachment class="Precondition" id="60" flag="precondition">
<property BinaryOperator="And" />
<property Operator="Equal" />
<property Opl="Self.HeroAgent::HasNewAttacker()" />
<property Opr2="const bool true" />
<property Phase="Both" />
</attachment>
<node class="Sequence" id="69">
<node class="Condition" id="73">
<property Operator="Less" />
<property Opl="Self.BaseAgent::RandRange(1,100)" />
<property Opr="const int 30" />
</node>
<node class="Condition" id="63">
<property Operator="Equal" />
<property Opl="Self.HeroAgent::NewAttackerIsHuman()" />
<property Opr="const bool true" />
</node>
<node class="Condition" id="70">
<property Operator="Greater" />
<property Opl="current_target_agent.TargetAgent::GetHPRate()" />
<property Opr="const float 0.6" />
</node>
<node class="Condition" id="74">
<property Operator="Greater" />
<property Opl="Self.HeroAgent::GetNewAttackerPassTime()" />
<property Opr="const int 200" />
</node>
<node class="Condition" id="62">
<property Operator="Less" />
<property Opl="Self.HeroAgent::GetNewAttackerPassTime()" />
<property Opr="const int 2000" />
</node>
<node class="Condition" id="67">
<property Operator="Equal" />
<property Opl="Self.HeroAgent::GetNewAttackerInRange(350)" />
<property Opr="const bool true" />
</node>
</node>
<node class="Sequence" id="64">
<node class="Assignment" id="72">
<property CastRight="false" />
<property Opl="int Self.HeroAgent::_$local_task_param_$_0" />
<property Opr="const int 0" />
</node>
<node class="Action" id="65">
<property Method="Self.HeroAgent::ResetShotTimes()" />
<property ResultOption="BT_SUCCESS" />
</node>
<node class="Action" id="66">
<property Method="Self.HeroAgent::ResetShotTimes()" />
<property ResultOption="BT_SUCCESS" />
</node>
<node class="Action" id="71">
<property Method="Self.HeroAgent::SwitchToNewAttacker()" />
<property ResultOption="BT_SUCCESS" />
</node>
</node>
<node class="Noop" id="61" />
</node>
</node>
</node>
</node>
</node>
</behavior>