# SPDX-FileCopyrightText: 2023 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
#
# SPDX-License-Identifier: MIT

- type: htnCompound
  id: RatServantCompound
  branches:
  - preconditions:
      - !type:HasOrdersPrecondition
        orders: enum.RatKingOrderType.Stay
    tasks:
      - !type:HTNCompoundTask
        task: IdleCompound
  - preconditions:
      - !type:HasOrdersPrecondition
        orders: enum.RatKingOrderType.Follow
    tasks:
      - !type:HTNCompoundTask
        task: FollowCompound
  - preconditions:
      - !type:HasOrdersPrecondition
        orders: enum.RatKingOrderType.CheeseEm
    tasks:
      - !type:HTNCompoundTask
        task: RatServantTargetAttackCompound
  - preconditions:
      - !type:HasOrdersPrecondition
        orders: enum.RatKingOrderType.Loose
    tasks:
      - !type:HTNCompoundTask
        task: SimpleHostileCompound
