- type: entity
  abstract: true
  id: MobCosmicGodBase
  name: The Unknown
  description: Your mind begins to fracture and break as it fails to comprehend what looms before you.
  components:
  - type: Sprite
    noRot: true
    sprite: _DV/CosmicCult/Mobs/cosmicgod.rsi
    offset: 0, 2
    drawdepth: Ghosts
    scale: 2,2
    layers:
    - state: god
      shader: unshaded

# spawn animation, spawns actual god when it ends
- type: entity
  parent: MobCosmicGodBase
  id: MobCosmicGodSpawn
  suffix: Spawn
  components:
  - type: EmitSoundOnSpawn
    sound:
      path: /Audio/_DV/CosmicCult/god_summon.ogg
  - type: Sprite
    layers:
    - state: spawn
      shader: unshaded
  # the spawn animation is exactly 4.62 seconds long, so we time our entity spawn-in to be the same.
  - type: TimedDespawn
    lifetime: 4.62
  - type: SpawnOnDespawn
    prototype: MobCosmicGod
  - type: PointLight
    enabled: true
    radius: 25
    energy: 25
    color: "#43286a"
  - type: LightBehaviour
    behaviours:
     - !type:FadeBehaviour
       interpolate: Linear
       minDuration: 4.62
       maxDuration: 4.62
       startValue: 0.5
       endValue: 25
       property: Energy
       enabled: true

- type: entity
  parent: [MobCosmicGodBase, BaseMob]
  id: MobCosmicGod
  components:
  - type: CargoSellBlacklist
  # big mob needs to see everything
  - type: ContentEye
    maxZoom: 2.2,2.2
  - type: Eye
    drawFov: false
  - type: Fixtures
    fixtures:
      EventHorizonCollider:
        shape:
          !type:PhysShapeCircle
            radius: 5
        hard: false
        restitution: 0.8
        density: 1
        mask:
        - Opaque
        layer:
        - GlassLayer
      EventHorizonConsumer:
        shape:
          !type:PhysShapeCircle
            radius: 6
        hard: false
        mask:
        - Opaque
        layer:
        - GlassLayer
  - type: Input
    context: "ghost"
  - type: MovementIgnoreGravity
  - type: GhostHearing
  - type: Physics
    bodyType: Dynamic
    bodyStatus: InAir
  - type: CanMoveInAir
  - type: WarpPoint
    follow: true
    location: The Unknown
  - type: CosmicGod
  - type: CosmicCultExamine
    cultistText: cosmic-examine-text-god
  - type: AmbientSound
    enabled: true
    volume: 0
    range: 25
    sound:
      path: /Audio/_DV/CosmicCult/god_ambient.ogg
  - type: EmitSoundOnSpawn
    sound:
      path: /Audio/_DV/CosmicCult/god_spawn.ogg
  - type: PointLight
    enabled: true
    radius: 25
    energy: 25
    color: "#43286a"
  - type: GhostRole
    allowMovement: true
    allowSpeech: false
    makeSentient: true
    name: ghost-role-information-theunknown-name
    description: ghost-role-information-theunknown-description
    rules: ghost-role-information-theunknown-rules
    mindRoles:
    - MindRoleGhostRoleTeamAntagonist
    raffle:
        settings: short
  - type: GhostTakeoverAvailable
