# SPDX-FileCopyrightText: 2022 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 EmoGarbage404 <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Flipp Syder <76629141+vulppine@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Jezithyr <Jezithyr@gmail.com>
# SPDX-FileCopyrightText: 2022 Moony <moonheart08@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 TekuNut <13456422+TekuNut@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Willhelm53 <97707302+Willhelm53@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2022 och-och <80923370+och-och@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Alex Evgrashin <aevgrashin@yandex.ru>
# SPDX-FileCopyrightText: 2023 Doru991 <75124791+Doru991@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 DrSmugleaf <drsmugleaf@gmail.com>
# SPDX-FileCopyrightText: 2023 Jezithyr <jezithyr@gmail.com>
# SPDX-FileCopyrightText: 2023 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2023 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Myakot <30875116+Myakot@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Visne <39844191+Visne@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 qwerltaz <69696513+qwerltaz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 CatMagic <135462166+CatMagic1@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kira Bridgeton <161087999+Verbalase@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Spatison <137375981+Spatison@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <93730715+Aviu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 BombasterDS <deniskaporoshok@gmail.com>
# SPDX-FileCopyrightText: 2025 BombasterDS2 <shvalovdenis.workmail@gmail.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 LuciferMkshelter <154002422+LuciferEOS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Ted Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2025 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 pacable <77161122+pxc1984@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 pacable <igor.mamaev1@gmail.com>
# SPDX-FileCopyrightText: 2025 pheenty <fedorlukin2006@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  save: false
  name: Urist McSkelly
  parent:
  - MobFlammable
  - BaseMobSpecies
  id: BaseMobSkeletonPerson
  abstract: true
  components:
  - type: Carriable # Goobstation
  - type: HumanoidAppearance
    species: Skeleton
  - type: Icon
    sprite: Mobs/Species/Skeleton/parts.rsi
    state: full
  - type: Body
    prototype: Skeleton
    requiredLegs: 2
    gibSound: /Audio/Effects/bone_rattle.ogg
  - type: Damageable
    damageContainer: Biological
    damageModifierSet: Skeleton
#  - type: DamageVisuals
#    damageOverlayGroups:
#      Brute:
#        sprite: _Shitmed/Mobs/Effects/brute_damage.rsi
#        color: "#555555AA"
#      Burn:
#        sprite: _Shitmed/Mobs/Effects/burn_damage.rsi
  - type: MobState
  - type: MobThresholds
    thresholds:
      0: Alive
      100: Critical
      150: Dead
  - type: TransferMindOnGib
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 150
      behaviors:
      - !type:GibBehavior # Shitmed Change
        gibContents: Skip # Shitmed Change
  - type: SlowOnDamage #modified speeds because they're so weak
    speedModifierThresholds:
      60: 0.9
      80: 0.7
  - type: Speech
    speechVerb: Skeleton
  - type: ZombieImmune
  - type: Vocal
    wilhelm: "/Audio/_Goobstation/Voice/badtothebone.ogg" # Goobstation
    wilhelmProbability: 0.1 # Goobstation
    sounds:
      Male: Skeleton
      Female: Skeleton
      Unsexed: Skeleton
  - type: LanguageKnowledge # Einstein Engines - Language
    speaks:
    - TauCetiBasic
    - Calcic
    understands:
    - TauCetiBasic
    - Calcic
  - type: SkeletonAccent
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeCircle
          radius: 0.35
        density: 130
        restitution: 0.0
        mask:
          - MobMask
        layer:
          - MobLayer
  - type: Reactive
    groups:
      Flammable: [ Touch ]
      Extinguish: [ Touch ]
      Acidic: [ Touch, Ingestion ]
    reactions:
    - reagents: [ Water, SpaceCleaner ]
      methods: [ Touch ]
      effects:
      - !type:WashCreamPieReaction
    - reagents: [ Milk, MilkGoat, MilkSoy, MilkSpoiled ]
      # add new types of milk to reagents as they appear, oat milk isn't on the list
      # because turns out oat milk has 1/30th the amount of calcium in it compared to the rest
      # even if it's a meme - I did research
      methods: [ Touch ]
      effects: # TODO: when magic is around - make a milk transformation to a skeleton monster
      - !type:HealthChange
        scaleByQuantity: true # Woundmed
        ignoreBlockers: true # What do broken bones even mean in the context of a skeleton?.. # Woundmed
        splitDamage: SplitEnsureAll
        damage:
          groups:
            Burn: -4 # healing obviously up to discussion # Shitmed value
            Brute: -3 # these groups are the only 2 possible ways to damage a skeleton # Shitmed value
      - !type:PopupMessage
        type: Local
        visualType: Large
        messages: [ "skeleton-healed-by-milk-popup" ]
        probability: 0.25
    - reagents: [ MilkOat ]
      methods: [ Touch ]
      effects:
        - !type:PopupMessage
          type: Local
          visualType: Large
          messages: [ "skeleton-sprayed-by-oat-milk-popup" ]
          probability: 0.5
  - type: FireVisuals
    alternateState: Standing
  - type: FlashImmunity
  - type: Inventory
    femaleDisplacements:
      jumpsuit:
        sizeMaps:
          32:
            sprite: Mobs/Species/Human/displacement.rsi
            state: jumpsuit-female
  - type: SurgeryTarget # Goobstation
    sepsisImmune: true
  - type: Tag # Goobstation
    tags:
    - CanPilot
    - FootstepSound
    - DoorBumpOpener
    - AnomalyHost
    - Undead
  - type: TypingIndicator
    proto: skeleton
  - type: FacehuggerImmune # Goobstation - Xenomorphs

- type: entity
  parent: BaseSpeciesDummy
  id: MobSkeletonPersonDummy
  categories: [ HideSpawnMenu ]
  components:
  - type: HumanoidAppearance
    species: Skeleton
  - type: Inventory
    femaleDisplacements:
      jumpsuit:
        sizeMaps:
          32:
            sprite: Mobs/Species/Human/displacement.rsi
            state: jumpsuit-female
