driftertree.py (3440B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\behaviors\trees\drifters\driftertree.py 2 from behaviors import composites 3 from behaviors.actions.combatnavigation import DEFAULT_COMBAT_ORBIT_RANGE, DEFAULT_COMBAT_ATTACK_RANGE 4 from behaviors.behaviortree import BehaviorTree 5 from behaviors.trees.combat import CreateCombatBehavior, CreateTargetSwitchingBehavior, CreateFriendlyTargetFilterBehavior 6 from behaviors.trees.drifters.drifter_aggression import CreateDrifterEntosisAggressionBehavior 7 from behaviors.trees.explore import CreateExplorationBehavior 8 from behaviors.trees.drifters.idle import CreateIdleBehavior 9 from behaviors.trees.harvesting import CreateHarvestOutpostBehavior 10 from behaviors.trees.incursions.const import DRIFTER_OWNERS 11 from behaviors.trees.pursuit import CreatePursuitBehavior 12 from behaviors.trees.regroup import CreateReGroupBehavior 13 from behaviors.trees.reinforcements import CreateRequestReinforcements 14 from behaviors.trees.drifters.superweapon import CreateSuperWeaponBehavior 15 from behaviors.trees.drifters.disappear import CreateDisappearBehavior 16 from behaviors.trees.corpseharvesting import CreateCorpseHarvestingBehavior 17 from behaviors.trees.corpsedisposal import CreateCorpseDisposalBehavior 18 from brennivin.itertoolsext import Bundle 19 LANDMARK_ARCHETYPE = 2 20 DUNGEON_WORMHOLE = 5643 21 UNIDENTIFIED_STRUCTURE = 5610 22 COMBAT_ORBIT_VELOCITY = 1500 23 24 def CreateDrifterBehaviorTree(): 25 root = composites.PrioritySelector(Bundle(name='Drifter Root')) 26 root.AddSubTask(CreateRequestReinforcements()) 27 root.AddSubTask(CreateSuperWeaponBehavior()) 28 root.AddSubTask(CreateTargetSwitchingBehavior()) 29 root.AddSubTask(CreateDrifterEntosisAggressionBehavior()) 30 root.AddSubTask(CreateFriendlyTargetFilterBehavior(DRIFTER_OWNERS)) 31 root.AddSubTask(CreateCombatBehavior(orbitVelocity=COMBAT_ORBIT_VELOCITY, orbitRange=DEFAULT_COMBAT_ORBIT_RANGE, attackRange=DEFAULT_COMBAT_ATTACK_RANGE)) 32 root.AddSubTask(CreateReGroupBehavior()) 33 root.AddSubTask(CreatePursuitBehavior()) 34 root.AddSubTask(CreateCorpseHarvestingBehavior()) 35 root.AddSubTask(CreateCorpseDisposalBehavior()) 36 root.AddSubTask(CreateExplorationBehavior(dungeonArchetypesOfInterest=[LANDMARK_ARCHETYPE], dungeonsOfInterest=[DUNGEON_WORMHOLE, UNIDENTIFIED_STRUCTURE])) 37 root.AddSubTask(CreateDisappearBehavior()) 38 root.AddSubTask(CreateHarvestOutpostBehavior()) 39 root.AddSubTask(CreateIdleBehavior()) 40 behaviorTree = BehaviorTree() 41 behaviorTree.StartRootTask(root) 42 return behaviorTree 43 44 45 def CreateHiveSystemDrifterBehaviorTree(): 46 root = composites.PrioritySelector(Bundle(name='Drifter Root')) 47 root.AddSubTask(CreateRequestReinforcements()) 48 root.AddSubTask(CreateSuperWeaponBehavior()) 49 root.AddSubTask(CreateTargetSwitchingBehavior()) 50 root.AddSubTask(CreateFriendlyTargetFilterBehavior(DRIFTER_OWNERS)) 51 root.AddSubTask(CreateCombatBehavior(orbitVelocity=COMBAT_ORBIT_VELOCITY, orbitRange=DEFAULT_COMBAT_ORBIT_RANGE, attackRange=DEFAULT_COMBAT_ATTACK_RANGE)) 52 root.AddSubTask(CreateReGroupBehavior()) 53 root.AddSubTask(CreateCorpseHarvestingBehavior()) 54 root.AddSubTask(CreateExplorationBehavior(dungeonArchetypesOfInterest=[LANDMARK_ARCHETYPE], dungeonsOfInterest=[DUNGEON_WORMHOLE, UNIDENTIFIED_STRUCTURE])) 55 root.AddSubTask(CreateIdleBehavior()) 56 behaviorTree = BehaviorTree() 57 behaviorTree.StartRootTask(root) 58 return behaviorTree