# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 username <113782077+whateverusername0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 whateverusername0 <whateveremail>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Armok <155400926+ARMOKS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <93730715+Aviu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <aviu00@protonmail.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 Rinary <72972221+Rinary1@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 SX_7 <sn1.test.preria.2002@gmail.com>
# SPDX-FileCopyrightText: 2025 TheBorzoiMustConsume <197824988+TheBorzoiMustConsume@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  parent: [ SimpleMobBase, MobCombat ]
  id: BaseMobGhoul
  abstract: true
  components:
  - type: WeakToHoly
    alwaysTakeHoly: true
  - type: Ghoul
  - type: MovementSpeedModifier
    baseWalkSpeed: 5
    baseSprintSpeed: 5
  - type: InputMover
  - type: MobMover
  - type: Reactive
    groups:
      Flammable: [ Touch ]
      Extinguish: [ Touch ]
  - type: NpcFactionMember
    factions:
    - Heretic
  - type: Physics
    bodyType: KinematicController
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeCircle
          radius: 0.35
        density: 250
        mask:
        - MobMask
        layer:
        - MobLayer
  - type: MobState
  - type: MobThresholds
    thresholds:
      0: Alive
      90: Critical
      100: Dead
  - type: Damageable
    damageContainer: Biological
  - type: MeleeWeapon
    altDisarm: false
    soundHit:
      path: /Audio/Weapons/Xeno/alien_claw_flesh1.ogg
    angle: 0
    animation: WeaponArcClaw
    damage:
      types:
        Slash: 12
        Piercing: 8
  - type: NoSlip
  - type: Grammar
    attributes:
      gender: male
  - type: GhostRole
    allowMovement: true
    allowSpeech: true
    makeSentient: true
    name: ghostrole-ghoul-name
    description: ghostrole-ghoul-desc
    rules: ghostrole-ghoul-rules
    mindRoles:
    - MindRoleGhoul
    raffle:
      settings: short
  - type: CollectiveMind
    defaultChannel: MansusLink
    channels:
    - MansusLink
  - type: HTN
    rootTask:
      task: HereticSummonCompound
    blackboard:
      NavSmash: !type:Bool
        true
  - type: Targeting
  - type: Bloodstream
    maxBleedAmount: 0

- type: entity
  parent: BaseMobGhoul
  id: MobGhoulStalker
  name: flesh stalker
  description: An abomination cobbled together from varied remains. Its appearance changes slightly every time you blink.
  components:
  - type: Ghoul
    totalHealth: 150
    ghostRoleName: ghostrole-stalker-name
    ghostRoleDesc: ghostrole-stalker-desc
  - type: Sprite
    sprite: _Goobstation/Heretic/eldritch_mobs.rsi
    state: stalker
  - type: GhostRole
    name: ghostrole-stalker-name
    description: ghostrole-stalker-desc
    mindRoles:
    - MindRoleGhoul
  - type: ActionGrant
    actions:
    - ActionHereticJaunt
    # basically an EMP implant. don't feel like making 1 more emp action
    - ActionActivateEmpImplant
    - ActionHereticShapeshift
  - type: TriggerImplantAction
  - type: EmpOnTrigger
    range: 5
    energyConsumption: 50000
    disableDuration: 20
  - type: MovementSpeedModifier
    baseWalkSpeed: 5
    baseSprintSpeed: 5
  - type: FlashImmunity
  - type: ThermalVision
    thermalShader: null
    isActive: true
    color: white
    drawOverlay: false
    lightRadius: 0
    toggleAction: null
  - type: MeleeWeapon
    animation: WeaponArcClaw
    damage:
      types:
        Slash: 15
        Piercing: 10

- type: entity
  parent: BaseMobGhoul
  id: MobGhoulProphet
  name: raw prophet
  description: An abomination stitched together from a few severed arms and one swollen, orphaned eye.
  components:
  - type: Ghoul
    totalHealth: 65
    ghostRoleName: ghostrole-prophet-name
    ghostRoleDesc: ghostrole-prophet-desc
  - type: Sprite
    noRot: true
    sprite: _Goobstation/Heretic/eldritch_mobs.rsi
    layers:
    - map: [ "movement" ]
      state: raw_prophet
  - type: SpriteMovement
    movementLayers:
      movement:
        state: raw_prophet-move
    noMovementLayers:
      movement:
        state: raw_prophet
  - type: GhostRole
    name: ghostrole-prophet-name
    description: ghostrole-prophet-desc
    mindRoles:
    - MindRoleGhoul
  - type: ActionGrant
    actions:
    - ActionHereticJauntLong
    - ActionHereticMansusLink
  - type: HealingAura
    selfHealMultiplier: 2
    componentHealMultipliers:
      Heretic: 1
      Ghoul: 2
  - type: NightVision
    color: white
    activateSound: null
    deactivateSound: null
    drawOverlay: false
  - type: Eye
    drawFov: false
  - type: ContentEye
    maxZoom: 1.25, 1.25
    targetZoom: 1.25, 1.25
  - type: ShowHealthBars
  - type: ShowHealthIcons

