# SPDX-FileCopyrightText: 2022 Kara <lunarautomaton6@gmail.com>
# 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 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 CatMagic <135462166+CatMagic1@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kira Bridgeton <161087999+Verbalase@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 PoTeletubby <108604614+PoTeletubby@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 PoTeletubby <ajcraigaz@gmail.com>
# SPDX-FileCopyrightText: 2024 keronshb <54602815+keronshb@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-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 J <billsmith116@gmail.com>
# SPDX-FileCopyrightText: 2025 OnsenCapy <101037138+OnsenCapy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 SX-7 <sn1.test.preria.2002@gmail.com>
# SPDX-FileCopyrightText: 2025 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  parent: BaseAction
  id: ActionFireball
  name: Fireball
  description: Fires an explosive fireball towards the clicked location.
  components:
  - type: Magic
    requiresSpeech: true # Goobstation
    school: Explosion # Goobstation
  - type: Sprite # Goobstation - for apprentices
    sprite: _Goobstation/Wizard/actions.rsi
    state: fireball
  - type: Action
    useDelay: 6
    itemIconStyle: BigAction
    raiseOnUser: true
    sound: !type:SoundPathSpecifier
      path: /Audio/Magic/fireball.ogg
    icon:
      sprite: _Goobstation/Wizard/actions.rsi # Goob edit
      state: fireball # Goob edit
  - type: TargetAction
    range: 60
    checkCanAccess: false
  - type: EntityTargetAction # Goobstation
    canTargetSelf: false
  - type: WorldTargetAction
    event: !type:ProjectileSpellEvent
      prototype: ProjectileFireball
      speed: 20
  - type: SpeakOnAction
    sentence: action-speech-spell-fireball
  - type: ActionUpgrade
    effectedLevels:
      2: ActionFireballII
      3: ActionFireballIII

- type: entity
  parent: ActionFireball
  id: ActionFireballII
  name: Fireball II
  description: Fires a fireball, but faster!
  components:
  - type: Action
    useDelay: 4

- type: entity
  parent: ActionFireball
  id: ActionFireballIII
  name: Fireball III
  description: The fastest fireball in the west!
  components:
  - type: Action
    useDelay: 2
