# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Armok <155400926+ARMOKS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Errant <35878406+Errant-4@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 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2025 Poips <Hanakohashbrown@gmail.com>
# SPDX-FileCopyrightText: 2025 Solstice <solsticeofthewinter@gmail.com>
# SPDX-FileCopyrightText: 2025 SolsticeOfTheWinter <solsticeofthewinter@gmail.com>
# SPDX-FileCopyrightText: 2025 Theodore Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 grub <unalterableness@gmail.com>
# SPDX-FileCopyrightText: 2025 gus <august.eymann@gmail.com>
# SPDX-FileCopyrightText: 2025 shityaml <unalterableness@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  parent: BaseGameRule
  id: LoneAbductorSpawn
  components:
  - type: StationEvent
    earliestStart: 15
    reoccurrenceDelay: 45
    weight: 3 # Goobstation - 7.5 -> 3
    minimumPlayers: 10
    duration: null # Goobstation - chud
    chaos:
      Hostile: 75
      Medical: 75
    eventType: HostilesSpawn
  - type: GameRule
    chaosScore: 100
  - type: RuleGrids
  - type: LoadMapRule
    mapPath: /Maps/_Shitmed/Shuttles/ShuttleEvent/abductor_shuttle.yml
  - type: AntagObjectives
    objectives:
    - AbductObjective
  - type: AntagLoadProfileRule
    speciesHardOverride: Abductor
  - type: AntagSelection
    definitions:
    - spawnerPrototype: LoneAbductorSpawner
      min: 1
      max: 1
      pickPlayer: false
      startingGear: LoneAbductorGear
      briefing:
        text: abductor-role-greeting
        color: Green
        sound: /Audio/_Shitmed/Misc/abductor.ogg
      components:
      - type: Abductor
      - type: ActionGrant
        actions:
          - ActionReturnToShip
      - type: GhostRole
        name: abductor-lone-ghost-role-name
        description: abductor-lone-ghost-role-desc
        rules: abductors-ghost-role-rules
        mindRoles:
        - MindRoleGhostRoleSoloAntagonist
        raffle:
          settings: default
        requirements:
        - !type:OverallPlaytimeRequirement
          time: 180000 #50 hours
        - !type:DepartmentTimeRequirement
          department: Medical
          time: 7200 #2 hours
        - !type:DepartmentTimeRequirement
          department: Security
          time: 7200 #2 hours
      - type: GhostTakeoverAvailable
      - type: NpcFactionMember
        factions:
          - SimpleHostile
      - type: RandomMetadata
        nameSegments:
          - AbductorScientistPrefix
          - AbductorNames
        nameFormat: name-format-standard
      - type: Tag
        tags:
          - Abductor
          - AbductorScientist
          - CanPilot
          - FootstepSound
          - DoorBumpOpener
      - type: AbductorScientist
      - type: SurgeryIgnoreClothing
      - type: Sanitized
      - type: SurgerySpeedModifier
        speedModifier: 1.5
      mindRoles:
      - MindRoleLoneAbductor

- type: entity
  parent: BaseGameRule
  id: AbductorVictim
  components:
  - type: AbductorVictimRule
  - type: AntagSelection
    definitions:
    - mindRoles:
      - MindRoleAbductorVictim
      briefing:
        text: abductor-victim-role-greeting
        color: Red
        sound: /Audio/_Shitmed/Misc/abducted.ogg
  - type: AntagRandomObjectives
    maxDifficulty: 1
    sets:
    - maxPicks: 1
      groups: AbductorVictimObjectiveGroups

- type: entity
  parent: BaseGameRule
  id: DuoAbductorSpawn
  components:
  - type: StationEvent
    earliestStart: 15
    reoccurrenceDelay: 45
    weight: 3 # Goobstation - 7.5 -> 3
    minimumPlayers: 20
    duration: null # Goobstation - chud
    chaos:
      Hostile: 150
      Medical: 150
    eventType: HostilesSpawn
  - type: GameRule
    chaosScore: 150
  - type: RuleGrids
  - type: LoadMapRule
    mapPath: /Maps/_Shitmed/Shuttles/ShuttleEvent/duo_abductor_shuttle.yml
  - type: AntagObjectives
    objectives:
    - AbductObjective
  - type: AntagLoadProfileRule
    speciesHardOverride: Abductor
  - type: AntagSelection
    definitions:
    - spawnerPrototype: AbductorScientistSpawner
      min: 1
      max: 1
      pickPlayer: false
      startingGear: AbductorScientistGear
      briefing:
        text: abductor-role-greeting
        color: Green
        sound: /Audio/_Shitmed/Misc/abductor.ogg
      components:
      - type: Abductor
      - type: ActionGrant
        actions:
          - ActionReturnToShip
      - type: GhostRole
        name: abductor-scientist-ghost-role-name
        description: abductor-scientist-ghost-role-desc
        rules: abductors-ghost-role-rules
        mindRoles:
        - MindRoleGhostRoleTeamAntagonist
        raffle:
          settings: default
        requirements:
        - !type:OverallPlaytimeRequirement
          time: 180000 #50 hours
        - !type:DepartmentTimeRequirement
          department: Medical
          time: 10800 #3 hours
      - type: GhostTakeoverAvailable
      - type: NpcFactionMember
        factions:
          - SimpleHostile
      - type: RandomMetadata
        nameSegments:
          - AbductorScientistPrefix
          - AbductorNames
        nameFormat: name-format-standard
      - type: Tag
        tags:
          - Abductor
          - AbductorScientist
          - CanPilot
          - FootstepSound
          - DoorBumpOpener
      - type: AbductorScientist
      - type: SurgeryIgnoreClothing
      - type: Sanitized
      - type: SurgerySpeedModifier
        speedModifier: 1.5
      mindRoles:
      - MindRoleAbductorScientist
    - spawnerPrototype: AbductorAgentSpawner
      min: 1
      max: 1
      pickPlayer: false
      startingGear: AbductorAgentGear
      briefing:
        text: abductor-role-greeting
        color: Green
        sound: /Audio/_Shitmed/Misc/abductor.ogg
      components:
      - type: Abductor
      - type: ActionGrant
        actions:
          - ActionReturnToShip
      - type: GhostRole
        name: abductor-agent-ghost-role-name
        description: abductor-agent-ghost-role-desc
        rules: abductors-ghost-role-rules
        mindRoles:
        - MindRoleGhostRoleTeamAntagonist
        raffle:
          settings: default
        requirements:
        - !type:OverallPlaytimeRequirement
          time: 18000 #5 hours
        - !type:DepartmentTimeRequirement
          department: Security
          time: 10800 #3 hours
      - type: GhostTakeoverAvailable
      - type: NpcFactionMember
        factions:
          - SimpleHostile
      - type: RandomMetadata
        nameSegments:
          - AbductorAgentPrefix
          - AbductorNames
        nameFormat: name-format-standard
      - type: Tag
        tags:
          - Abductor
          - CanPilot
          - FootstepSound
          - DoorBumpOpener
      - type: AbductorScientist # Should be removed when we have proper teleportation system
      mindRoles:
      - MindRoleAbductorAgent