- type: entity
  parent: [BaseMobGhoul, FlyingMobBase]
  id: MobGhoulFireShark
  name: fire shark
  description: It is a eldritch dwarf space shark, also known as a fire shark.
  components:
  - type: Ghoul
    spawnOnDeathPrototype: SheetPlasma1
    totalHealth: 15
    ghostRoleName: ghostrole-fire-shark-name
    ghostRoleDesc: ghostrole-fire-shark-desc
  - type: Sprite
    sprite: _Goobstation/Heretic/eldritch_mobs.rsi
    state: fire_shark
  - type: GhostRole
    name: ghostrole-fire-shark-name
    description: ghostrole-fire-shark-desc
    mindRoles:
    - MindRoleGhoul
  - type: Body
    prototype: null
    bodyType: Simple
  - type: IgniteOnMeleeHit
    fireStacks: 2
  - type: MovementSpeedModifier
    baseWalkSpeed: 7
    baseSprintSpeed: 7
  - type: MeleeWeapon
    altDisarm: false
    angle: 0
    animation: WeaponArcBite
    soundHit:
      path: /Audio/Effects/bite.ogg
    damage:
      types:
        Heat: 6
        Slash: 6
        Piercing: 6
  - type: Flammable
    canResistFire: false
    damage:
      types:
        Heat: 0
  - type: Temperature
    heatDamage:
      types:
        Heat: 0
  - type: PointLight
    radius: 3
    energy: 3
    color: "#ff8227"
  - type: Damageable
    damageModifierSet: FireShark
  - type: Bloodstream
    bloodReagent: Plasma
    bloodMaxVolume: 10
    bleedReductionAmount: 0.1
    maxBleedAmount: 0.5

- type: entity
  parent:
  - BaseMob
  - MobCombat
  - MobFlammable
  - MobAtmosExposed
  - MobPolymorphable
  id: MobGhoulRustWalker
  name: rust walker
  description: A grinding, clanking construct which leaches life from its surroundings with every armoured step.
  components:
  - type: Ghoul
    totalHealth: 100
    ghostRoleName: ghostrole-rustwalker-name
    ghostRoleDesc: ghostrole-rustwalker-desc
  - type: Sprite
    sprite: _Goobstation/Heretic/eldritch_mobs.rsi
    layers:
    - map: [ "movement" ]
      state: rust_walker
  - type: SpriteMovement
    movementLayers:
      movement:
        state: rust_walker-move
    noMovementLayers:
      movement:
        state: rust_walker
  - type: ActionGrant
    actions:
    - ActionHereticAggressiveSpread
    - ActionHereticRustWave
  - type: LeechingWalk
  - type: MeleeWeapon
    soundHit:
      collection: MetalThud
    altDisarm: false
    angle: 0
    animation: WeaponArcPunch
    damage:
      types:
        Blunt: 20
        Ion: 20
        Structural: 80
  - type: Physics
    bodyType: KinematicController
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeCircle
          radius: 0.35
        density: 250
        mask:
        - MobMask
        layer:
        - MobLayer
  - type: MobState
  - type: MobThresholds
    thresholds:
      0: Alive
      100: Dead
    stateAlertDict:
      Alive: BorgHealth
      Critical: BorgCrit
      Dead: BorgDead
    showOverlays: false
  - type: CombatMode
  - type: Pullable
  - type: Speech
  - type: TypingIndicator
  - type: NoSlip
  - type: Grammar
    attributes:
      gender: male
  - type: GhostRole
    allowMovement: true
    allowSpeech: true
    makeSentient: true
    name: ghostrole-rustwalker-name
    description: ghostrole-rustwalker-desc
    rules: ghostrole-ghoul-rules
    raffle:
      settings: short
  - type: CollectiveMind
    defaultChannel: MansusLink
    channels:
    - MansusLink
  - type: FactionException
  - type: NpcFactionMember
    factions:
    - Heretic
  - type: Reactive
    groups:
      Flammable: [ Touch ]
      Extinguish: [ Touch ]
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: Damageable
    damageContainer: Inorganic
  - type: HealthExaminable
    examinableTypes:
    - Blunt
    - Slash
    - Piercing
    - Heat
    - Shock
    locPrefix: silicon
  - type: MovedByPressure
  - type: StatusEffects
    allowed:
    - Stun
    - KnockedDown
    - SlowedDown
    - Stutter
    - Electrocution
  - type: Repairable
    doAfterDelay: 8
    fuelCost: 15
  - type: FloatingVisuals
  - type: Body
    bodyType: Simple
  - type: StatusIcon
    bounds: -0.5,-0.5,0.5,0.5
  - type: NameIdentifier
    group: GenericNumber
  - type: Insulated
  - type: MovementSpeedModifier
    baseWalkSpeed: 5
    baseSprintSpeed: 5
  - type: FlashImmunity
  - type: HTN
    rootTask:
      task: HereticSummonCompound
    blackboard:
      NavSmash: !type:Bool
        true
  - type: Targeting
