# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 PunishedJoe <PunishedJoeseph@proton.me>
# SPDX-FileCopyrightText: 2025 SX-7 <92227810+SX-7@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Ted Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 gus <august.eymann@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: reagent
  id: Triclor
  name: reagent-name-triclor
  group: Toxins
  desc: reagent-desc-triclor
  physicalDesc: reagent-physical-desc-pungent
  flavor: terrible
  color: "#174f17"
  metabolisms:
    Poison:
      effects: # considering vomiting and re-add the metabolism rate works out to ~2.5/s
      - !type:HealthChange # ~20/20 damage per 15u, inconsistent
        damage:
          types:
            Blunt: 4
      - !type:HealthChange
        conditions:
        - !type:OrganType
          type: Yowie
          shouldHave: false
        damage:
          types:
            Poison: 4
      - !type:AdjustReagent
        reagent: Triclor
        amount: 0.5 # Counteracts some loss from vomiting, makes effects more linear
        conditions:
        - !type:ReagentThreshold
          max: 15 # Limit self-replication to prevent infinite accumulation
      - !type:AdjustReagent
        conditions: # Vomiting behaves weirdly and might leave unmetabolisable 0.1 at 40u (floating point errors?)
        - !type:ReagentThreshold
          max: 1
        reagent: Triclor
        amount: -0.5
      - !type:ChemVomit
      - !type:ModifyBloodLevel
        amount: -5
      - !type:ModifyBleedAmount
        amount: 0.5
      - !type:MovespeedModifier # primairly to decrease speed for a while longer after finishing vomiting
        walkSpeedModifier: 0.8
        sprintSpeedModifier: 0.8
        statusLifetime: 6
      - !type:GenericStatusEffect
        key: Stutter
        component: StutteringAccent
      - !type:Jitter

- type: reagent
  id: Cyanide
  name: reagent-name-cyanide
  group: Toxins
  desc: reagent-desc-cyanide
  physicalDesc: reagent-physical-desc-powdery
  flavor: bitter
  color: "#1abcff"
  metabolisms:
    Poison:
      metabolismRate: 0.1
      effects:
      - !type:HealthChange
        damage:
          types:
            Poison: 0.75 # 37.5 per 5u but pretty slow
            Asphyxiation: 0.25
        conditions:
        - !type:OrganType
          type: Yowie
          shouldHave: false
      - !type:Paralyze
        conditions:
        - !type:OrganType
          type: Yowie
          shouldHave: false
        probability: 0.05
        paralyzeTime: 2
      - !type:Emote
        emote: Gasp
        probability: 0.1
        conditions:
        - !type:OrganType
          type: Yowie
          shouldHave: false

- type: reagent
  id: Anacea
  name: reagent-name-anacea
  group: Toxins
  desc: reagent-desc-anacea
  physicalDesc: reagent-physical-desc-creamy
  flavor: bitter
  color: "#819cb5"
  metabolisms:
    Poison:
      metabolismRate: 0.05
      effects:
      - !type:AdjustReagent
        group: Medicine
        amount: -4.5
        conditions: # higher quality anti-poisons, save for calomel which is low effort but high risk
        - !type:BloodReagentThreshold
          reagent: PentenicAcid
          max: 0.1
        - !type:BloodReagentThreshold
          reagent: Calomel
          max: 0.1
        - !type:BloodReagentThreshold
          reagent: Diphenhydramine
          max: 0.1
      - !type:AdjustReagent
        group: Medicine
        amount: -0.5
      - !type:HealthChange
        damage:
          types:
            Poison: 0.2 # this works out to 20 per 5u
        conditions:
        - !type:OrganType
          type: Yowie
          shouldHave: false

- type: reagent
  id: Pendetide
  name: reagent-name-pendetide
  group: Toxins
  desc: reagent-desc-pendetide
  physicalDesc: reagent-physical-desc-viscous
  flavor: bitter
  color: "#22ff1a"
  metabolisms:
    Poison:
      effects:
      - !type:AdjustReagent
        group: Medicine
        amount: -5
      - !type:HealthChange
        damage:
          types:
            Radiation: 2
        conditions:
        - !type:TypedDamageThreshold
          damage:
            types:
              Radiation: 2 # kinda arbitrary, it'll trigger after some rads
        - !type:OrganType
          type: Yowie
          shouldHave: false
      - !type:GenericStatusEffect
        key: Stutter
        component: StutteringAccent
      - !type:Jitter

