# SPDX-FileCopyrightText: 2020 Paul Ritter <ritter.paul1@googlemail.com>
# SPDX-FileCopyrightText: 2020 Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 Víctor Aguilera Puerto <zddm@outlook.es>
# SPDX-FileCopyrightText: 2020 Ygg01 <daniel.fath7@gmail.com>
# SPDX-FileCopyrightText: 2021 Acruid <shatter66@gmail.com>
# SPDX-FileCopyrightText: 2021 Clyybber <darkmine956@gmail.com>
# SPDX-FileCopyrightText: 2021 FoLoKe <36813380+FoLoKe@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Leo <lzimann@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Metal Gear Sloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2021 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <zddm@outlook.es>
# SPDX-FileCopyrightText: 2021 Visne <39844191+Visne@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Ygg01 <y.laughing.man.y@gmail.com>
# SPDX-FileCopyrightText: 2021 collinlunn <60152240+collinlunn@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 cyclowns <cyclowns@protonmail.ch>
# SPDX-FileCopyrightText: 2021 komunre <49118681+komunre@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 mirrorcult <notzombiedude@gmail.com>
# SPDX-FileCopyrightText: 2022 20kdc <asdd2808@gmail.com>
# SPDX-FileCopyrightText: 2022 CommieFlowers <rasmus.cedergren@hotmail.com>
# SPDX-FileCopyrightText: 2022 CrudeWax <75271456+CrudeWax@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Fishfish458 <47410468+Fishfish458@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 Rane <60792108+Elijahrane@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 fishfish458 <fishfish458>
# SPDX-FileCopyrightText: 2022 keronshb <54602815+keronshb@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 metalgearsloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2022 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 rolfero <45628623+rolfero@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 DrSmugleaf <drsmugleaf@gmail.com>
# SPDX-FileCopyrightText: 2023 I.K <45953835+notquitehadouken@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Jezithyr <jezithyr@gmail.com>
# SPDX-FileCopyrightText: 2023 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2023 Nairod <110078045+Nairodian@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Nim <128169402+Nimfar11@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Whisper <121047731+QuietlyWhisper@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 faint <46868845+ficcialfaint@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 liltenhead <104418166+liltenhead@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 Aiden <aiden@djkraz.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 ArkiveDev <95712736+ArkiveDev@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Boaz1111 <149967078+Boaz1111@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Doomsdrayk <robotdoughnut@comcast.net>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Fishbait <Fishbait@git.ml>
# SPDX-FileCopyrightText: 2024 Flareguy <78941145+Flareguy@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 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ko4ergaPunk <62609550+Ko4ergaPunk@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MilenVolf <63782763+MilenVolf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.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 Redfire1331 <125223432+Redfire1331@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Rouge2t7 <81053047+Sarahon@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Tayrtahn <tayrtahn@gmail.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 Vasilis <vasilis@pikachu.systems>
# 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 fishbait <gnesse@gmail.com>
# SPDX-FileCopyrightText: 2024 lzk <124214523+lzk228@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 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 Арт <123451459+JustArt1m@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Aineias1 <dmitri.s.kiselev@gmail.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 FaDeOkno <143940725+FaDeOkno@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 McBosserson <148172569+McBosserson@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Milon <plmilonpl@gmail.com>
# SPDX-FileCopyrightText: 2025 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2025 Rinary <72972221+Rinary1@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Rouden <149893554+Roudenn@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Spatison <137375981+Spatison@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 TheBorzoiMustConsume <197824988+TheBorzoiMustConsume@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Unlumination <144041835+Unlumy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 coderabbitai[bot] <136622811+coderabbitai[bot]@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 gluesniffler <linebarrelerenthusiast@gmail.com>
# SPDX-FileCopyrightText: 2025 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 username <113782077+whateverusername0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 whateverusername0 <whateveremail>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  name: space carp
  id: BaseMobCarp
  parent: [ SimpleSpaceMobBase, FlyingMobBase, MobCombat ]
  description: It's a space carp.
  abstract: true
  components:
    - type: WeatherImmune
    - type: InputMover
    - type: MobMover
    - type: HTN
      rootTask:
        task: SimpleHostileCompound
      blackboard:
        NavSmash: !type:Bool
          true
    - type: NpcFactionMember
      factions:
      - Dragon
    - type: Sprite
      drawdepth: Mobs
      sprite: Mobs/Aliens/Carps/space.rsi
      layers:
      - map: [ "enum.DamageStateVisualLayers.Base" ]
        state: alive
    - type: CombatMode
    - type: Physics
    - type: Fixtures
      fixtures:
        fix1:
          shape:
            !type:PhysShapeCircle
            radius: 0.40
          density: 80
          mask:
            - FlyingMobMask
          layer:
            - FlyingMobLayer
    - type: MobState
    - type: MobThresholds
      thresholds:
        0: Alive
        40: Dead
    - type: MovementSpeedModifier
      baseWalkSpeed: 2.5
      baseSprintSpeed: 3.5
    - type: Stamina
      critThreshold: 100
    - type: DamageStateVisuals
      states:
        Alive:
          Base: alive
          BaseUnshaded: mouth
        Dead:
          Base: dead
          BaseUnshaded: dead_mouth
    - type: Butcherable
      spawned:
        - id: FoodMeatFish
          amount: 2
        - id: MaterialToothSpaceCarp1
          amount: 1
          maxAmount: 4
    - type: MeleeWeapon
      altDisarm: false
      angle: 0
      animation: WeaponArcBite
      soundHit:
        path: /Audio/Effects/bite.ogg
      damage:
        types:
          Blunt: 5
          Slash: 7
    - type: TypingIndicator
      proto: alien
    - type: Tag
      tags:
        - Carp
        - DoorBumpOpener
        - CannotSuicide
    # - type: ReplacementAccent
    #   accent: genericAggressive
    - type: LanguageKnowledge # goob edit - swap replacement accent for language
      speaks:
      - Carptongue
      understands:
      - TauCetiBasic
      - Carptongue
    - type: Speech
      speechVerb: LargeMob
    - type: InteractionPopup
      interactSuccessString: petting-success-carp
      interactFailureString: petting-failure-carp
      interactFailureSound:
        path: /Audio/Effects/bite.ogg
    - type: Body # Shitmed: Special carp organs
      prototype: Carp
    - type: NightVision # Goobstation - Nigthvision
      color: "#808080"
      activateSound: null
      deactivateSound: null
    - type: VentCrawler # Goobstation
    - type: Fauna # Lavaland Change

