# SPDX-FileCopyrightText: 2025 Armok <155400926+ARMOKS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Solstice <solsticeofthewinter@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: CosmicGlyphBase
  name: base glyph
  description: A strange, otherworldly marking.
  abstract: true
  placement:
    mode: SnapgridCenter
  components:
  - type: Fixtures
    fixtures:
      glyph:
        shape:
          !type:PhysShapeAabb
          bounds: "-1.2,-0.5,1.2,0.5"
        hard: false
        mask:
        - ItemMask
        layer:
        - SlipLayer
  - type: Physics
  - type: Clickable
  - type: CosmicCultExamine
    othersText: cosmic-examine-text-glyphs
  - type: Sprite
    sprite: _DV/CosmicCult/Objects/glyph_truth.rsi
    layers:
      - state: spawning
        map: ["base"]
    drawdepth: Puddles
  - type: GenericVisualizer
    visuals:
      enum.GlyphVisuals.Status:
        base:
          Spawning: {state: spawning}
          Despawning: {state: despawning}
          Ready: {state: ready}
          Active: {state: active}
          Cooldown: {state: cooldown}
  - type: Appearance
  - type: InteractionOutline
  - type: CosmicPurifiable # Because why the hell not
    cleanseTime: 10
    cleanseTimeChaplain: 5

- type: entity
  parent: CosmicGlyphBase
  id: CosmicGlyphTruth
  name: Glyph of Truth
  components:
  - type: Sprite
    sprite: _DV/CosmicCult/Objects/glyph_truth.rsi
    layers:
      - state: spawning
        map: ["base"]
  - type: CosmicGlyphConversion
    negateProtection: true
  - type: CosmicGlyph
    requiredCultists: 3
    activationDamage:
      types:
        Asphyxiation: 10 # Goobstation
        Ion: 10 # Goobstation
  - type: CosmicCultExamine
    cultistText: cosmic-examine-glyph-truth

- type: entity
  parent: CosmicGlyphBase
  id: CosmicGlyphKnowledge
  name: Glyph of Knowledge
  components:
  - type: Sprite
    sprite: _DV/CosmicCult/Objects/glyph_knowledge.rsi
    layers:
      - state: spawning
        map: ["base"]
  - type: CosmicGlyphConversion
  - type: CosmicGlyph
    requiredCultists: 1 # Goobstation
    activationDamage:
      types:
        Asphyxiation: 10 # Goobstation
        Ion: 10 # Goobstation
  - type: CosmicCultExamine
    cultistText: cosmic-examine-glyph-knowledge

- type: entity
  parent: CosmicGlyphBase
  id: CosmicGlyphCessation
  name: Glyph of Cessation
  components:
  - type: Sprite
    sprite: _DV/CosmicCult/Objects/glyph_cessation.rsi
    layers:
      - state: spawning
        map: ["base"]
  - type: CosmicGlyphTransmute
  - type: CosmicGlyph
    requiredCultists: 1
    activationDamage:
      types:
        Asphyxiation: 10 # Goobstation
        Ion: 10 # Goobstation
  - type: CosmicCultExamine
    cultistText: cosmic-examine-glyph-cessation

- type: entity
  parent: CosmicGlyphBase
  id: CosmicGlyphBlades
  name: Glyph of Blades
  components:
  - type: Sprite
    sprite: _DV/CosmicCult/Objects/glyph_blades.rsi
    layers:
      - state: spawning
        map: ["base"]
  - type: CosmicGlyphTransmute
  - type: CosmicGlyph
    requiredCultists: 1
    activationDamage:
      types:
        Asphyxiation: 10 # Goobstation
        Ion: 10 # Goobstation
  - type: CosmicCultExamine
    cultistText: cosmic-examine-glyph-blades

- type: entity
  parent: CosmicGlyphBase
  id: CosmicGlyphWarding
  name: Glyph of Warding
  components:
  - type: Sprite
    sprite: _DV/CosmicCult/Objects/glyph_warding.rsi
    layers:
      - state: spawning
        map: ["base"]
  - type: CosmicGlyphTransmute
  - type: CosmicGlyph
    requiredCultists: 1 # Goobstation
    activationDamage:
      types:
        Asphyxiation: 10 # Goobstation
        Ion: 10 # Goobstation
  - type: CosmicCultExamine
    cultistText: cosmic-examine-glyph-warding

- type: entity
  parent: CosmicGlyphBase
  id: CosmicGlyphProjection
  name: Glyph of Projection
  components:
  - type: Sprite
    sprite: _DV/CosmicCult/Objects/glyph_projection.rsi
    layers:
      - state: spawning
        map: ["base"]
  - type: CosmicGlyphAstralProjection
  - type: CosmicGlyph
    requiredCultists: 1
    eraseOnUse: true # This is something that you may use early into the round where there aren't many cultists to hide it for you, so it erases automaticaly.
    activationDamage:
      types:
        Asphyxiation: 25
        Ion: 25
  - type: CosmicCultExamine
    cultistText: cosmic-examine-glyph-projection
