# SPDX-FileCopyrightText: 2024 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Errant <35878406+Errant-4@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 username <113782077+whateverusername0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 whateverusername0 <whateveremail>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Ilya246 <ilyukarno@gmail.com>
# SPDX-FileCopyrightText: 2025 Marcus F <199992874+thebiggestbruh@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 thebiggestbruh <199992874+thebiggestbruh@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  abstract: true
  parent: BaseObjective
  id: BaseChangelingObjective
  components:
  - type: Objective
    difficulty: 0 # forced, guaranteed changeling objectives shouldnt hog difficulty
    issuer: objective-issuer-hivemind

- type: entity
  abstract: true
  parent: BaseObjective
  id: BaseChangelingSyndicateObjective ## the tiger cooperative
  components:
  - type: Objective
    difficulty: 2.5 ## 2 objectives always - kill & steal, kill & kill, steal & steal.
    issuer: objective-issuer-tiger

- type: entity
  parent: [BaseChangelingObjective, BaseSurviveObjective]
  id: ChangelingSurviveObjective
  name: Survive
  description: We must survive no matter what.
  components:
  - type: Objective
    icon:
      sprite: _Goobstation/Changeling/changeling_objectives.rsi
      state: survive

- type: entity
  parent: BaseChangelingObjective
  id: ChangelingAbsorbObjective
  components:
  - type: Objective
    icon:
      sprite: Mobs/Demons/abomination.rsi
      state: dead
  - type: NumberObjective
    min: 4
    max: 6
    title: objective-condition-absorb-title
    description: objective-condition-absorb-description
  - type: AbsorbCondition

- type: entity
  parent: BaseChangelingObjective
  id: ChangelingAbsorbOtherObjective
  components:
  - type: Objective
    difficulty: 2.5 ## special objective, can potentially replace one of the Tiger Cooperative ones
    icon:
      sprite: _Goobstation/Changeling/changeling_objectives.rsi
      state: absorb
  - type: NumberObjective
    min: 1
    max: 2 # good luck
    title: objective-condition-absorb-other-title
    description: objective-condition-absorb-other-description
  - type: AbsorbChangelingCondition

- type: entity
  parent: BaseChangelingObjective
  id: ChangelingStealDNAObjective
  components:
  - type: Objective
    icon:
      sprite: Mobs/Species/Human/organs.rsi
      state: brain
  - type: NumberObjective
    min: 6
    max: 9
    title: objective-condition-stealdna-title
    description: objective-condition-stealdna-description
  - type: StealDNACondition

- type: entity
  parent: BaseChangelingObjective
  id: EscapeIdentityObjective
  description: We need to escape on the evacuation shuttle. Undercover.
  components:
  - type: Objective
    icon:
      sprite: Objects/Magic/magicactions.rsi
      state: blink
  - type: ImpersonateCondition
  - type: TargetObjective
    title: objective-condition-escape-identity-title
  - type: PickRandomPerson
    needsOrganic: true # Don't pick IPCs.
    excludeChangeling: true # if they swap identities its a guarantee fail

- type: entity
  parent: [BaseChangelingSyndicateObjective, BaseStealObjective]
  abstract: true
  id: ChangelingStealObjective
  components:
  - type: StealCondition
    descriptionText: objective-condition-changelingsteal-description
    verifyMapExistence: false

- type: entity
  parent: [BaseChangelingSyndicateObjective, BaseKillObjective]
  id: LingKillRandomHeadObjective
  description: Our worshippers requested we eliminate this high value target.
  components:
  - type: Objective
    unique: true
  - type: TargetObjective
    title: objective-condition-kill-head-title
  - type: PickRandomHead
  - type: KillPersonCondition
    requireDead: true

# below is pretty much 1:1 with traitor steal obj, but adjusted to all have the same difficulty

## cmo

- type: entity
  abstract: true
  parent: ChangelingStealObjective
  id: LingCMOStealObjective
  components:
  - type: NotJobRequirement
    job: ChiefMedicalOfficer
  - type: StealCondition
    owner: job-name-cmo

