# SPDX-FileCopyrightText: 2024 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Fishbait <Fishbait@git.ml>
# SPDX-FileCopyrightText: 2024 fishbait <gnesse@gmail.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <93730715+Aviu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Errant <35878406+Errant-4@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Ilya246 <ilyukarno@gmail.com>
# SPDX-FileCopyrightText: 2025 Rinary <72972221+Rinary1@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Spatison <137375981+Spatison@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Theodore Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 shibe <95730644+shibechef@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# Pod
- type: entity
  id: MobBlobPod
  name: Blob pod
  description: An ordinary person fighting opponents, not like a thing attached to a tile, zombifies corpses.
  parent: SimpleSpaceMobBase
  categories: [ HideSpawnMenu ]
  components:
    - type: ZombieImmune
    - type: TriggerOnMobstateChange
      mobState:
        - Dead
    - type: SmokeOnTrigger
      duration: 5
      spreadAmount: 20
      solution:
        reagents:
          - ReagentId: TearGas
            Quantity: 3
    - type: Damageable
      damageContainer: Blob
      damageModifierSet: BlobMob
    - type: Clothing
      quickEquip: false
      sprite: _Goobstation/Blob/Mobs/blob_mobs.rsi
      equippedPrefix: blobPod
      slots:
        - HEAD
    - type: Tag
      tags:
        - HidesHair
        - BlobMob
    - type: CollectiveMind
      defaultChannel: Blobmind
      channels:
      - Blobmind
    - type: IngestionBlocker
    - type: IdentityBlocker
    - type: BlobPod
    - type: DoAfter
    - type: Physics
      bodyType: KinematicController
    - type: InteractionOutline
    - type: Actions
    - type: Alerts
    - type: InputMover
    - type: Examiner
    - type: MobMover
    - type: HTN
      rootTask:
        task: BlobPodCompound
      blackboard:
        NavBlob: !type:Bool
          true
    - type: BlobMob
    # - type: BlobSpeak
    # Einstein Engines - Language begin
    - type: LanguageSpeaker
    - type: LanguageKnowledge
      speaks:
      - Blob
      understands:
      - Blob
    # Einstein Engines - Language end
    - type: CombatMode
    - type: NpcFactionMember
      factions:
        - Blob
    - type: MeleeWeapon
      hidden: true
      soundHit:
        path: /Audio/Effects/bite.ogg
      angle: 0
      animation: WeaponArcSmash
      damage:
        types:
          Blunt: 8
    - type: DamageStateVisuals
      states:
        Alive:
          Base: blobpod
    - type: Fixtures
      fixtures:
        fix1:
          shape:
            !type:PhysShapeCircle
            radius: 0.25
          density: 10
          mask:
            - FlyingBlobMobMask
          layer:
            - FlyingBlobMobLayer
    - type: Destructible
      thresholds:
        - trigger:
            !type:DamageTrigger
            damage: 50
          behaviors:
            - !type:DoActsBehavior
              acts: [ "Destruction" ]
    - type: MobThresholds
      thresholds:
        0: Alive
        50: Dead
    - type: MovementSpeedModifier
      baseWalkSpeed: 3
      baseSprintSpeed: 4
    - type: Sprite
      drawdepth: Mobs
      sprite: _Goobstation/Blob/Mobs/blob_mobs.rsi
      state: blobpod
    - type: GuideHelp
      guides:
      - Blob

