# SPDX-FileCopyrightText: 2024 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 Preston Smith <92108534+thetolbean@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Spatison <137375981+Spatison@users.noreply.github.com>
# 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-FileCopyrightText: 2025 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <93730715+Aviu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <aviu00@protonmail.com>
# SPDX-FileCopyrightText: 2025 BombasterDS <deniskaporoshok@gmail.com>
# SPDX-FileCopyrightText: 2025 BombasterDS2 <shvalovdenis.workmail@gmail.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Ted Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 TheBorzoiMustConsume <197824988+TheBorzoiMustConsume@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 pheenty <fedorlukin2006@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  parent: [ BaseItem, BaseMagicalContraband ]
  id: HereticBladeBaseNoTeleport
  abstract: true
  name: eldritch blade
  description: A sickly green crescent blade, decorated with an ornamental eye. You feel like you're being watched...
  components:
  - type: UnholyItem
  - type: HereticBlade
  - type: Sharp
  - type: Sprite
    sprite: _Goobstation/Heretic/Blades/eldritch_blade.rsi
    state: icon
  - type: Clothing
    quickEquip: false
    slots:
    - Belt
  - type: MeleeWeapon
    wideAnimationRotation: -125
    damage:
      types:
        Slash: 20
      armorPenetration: 0.3
      woundSeverityMultipliers:
        Slash: 1.5
    soundHit:
      path: /Audio/Weapons/bladeslice.ogg
  - type: Item
    size: Normal
    sprite: _Goobstation/Heretic/Blades/eldritch_blade-inhands.rsi
  - type: Scalpel
    speed: 1.5
  - type: BoneSaw
    speed: 1.5
  - type: Tag
    tags:
    - HereticItem
    - HereticBlade

- type: entity
  id: BaseRandomTeleportBlade
  abstract: true
  components:
  - type: RandomTeleport
    radius:
      min: 10
      max: 100

- type: entity
  parent: [ HereticBladeBaseNoTeleport, BaseRandomTeleportBlade ]
  id: HereticBladeBase

- type: entity
  parent: HereticBladeBase
  id: HereticBladeAsh
  name: ashen blade
  description: Molten and unwrought, a hunk of metal warped to cinders and slag. Unmade, it aspires to be more than it is, and shears soot-filled wounds with a blunt edge.
  suffix: Ash
  components:
  - type: HereticBlade
    path: Ash
  - type: Sprite
    sprite: _Goobstation/Heretic/Blades/blade_ash.rsi
    state: icon
  - type: Item
    sprite: _Goobstation/Heretic/Blades/blade_ash-inhand.rsi
  - type: Cautery
    speed: 1.5

- type: entity
  parent: HereticBladeBase
  id: HereticBladeBlade
  name: sundered blade
  description: A galliant blade, sundered and torn. Furiously, the blade cuts. Silver scars bind it forever to its dark purpose.
  suffix: Blade
  components:
  - type: HereticBlade
    path: Blade
  - type: Sprite
    sprite: _Goobstation/Heretic/Blades/blade_blade.rsi
    layers:
    - state: icon
      map: [ "base" ]
  - type: Item
    sprite: _Goobstation/Heretic/Blades/blade_blade-inhand.rsi
  - type: Tag
    tags:
    - HereticItem
    - HereticBlade
    - HereticBladeBlade
  - type: Multihit
    damageMultiplier: 0.75
    multihitWhitelist:
      tags:
      - HereticBladeBlade
    conditions:
    - !type:MultihitUserHereticEvent
      requiredPath: Blade
      minPathStage: 7
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.InfusedBladeVisuals.Infused:
        base:
          False: { state: icon }
          True: { state: infused }

# Ghoul blade (cannot teleport)
- type: entity
  parent: HereticBladeBaseNoTeleport
  id: HereticBladeFleshGhoul
  name: ghoul blade
  description: A crescent blade born from a fleshwarped creature. Keenly aware, it seeks to spread to others the suffering it has endured from its dreadful origins.
  suffix: Flesh ghoul
  components:
  - type: HereticBlade
    path: Flesh
  - type: Sprite
    sprite: _Goobstation/Heretic/Blades/blade_flesh.rsi
    state: icon
  - type: Item
    sprite: _Goobstation/Heretic/Blades/blade_flesh-inhand.rsi

- type: entity
  parent: [HereticBladeFleshGhoul, BaseRandomTeleportBlade]
  id: HereticBladeFlesh
  name: bloody blade
  suffix: Flesh

- type: entity
  parent: HereticBladeBase
  id: HereticBladeLock
  name: key blade
  description: A blade and a key, a key to what? What grand gates does it open?
  suffix: Lock
  components:
  - type: HereticBlade
    path: Lock
  - type: Sprite
    sprite: _Goobstation/Heretic/Blades/blade_lock.rsi
    state: icon
  - type: Item
    sprite: _Goobstation/Heretic/Blades/blade_lock-inhand.rsi

- type: entity
  parent: HereticBladeBase
  id: HereticBladeRust
  name: rusted blade
  description: This crescent blade is decrepit, wasting to rust. Yet still it bites, ripping flesh and bone with jagged, rotten teeth.
  suffix: Rust
  components:
  - type: HereticBlade
    path: Rust
  - type: Sprite
    sprite: _Goobstation/Heretic/Blades/blade_rust.rsi
    state: icon
  - type: Item
    sprite: _Goobstation/Heretic/Blades/blade_rust-inhand.rsi

- type: entity
  parent: HereticBladeBase
  id: HereticBladeVoid
  name: void blade
  description: Devoid of any substance, this blade reflects nothingness. It is a real depiction of purity, and chaos that ensues after its implementation.
  suffix: Void
  components:
  - type: HereticBlade
    path: Void
  - type: Sprite
    sprite: _Goobstation/Heretic/Blades/blade_void.rsi
    state: icon
  - type: Item
    sprite: _Goobstation/Heretic/Blades/blade_void-inhand.rsi

- type: entity
  parent: HereticBladeBase
  id: HereticBladeCosmos
  name: cosmic blade
  description: A mote of celestial resonance, shaped into a star-woven blade. An iridescent exile, carving radiant trails, desperately seeking unification.
  suffix: Cosmos
  components:
  - type: HereticBlade
    path: Cosmos
  - type: Sprite
    sprite: _Goobstation/Heretic/Blades/blade_cosmos.rsi
    state: icon
  - type: Item
    sprite: _Goobstation/Heretic/Blades/blade_cosmos-inhand.rsi
