# SPDX-FileCopyrightText: 2024 Thomas <87614336+Aeshus@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 keronshb <54602815+keronshb@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 ActiveMammmoth <140334666+ActiveMammmoth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <93730715+Aviu00@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  parent: BaseEntitySpellAction
  id: ActionMindSwap
  name: Mind Swap
  description: Exchange bodies with another person!
  components:
  - type: Action
    raiseOnUser: true # Goobstation
    useDelay: 60
    icon:
      sprite: _Goobstation/Wizard/actions.rsi # Goob edit
      state: mindswap # Goob edit
  - type: EntityTargetAction
    # Goob edit start
    canTargetSelf: false
    whitelist:
      requireAll: true
      components:
      - Body
      - MobState
      - MindContainer
    # Goob edit end
    event: !type:MindSwapSpellEvent
      sound: # Goobstation
        path: /Audio/_Goobstation/Wizard/mandswap.ogg
      performerStunDuration: 5 # Goobstation
      targetStunDuration: 5 # Goobstation
  - type: Sprite # Goobstation - for apprentices
    sprite: _Goobstation/Wizard/actions.rsi
    state: mindswap
  - type: Magic # Goobstation
    requiresSpeech: true
    school: Transmutation
  - type: ActionUpgrade
    effectedLevels:
      2: ActionMindSwapII
      3: ActionMindSwapIII
  - type: SpeakOnAction
    sentence: action-speech-spell-mind-swap
