# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 loltart <lo1tartyt@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later



# Normal Traitor Objectives

- type: entity
  abstract: true
  parent: BaseObjective
  id: BaseCorporateObjective
  components:
  - type: Objective
    issuer: objective-issuer-syndicate
  - type: RoleRequirement
    roles:
    - TraitorRole

- type: entity
  abstract: true
  parent: [BaseCorporateObjective, BaseSocialObjective]
  id: BaseCorporateSocialObjective
  components:
  - type: Objective
    icon:
      sprite: Objects/Misc/folders.rsi
      state: folder-white
  - type: MultipleTraitorsRequirement

- type: entity
  abstract: true
  parent: [BaseCorporateObjective, BaseStealObjective]
  id: BaseCorporateStealObjective
  components:
  - type: StealCondition
    verifyMapExistence: false
  - type: Objective
    difficulty: 2.75
  - type: ObjectiveLimit
    limit: 2 # there is usually only 1 of each steal objective, have 2 max for drama

# state

- type: entity
  parent: [BaseCorporateObjective, BaseLivingObjective]
  id: CorporateEscapeShuttleObjective
  name: Escape to centcomm alive and unrestrained.
  description: One of our undercover agents will debrief you when you arrive on the evacuation shuttle. Don't show up in cuffs.
  components:
  - type: Objective
    difficulty: 1
    icon:
      sprite: Structures/Furniture/chairs.rsi
      state: shuttle
  - type: EscapeShuttleCondition

#- type: entity
#  parent: BaseCorporateObjective
#  id: CorporateDieObjective
#  name: Die a glorious death
#  description: Die.
#  components:
#  - type: Objective
#    difficulty: 0.5
#    icon:
#      sprite: Mobs/Ghosts/ghost_human.rsi
#      state: icon
#  - type: ObjectiveBlacklistRequirement
#    blacklist:
#      components:
#      - EscapeShuttleCondition
#      - StealCondition
#  - type: DieCondition

- type: entity
  parent: [BaseCorporateObjective, BaseLivingObjective]
  id: CorporateHijackShuttleObjective
  name: Hijack emergency shuttle
  description: The crew has witnessed something they shouldn't have. Leave on the shuttle free and clear of any Nanotrasen crew. Use ANY methods available to you. Make sure no one escapes to spread word of what happened here. Ignore assistance from anyone other than a support agent.
  components:
    - type: Objective
      difficulty: 5 # insane, default config max difficulty
      icon:
        sprite: Objects/Tools/emag.rsi
        state: icon
    - type: HijackShuttleCondition

# kill

- type: entity
  parent: [BaseCorporateObjective, BaseKillObjective]
  id: CorporateKillRandomPersonObjective
  description: They are suspected of being a Traitor. Do it however you like, just make sure they don't get off the station.
  components:
  - type: Objective
    difficulty: 1.75
    unique: false
  - type: TargetObjective
    title: objective-condition-maroon-person-title
  - type: PickRandomPerson
  - type: KillPersonCondition
    requireMaroon: true

- type: entity
  parent: [BaseCorporateObjective, BaseKillObjective]
  id: CorporateKillRandomHeadObjective
  description: They've spoken out against us one too many times. Make them disappear. Good luck, agent.
  components:
  - type: Objective
    # technically its still possible for KillRandomPersonObjective to roll a head but this is guaranteed, so higher difficulty
    difficulty: 3.0
    # killing 1 head is enough
    unique: true
  - type: TargetObjective
    title: objective-condition-kill-maroon-title
  - type: PickRandomHead
  - type: KillPersonCondition
    # don't count missing evac as killing as heads are higher profile, so you really need to do the dirty work
    # if ce flies a shittle to centcom you better find a way onto it
    requireDead: true
    requireMaroon: true

# social

- type: entity
  parent: [BaseCorporateSocialObjective, BaseKeepAliveObjective]
  id: RandomCorporateAliveObjective
  description: They're of interest to us. Make sure they survive.
  components:
  - type: Objective
    difficulty: 1.75
  - type: TargetObjective
    title: objective-condition-other-traitor-alive-title
  - type: RandomTraitorAlive

- type: entity
  parent: [BaseCorporateSocialObjective, BaseHelpProgressObjective]
  id: RandomCorporateProgressObjective
  description: We've signed a pretty good deal with their employer. Help them out with their work and you'll get a nice bonus.
  components:
  - type: Objective
    difficulty: 2.5
  - type: TargetObjective
    title: objective-condition-other-traitor-progress-title
  - type: RandomTraitorProgress

# steal

## cmo

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

- type: entity
  parent: CorporateBaseCMOStealObjective
  id: CorporateCMOHyposprayStealObjective
  components:
  - type: StealCondition
    stealGroup: Hypospray

#- type: entity # Goobstation - made this public
#  parent: BaseCMOStealObjective
#  id: CMOCrewMonitorStealObjective
#  components:
#  - type: StealCondition
#    stealGroup: HandheldCrewMonitor

## rd

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

- type: entity
  parent: CorporateBaseRDStealObjective
  id: CorporateRDHardsuitStealObjective
  components:
  - type: StealCondition
    stealGroup: ClothingOuterHardsuitRd
  - type: Objective
    # This item must be worn or stored in a slowing duffelbag, very hard to hide.
    difficulty: 3

- type: entity
  parent: CorporateBaseRDStealObjective
  id: CorporateHandTeleporterStealObjective
  components:
  - type: StealCondition
    stealGroup: HandTeleporter

## warden

- type: entity
  parent: BaseCorporateStealObjective
  id: CorporateEnergyShotgunStealObjective
  components:
  - type: Objective
    # Warden will have this on them a lot of the time so..
    difficulty: 3
  - type: NotJobRequirement
    job: Warden # Goob edit
  - type: StealCondition
    stealGroup: WeaponEnergyShotgun
    owner: job-name-warden # Goob edit

