NovaBryan/EVE_Dump
Log | Files | 📦 下载最新源码 (.zip) | Refs | README

sleeperscouts.py (2572B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\behaviors\trees\sleeperscouts.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.harvesting import CreateHarvestOutpostBehavior
      6 from behaviors.trees.incursions.const import DRIFTER_OWNERS
      7 from behaviors.trees.pursuit import CreatePursuitBehavior
      8 from behaviors.trees.regroup import CreateReGroupBehavior
      9 from behaviors.trees.reinforcements import CreateRequestReinforcements
     10 from behaviors.trees.scoutsidle import CreateIdleBehavior
     11 from behaviors.trees.scoutexplore import CreateExplorationBehavior
     12 from behaviors.trees.combat import CreateCombatBehavior, CreateFriendlyTargetFilterBehavior
     13 from behaviors.trees.corpseharvesting import CreateCorpseHarvestingBehavior
     14 from behaviors.trees.corpsedisposal import CreateCorpseDisposalBehavior
     15 from brennivin.itertoolsext import Bundle
     16 COMBAT_ORBIT_VELOCITY = 600
     17 
     18 def CreateSleeperScoutBehaviorTree():
     19     root = composites.PrioritySelector(Bundle(name='Sleeper Scout Root'))
     20     root.AddSubTask(CreateRequestReinforcements())
     21     root.AddSubTask(CreateFriendlyTargetFilterBehavior(DRIFTER_OWNERS))
     22     root.AddSubTask(CreateCombatBehavior(orbitVelocity=COMBAT_ORBIT_VELOCITY, orbitRange=DEFAULT_COMBAT_ORBIT_RANGE, attackRange=DEFAULT_COMBAT_ATTACK_RANGE))
     23     root.AddSubTask(CreateReGroupBehavior())
     24     root.AddSubTask(CreatePursuitBehavior())
     25     root.AddSubTask(CreateCorpseHarvestingBehavior())
     26     root.AddSubTask(CreateCorpseDisposalBehavior())
     27     root.AddSubTask(CreateExplorationBehavior())
     28     root.AddSubTask(CreateHarvestOutpostBehavior())
     29     root.AddSubTask(CreateIdleBehavior())
     30     behaviorTree = BehaviorTree()
     31     behaviorTree.StartRootTask(root)
     32     return behaviorTree
     33 
     34 
     35 def CreateHiveSystemSleeperScoutBehaviorTree():
     36     root = composites.PrioritySelector(Bundle(name='Sleeper Scout Root'))
     37     root.AddSubTask(CreateRequestReinforcements())
     38     root.AddSubTask(CreateFriendlyTargetFilterBehavior(DRIFTER_OWNERS))
     39     root.AddSubTask(CreateCombatBehavior(orbitVelocity=COMBAT_ORBIT_VELOCITY, orbitRange=DEFAULT_COMBAT_ORBIT_RANGE, attackRange=DEFAULT_COMBAT_ATTACK_RANGE))
     40     root.AddSubTask(CreateReGroupBehavior())
     41     root.AddSubTask(CreateCorpseHarvestingBehavior())
     42     root.AddSubTask(CreateExplorationBehavior())
     43     root.AddSubTask(CreateIdleBehavior())
     44     behaviorTree = BehaviorTree()
     45     behaviorTree.StartRootTask(root)
     46     return behaviorTree