# SPDX-FileCopyrightText: 2022 Alex Evgrashin <aevgrashin@yandex.ru>
# SPDX-FileCopyrightText: 2022 Flipp Syder <76629141+vulppine@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Moony <moonheart08@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Nairod <110078045+Nairodian@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Rane <60792108+Elijahrane@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Sam Weaver <weaversam8@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 areit <77842470+areitpog@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 moonheart08 <moonheart08@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 router <messagebus@vk.com>
# SPDX-FileCopyrightText: 2023 0x6273 <0x40@keemail.me>
# SPDX-FileCopyrightText: 2023 Alekshhh <44923899+Alekshhh@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Feluk6174 <77207907+Feluk6174@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 GoodWheatley <109803540+GoodWheatley@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Interrobang01 <113810873+Interrobang01@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Kevin Zheng <kevinz5000@gmail.com>
# SPDX-FileCopyrightText: 2023 Scribbles0 <91828755+Scribbles0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Vordenburg <114301317+Vordenburg@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2023 lapatison <100279397+lapatison@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 Alzore <140123969+Blackern5000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ashley Woodiss-Field <ash@DESKTOP-H64M4AI.localdomain>
# SPDX-FileCopyrightText: 2024 ColesMagnum <98577947+AW-FulCode@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Kira Bridgeton <161087999+Verbalase@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Stomf <5dorkydorks@gmail.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2024 potato1234_x <79580518+potato1234x@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 takemysoult <143123247+takemysoult@users.noreply.github.com>
# 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 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <93730715+Aviu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 RedMush1 <axmetvaliev1@gmail.com>
# SPDX-FileCopyrightText: 2025 Steve <marlumpy@gmail.com>
# SPDX-FileCopyrightText: 2025 Ted Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 marc-pelletier <113944176+marc-pelletier@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 pheenty <fedorlukin2006@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: reagent
  id: Desoxyephedrine
  name: reagent-name-desoxyephedrine
  group: Narcotics
  desc: reagent-desc-desoxyephedrine
  physicalDesc: reagent-physical-desc-translucent
  flavor: bitter
  color: "#FAFAFA"
  boilingPoint: 212.0  # Dexosyephedrine vape when?
  meltingPoint: 170.0
  metabolisms:
    Poison:
      effects:
      - !type:HealthChange
        conditions:
        - !type:OrganType # Goobstation - Yowie
          type: Yowie
        damage:
          groups:
            Brute: -1
          types:
            Heat: -0.5
            Shock: -0.5
            Cold: -0.5
            Radiation: -0.5
      - !type:HealthChange
        conditions:
        - !type:OrganType # Goobstation - Yowie
          type: Yowie
          shouldHave: false
        damage:
          types:
            Poison: 0.75
      - !type:HealthChange
        conditions:
        - !type:OrganType # Goobstation - Yowie
          type: Yowie
          shouldHave: false
        - !type:ReagentThreshold
          min: 30
        damage:
          types:
            Poison: 2 # this is added to the base damage of the meth.
            Asphyxiation: 2
    Narcotic:
      effects:
      - !type:MovespeedModifier
        walkSpeedModifier: 1.35
        sprintSpeedModifier: 1.35
      - !type:GenericStatusEffect
        key: Stutter
        component: StutteringAccent
      - !type:Jitter
      - !type:GenericStatusEffect
        key: Stun
        time: 3
        type: Remove
      - !type:GenericStatusEffect
        key: KnockedDown
        time: 3
        type: Remove
      - !type:ModifyStatusEffect
        conditions:
        - !type:ReagentThreshold
          reagent: Haloperidol
          max: 0.01
        effectProto: StatusEffectDrowsiness
        time: 10
        type: Remove
      - !type:GenericStatusEffect # goob edit
        key: Adrenaline
        component: IgnoreSlowOnDamage
        time: 5
      - !type:RemoveComponentEffect # goob edit
        component: DelayedKnockdown
        locale: reagent-effect-guidebook-remove-delayed-knockdown
    Medicine:
      effects:
      - !type:ResetNarcolepsy
        conditions:
        - !type:ReagentThreshold
          min: 20

