root.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # Specific Root compound tasks being used for NPCs.
  2. # Tries to shoot a target in LOS in range.
  3. - type: htnCompound
  4. id: TurretCompound
  5. branches:
  6. - tasks:
  7. - !type:HTNPrimitiveTask
  8. operator: !type:UtilityOperator
  9. proto: NearbyGunTargets
  10. - !type:HTNPrimitiveTask
  11. preconditions:
  12. - !type:KeyExistsPrecondition
  13. key: Target
  14. - !type:TargetInRangePrecondition
  15. targetKey: Target
  16. # TODO: Non-scuffed
  17. rangeKey: RangedRange
  18. - !type:TargetInLOSPrecondition
  19. targetKey: Target
  20. rangeKey: RangedRange
  21. operator: !type:GunOperator
  22. targetKey: Target
  23. requireLOS: true
  24. services:
  25. - !type:UtilityService
  26. id: RangedService
  27. proto: NearbyGunTargets
  28. key: Target
  29. - tasks:
  30. - !type:HTNCompoundTask
  31. task: IdleSpinCompound
  32. - type: htnCompound
  33. id: EnergyTurretCompound
  34. branches:
  35. - tasks:
  36. - !type:HTNPrimitiveTask
  37. operator: !type:UtilityOperator
  38. proto: NearbyGunTargets
  39. - !type:HTNPrimitiveTask
  40. preconditions:
  41. - !type:KeyExistsPrecondition
  42. key: Target
  43. - !type:TargetInRangePrecondition
  44. targetKey: Target
  45. # TODO: Non-scuffed
  46. rangeKey: RangedRange
  47. - !type:TargetInLOSPrecondition
  48. targetKey: Target
  49. rangeKey: RangedRange
  50. opaqueKey: true
  51. operator: !type:GunOperator
  52. targetKey: Target
  53. opaqueKey: true
  54. services:
  55. - !type:UtilityService
  56. id: RangedService
  57. proto: NearbyGunTargets
  58. key: Target
  59. - tasks:
  60. - !type:HTNCompoundTask
  61. task: IdleSpinCompound
  62. - type: htnCompound
  63. id: SimpleRangedHostileCompound
  64. branches:
  65. - tasks:
  66. - !type:HTNCompoundTask
  67. task: InnateRangedCombatCompound
  68. - tasks:
  69. - !type:HTNCompoundTask
  70. task: MeleeCombatCompound
  71. - tasks:
  72. - !type:HTNCompoundTask
  73. task: IdleCompound
  74. - type: htnCompound
  75. id: SimpleHumanoidHostileCompound
  76. branches:
  77. - tasks:
  78. - !type:HTNCompoundTask
  79. task: RangedCombatCompound
  80. - tasks:
  81. - !type:HTNCompoundTask
  82. task: MeleeCombatCompound
  83. - tasks:
  84. - !type:HTNCompoundTask
  85. task: IdleCompound