# SPDX-FileCopyrightText: 2021 Metal Gear Sloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2022 CommieFlowers <rasmus.cedergren@hotmail.com>
# SPDX-FileCopyrightText: 2022 CrudeWax <75271456+CrudeWax@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Flipp Syder <76629141+vulppine@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 MaxNox7 <99754140+MaxNox7@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 keronshb <54602815+keronshb@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 metalgearsloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2022 rolfero <45628623+rolfero@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 DrSmugleaf <drsmugleaf@gmail.com>
# SPDX-FileCopyrightText: 2023 HerCoyote23 <131214189+HerCoyote23@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 I.K <45953835+notquitehadouken@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Jezithyr <jezithyr@gmail.com>
# SPDX-FileCopyrightText: 2023 Nairod <110078045+Nairodian@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Whisper <121047731+QuietlyWhisper@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 lzk228 <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 notquitehadouken <1isthisameme>
# SPDX-FileCopyrightText: 2024 AJCM <AJCM@tutanota.com>
# SPDX-FileCopyrightText: 2024 Alex Evgrashin <aevgrashin@yandex.ru>
# SPDX-FileCopyrightText: 2024 Alex Pavlenko <diraven@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Alice "Arimah" Heurlin <30327355+arimah@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Alzore <140123969+Blackern5000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 ArkiveDev <95712736+ArkiveDev@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Boaz1111 <149967078+Boaz1111@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Brandon Hu <103440971+Brandon-Huu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 CaasGit <87243814+CaasGit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Cojoke <83733158+Cojoke-dot@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Doomsdrayk <robotdoughnut@comcast.net>
# SPDX-FileCopyrightText: 2024 DrEnzyme <DrEnzyme@gmail.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Elysium206 <151651971+Elysium206@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 EmoGarbage404 <retron404@gmail.com>
# SPDX-FileCopyrightText: 2024 Eoin Mcloughlin <helloworld@eoinrul.es>
# SPDX-FileCopyrightText: 2024 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Floofi <126319569+Shadowtheprotogen546@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ghagliiarghii <68826635+Ghagliiarghii@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 HS <81934438+HolySSSS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Hrosts <35345601+Hrosts@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ian <ignaz.k@live.de>
# SPDX-FileCopyrightText: 2024 Joel Zimmerman <JoelZimmerman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 JustCone <141039037+JustCone14@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 K-Dynamic <20566341+K-Dynamic@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Kevin Zheng <kevinz5000@gmail.com>
# SPDX-FileCopyrightText: 2024 Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ko4ergaPunk <62609550+Ko4ergaPunk@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kukutis96513 <146854220+Kukutis96513@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Lye <128915833+Lyroth001@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MerrytheManokit <167581110+MerrytheManokit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mervill <mervills.email@gmail.com>
# SPDX-FileCopyrightText: 2024 MetalSage <74924875+MetalSage@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MetalSage <metalsage.official@gmail.com>
# SPDX-FileCopyrightText: 2024 Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MureixloI <132683811+MureixloI@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 NakataRin <45946146+NakataRin@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 OrangeMoronage9622 <whyteterry0092@gmail.com>
# SPDX-FileCopyrightText: 2024 PJBot <pieterjan.briers+bot@gmail.com>
# SPDX-FileCopyrightText: 2024 Partmedia <kevinz5000@gmail.com>
# SPDX-FileCopyrightText: 2024 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Preston Smith <92108534+thetolbean@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Redfire1331 <125223432+Redfire1331@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Repo <47093363+Titian3@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 RiceMar1244 <138547931+RiceMar1244@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Rouge2t7 <81053047+Sarahon@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Scribbles0 <91828755+Scribbles0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Simon <63975668+Simyon264@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Stalen <33173619+stalengd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TakoDragon <69509841+BackeTako@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Tayrtahn <tayrtahn@gmail.com>
# SPDX-FileCopyrightText: 2024 Thomas <87614336+Aeshus@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Truoizys <153248924+Truoizys@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TsjipTsjip <19798667+TsjipTsjip@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ubaser <134914314+UbaserB@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Unkn0wn_Gh0st <shadowstalkermll@gmail.com>
# SPDX-FileCopyrightText: 2024 Vasilis <vasilis@pikachu.systems>
# SPDX-FileCopyrightText: 2024 Vigers Ray <60344369+VigersRay@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 WarMechanic <69510347+WarMechanic@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 beck-thompson <107373427+beck-thompson@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 brainfood1183 <113240905+brainfood1183@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deathride58 <deathride58@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2024 dffdff2423 <dffdff2423@gmail.com>
# SPDX-FileCopyrightText: 2024 eoineoineoin <github@eoinrul.es>
# SPDX-FileCopyrightText: 2024 foboscheshir <156405958+foboscheshir@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 marbow <152051971+marboww@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 mhamster <81412348+mhamsterr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 neutrino <67447925+neutrino-laser@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 no <165581243+pissdemon@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 osjarw <62134478+osjarw@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2024 redfire1331 <Redfire1331@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 saintmuntzer <47153094+saintmuntzer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 shamp <140359015+shampunj@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 strO0pwafel <153459934+strO0pwafel@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 stroopwafel <j.o.luijkx@student.tudelft.nl>
# SPDX-FileCopyrightText: 2024 themias <89101928+themias@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 to4no_fix <156101927+chavonadelal@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 voidnull000 <18663194+voidnull000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Арт <123451459+JustArt1m@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <aiden@djkraz.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 ImHoks <142083149+ImHoks@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 MilenVolf <63782763+MilenVolf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Theodore Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# Does not inherit from simplemob
- type: entity
  abstract: true
  name: GuardianBase
  id: MobGuardianBase
  description: guardian
  save: false
  components:
    - type: LagCompensation
    - type: GhostRole
      allowMovement: true
      allowSpeech: true
      makeSentient: true
      name: ghost-role-information-guardian-name
      description: ghost-role-information-guardian-description
      rules: ghost-role-information-familiar-rules
      mindRoles:
      - MindRoleGhostRoleFamiliar
      raffle:
        settings: default
      requirements: # Goobstation - ghost roles requirements
      - !type:OverallPlaytimeRequirement
        time: 18000 #5 hours
    - type: GhostTakeoverAvailable
    - type: Input
      context: "human"
    - type: MobMover
    - type: InputMover
    - type: MovementSpeedModifier
      baseWalkSpeed: 4
      baseSprintSpeed: 5.5
    - type: DamageOnHighSpeedImpact
      damage:
        types:
          Blunt: 5
      soundHit:
        collection: MetalThud
    - type: RandomSprite
      available:
        - enum.DamageStateVisualLayers.Base:
            magic_base: ""
          enum.DamageStateVisualLayers.BaseUnshaded:
            magic_flare: Sixteen
        - enum.DamageStateVisualLayers.Base:
            miner_base: ""
          enum.DamageStateVisualLayers.BaseUnshaded:
            miner_flare: Sixteen
        - enum.DamageStateVisualLayers.Base:
            tech_base: ""
          enum.DamageStateVisualLayers.BaseUnshaded:
            tech_flare: Sixteen
    - type: Sprite
      drawdepth: Mobs
      sprite: Mobs/Aliens/Guardians/guardians.rsi
      layers:
        - state: tech_base
          map: [ "enum.DamageStateVisualLayers.Base" ]
        - state: tech_flare
          map: [ "enum.DamageStateVisualLayers.BaseUnshaded" ]
          color: "#40a7d7"
          shader: unshaded
      noRot: true
    - type: Clickable
    - type: InteractionOutline
    - type: Physics
      bodyType: KinematicController
    - type: Fixtures
      fixtures:
        fix1:
          shape:
            !type:PhysShapeCircle
            radius: 0.35
          density: 25
          mask:
            - FlyingMobMask
          layer:
            - Opaque
    - type: Damageable
      damageContainer: Biological
    - type: MobState
      allowedStates:
        - Alive
    - type: CombatMode
    - type: Internals
    - type: Examiner
    - type: Speech
      speechVerb: Robotic
    - type: TypingIndicator
      proto: guardian
    - type: Pullable
    - type: MeleeWeapon
      hidden: false
      altDisarm: false
      animation: WeaponArcFist
      attackRate: 1.8
      autoAttack: true
      soundHit:
        collection: Punch
      damage:
        types:
          Blunt: 20
          Structural: 20
    - type: MeleeSpeech
    - type: UserInterface
      interfaces:
        enum.MeleeSpeechUiKey.Key:
          type: MeleeSpeechBoundUserInterface
    - type: Actions
    - type: Guardian
    - type: Tag
      tags:
        - CannotSuicide
    # <Goobstation>
    - type: MovementIgnoreGravity
    - type: ActionGrant
      actions:
        - ActionSelfToggleGuardian
    - type: Targeting
    # </Goobstation>