- type: reagent
  id: Ephedrine
  name: reagent-name-ephedrine
  group: Narcotics
  desc: reagent-desc-ephedrine
  physicalDesc: reagent-physical-desc-powdery
  flavor: bitter
  color: "#D2FFFA"
  boilingPoint: 255.0
  meltingPoint: 36.0
  metabolisms:
    Narcotic:
      effects:
      - !type:HealthChange
        conditions:
        - !type:OrganType # Goobstation - Yowie
          type: Yowie
        damage:
          groups:
            Brute: -1
          types:
            Heat: -0.5
            Shock: -0.5
            Cold: -0.5
            Radiation: -0.5
      - !type:MovespeedModifier
        walkSpeedModifier: 1.25
        sprintSpeedModifier: 1.25
      - !type:HealthChange
        conditions:
        - !type:OrganType # Goobstation - Yowie
          type: Yowie
          shouldHave: false
        - !type:ReagentThreshold
          min: 20
        damage:
          types:
            Poison: 2 # this is added to the base damage of the meth.
            Asphyxiation: 2
      - !type:Jitter
      - !type:GenericStatusEffect
        key: Stun
        time: 1
        type: Remove
      - !type:GenericStatusEffect
        key: KnockedDown
        time: 1
        type: Remove
      - !type:ModifyStatusEffect
        conditions:
        - !type:ReagentThreshold
          reagent: Haloperidol
          max: 0.01
        effectProto: StatusEffectDrowsiness
        time: 10
        type: Remove
      - !type:PopupMessage
        visualType: Medium
        messages: ["ephedrine-effect-tight-pain", "ephedrine-effect-heart-pounds"]
        type: Local
        probability: 0.05
      - !type:GenericStatusEffect # goob edit
        key: Adrenaline
        component: IgnoreSlowOnDamage
        time: 5
      - !type:RemoveComponentEffect # goob edit
        component: DelayedKnockdown
        locale: reagent-effect-guidebook-remove-delayed-knockdown
      - !type:SuppressPain # Shitmed Change
        amount: 1.2
        time: 10 # it accumulated 1.2*quantity and then exists for 30 seconds.
    Medicine:
      effects:
      - !type:ResetNarcolepsy
        conditions:
        - !type:ReagentThreshold
          min: 30

- type: reagent
  id: Stimulants
  name: reagent-name-stimulants
  group: Narcotics
  desc: reagent-desc-stimulants
  physicalDesc: reagent-physical-desc-energizing
  flavor: sharp
  color: "#9A040E"
  boilingPoint: 212.0
  meltingPoint: 170.0
  metabolisms:
    Narcotic:
      metabolismRate: 0.25 # Goobstation edit
      effects:
      - !type:HealthChange
        conditions:
        - !type:OrganType # Goobstation - Yowie
          type: Yowie
        damage:
          groups:
            Brute: -1
          types:
            Heat: -0.5
            Shock: -0.5
            Cold: -0.5
            Radiation: -0.5
      - !type:MovespeedModifier
        walkSpeedModifier: 1.3
        sprintSpeedModifier: 1.3
      - !type:HealthChange
        conditions:
        - !type:OrganType # Goobstation - Yowie
          type: Yowie
          shouldHave: false
        - !type:ReagentThreshold
          min: 20 #please wait 3 minutes before using another stimpack, also goob edit
        damage:
          types:
            Poison: 1
      - !type:AdjustReagent
        conditions:
        - !type:ReagentThreshold
          reagent: ChloralHydrate
          min: 1
        reagent: ChloralHydrate
        amount: -10
      - !type:GenericStatusEffect
        key: Stun
        time: 3
        type: Remove
      - !type:GenericStatusEffect
        key: KnockedDown
        time: 3
        type: Remove
      - !type:GenericStatusEffect
        key: StaminaModifier
        component: StaminaModifier
        time: 3
        type: Add
      - !type:ModifyStatusEffect
        effectProto: StatusEffectForcedSleeping
        time: 3
        type: Remove
      - !type:ModifyStatusEffect
        conditions:
        - !type:ReagentThreshold
          reagent: Haloperidol
          max: 0.01
        effectProto: StatusEffectDrowsiness
        time: 10
        type: Remove
      - !type:GenericStatusEffect # goob edit
        key: Adrenaline
        component: IgnoreSlowOnDamage
        time: 5
      - !type:RemoveComponentEffect # goob edit
        component: DelayedKnockdown
        locale: reagent-effect-guidebook-remove-delayed-knockdown
      - !type:TakeStaminaDamage # goob edit
        amount: -10
        immediate: true
      - !type:SuppressPain
          amount: 1.2
          time: 30 # it accumulated 1.2*quantity and then exists for 30 seconds.
    Medicine:
      metabolismRate: 0.25 # Goobstation edit
      effects:
        - !type:ResetNarcolepsy
        - !type:SatiateHunger
          factor: 1
        - !type:SatiateThirst
          factor: 1
        - !type:HealthChange
          conditions:
          - !type:TotalDamage
            min: 70 # only heals when you're more dead than alive
          damage: # heals at the same rate as tricordrazine, doesn't heal poison because if you OD'd I'm not giving you a safety net
            groups:
              Burn: -1
              Brute: -1

