# SPDX-FileCopyrightText: 2023 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 AJCM <AJCM@tutanota.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 keronshb <54602815+keronshb@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  parent: BaseAction
  id: ActionBlink
  name: Blink
  description: Teleport to the clicked location.
  components:
  - type: Action
    useDelay: 10
    itemIconStyle: BigAction
    sound: !type:SoundPathSpecifier
      path: /Audio/Magic/blink.ogg
    icon:
      sprite: Objects/Magic/magicactions.rsi
      state: blink
  - type: TargetAction
    range: 16 # default examine-range.
    # ^ should probably add better validation that the clicked location is on the users screen somewhere,
    repeat: false
    checkCanAccess: false
  - type: WorldTargetAction
    event: !type:TeleportSpellEvent

# TODO: Second level upgrade sometime that allows swapping with all objects
#- type: entity
#  parent: BaseEntitySpellAction
#  id: ActionVoidApplause
#  name: Void Applause
#  description: Clap your hands and swap places with the target.
#  components:
#  - type: Action
#    useDelay: 15
#    sound: !type:SoundPathSpecifier
#      path: /Audio/Magic/Eldritch/voidblink.ogg
#    icon:
#      sprite: Objects/Magic/Eldritch/eldritch_actions.rsi
#      state: voidblink
#  - type: TargetAction
#    checkCanAccess: false
#    repeat: false
#    range: 16
#  - type: EntityTargetAction
#    event: !type:VoidApplauseSpellEvent
#      effect: EffectVoidBlink