# From the uplink injector
- type: entity
  name: Holoparasite
  id: MobHoloparasiteGuardian
  parent: MobGuardianBase
  description: A mesmerising whirl of hard-light patterns weaves a marvelous, yet oddly familiar visage. It stands proud, tuning into its owner's life to sustain itself.
  components:
    - type: GhostRole
      allowMovement: true
      allowSpeech: true
      makeSentient: true
      name: ghost-role-information-holoparasite-name
      description: ghost-role-information-holoparasite-description
      rules: ghost-role-information-familiar-rules
      raffle:
        settings: default
    - type: GhostTakeoverAvailable
    - type: NameIdentifier
      group: Holoparasite
    - type: TypingIndicator
      proto: holo
    - type: Sprite
      layers:
        - state: tech_base
          map: [ "enum.DamageStateVisualLayers.Base" ]
        - state: tech_flare
          map: [ "enum.DamageStateVisualLayers.BaseUnshaded" ]
          color: "#40a7d7"
          shader: unshaded
    - type: HTN
      rootTask:
        task: SimpleHumanoidHostileCompound

# From Wizard deck of cards
- type: entity
  name: Ifrit
  parent: MobGuardianBase
  id: MobIfritGuardian
  description: A corrupted jinn, ripped from fitra to serve the wizard's petty needs. It stands wicked, tuning into its owner's life to sustain itself.
  components:
    - type: GhostRole
      allowMovement: true
      allowSpeech: true
      makeSentient: true
      name: ghost-role-information-ifrit-name
      description: ghost-role-information-ifrit-description
      rules: ghost-role-information-familiar-rules
      raffle:
        settings: default
    - type: GhostTakeoverAvailable
    - type: RandomSprite
      available:
        - enum.DamageStateVisualLayers.BaseUnshaded:
            magic_flare: Sixteen
    - type: Sprite
      layers:
        - state: magic_base
          map: [ "enum.DamageStateVisualLayers.Base" ]
        - state: magic_flare
          map: [ "enum.DamageStateVisualLayers.BaseUnshaded" ]
          color: "#40a7d7"
          shader: unshaded
    - type: NpcFactionMember # Goobstation
      factions:
        - Wizard
    - type: HTN # Goobstation
      rootTask:
        task: SimpleHumanoidHostileCompound
    - type: Tag # Goobstation
      tags:
        - CannotSuicide
        - ShowWizardIcons