## ce

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

- type: entity
  parent: CorporateBaseCEStealObjective
  id: CorporateMagbootsStealObjective
  components:
  - type: StealCondition
    stealGroup: ClothingShoesBootsMagAdv

## qm

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

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

## hop

- type: entity
  parent: BaseCorporateStealObjective
  id: CorporateCorgiMeatStealObjective
  components:
  - type: NotJobRequirement
    job: HeadOfPersonnel
  - type: ObjectiveLimit
    limit: 3 # ian only has 2 slices, 3 obj for drama
  - type: StealCondition
    stealGroup: FoodMeatCorgi
    owner: objective-condition-steal-Ian

## cap

- type: entity
  abstract: true
  parent: BaseCorporateStealObjective
  id: CorporateBaseCaptainObjective
  components:
  - type: Objective
    # sorry ce but your jordans are not as high security as the caps gear
    difficulty: 3.5
  - type: NotJobRequirement
    job: Captain

- type: entity
  parent: CorporateBaseCaptainObjective
  id: CorporateCaptainIDStealObjective
  components:
  - type: StealCondition
    stealGroup: CaptainIDCard

- type: entity
  parent: CorporateBaseCaptainObjective
  id: CorporateCaptainJetpackStealObjective
  components:
  - type: StealCondition
    stealGroup: JetpackCaptainFilled

- type: entity
  parent: CorporateBaseCaptainObjective
  id: CorporateCaptainGunStealObjective
  components:
  - type: StealCondition
    stealGroup: WeaponAntiqueLaser
    owner: job-name-captain

- type: entity
  parent: CorporateBaseCaptainObjective
  id: CorporateNukeDiskStealObjective
  components:
  - type: Objective
    # high difficulty since the hardest item both to steal, and to not get caught down the road,
    # since anyone with a pinpointer can track you down and kill you
    # it's close to being a stealth loneop
    difficulty: 4
  - type: StealCondition
    stealGroup: NukeDisk
    owner: objective-condition-steal-station


# GOOB SPECIFIC

    # random alive traitor
- type: entity
  parent: [BaseCorporateObjective, BaseKillObjective]
  id: CorporatePermaKillRandomTraitorObjective
  description: Do it however you like, as long as they're not breathing anymore.
  components:
  - type: Objective
    difficulty: 2.5 # Most cases tots are armed themselves so have fun
    unique: false
  - type: TargetObjective
    title: objective-condition-pkill-person
  - type: PickRandomTraitor
  - type: KillPersonCondition
    requireDead: true
  - type: MultipleTraitorsRequirement

# random person
# This is a separate objective to prevent metagaming by having a different condition for killing traitors, by also requiring you just kill someone entirely
- type: entity
  parent: [BaseCorporateObjective, BaseKillObjective]
  id: CorporatePermaKillRandomPersonObjective
  description: Do it however you like, as long as they're not breathing anymore.
  components:
  - type: Objective
    difficulty: 1.75
    unique: false
  - type: TargetObjective
    title: objective-condition-pkill-person
  - type: PickRandomPerson
  - type: KillPersonCondition
    requireDead: true

# Protect

# another traitor's target
# Note: The possibility of having both protect and kill objectives on the same person is intentional
# to cause kino situations where the traitor kills the person they were protecting at the end of the round
#- type: entity
#  parent: [BaseCorporateSocialObjective, BaseKeepAliveObjective]
#  id: CorporateRandomTraitorTargetAliveObjective
#  description: Rival agents intend to assassinate this target. Identify yourself at your own risk.
#  components:
#  - type: Objective
#    difficulty: 1 # This can be either protect HoS (objective solves itself) or having some tider die in maints silently. Difficulty is set to 1 to have other objectives.
#  - type: TargetObjective
#    title: objective-condition-traitor-target-alive-title
#  - type: RandomTraitorTarget
#  - type: MultipleTraitorsRequirement

# Steal

- type: entity
  categories: [ HideSpawnMenu ]
  parent: BaseCorporateStealObjective
  id: CorporateStealSupermatterSliverObjective
  components:
  - type: Objective
    difficulty: 3.5
  - type: NotJobRequirement
    job: ChiefEngineer
  - type: StealCondition
    verifyMapExistence: true
    stealGroup: SupermatterSliver
    objectiveNoOwnerText: objective-condition-steal-smsliver-title
    descriptionText: objective-condition-steal-smsliver-description

- type: entity
  parent: BaseCorporateStealObjective
  id: CorporateLawbringerStealObjective
  components:
  - type: Objective
    # HoS will have this on them a lot of the time so..
    difficulty: 3
  - type: NotJobRequirement
    job: HeadOfSecurity
  - type: StealCondition
    stealGroup: WeaponEnergyGunLawbringer
    owner: job-name-hos

- type: entity
  parent: CorporateBaseCMOStealObjective
  id: CorporateCMORapidSyringeGunStealObjective
  components:
  - type: StealCondition
    stealGroup: RapidSyringeGun
  - type: Objective
    difficulty: 3 # Slightly more than normal as it does not fit into storage implant

- type: entity
  parent: CorporateBaseRDStealObjective
  id: CorporateGeminiProjectorStealObjective
  components:
  - type: NotJobRequirement
    job: ResearchDirector
  - type: StealCondition
    stealGroup: ClothingBeltGeminiHoloProjector
    descriptionText: objective-condition-steal-gemini-projector-description
  - type: Objective
    # This bad boy is LITERALLY directly screwed into the RDs spinal cord. Good luck!
    difficulty: 3.5