- type: reagent
  id: Aluite
  name: reagent-name-aluite
  group: Toxins
  desc: reagent-desc-aluite
  physicalDesc: reagent-physical-desc-bubbly
  flavor: bitter
  color: "#8e8e8e"
  metabolisms:
    Poison:
      metabolismRate: 3
      effects:
      - !type:HealthChange
        conditions:
        - !type:ReagentThreshold
          min: 6
        damage:
          types:
            Blunt: 10
      - !type:AdjustReagent
        amount: -25
        reagent: Syriniver
      - !type:AdjustReagent
        amount: -50
        reagent: Ebifin
      - !type:AdjustReagent
        amount: -25
        reagent: ProcenylLazide
      - !type:AdjustReagent
        amount: -25
        reagent: Aluite

- type: reagent
  id: Sarin
  name: reagent-name-sarin
  group: Toxins
  desc: reagent-desc-sarin
  physicalDesc: reagent-physical-desc-powdery
  flavor: salty
  color: "#ff8239"
  boilingPoint: 255.0
  meltingPoint: 36.0
  metabolisms:
    Poison:
      metabolismRate: 0.25
      effects:
      - !type:HealthChange
        damage:
          types:
            Poison: 2
      - !type:MovespeedModifier
        walkSpeedModifier: 0.7
        sprintSpeedModifier: 0.7
      - !type:GenericStatusEffect
        key: Stutter
        component: StutteringAccent
      - !type:Jitter
      - !type:Paralyze
        probability: 0.5
        paralyzeTime: 4
        conditions:
        - !type:ReagentThreshold
          min: 5
      - !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
      - !type:GenericStatusEffect
        key: TemporaryBlindness
        component: TemporaryBlindness
        conditions:
        - !type:ReagentThreshold
          min: 2.5
  reactiveEffects:
    Acidic:
      methods: [ Touch ]
      effects:
      - !type:HealthChange
        scaleByQuantity: true
        ignoreResistances: false
        damage:
          types:
            Caustic: 3 # any less and you wont crit from the full duration if you have internals
        conditions:
        - !type:HasComponentOnEquipmentCondition
          components:
          - type: PressureProtection # can't get through this to reach the bodyparts!
          invert: true

- type: reagent
  id: Tirizene
  name: reagent-name-tirizene
  group: Toxins
  desc: reagent-desc-tirizene
  physicalDesc: reagent-physical-desc-syrupy
  color: "#6E2828"
  boilingPoint: 255.0
  meltingPoint: 36.0
  metabolisms:
    Poison:
      effects:
      - !type:TakeStaminaDamage
        conditions:
        - !type:OrganType
          type: Yowie
          shouldHave: false
        amount: 13 # 13 parity
        immediate: false

- type: reagent
  id: NevcottaPowder
  name: reagent-name-nevcottapowder
  group: Toxins
  desc: reagent-desc-nevcottapowder
  physicalDesc: reagent-physical-desc-powdery
  flavor: bitter
  color: "#FAF9F6"
  metabolisms:
    Poison:
      metabolismRate: 0.05
      effects:
      - !type:ChemVomit
        conditions:
        - !type:ReagentThreshold
          min: 10
        - !type:OrganType
          type: Yowie
          shouldHave: false
        probability: 0.15
      - !type:HealthChange
        damage:
          types:
            Poison: 2
            Asphyxiation: 0.25
        conditions:
        - !type:OrganType
          type: Yowie
          shouldHave: false
      - !type:GenericStatusEffect
        key: SeeingRainbows
        component: SeeingRainbows
        type: Add
        time: 20
        refresh: false
      - !type:Paralyze
        conditions:
        - !type:OrganType
          type: Yowie
          shouldHave: false
        probability: 0.05
        paralyzeTime: 2

- type: reagent
  id: Microplastics
  name: reagent-name-microplastics
  group: Toxins
  desc: reagent-desc-microplastics
  physicalDesc: reagent-physical-desc-powdery
  color: "#ffffff"
  plantMetabolism:
  - !type:PlantAdjustToxins
    amount: 2
  - !type:PlantAdjustHealth
    amount: -1
  metabolisms:
    Poison:
      metabolismRate: 0.01 #Yummers
      effects:
      - !type:HealthChange
        probability: 0.5
        damage:
          types:
            Poison: 0.25 #should be 0.02, dealt ~30 dmg (less due to Good code)
        conditions:
        - !type:OrganType
          type: Vox
          shouldHave: false
      - !type:ChemVomit
        probability: 0.1
        conditions:
        - !type:ReagentThreshold
          min: 10
        - !type:OrganType
          type: Vox
          shouldHave: false
      - !type:MovespeedModifier
        walkSpeedModifier: 0.90
        sprintSpeedModifier: 0.90
        conditions:
        - !type:OrganType
          type: Vox
          shouldHave: false
        - !type:ReagentThreshold
          min: 20
      - !type:HealthChange
        probability: 0.5
        damage:
          types:
            Poison: -0.25 #in reality i dont care if its a good medicine for vox bcz its funny
        conditions:
        - !type:OrganType # Goob, Vox are stinky
          type: Vox
          shouldHave: true
