# SPDX-FileCopyrightText: 2024 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Armok <155400926+ARMOKS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# 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-License-Identifier: AGPL-3.0-or-later

- type: entity
  parent: BaseAction
  id: ActionHereticVoidBlast
  name: Void Blast
  description: Fire off a cone of ice in front of you.
  categories: [ HideSpawnMenu ]
  components:
  - type: Action
    checkCanInteract: false
    raiseOnUser: true
    useDelay: 15
    itemIconStyle: NoItem
    icon:
      sprite: _Goobstation/Heretic/abilities_heretic.rsi
      state: void_blast
  - type: InstantAction
    event: !type:HereticVoidBlastEvent
  - type: HereticAction
    requireMagicItem: true
    messageLoc: heretic-speech-void-blast

- type: entity
  parent: BaseAction
  id: ActionHereticVoidPhase
  name: Void Phase
  description: Shift through the void, knocking down everyone around you.
  categories: [ HideSpawnMenu ]
  components:
  - type: Action
    checkCanInteract: false
    raiseOnUser: true
    useDelay: 20
    itemIconStyle: NoItem
    icon:
      sprite: _Goobstation/Heretic/abilities_heretic.rsi
      state: void_phase
    sound: !type:SoundPathSpecifier
      path: /Audio/_Goobstation/Heretic/voidblink.ogg
  - type: TargetAction
    checkCanAccess: false
    range: 16
  - type: WorldTargetAction
    event: !type:HereticVoidBlinkEvent
  - type: HereticAction
    requireMagicItem: true
    messageLoc: heretic-speech-void-phase

- type: entity
  parent: BaseAction
  id: ActionHereticVoidPrison
  name: Void Prison
  description: Sends a heathen into the void for 10 seconds. They will be unable to perform any actions for the duration. Afterwards, they will be chilled and returned to the mortal plane.
  categories: [ HideSpawnMenu ]
  components:
  - type: Action
    predicted: false
    checkCanInteract: false
    raiseOnUser: true
    useDelay: 30
    itemIconStyle: NoItem
    icon:
      sprite: _Goobstation/Heretic/abilities_heretic.rsi
      state: voidball
  - type: TargetAction
    range: 3
  - type: EntityTargetAction
    whitelist:
      components:
      - MobState
    canTargetSelf: false
    event: !type:HereticVoidPrisonEvent
  - type: HereticAction
    requireMagicItem: true
    messageLoc: heretic-speech-void-prison

- type: entity
  parent: BaseAction
  id: ActionHereticVoidPull
  name: Void Pull
  description: Calls the void, damaging, knocking down, pulling people closer, and stunning people nearby.
  categories: [ HideSpawnMenu ]
  components:
  - type: Action
    useDelay: 30
    itemIconStyle: NoItem
    checkCanInteract: false
    raiseOnUser: true
    icon:
      sprite: _Goobstation/Heretic/abilities_heretic.rsi
      state: void_pull
    sound: !type:SoundPathSpecifier
      path: /Audio/_Goobstation/Heretic/voidblink.ogg
  - type: InstantAction
    event: !type:HereticVoidPullEvent
  - type: HereticAction
    requireMagicItem: true
    messageLoc: heretic-speech-void-pull

- type: entity
  parent: BaseAction
  id: ActionHereticVoidConduit
  name: Void Conduit
  description: Opens a gate to the Void; it releases an intermittent pulse that damages windows and airlocks, while afflicting Heathens with void chill. Affected Heretics instead receive low pressure resistance.
  categories: [ HideSpawnMenu ]
  components:
  - type: Action
    useDelay: 60
    itemIconStyle: NoItem
    checkCanInteract: false
    raiseOnUser: true
    icon:
      sprite: _Goobstation/Heretic/abilities_heretic.rsi
      state: void_rift
  - type: InstantAction
    event: !type:HereticVoidConduitEvent
  - type: HereticAction
    requireMagicItem: true
    messageLoc: heretic-speech-void-conduit
