# 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-FileCopyrightText: 2025 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <93730715+Aviu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 TheBorzoiMustConsume <197824988+TheBorzoiMustConsume@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  parent: [ BaseItem, BaseMagicalContraband ]
  id: CodexCicatrix
  name: codex cicatrix
  description: This heavy tome is full of cryptic scribbles and impossible diagrams. According to legend, it can be deciphered to reveal the secrets of the veil between worlds.
  components:
  - type: UnholyItem
  - type: Sprite
    sprite: _Goobstation/Heretic/book.rsi
    layers:
    - state: icon
      map: [ "base" ]
  - type: GenericVisualizer
    visuals:
      enum.ToggleAnimationVisuals.ToggleState:
        base:
          On: { state: icon-on }
          Off: { state: icon }
          TogglingOn: { state: icon-opening }
          TogglingOff: { state: icon-closing }
  - type: Item
    size: Small
    sprite: _Goobstation/Heretic/book.rsi
  - type: UseDelay
    delay: 2.0
  - type: Appearance
  - type: ItemToggle
  - type: ComponentToggler
    components:
    - type: HereticMagicItem
    - type: EldritchInfluenceDrainer
    - type: TransmutationRuneScriber
  - type: ItemToggleSize
    activatedSize: Normal
  - type: ToggleAnimation
  - type: EnchantingTool
  - type: Tag
    tags:
    - HereticItem

- type: entity
  parent: [ DrinkBase, BaseMagicalContraband ]
  id: HereticEldritchFlask
  name: eldritch flask
  description: A flask filled with an unknown substance. Who knows what will happen when you take a sip from it.
  components:
  - type: UnholyItem
  - type: Sprite
    sprite: _Goobstation/Heretic/items.rsi
    state: eldritch_flask
  - type: Icon
    sprite: _Goobstation/Heretic/items.rsi
    state: eldritch_flask
  - type: SolutionContainerManager
    solutions:
      drink:
        # it's a cryostasis flash filled with healing goodies what could possibly go wrong?
        # i will certainly not abuse it as a heretic chemist
        maxVol: 100
        canReact: false
        reagents:
        - ReagentId: EldritchEssence
          Quantity: 100
  - type: Tag
    tags:
    - HereticItem

- type: entity
  id: HereticProtectiveBlade
  name: eldritch blade
  description: Maelstrom of razors flashing right before your eyes. Why are you stopping to look at it!?
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    noRot: true
    sprite: _Goobstation/Heretic/items.rsi
    state: protective_blade
  - type: Clickable
  - type: InteractionOutline
  - type: ProtectiveBlade
    lifetime: 60
  - type: Physics
    bodyType: Dynamic
    fixedRotation: false
    angularDamping: 0
    linearDamping: 0
    canCollide: False
  - type: Tag
    tags:
    - FollowerStayOnPolymorph
  - type: Reflect
    reflectProb: 1
    spread: 360
    reflects:
    - Energy
    - NonEnergy
    - Magic

- type: entity
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  id: HereticProtectiveBladeProjectile
  name: eldritch blade
  description: Maelstrom of razors flashing right before your eyes. Why are you stopping to look at it!?
  components:
  - type: Sprite
    sprite: _Goobstation/Heretic/items.rsi
    layers:
    - state: bullet
      shader: unshaded
  - type: Projectile
    impactEffect: BulletImpactEffectKinetic
    ignoreResistances: true
    damage:
      types:
        Slash: 25
        Structural: 100
    soundHit:
      path: /Audio/Weapons/Guns/Hits/bullet_hit.ogg
  - type: Reflective
    reflective: None

- type: entity
  id: Inkofimaginination
  name: Ink of imaginination
  description: Call to the great minimal to bring forth true existence... A closing truth
  parent: BaseItem
  components:
  - type: UnholyItem
  - type: Sprite
    sprite: _Goobstation/Heretic/book.rsi
    state: icon
  - type: Icon
    sprite: _Goobstation/Heretic/book.rsi
    state: icon
  - type: SpawnItemsOnUse
    items:
      - id: EldritchInfluence
      - id: EldritchInfluence
  - type: Tag
    tags:
    - HereticItem

