# SPDX-FileCopyrightText: 2023 brainfood1183 <113240905+brainfood1183@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 AJCM-git <60196617+AJCM-git@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Hmeister <nathan.springfredfoxbon4@gmail.com>
# SPDX-FileCopyrightText: 2024 I.K <45953835+notquitehadouken@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Scribbles0 <91828755+Scribbles0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deathride58 <deathride58@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 wafehling <wafehling@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  abstract: true
  parent: BaseItem
  id: ShardCrystalBase
  name: crystal shard
  description:  A small piece of crystal.
  components:
  - type: Sharp
  - type: Execution
    doAfterDuration: 4.0
  - type: Sprite
    layers:
      - sprite: Objects/Materials/Shards/crystal.rsi
        state: shard1
        map: [ "enum.DamageStateVisualLayers.Base" ]
  - type: RandomSprite
    available:
      - enum.DamageStateVisualLayers.Base:
          shard1: ""
          shard2: ""
          shard3: ""
  - type: SpaceGarbage
  - type: MeleeWeapon
    wideAnimationRotation: -22.5
    attackRate: 1.5
    damage:
      types:
        Slash: 3.5
  - type: Damageable
    damageContainer: Inorganic
    damageModifierSet: Glass
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: StaticPrice
    price: 50

- type: entity
  parent: ShardCrystalBase
  id: ShardCrystalCyan
  name: cyan crystal shard
  description: A small piece of crystal.
  components:
  - type: Sprite
    color: "#47f8ff"
  - type: PointLight
    radius: 2
    energy: 2.5
    color: "#47f8ff"
  - type: Tag
    tags:
      - Trash
      - CrystalCyan

- type: entity
  parent: ShardCrystalBase
  name: blue crystal shard
  id: ShardCrystalBlue
  components:
  - type: Sprite
    color: "#39a1ff"
  - type: PointLight
    radius: 2
    energy: 2.5
    color: "#39a1ff"
  - type: Tag
    tags:
      - Trash
      - CrystalBlue

- type: entity
  parent: ShardCrystalBase
  name: yellow crystal shard
  id: ShardCrystalYellow
  components:
  - type: Sprite
    color: "#ffde46"
  - type: PointLight
    radius: 2
    energy: 2.5
    color: "#ffde46"
  - type: Tag
    tags:
      - Trash
      - CrystalYellow

- type: entity
  parent: ShardCrystalBase
  id: ShardCrystalOrange
  name: orange crystal shard
  components:
  - type: Sprite
    color: "#ff8227"
  - type: PointLight
    radius: 2
    energy: 2.5
    color: "#ff8227"
  - type: Tag
    tags:
      - Trash
      - CrystalOrange

- type: entity
  parent: ShardCrystalBase
  name: black crystal shard
  id: ShardCrystalBlack
  components:
  - type: Sprite
    color: "#363636"
  - type: PointLight
    radius: 2
    energy: 2.5
    color: "#363636"
  - type: Tag
    tags:
      - Trash
      - CrystalBlack

- type: entity
  parent: ShardCrystalBase
  id: ShardCrystalPink
  name: pink crystal shard
  components:
  - type: Sprite
    color: "#ff66cc"
  - type: PointLight
    radius: 2
    energy: 2.5
    color: "#ff66cc"
  - type: Tag
    tags:
      - Trash
      - CrystalPink

- type: entity
  parent: ShardCrystalBase
  id: ShardCrystalGreen
  name: green crystal shard
  components:
  - type: Sprite
    color: "#52ff39"
  - type: PointLight
    radius: 2
    energy: 2.5
    color: "#52ff39"
  - type: Tag
    tags:
      - Trash
      - CrystalGreen

- type: entity
  parent: ShardCrystalBase
  id: ShardCrystalRed
  name: red crystal shard
  components:
  - type: Sprite
    color: "#fb4747"
  - type: PointLight
    radius: 2
    energy: 2.5
    color: "#fb4747"
  - type: Tag
    tags:
      - Trash
      - CrystalRed

- type: entity
  parent: ShardCrystalBase
  id: ShardCrystalRandom
  name: random crystal shard
  components:
  - type: RandomSpawner
    prototypes:
      - ShardCrystalGreen
      - ShardCrystalPink
      - ShardCrystalOrange
      - ShardCrystalBlue
      - ShardCrystalCyan
      - ShardCrystalRed
    chance: 1