- type: entity
  id: BaseMobAsteroid
  parent:
  - BaseMob
  - MobDamageable
  - MobAtmosExposed
  - MobCombat
  - BaseMobAnimal
  abstract: true
  components:
  - type: Reactive
    groups:
      Flammable: [Touch]
      Extinguish: [Touch]
      Acidic: [Touch, Ingestion]
  - type: Climbing
  - type: NameIdentifier
    group: GenericNumber
  - type: StatusEffects
    allowed:
    - Electrocution
    - Adrenaline
  - type: StandingState
  - type: Tag
    tags:
    - DoorBumpOpener

- type: entity
  id: MobGoliath
  parent: [ BaseMobAsteroid, MobBloodstream, BaseSlicingRefinable ]
  name: goliath
  description: A massive beast that uses long tentacles to ensnare its prey, threatening them is not advised under any conditions.
  components:
  - type: Sprite
    sprite: Mobs/Aliens/Asteroid/goliath.rsi
    layers:
    - map: ["enum.DamageStateVisualLayers.Base"]
      state: goliath
  - type: DamageStateVisuals
    states:
      Alive:
        Base: goliath
      Dead:
        Base: goliath_dead
  - type: MovementSpeedModifier
    baseWalkSpeed : 2.00
    baseSprintSpeed : 2.00
  - type: Bloodstream
    bloodReferenceSolution:
      reagents:
      - ReagentId: Blood
        Quantity: 350
  - type: MobThresholds
    thresholds:
      0: Alive
      150: Dead
  - type: MeleeWeapon
    soundHit:
      path: "/Audio/Weapons/smash.ogg"
    angle: 0
    attackRate: 0.75
    animation: WeaponArcPunch
    damage:
      types:
        Slash: 10
        Piercing: 10
  - type: NpcFactionMember
    factions:
    - SimpleHostile
  - type: HTN
    constantlyReplan: false
    rootTask:
      task: GoliathCompound
    blackboard:
      VisionRadius: !type:Single
        6
      AggroVisionRadius: !type:Single
        10
      NavSmash: !type:Bool
        true
  - type: NPCUseActionOnTarget
    actionId: ActionGoliathTentacle
  - type: Tag
    tags:
    - CannotSuicide
    - Goliath
    - FootstepSound
  - type: NoSlip
  - type: ToolRefinable
    refineResult:
    - id: FoodMeatGoliath
      amount: 3
    - id: MaterialGoliathHide1
      amount: 3

- type: entity
  parent: BaseAction
  id: ActionGoliathTentacle
  name: "[color=red]Tentacle Slam[/color]"
  description: Use your tentacles to grab and stun a target player!
  components:
  - type: Action
    raiseOnUser: true
    icon:
      sprite: Mobs/Aliens/Asteroid/goliath.rsi
      state: goliath_tentacle_spawn
    iconOn:
      sprite: Mobs/Aliens/Asteroid/goliath.rsi
      state: goliath_tentacle_wiggle
    sound:
      path: "/Audio/Weapons/slash.ogg"
    useDelay: 8
  - type: TargetAction
    range: 10
  - type: WorldTargetAction
    event: !type:GoliathSummonTentacleAction

- type: entity
  id: GoliathTentacle
  name: tentacle
  components:
  - type: Transform
    anchored: True
  - type: Physics
    bodyType: Static
    canCollide: true
  - type: InteractionOutline
  - type: Sprite
    sprite: Mobs/Aliens/Asteroid/goliath.rsi
    layers:
    - state: goliath_tentacle_wiggle
  - type: StunOnContact
    blacklist:
      tags:
      - Goliath
  - type: Fixtures
    fixtures:
      fix:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.45,-0.45,0.45,0.45"
        mask:
        - Impassable
        layer:
        - Impassable
        hard: false
  - type: TimedDespawn #do this shit by hand because of fucking course.
    lifetime: 0.4
  - type: SpawnOnDespawn
    prototype: EffectGoliathTentacleRetract

