# 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 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Armok <155400926+ARMOKS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <93730715+Aviu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <aviu00@protonmail.com>
# SPDX-FileCopyrightText: 2025 BombasterDS <115770678+BombasterDS@users.noreply.github.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 Spatison <137375981+Spatison@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Ted Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 TheBorzoiMustConsume <197824988+TheBorzoiMustConsume@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  parent: [ ClothingOuterStorageToggleableBase, AllowSuitStorageClothing, BaseMagicalContraband ]
  id: ClothingOuterArmorHeretic
  name: ominous armor
  description: A ragged, dusty set of robes. Strange eyes line the inside.
  components:
  - type: UnholyItem
  - type: Sprite
    sprite: _Goobstation/Heretic/Clothing/OuterClothing/eldritch_armor.rsi
    state: icon
  - type: Clothing
    sprite: _Goobstation/Heretic/Clothing/OuterClothing/eldritch_armor.rsi
  - type: Armor
    coverage:
    - Chest
    - Groin
    - Arm
    - Hand
    - Leg
    - Foot
    - Tail
    modifiers:
      coefficients:
        Blunt: 0.5
        Slash: 0.5
        Piercing: 0.5
        Heat: 0.5
        Caustic: 0.5
        Holy: 1.25
    traumaDeductions:
      Dismemberment: 0.5
      OrganDamage: 0.5
      BoneDamage: 0.5
      VeinsDamage: 0.0
      NerveDamage: 0.0
  - type: ExplosionResistance
    damageCoefficient: 0.25
  - type: ToggleableClothing # Goobstation - Modsuits change
    clothingPrototypes:
      head: ClothingHeadHatHoodHeretic
  - type: ModifyDelayedKnockdown
    delayDelta: 3
    knockdownTimeDelta: -3
  - type: StaminaResistance
    damageCoefficient: 0.5
  - type: HideClothingLayerClothing
    hiddenSlots:
    - jumpsuit
  - type: FireProtection
    reduction: 0.4
  - type: TemperatureProtection
    heatingCoefficient: 0.5
    coolingCoefficient: 0.5

- type: entity
  parent: ClothingOuterArmorHeretic
  id: ClothingOuterArmorHereticVoid
  suffix: Void
  components:
  - type: Sprite
    sprite: _Goobstation/Heretic/Clothing/OuterClothing/void_armor.rsi
    state: icon
  - type: Clothing
    sprite: _Goobstation/Heretic/Clothing/OuterClothing/void_armor.rsi
  - type: ToggleableClothing
    clothingPrototypes:
      head: ClothingHeadHatHoodHereticVoid

- type: entity
  parent: ClothingOuterArmorHeretic
  id: ClothingOuterArmorHereticAsh
  suffix: Ash
  components:
  - type: Sprite
    sprite: _Goobstation/Heretic/Clothing/OuterClothing/ashen_armor.rsi
    state: icon
  - type: Clothing
    sprite: _Goobstation/Heretic/Clothing/OuterClothing/ashen_armor.rsi
  - type: ToggleableClothing
    clothingPrototypes:
      head: ClothingHeadHatHoodHereticAsh

- type: entity
  parent: ClothingOuterArmorHeretic
  id: ClothingOuterArmorHereticFlesh
  suffix: Flesh
  components:
  - type: Sprite
    sprite: _Goobstation/Heretic/Clothing/OuterClothing/flesh_armor.rsi
    state: icon
  - type: Clothing
    sprite: _Goobstation/Heretic/Clothing/OuterClothing/flesh_armor.rsi
  - type: ToggleableClothing
    clothingPrototypes:
      head: ClothingHeadHatHoodHereticFlesh

- type: entity
  parent: ClothingOuterArmorHeretic
  id: ClothingOuterArmorHereticBlade
  suffix: Blade
  components:
  - type: Sprite
    sprite: _Goobstation/Heretic/Clothing/OuterClothing/blade_armor.rsi
    state: icon
  - type: Clothing
    sprite: _Goobstation/Heretic/Clothing/OuterClothing/blade_armor.rsi
  - type: ToggleableClothing
    clothingPrototypes:
      head: ClothingHeadHatHoodHereticBlade

- type: entity
  parent: ClothingOuterArmorHeretic
  id: ClothingOuterArmorHereticCosmos
  suffix: Cosmos
  components:
  - type: Sprite
    sprite: _Goobstation/Heretic/Clothing/OuterClothing/cosmos_armor.rsi
    state: icon
  - type: Clothing
    sprite: _Goobstation/Heretic/Clothing/OuterClothing/cosmos_armor.rsi
  - type: ToggleableClothing
    clothingPrototypes:
      head: ClothingHeadHatHoodHereticCosmos

- type: entity
  parent: [ ClothingOuterBaseMedium, ClothingOuterStorageToggleableBase, AllowSuitStorageClothing, BaseMagicalContraband ]
  id: ClothingOuterArmorCloakVoid
  name: void cloak
  description: Black like tar, reflecting no light. Runic symbols line the outside. With each flash you lose comprehension of what you are seeing.
  components:
  # - type: UnholyItem # This should only be active when cloak is visible. Can't simply ensure/remove this component on
  # cloak toggle due to goobmod. Should be done when heretic is mored to goobmod probably.
  - type: Sprite
    sprite: _Goobstation/Heretic/Clothing/OuterClothing/void_cloak.rsi
    layers:
    - state: icon
      map: [ "base" ]
  - type: Clothing
    sprite: _Goobstation/Heretic/Clothing/OuterClothing/void_cloak.rsi
  - type: Armor
    coverage:
    - Chest
    - Groin
    - Arm
    - Hand
    - Leg
    - Foot
    - Tail
    modifiers:
      coefficients:
        Blunt: 0.7
        Slash: 0.7
        Piercing: 0.7
        Heat: 0.7
        Caustic: 0.7
        # Holy: 1.25
    traumaDeductions:
      Dismemberment: 0.3
      OrganDamage: 0.3
      BoneDamage: 0.3
      VeinsDamage: 0.0
      NerveDamage: 0.0
  - type: ExplosionResistance
    damageCoefficient: 0.7
  - type: ToggleableClothing # Goobstation - Modsuits change
    stripDelay: null
    clothingPrototypes:
      head: ClothingHeadHatHoodVoidCloakHeretic
  - type: ModifyDelayedKnockdown
    delayDelta: 2
    knockdownTimeDelta: -2
  - type: StaminaResistance
    damageCoefficient: 0.7
  - type: HideContrabandContent #Goobstation Contraband detector
  - type: UndetectableContraband #Goobstation Contraband detector
  - type: Storage
    storageOpenSound: null
    maxItemSize: Normal
    grid:
    - 0,0,0,1
    - 2,0,2,1
    - 4,0,5,1
    - 7,0,7,1
    - 9,0,9,1
    whitelist:
      tags:
      - HereticItem
      - Knife
      - Meat
      components:
      - Organ
      - BodyPart
      - HereticBlade
      - CarvingKnife
      - HereticMagicItem
  - type: HereticClothing
  - type: PressureProtection
  - type: VoidCloak
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.VoidCloakVisuals.Transparent:
        base:
          True: { state: transparent-icon }
          False: { state: icon }