- type: reagent
  id: THC
  name: reagent-name-thc
  group: Narcotics
  desc: reagent-desc-thc
  flavor: bitter
  flavorMinimum: 0.05
  color: "#808080"
  physicalDesc: reagent-physical-desc-crystalline
  plantMetabolism:
  - !type:PlantAdjustNutrition
    amount: -5
  - !type:PlantAdjustHealth
    amount: -1
  metabolisms:
    Narcotic:
      effects:
      - !type:HealthChange
        conditions:
        - !type:OrganType # Goobstation - Yowie
          type: Yowie
        damage:
          groups:
            Brute: -1
          types:
            Heat: -0.5
            Shock: -0.5
            Cold: -0.5
            Radiation: -0.5
      - !type:ModifyStatusEffect
        effectProto: StatusEffectSeeingRainbow
        time: 16
        type: Add
        refresh: false

- type: reagent
  id: Nicotine
  name: reagent-name-nicotine
  group: Narcotics
  desc: reagent-desc-nicotine
  flavor: bitter
  color: "#C0C0C0"
  physicalDesc: reagent-physical-desc-strong-smelling
  plantMetabolism:
  - !type:PlantAdjustHealth
    amount: -5
  metabolisms:
    Narcotic:
      effects:
      - !type:HealthChange
        conditions:
        - !type:OrganType # Goobstation - Yowie
          type: Yowie
        damage:
          groups:
            Brute: -0.2
          types:
            Heat: -0.1
            Shock: -0.1
            Cold: -0.1
            Radiation: -0.1

# TODO: Replace these nonstandardized effects with generic brain damage
- type: reagent
  id: Impedrezene
  name: reagent-name-impedrezene
  group: Narcotics
  desc: reagent-desc-impedrezene
  physicalDesc: reagent-physical-desc-acrid
  flavor: bitter
  color: "#215263"
  metabolisms:
    Narcotic:
      effects:
      - !type:HealthChange
        conditions:
        - !type:OrganType # Goobstation - Yowie
          type: Yowie
        damage:
          groups:
            Brute: -1
          types:
            Heat: -0.5
            Shock: -0.5
            Cold: -0.5
            Radiation: -0.5
      - !type:MovespeedModifier
        walkSpeedModifier: 0.65
        sprintSpeedModifier: 0.65
      - !type:HealthChange
        conditions:
        - !type:OrganType # Goobstation - Yowie
          type: Yowie
          shouldHave: false
        damage:
          types:
            Poison: 2
      - !type:ModifyStatusEffect
        effectProto: StatusEffectSeeingRainbow
        time: 10
        type: Add
        refresh: false
      - !type:ChemVomit # Vomiting is a symptom of brain damage
        probability: 0.05
      - !type:Drunk # Headaches and slurring are major symptoms of brain damage, this is close enough
        boozePower: 5