- type: entity
  id: BaseEffectGoliathTentacleSpawn
  categories: [ HideSpawnMenu ]
  name: tentacle
  abstract: true
  components:
  - type: Transform
    anchored: True
  - type: Physics
    bodyType: Static
    canCollide: false
  - type: Sprite
    sprite: Mobs/Aliens/Asteroid/goliath.rsi
  - type: InteractionOutline
  - type: TimedDespawn
    lifetime: 0.7

- type: entity
  id: EffectGoliathTentacleSpawn
  parent: BaseEffectGoliathTentacleSpawn
  categories: [ HideSpawnMenu ]
  name: tentacle
  components:
    - type: Sprite
      state: goliath_tentacle_spawn
    - type: SpawnOnDespawn
      prototype: GoliathTentacle

- type: entity
  id: EffectGoliathTentacleRetract
  parent: BaseEffectGoliathTentacleSpawn
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    state: goliath_tentacle_retract
  - type: EffectVisuals
  - type: AnimationPlayer

- type: entity
  id: MobHivelord
  parent: [ BaseMobAsteroid, FlyingMobBase, BaseSlicingRefinable ]
  name: hivelord
  description: A truly alien creature, it is a mass of unknown organic material, constantly fluctuating. When attacking, pieces of it split off and attack in tandem with the original.
  components:
  - type: Sprite
    sprite: Mobs/Aliens/Asteroid/hivelord.rsi
    layers:
    - map: ["enum.DamageStateVisualLayers.Base"]
      state: hivelord
  - type: DamageStateVisuals
    states:
      Alive:
        Base: hivelord
      Dead:
        Base: hivelord_dead
  - type: MovementSpeedModifier
    baseWalkSpeed : 3.5
    baseSprintSpeed : 4.0
  - type: MobThresholds
    thresholds:
      0: Alive
      75: Dead
  - type: MeleeWeapon
    damage:
      types:
        Blunt: 0
  - type: Gun
    fireRate: 0.66
    selectedMode: SemiAuto
    showExamineText: false
    availableModes:
    - SemiAuto
    soundGunshot: null
  - type: RechargeBasicEntityAmmo
    showExamineText: false
    rechargeCooldown: 0
    rechargeSound: null
  - type: BasicEntityAmmoProvider
    proto: MobHivelordBrood
    capacity: 1
    count: 1
  - type: NpcFactionMember
    factions:
    - SimpleHostile
  - type: HTN
    rootTask:
      task: SimpleRangedHostileCompound
    blackboard:
      VisionRadius: !type:Single
        4
      AggroVisionRadius: !type:Single
        9
      NavSmash: !type:Bool
        true
  - type: ToolRefinable
    refineResult:
    - id: FoodHivelordRemains

- type: entity
  id: MobHivelordBrood
  parent: [ BaseMobAsteroid, FlyingMobBase ]
  name: hivelord brood
  description: A fragment of the original hivelord, rallying behind its original. One isn't much of a threat, but...
  components:
  - type: Sprite
    sprite: Mobs/Aliens/Asteroid/hivelord.rsi
    layers:
    - state: hivelordbrood
  - type: MovementSpeedModifier
    baseWalkSpeed : 3.5
    baseSprintSpeed : 4.0
  - type: MobThresholds
    thresholds:
      0: Alive
      5: Dead
  - type: MeleeWeapon
    soundHit:
      path: /Audio/Weapons/bladeslice.ogg
    angle: 0
    attackRate: 1.0
    range: 0.75
    animation: WeaponArcPunch
    damage:
      types:
        Slash: 7
  - type: Ammo
    muzzleFlash: null
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 5
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: NpcFactionMember
    factions:
    - SimpleHostile
  - type: HTN
    rootTask:
      task: SimpleHostileCompound
    blackboard: # highly aggressive
      VisionRadius: !type:Single
        15
      AggroVisionRadius: !type:Single
        15
      NavSmash: !type:Bool
        true
  - type: TimedDespawn
    lifetime: 100