- type: entity
  parent: BaseMobCarp
  id: MobCarp
  components:
  - type: Sprite
    layers:
    - map: [ "enum.DamageStateVisualLayers.Base" ]
      state: alive
    - map: [ "enum.DamageStateVisualLayers.BaseUnshaded" ]
      state: mouth
      shader: unshaded
  - type: RandomSprite
    available:
    - enum.DamageStateVisualLayers.Base:
        alive: Rainbow
      enum.DamageStateVisualLayers.BaseUnshaded:
        mouth: ""

- type: entity
  name: magicarp
  parent: BaseMobCarp
  id: MobCarpMagic
  description: Looks like some kind of fish. Might be magical.
  components:
    - type: Sprite
      sprite: Mobs/Aliens/Carps/magic.rsi
    - type: TypingIndicator
      proto: guardian

- type: entity
  name: holocarp
  parent: BaseMobCarp
  id: MobCarpHolo
  description: Carp made out of holographic energies. Sadly for you, it is very much real.
  components:
    - type: Sprite
      sprite: Mobs/Aliens/Carps/holo.rsi
    - type: Physics
    - type: Fixtures
      fixtures:
        fix1:
          shape:
            !type:PhysShapeCircle
            radius: 0.40
          density: 10
          mask:
            - MobMask
          layer:
            - Opaque
    - type: TypingIndicator
      proto: robot

- type: entity
  parent: MobCarp
  id: MobCarpRainbow
  name: rainbow carp
  description: Wow such a shiny fishie!
  components:
  - type: PointLight
    radius: 1.5
    energy: 0.5
  - type: RgbLightController
    layers: [ 0 ]

- type: entity
  id: MobCarpSalvage
  parent: MobCarp
  suffix: "Salvage Ruleset"
  components:
    - type: SalvageMobRestrictions
#    - type: MobThresholds # Lavaland change
#      thresholds:
#        0: Alive
#        30: Dead

- type: entity
  name: space carp
  id: MobCarpDragon
  suffix: DragonBrood
  parent: MobCarp
  components:
    - type: GhostRole
      allowMovement: true
      allowSpeech: true
      makeSentient: true
      name: ghost-role-information-sentient-carp-name
      description: ghost-role-information-sentient-carp-description
      rules: ghost-role-information-space-dragon-summoned-carp-rules
      mindRoles:
      - MindRoleGhostRoleTeamAntagonistFlock
    - type: GhostTakeoverAvailable
    - type: HTN
      rootTask:
        task: DragonCarpCompound
    - type: Tag
      tags:
        - Carp
        - DoorBumpOpener
    # Goobstation - Collective mind
    - type: CollectiveMind
      defaultChannel: Dragonmind
      channels:
      - Dragonmind

- type: entity
  id: MobCarpDungeon
  parent: MobCarp
  suffix: Dungeon
  components:
  - type: MobThresholds
    thresholds:
      0: Alive
      50: Dead
  - type: SlowOnDamage
    speedModifierThresholds:
      25: 0.7
  - type: MeleeWeapon
    damage:
      types:
        Slash: 6

- type: entity
  name: sharkminnow
  parent: BaseMobCarp
  id: MobShark
  description: A dangerous shark from the blackness of endless space, who loves to drink blood.
  components:
    - type: Sprite
      sprite: Mobs/Aliens/Carps/sharkminnow.rsi
      layers:
      - map: [ "enum.DamageStateVisualLayers.Base" ]
        state: alive
      - map: [ "enum.DamageStateVisualLayers.BaseUnshaded" ]
        state: mouth
        shader: unshaded
    - type: Fixtures
      fixtures:
        fix1:
          shape:
            !type:PhysShapeCircle
            radius: 0.40
          density: 100
          mask:
            - FlyingMobMask
          layer:
            - FlyingMobLayer
    - type: MobThresholds
      thresholds:
        0: Alive
        #82: Dead # Might seem random, but this brings up the hits to kill with a crusher mark to 3
        150: Dead # Lavaland Change
    - type: Stamina
      critThreshold: 150
    - type: DamageStateVisuals
      states:
        Alive:
          Base: alive
          BaseUnshaded: mouth
        Dead:
          Base: dead
          BaseUnshaded: dead_mouth
    - type: Body
      prototype: Bloodsucker
      requiredLegs: 1
    - type: Butcherable
      spawned:
        - id: FoodMeatFish
          amount: 4
        - id: MaterialToothSharkminnow1
          amount: 3
    - type: MeleeWeapon
      damage:
        types:
          Slash: 10
          Bloodloss: 5

- type: entity
  id: MobSharkSalvage
  parent: MobShark
  suffix: "Salvage Ruleset"
  components:
    - type: SalvageMobRestrictions