- type: entity
  parent: LingCMOStealObjective
  id: LingCMOHyposprayStealObjective
  components:
  - type: StealCondition
    stealGroup: Hypospray

- type: entity
  parent: LingCMOStealObjective
  id: LingCMORapidSyringeGunStealObjective
  components:
  - type: StealCondition
    stealGroup: RapidSyringeGun

## rd

- type: entity
  abstract: true
  parent: ChangelingStealObjective
  id: LingRDStealObjective
  components:
  - type: NotJobRequirement
    job: ResearchDirector
  - type: StealCondition
    owner: job-name-rd

- type: entity
  parent: LingRDStealObjective
  id: LingRDHardsuitStealObjective
  components:
  - type: StealCondition
    stealGroup: ClothingOuterHardsuitRd

- type: entity
  parent: LingRDStealObjective
  id: LingHandTeleporterStealObjective
  components:
  - type: StealCondition
    stealGroup: HandTeleporter

## warden

- type: entity
  parent: ChangelingStealObjective
  id: LingEnergyShotgunStealObjective
  components:
  - type: NotJobRequirement
    job: Warden # Goob edit
  - type: StealCondition
    stealGroup: WeaponEnergyShotgun
    owner: job-name-warden # Goob edit

## ce

- type: entity
  abstract: true
  parent: ChangelingStealObjective
  id: LingCEStealObjective
  components:
  - type: NotJobRequirement
    job: ChiefEngineer
  - type: StealCondition
    owner: job-name-ce

- type: entity
  parent: LingCEStealObjective
  id: LingMagbootsStealObjective
  components:
  - type: StealCondition
    stealGroup: ClothingShoesBootsMagAdv

## qm

- type: entity
  parent: ChangelingStealObjective
  id: LingClipboardStealObjective
  components:
  - type: NotJobRequirement
    job: Quartermaster
  - type: StealCondition
    stealGroup: BoxFolderQmClipboard
    owner: job-name-qm

- type: entity
  parent: ChangelingStealObjective
  id: LingKnuckleDustersStealObjective
  components:
  - type: NotJobRequirement
    job: Quartermaster
  - type: StealCondition
    stealGroup: ClothingHandsKnuckleDustersQM
    owner: job-name-qm

## hop

- type: entity
  parent: ChangelingStealObjective
  id: LingCorgiMeatStealObjective
  components:
  - type: NotJobRequirement
    job: HeadOfPersonnel
  - type: StealCondition
    stealGroup: FoodMeatCorgi
    owner: objective-condition-steal-Ian

## cap

- type: entity
  abstract: true
  parent: ChangelingStealObjective
  id: LingCaptainObjective
  components:
  - type: NotJobRequirement
    job: Captain

- type: entity
  parent: LingCaptainObjective
  id: LingCaptainIDStealObjective
  components:
  - type: StealCondition
    stealGroup: CaptainIDCard

- type: entity
  parent: LingCaptainObjective
  id: LingCaptainJetpackStealObjective
  components:
  - type: StealCondition
    stealGroup: JetpackCaptainFilled

- type: entity
  parent: LingCaptainObjective
  id: LingCaptainGunStealObjective
  components:
  - type: StealCondition
    stealGroup: WeaponAntiqueLaser
    owner: job-name-captain

- type: entity
  parent: LingCaptainObjective
  id: LingNukeDiskStealObjective
  components:
  - type: NotCommandRequirement
  - type: StealCondition
    stealGroup: NukeDisk
    owner: objective-condition-steal-station

## misc

- type: entity
  categories: [ HideSpawnMenu ]
  parent: ChangelingStealObjective
  id: LingStealSupermatterSliverObjective
  components:
  - type: StealCondition
    verifyMapExistence: true
    stealGroup: SupermatterSliver
    objectiveNoOwnerText: objective-condition-steal-smsliver-title
    descriptionText: objective-condition-steal-smsliver-description