- type: reagent
  id: SpaceDrugs
  name: reagent-name-space-drugs
  group: Narcotics
  desc: reagent-desc-space-drugs
  physicalDesc: reagent-physical-desc-syrupy
  flavor: bitter
  color: "#63806e"
  metabolisms:
    Narcotic:
      effects:
      - !type:HealthChange
        conditions:
        - !type:OrganType # Goobstation - Yowie
          type: Yowie
        damage:
          groups:
            Brute: -1
          types:
            Heat: -0.5
            Shock: -0.5
            Cold: -0.5
            Radiation: -0.5
      - !type:ModifyStatusEffect
        effectProto: StatusEffectSeeingRainbow
        type: Add
        time: 5
        refresh: false

- type: reagent
  id: Bananadine
  name: reagent-name-bananadine
  group: Narcotics
  desc: reagent-desc-bananadine
  physicalDesc: reagent-physical-desc-powdery
  flavor: bitter
  color: "#ffff00"
  metabolisms:
    Narcotic:
      effects:
      - !type:HealthChange
        conditions:
        - !type:OrganType # Goobstation - Yowie
          type: Yowie
        damage:
          groups:
            Brute: -1
          types:
            Heat: -0.5
            Shock: -0.5
            Cold: -0.5
            Radiation: -0.5
      - !type:ModifyStatusEffect
        effectProto: StatusEffectSeeingRainbow
        type: Add
        time: 5
        refresh: false

# Probably replace this one with sleeping chem when putting someone in a comatose state is easier
- type: reagent
  id: Nocturine
  name: reagent-name-nocturine
  group: Narcotics
  desc: reagent-desc-nocturine
  physicalDesc: reagent-physical-desc-powdery
  color: "#128e80"
  boilingPoint: 444.0
  meltingPoint: 128.0
  metabolisms:
    Narcotic:
      effects:
      - !type:ModifyStatusEffect
        conditions:
        - !type:OrganType # Goobstation - Yowie
          type: Yowie
          shouldHave: false
        - !type:ReagentThreshold
          reagent: Nocturine
          min: 8
        effectProto: StatusEffectForcedSleeping
        time: 3
        type: Add

- type: reagent
  id: MuteToxin
  name: reagent-name-mute-toxin
  group: Narcotics
  desc: reagent-desc-mute-toxin
  physicalDesc: reagent-physical-desc-syrupy
  color: "#000000"
  boilingPoint: 255.0
  meltingPoint: 36.0
  metabolisms:
    Narcotic:
      effects:
      - !type:GenericStatusEffect
        conditions:
        - !type:OrganType # Goobstation - Yowie
          type: Yowie
          shouldHave: false
        key: Muted
        component: Muted
        type: Add
        time: 10
        refresh: false

- type: reagent
  id: NorepinephricAcid
  name: reagent-name-norepinephric-acid
  group: Narcotics
  desc: reagent-desc-norepinephric-acid
  physicalDesc: reagent-physical-desc-milky
  flavor: salty
  color: "#96a8b5"
  boilingPoint: 255.0
  meltingPoint: 36.0
  metabolisms:
    Narcotic:
      effects:
      - !type:PopupMessage
        type: Local
        messages:
        - generic-reagent-effect-burning-eyes
        - generic-reagent-effect-burning-eyes-a-bit
        - generic-reagent-effect-tearing-up
        - norepinephricacid-effect-eyelids
        - norepinephricacid-effect-eyes-itch
        - norepinephricacid-effect-vision-fade
        - norepinephricacid-effect-vision-fail
        probability: 0.08
      - !type:PopupMessage
        visualType: MediumCaution
        type: Local
        messages:
        - norepinephricacid-effect-eye-disconnect
        - norepinephricacid-effect-eye-pain
        - norepinephricacid-effect-darkness
        - norepinephricacid-effect-blindness
        conditions:
        - !type:ReagentThreshold
          min: 20
        probability: 0.03
        #If anyone wants to add a light dimming or grayscale effect when under 20u, be my guest
      - !type:GenericStatusEffect
        key: TemporaryBlindness
        component: TemporaryBlindness
        conditions:
        - !type:ReagentThreshold
          min: 20

