# SPDX-FileCopyrightText: 2023 Colin-Tel <113523727+Colin-Tel@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Kira Bridgeton <161087999+Verbalase@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 PoTeletubby <ajcraigaz@gmail.com>
# SPDX-FileCopyrightText: 2024 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# OBJECTIVE STYLE
# in comments anything that says final prototype means the objective that isnt abstract.
# you dont need noSpawn because Objectives category is automatically added, which has hideSpawnmenu
# components are listed in this order:
# 1. Objective
# 2. requirement components
# 3. non-condition components
# 4. the condition component

# all objectives should inherit this at some point
# then have its icon etc fields set in the final objective prototypes
- type: entity
  abstract: true
  id: BaseObjective
  components:
  - type: Objective

# requires that the player not have a die objective
- type: entity
  abstract: true
  parent: BaseObjective
  id: BaseLivingObjective
  components:
  - type: ObjectiveBlacklistRequirement
    blacklist:
      components:
      - DieCondition

# objective that targets a player
# final prototype must specify the title locale id in TargetObjective
- type: entity
  abstract: true
  parent: BaseObjective
  id: BaseTargetObjective
  components:
  - type: TargetObjective

# requires that the player kill someone
# disables social objectives and is disabled by social objectives
- type: entity
  abstract: true
  parent: BaseTargetObjective
  id: BaseKillObjective
  components:
  - type: Objective
    unique: false
    icon:
      sprite: Objects/Weapons/Guns/Pistols/viper.rsi
      state: icon
  - type: ObjectiveBlacklistRequirement
    blacklist:
      components:
      - SocialObjective
  - type: KillPersonCondition

# requires that the player interact socially with someone
# disables kill objectives and is disabled by kill objectives
- type: entity
  abstract: true
  parent: BaseTargetObjective
  id: BaseSocialObjective
  components:
  - type: Objective
    unique: false
  - type: ObjectiveBlacklistRequirement
    blacklist:
      components:
      - KillPersonCondition
  - type: SocialObjective

# requires that the target survives the round
- type: entity
  abstract: true
  parent: BaseSocialObjective
  id: BaseKeepAliveObjective
  components:
  - type: KeepAliveCondition

# requires that the target completes at least 50% of their objectives
- type: entity
  abstract: true
  parent: BaseSocialObjective
  id: BaseHelpProgressObjective
  components:
  - type: HelpProgressCondition

# requires that the player steal an item specified in the final prototype
- type: entity
  abstract: true
  parent: BaseLivingObjective
  id: BaseStealObjective
  components:
  - type: StealCondition
    objectiveNoOwnerText: objective-condition-steal-title-no-owner
    objectiveText: objective-condition-steal-title
    descriptionText: objective-condition-steal-description
    descriptionMultiplyText: objective-condition-thief-multiply-description

# requires that the player not die, ignores being on emergency shuttle or cuffed
- type: entity
  abstract: true
  parent: BaseObjective
  id: BaseSurviveObjective
  components:
  - type: SurviveCondition

# objective progress is controlled by a system and not the objective itself
- type: entity
  abstract: true
  parent: BaseObjective
  id: BaseCodeObjective
  components:
  - type: CodeCondition