- type: entity
  name: Cortical Borer
  parent: SimpleSpaceMobBase
  id: MobCorticalBorer
  description: A worm that burrows into brains and lays its eggs
  components:
  - type: GhostRole
    makeSentient: true
    allowSpeech: False
    allowMovement: true
    requirements:
    - !type:OverallPlaytimeRequirement
      time: 180000 # 50 hrs - THIS IS WHY WE CANT HAVE NICE THINGS
    name: cortical-borer-ghostrole-name
    description: cortical-borer-ghostrole-desc
    rules: cortical-borer-ghostrole-rules
    mindRoles:
    - MindRoleGhostRoleFreeAgent
  - type: GhostTakeoverAvailable
  - type: Sprite
    drawdepth: SmallMobs
    sprite: _Mono/Mobs/Aliens/cortical_borer.rsi
    layers:
    - map: [ "enum.DamageStateVisualLayers.Base" ]
      state: cortical_borer
  - type: DamageStateVisuals
    states:
      Alive:
        Base: cortical_borer
      Dead:
        Base: dead
  - type: Item
    size: Tiny
    heldPrefix: 0
  - type: Physics
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeCircle
          radius: 0.2
        density: 100
        mask:
        - SmallMobMask
        layer:
        - SmallMobLayer
  - type: MobState
  - type: MobThresholds
    thresholds:
      0: Alive
      20: Dead
  - type: Barotrauma # take away space immunity but still not gasp
    damage:
      types:
        Blunt: 0.15
  - type: Bloodstream
    bloodlossDamage:
      types:
        Bloodloss: 0.5
    bloodlossHealDamage:
      types:
        Bloodloss: -1
    bleedReductionAmount: 2 # bleeding stops faster
  - type: MovementSpeedModifier
    baseWalkSpeed : 1.9
    baseSprintSpeed : 7.5
  - type: Tag
    tags:
    - Meat
    - VimPilot
  - type: ThermalVision
    lightRadius: 15
    activateSound: null
    deactivateSound: null
  - type: CorticalBorer
    eggProto: "CorticalBorerEgg"
    addOnInfest:
    - type: PressureImmunity
    removeOnInfest:
    - type: CanEscapeInventory
  - type: UserInterface
    interfaces:
      enum.CorticalBorerDispenserUiKey.Key:
        type: CorticalBorerDispenserBoundUserInterface
      enum.HealthAnalyzerUiKey.Key:
        type: HealthAnalyzerBoundUserInterface
  - type: CollectiveMind
    channels:
    - CorticalBorer
    defaultChannel: CorticalBorer
  - type: Speech
    enabled: false
  - type: HealthAnalyzer
    scanningEndSound:
      path: "/Audio/Voice/Slime/slime_squish.ogg"
    maxScanRange: .5
  - type: CanEscapeInventory
  - type: GuideHelp
    guides:
    - CorticalBorerGuide
  - type: Body
    thermalVisibility: false
  - type: UniversalLanguageSpeaker

- type: entity
  parent: BaseItem
  id: CorticalBorerEgg
  name: cortical borer egg
  description: This egg is so nice and wet and soft...
  components:
  - type: Sprite
    sprite: _Mono/Mobs/Aliens/cortical_borer_egg.rsi
    state: icon
  - type: Item
    size: Tiny
  - type: GhostRole
    name: cortical-borer-ghostrole-name
    description: cortical-borer-ghostrole-desc
    rules: cortical-borer-ghostrole-rules
    requirements:
    - !type:OverallPlaytimeRequirement
      time: 180000 # 50 hrs
    mindRoles:
    - MindRoleGhostRoleFreeAgent
  - type: GhostRoleMobSpawner
    prototype: MobCorticalBorer
  - type: Damageable
    damageContainer: Biological
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 1
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: desecration
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: GuideHelp
    guides:
    - CorticalBorerGuide