# Blobbernaut
- type: entity
  id: MobBlobBlobbernaut
  name: Blobbernaut
  description: Juggernaut, but blob! when the station crew shows full hatred of you, with the help of such strong men you can organize a blitzkriek if you tell them the plan in advance.
  parent: SimpleSpaceMobBase
  categories: [ HideSpawnMenu ]
  components:
    - type: ZombieImmune
    - type: Damageable
      damageContainer: Blob
      damageModifierSet: BlobBlobbernaut
    - type: Tag
      tags:
        - Blobbernaut
        - BlobMob
    - type: CollectiveMind
      defaultChannel: Blobmind
      channels:
      - Blobmind
    - type: GhostRole
      name: ghost-role-information-blobbernaut-name
      description: ghost-role-information-blobbernaut-description
      rules: You are an antagonist, defend your blob core!
      mindRoles:
      - MindRoleGhostRoleTeamAntagonist
      raffle:
        settings: short
    - type: GhostTakeoverAvailable
    - type: Blobbernaut
    - type: Physics
    - type: InputMover
    - type: MobMover
    - type: BlobMob
    # - type: BlobSpeak
    # Einstein Engines - Language begin
    - type: LanguageSpeaker
    - type: LanguageKnowledge
      speaks:
      - Blob
      understands:
      - Blob
    # Einstein Engines - Language end
    - type: CombatMode
    - type: HTN
      rootTask:
        task: SimpleHostileCompound
      blackboard:
        NavSmash: !type:Bool
          true
    - type: NpcFactionMember
      factions:
        - Blob
    - type: MobState
      allowedStates:
        - Alive
        - Dead
    - type: MeleeWeapon
      hidden: true
      soundHit:
        path: /Audio/Effects/bite.ogg
      angle: 0
      animation: WeaponArcSmash
      damage:
        types:
          Blunt: 15
          Structural: 50
    - type: DamageStateVisuals
      states:
        Alive:
          Base: blobbernaut
        Dead:
          Base: blobbernaut_dead
    - type: Fixtures
      fixtures:
        fix1:
          shape:
            !type:PhysShapeCircle
            radius: 0.35
          density: 200
          mask:
            - BlobMobMask
          layer:
            - BlobMobLayer
    - type: MobThresholds
      thresholds:
        0: Alive
        200: Dead
    - type: MovementSpeedModifier
      baseWalkSpeed: 2.5
      baseSprintSpeed: 3
    - type: Sprite
      sprite: _Goobstation/Blob/Mobs/blob_mobs.rsi
      drawdepth: Mobs
      layers:
        - map: [ "enum.DamageStateVisualLayers.Base" ]
          state: blobbernaut
        - map: [ "enum.DamageStateVisualLayers.BaseUnshaded" ]
          state: nautdamage
          shader: unshaded
    - type: NightVision
      color: "#808080"
      activateSound: null
      deactivateSound: null
    - type: GuideHelp
      guides:
      - Blob
    - type: Bloodstream
      bloodMaxVolume: 300
      bloodReagent: Blood
      bleedReductionAmount: 5

# Observer
- type: entity
  id: MobObserverBlob
  name: Blob observer
  categories: [ HideSpawnMenu ]
  save: false
  components:
    - type: UserInterface
      interfaces:
        enum.BlobChemSwapUiKey.Key:
          type: BlobChemSwapBoundUserInterface
    - type: Actions
    - type: Alerts
    # Einstein Engines - Language begin
    - type: LanguageSpeaker
      currentLanguage: Blob
    - type: LanguageKnowledge
      speaks:
      - Blob
      understands:
      - Blob
      - Xeno
      - TauCetiBasic
    # Einstein Engines - Language end
    - type: Hands
      showInHands: true
    - type: BlobObserver
    - type: Visibility
      layer: 2
    - type: ContentEye
    - type: MindContainer
    - type: Clickable
    - type: InteractionOutline
    - type: Physics
      bodyType: KinematicController
      fixedRotation: true
    - type: GhostRole
      name: ghost-role-information-blob-name
      description: ghost-role-information-blob-description
      rules: You are an antagonist, destroy the station!
      mindRoles:
      - MindRoleGhostRoleSoloAntagonist
      requirements:
      - !type:OverallPlaytimeRequirement
        time: 18000 #5 hours
    - type: GhostTakeoverAvailable
    - type: Fixtures
      fixtures:
        fix1:
          shape:
            !type:PhysShapeCircle
            radius: 0.35
          density: 15
    - type: InputMover
    - type: Appearance
    - type: Eye
    - type: Input
      context: "ghost"
    - type: Examiner
      skipChecks: true
    - type: Sprite
      sprite: _Goobstation/Blob/Mobs/blob_mobs.rsi
      color: "#fc8403"
      state: marker
      noRot: true
      drawdepth: Ghosts
    - type: MovementSpeedModifier
      baseSprintSpeed: 8
      baseWalkSpeed: 15
    - type: MovementIgnoreGravity
    - type: Tag
      tags:
      - BypassInteractionRangeChecks
    - type: CollectiveMind
      defaultChannel: Blobmind
      channels:
      - Blobmind