- type: entity
  id: FoodHivelordRemains
  parent: FoodBase
  name: hivelord remains
  description: All that remains of a hivelord, it seems to be what allows it to break pieces of itself off without being hurt... its healing properties will soon become inert if not used quickly. Try not to think about what you're eating.
  components:
  - type: Solution
    solution:
      reagents:
      - ReagentId: Rororium
        Quantity: 5
  - type: Sprite
    sprite: Objects/Consumable/Food/rorocore.rsi
    state: boiled
  - type: Item
    size: Normal
  - type: Perishable
    rotAfter: 120 # rot after 2 minutes
    molsPerSecondPerUnitMass: 0
    forceRotProgression: true
  - type: RotInto
    entity: FoodHivelordRemainsInert
    stage: 1
  - type: StaticPrice
    price: 5000
  - type: Tag
    tags:
    - HivelordRemains
    - Meat
    - Raw

- type: entity
  id: FoodHivelordRemainsInert
  parent: BaseItem
  name: inert hivelord remains
  description: All that remains of a hivelord... Now all is truly lost.
  components:
  - type: Sprite
    sprite: Objects/Consumable/Food/rorocore.rsi
    state: boiled
    color: "#664444"
  - type: SpaceGarbage
  - type: Item
    size: Normal
  - type: StaticPrice
    price: 500
  - type: Tag
    tags:
    - HivelordRemains
    - Meat
    - Raw

- type: entity
  id: MobBasilisk
  parent: [ BaseMobAsteroid, MobBloodstream, BaseSlicingRefinable ]
  name: basilisk
  description: A territorial beast, covered in a thick shell that absorbs energy. Its stare causes victims to freeze from the inside.
  components:
  - type: Sprite
    sprite: Mobs/Aliens/Asteroid/basilisk.rsi
    layers:
    - map: ["enum.DamageStateVisualLayers.Base"]
      state: basilisk
  - type: DamageStateVisuals
    states:
      Alive:
        Base: basilisk
      Dead:
        Base: basilisk_dead
  - type: MovementSpeedModifier
    baseWalkSpeed : 2
    baseSprintSpeed : 3
  - type: MobThresholds
    thresholds:
      0: Alive
      45: Dead
  - type: MeleeWeapon
    angle: 0
    animation: WeaponArcBite
    soundHit:
      path: /Audio/Effects/bite.ogg
    damage:
      types:
        Slash: 7
        Piercing: 5
  - type: Gun
    fireRate: 0.75
    projectileSpeed: 10.0 # When we get predicted guns and projectiles this should be raised to like 15, 15 mis-predicts too much right now unfortunately.
    selectedMode: SemiAuto
    showExamineText: false
    availableModes: [ SemiAuto ]
    soundGunshot: /Audio/Weapons/Guns/Gunshots/syringe_gun.ogg
  - type: RechargeBasicEntityAmmo
    showExamineText: false
    rechargeCooldown: 0
    rechargeSound: null
  - type: BasicEntityAmmoProvider
    proto: BasiliskRay
    capacity: 1
    count: 1
  - type: Bloodstream
    bloodReferenceSolution:
      reagents:
      - ReagentId: Blood
        Quantity: 200
  - type: NpcFactionMember
    factions:
    - SimpleHostile
  - type: HTN
    rootTask:
      task: BasiliskCompound
    blackboard:
      VisionRadius: !type:Single
        7
      AggroVisionRadius: !type:Single
        12
      NavSmash: !type:Bool
        true
  - type: Reflect
    reflectProb: 1
    reflects:
    - Energy
  - type: ToolRefinable
    refineResult:
    - id: DiamondOre1
      amount: 1
      maxAmount: 3