- type: reagent
  id: TearGas
  name: reagent-name-tear-gas
  group: Narcotics
  desc: reagent-desc-tear-gas
  physicalDesc: reagent-physical-desc-milky
  flavor: salty
  color: "#ffffff4d"
  boilingPoint: 255.0
  meltingPoint: 36.0
  metabolisms:
    Narcotic:
      effects:
      - !type:PopupMessage
        type: Local
        probability: 0.08
        messages:
        - generic-reagent-effect-burning-eyes
        - generic-reagent-effect-burning-eyes-a-bit
        - generic-reagent-effect-tearing-up
        - norepinephricacid-effect-eyelids
        - norepinephricacid-effect-eyes-itch
        - norepinephricacid-effect-vision-fade
        - norepinephricacid-effect-vision-fail
      - !type:PopupMessage
        type: Local
        visualType: MediumCaution
        probability: 0.03
        messages:
        - norepinephricacid-effect-eye-disconnect
        - norepinephricacid-effect-eye-pain
        - norepinephricacid-effect-darkness
        - norepinephricacid-effect-blindness
        conditions:
        - !type:ReagentThreshold
          min: 5
      - !type:Emote
        emote: Scream
        probability: 0.08
        conditions:
        - !type:ReagentThreshold
          min: 4
      - !type:Emote
        emote: Cough
        probability: 0.08
      - !type:GenericStatusEffect
        key: TemporaryBlindness
        component: TemporaryBlindness
        conditions:
        - !type:ReagentThreshold
          min: 5
      - !type:MovespeedModifier
        walkSpeedModifier: 0.65
        sprintSpeedModifier: 0.65
        statusLifetime: 1.5
        conditions: # because of the remainding after effect, threshold is given so the effects ends simultaniously
        - !type:ReagentThreshold
          min: 4

- type: reagent
  id: Happiness
  name: reagent-name-happiness
  group: Narcotics
  desc: reagent-desc-happiness
  physicalDesc: reagent-physical-desc-soothing
  flavor: paintthinner
  color: "#EE35FF"
  metabolisms:
    Narcotic:
      effects:
      - !type:HealthChange
        conditions:
        - !type:OrganType # Goobstation - Yowie
          type: Yowie
        damage:
          groups:
            Brute: -1
          types:
            Heat: -0.5
            Shock: -0.5
            Cold: -0.5
            Radiation: -0.5
      - !type:Emote
        emote: Laugh
        showInChat: true
        probability: 0.1
        conditions:
        - !type:ReagentThreshold
          max: 20
      - !type:Emote
        emote: Whistle
        showInChat: true
        probability: 0.1
        conditions:
        - !type:ReagentThreshold
          max: 20
      - !type:Emote
        emote: Crying
        showInChat: true
        probability: 0.1
        conditions:
        - !type:ReagentThreshold
          min: 20
      - !type:PopupMessage # we dont have sanity/mood so this will have to do
        type: Local
        visualType: Medium
        messages:
        - "psicodine-effect-fearless"
        - "psicodine-effect-anxieties-wash-away"
        - "psicodine-effect-at-peace"
        probability: 0.2
        conditions:
        - !type:ReagentThreshold
          max: 20
      - !type:ModifyStatusEffect
        effectProto: StatusEffectSeeingRainbow
        type: Add
        time: 5
        refresh: false

- type: reagent # Assmos - /tg/ gases
  id: NitrosylPlasmide
  name: reagent-name-nitrosyl-plasmide
  group: Narcotics
  desc: reagent-desc-nitrosyl-plasmide
  physicalDesc: reagent-physical-desc-translucent
  flavor: sour
  color: "#e1a116"
  metabolisms:
    Gas:
      effects:
      - !type:Jitter
    Narcotic:
      effects:
      - !type:Jitter
      - !type:GenericStatusEffect
        key: Stun
        time: 3
        type: Remove
      - !type:GenericStatusEffect
        key: KnockedDown
        time: 3
        type: Remove
      - !type:GenericStatusEffect
        key: Drowsiness
        time: 10
        type: Remove
      - !type:GenericStatusEffect
        conditions:
        key: ForcedSleep
        type: Remove
        time: 10
      - !type:HealthChange
        damage:
          types:
            Poison: 0.1
      - !type:RemoveComponentEffect
        component: DelayedKnockdown
        locale: reagent-effect-guidebook-remove-delayed-knockdown
    Medicine:
      effects:
      - !type:ResetNarcolepsy
        conditions:
        - !type:ReagentThreshold
          min: 1