- type: entity
  name: HoloClown
  id: MobHoloClownGuardian
  parent: [MobGuardianBase, InventoryBase]
  description: A mesmerising whirl of hard-light patterns weaves a blue colored clown of dubious origin.
  components:
    - type: GhostRole
      allowMovement: true
      allowSpeech: true
      makeSentient: true
      name: ghost-role-information-holoclown-name
      description: ghost-role-information-holoclown-description
      rules: ghost-role-information-familiar-rules
      raffle:
        settings: default
    - type: GhostTakeoverAvailable
    - type: NameIdentifier
      group: Holoparasite
    - type: FootstepModifier
      footstepSoundCollection:
        collection: FootstepClown
    - type: Speech
      speechVerb: Cluwne
    - type: TypingIndicator
      proto: holo
    - type: RandomSprite
      available:
        - enum.DamageStateVisualLayers.Base:
            holoclown_base: ""
          enum.DamageStateVisualLayers.BaseUnshaded:
            holoclown_flare: Sixteen
        - enum.DamageStateVisualLayers.Base:
            holoclown_base: ""
          enum.DamageStateVisualLayers.BaseUnshaded:
            holoclown_flare: Sixteen
        - enum.DamageStateVisualLayers.Base:
            holoclown_base: ""
          enum.DamageStateVisualLayers.BaseUnshaded:
            holoclown_flare: Sixteen
    - type: Sprite
      layers:
        - state: holoclown_base
          map: [ "enum.DamageStateVisualLayers.Base" ]
        - state: holoclown_flare
          map: [ "enum.DamageStateVisualLayers.BaseUnshaded" ]
          color: "#8adaff"
          shader: unshaded
    - type: Body
      prototype: Primate
    - type: Tag
      tags:
        - CannotSuicide
        - FootstepSound
    - type: Inventory
      templateId: holoclown
    - type: Hands
    - type: ComplexInteraction
    - type: Clumsy
      gunShootFailDamage:
        types:
          Blunt: 5
          Piercing: 4
        groups:
          Burn: 3
      catchingFailDamage:
        types:
          Blunt: 1
    - type: MeleeWeapon
      angle: 30
      animation: WeaponArcFist
      attackRate: 1.8
      soundHit:
        collection: BikeHorn
      damage:
        types:
          Blunt: 5
    - type: Loadout
      prototypes: [ HoloClownGear ]
    - type: RandomMetadata
      nameSegments:
      - NamesClown
    - type: NpcFactionMember
      factions:
        - Syndicate
    - type: HTN
      rootTask:
        task: SimpleHumanoidHostileCompound

- type: entity
  parent: BaseMentalAction
  id: ActionToggleGuardian
  name: Toggle Guardian
  description: Either manifests the guardian or recalls it back into your body
  components:
  - type: Action
    icon: Interface/Actions/manifest.png
    useDelay: 2
    checkCanInteract: false
    checkConsciousness: false
  - type: InstantAction
    event: !type:GuardianToggleActionEvent

# Goobstation
- type: entity
  parent: BaseMentalAction
  id: ActionSelfToggleGuardian
  name: Recall Self
  description: Recalls yourself back into your host's body
  components:
  - type: Action
    icon: Interface/Actions/manifest.png
    useDelay: 2
    checkCanInteract: false
    checkConsciousness: false
  - type: InstantAction
    event: !type:GuardianToggleSelfActionEvent # can only recall
