antidps.py (1444B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\behaviors\trees\miners\antidps.py 2 from behaviors.actions import WaitAction 3 from behaviors.behaviortree import BehaviorTree 4 from behaviors.composites import PrioritySelector 5 from behaviors.const.behaviorroles import ROLE_ANTI_DPS 6 from behaviors.const.blackboardchannels import MY_COMBAT_TARGET 7 from behaviors.trees.combat import CreateTargetSwitchingBehavior, TARGET_SWITCH_TIMER, CreateEntityCombatBehavior 8 from behaviors.trees.regroup import CreateReGroupBehavior 9 from behaviors.trees.reinforcements import CreateReinforceLocationBehavior 10 from behaviors.trees.role import CreateRegisterEntityRole 11 from behaviors.trees.unspawn import CreateUnspawnBehavior 12 from brennivin.itertoolsext import Bundle 13 14 def CreateAntiDpsBehaviorTree(): 15 root = PrioritySelector(Bundle(name='Anti-Dps Tree')) 16 root.AddSubTask(CreateRegisterEntityRole(ROLE_ANTI_DPS)) 17 root.AddSubTask(CreateTargetSwitchingBehavior(targetAddress=MY_COMBAT_TARGET, targetSwitchTimerAddress=TARGET_SWITCH_TIMER)) 18 root.AddSubTask(CreateEntityCombatBehavior(targetAddress=MY_COMBAT_TARGET)) 19 root.AddSubTask(CreateUnspawnBehavior()) 20 root.AddSubTask(CreateReinforceLocationBehavior()) 21 root.AddSubTask(CreateReGroupBehavior()) 22 root.AddSubTask(WaitAction(Bundle(name='Do nothing'))) 23 behaviorTree = BehaviorTree() 24 behaviorTree.StartRootTask(root) 25 return behaviorTree