- type: reagent
  id: Cryptobiolin
  name: cryptobiolin
  group: Medicine
  desc: Causes confusion and dizziness. This is essential to make Spaceacillin.
  physicalDesc: fizzy
  color: "#081a80"

- type: reagent
  id: Dylovene
  name: dylovene
  group: Medicine
  desc: A broad-spectrum anti-toxin, which treats toxin damage in the blood stream. Overdosing will cause vomiting, dizzyness and pain.
  physicalDesc: translucent
  color: "#3a1d8a"
  metabolisms:
    Medicine:
      effects:
      - !type:HealthChange
        damage:
          types:
            Poison: -1
    # TODO overdose: vomit, dizzy effect (drunkenness?)
  plantMetabolism:
    - !type:PlantAdjustToxins
      amount: -10
    - !type:PlantAdjustHealth
      amount: 1

- type: reagent
  id: Diphenhydramine
  name: diphenhydramine
  group: Medicine
  desc: Rapidly purges the body of histamine and reduces jitteriness.
  physicalDesc: chalky
  color: "#64ffe6"
  metabolisms:
    Medicine:
      effects:
      - !type:AdjustReagent
        reagent: Histamine
        amount: -3.0
      - !type:GenericStatusEffect
        key: Jitter
        time: 3.0
        type: Remove

- type: reagent
  id: Arithrazine
  name: arithrazine
  group: Medicine
  desc: A slightly unstable medication used for the most extreme case of radiation poisoning. Lowers radiation level at over twice the rate Hyronalin does and will heal toxin damage at the same time. Deals very minor brute damage to the patient over time, but the patient's body will typically out-regenerate it easily.
  physicalDesc: cloudy
  color: "#bd5902"
  metabolisms:
    Medicine:
      effects:
      - !type:HealthChange
        damage:
          types:
            Radiation: -3
          groups:
            Brute: 0.5

- type: reagent
  id: Bicaridine
  name: bicaridine
  group: Medicine
  desc: An analgesic which is highly effective at treating brute damage. It is useful for stabilizing people who have been severely beaten, as well as treating less life-threatening injuries. In the case of bleeding (internal or external), bicaridine will slow down the bleeding heavily. If the dosage exceeds the overdose limit, it'll stop it outright.
  physicalDesc: opaque
  color: "#ffaa00"
  metabolisms:
    Medicine:
      effects:
      - !type:HealthChange
        damage:
          groups:
            Brute: -2

- type: reagent
  id: Cryoxadone
  name: cryoxadone
  group: Medicine
  desc: Required for the proper function of cryogenics. Heals all standard types of damage very swiftly, but only works in temperatures under 170K (usually this means cryo cells). Can also slowly heal clone damage, such as caused by cloning or Slimes.
  physicalDesc: fizzy
  color: "#0091ff"
  plantMetabolism:
    - !type:PlantAdjustToxins
      amount: -3
    - !type:PlantAdjustHealth
      amount: 3
  metabolisms:
    Medicine:
      effects:
        - !type:HealthChange
          conditions:
          - !type:Temperature
            # this is a little arbitrary but they gotta be pretty cold
            max: 150.0
          damage:
          # todo scale with temp like SS13
            groups:
              Airloss: -6
              Brute: -4
              Burn: -4
              Toxin: -4

- type: reagent
  id: Clonexadone
  name: clonexadone
  group: Medicine
  parent: Cryoxadone
  desc: Heals standard damage in the same as Cryoxadone, with the same temperature requirement. Significantly more effective than the former at treating cellular damage, although both can be used simultaneously. Best used in cryo cells.
  physicalDesc: bubbly
  color: "#0666ff"
  plantMetabolism:
    - !type:PlantAdjustToxins
      amount: -5
    - !type:PlantAdjustHealth
      amount: 5

- type: reagent
  id: Dermaline
  name: dermaline
  group: Medicine
  desc: An advanced chemical that is more effective at treating burn damage than Kelotane.
  physicalDesc: translucent
  color: "#215263"
  metabolisms:
    Medicine:
      effects:
      - !type:HealthChange
        damage:
          groups:
            Burn: -3

- type: reagent
  id: Dexalin
  name: dexalin
  group: Medicine
  desc: Used for treating oxygen deprivation. In most cases where it is likely to be needed, the strength of Dexalin Plus will probably be more useful.
  physicalDesc: opaque
  color: "#0041a8"
  metabolisms:
    Medicine:
      effects:
      - !type:HealthChange
        damage:
          types:
            Asphyxiation: -1
            Bloodloss: -0.5

- type: reagent
  id: DexalinPlus
  name: dexalin plus
  group: Medicine
  desc: Used in treatment of extreme cases of oxygen deprivation. Effective at healing blood loss damage.
  physicalDesc: cloudy
  color: "#4da0bd"
  metabolisms:
    Medicine:
      effects:
      - !type:HealthChange
        damage:
          types:
            Asphyxiation: -3
            Bloodloss: -2

# this ones a doozy
- type: reagent
  id: Epinephrine
  name: epinephrine
  group: Medicine
  desc: Effective at bringing people back from a critical state. Reduces some stun times. Easy to overdose on.
  physicalDesc: odorless
  color: "#d2fffa"
  metabolisms:
    Medicine:
      effects:
      - !type:HealthChange
        conditions:
        - !type:TotalDamage
          # they gotta be in crit first
          min: 100
        - !type:ReagentThreshold
          min: 0
          max: 20
        damage:
          types:
            Asphyxiation: -3
            Poison: -0.5
          groups:
            Brute: -0.5
            Burn: -0.5
      - !type:HealthChange
        conditions:
        - !type:ReagentThreshold
          min: 20
        damage:
          types:
            Asphyxiation: 1
            Poison: 1
      - !type:AdjustReagent
        reagent: Lexorin
        amount: -2
      - !type:AdjustReagent
        conditions:
        - !type:ReagentThreshold
          reagent: Lexorin
          min: 1
        reagent: Epinephrine
        amount: -1
      - !type:AdjustReagent
        probability: 0.1
        conditions:
        - !type:ReagentThreshold
          reagent: Lexorin
          min: 1
        reagent: Histamine
        amount: 4
      - !type:GenericStatusEffect
        key: Stun
        time: 0.75
        type: Remove
      - !type:GenericStatusEffect
        key: KnockedDown
        time: 0.75
        type: Remove

- type: reagent
  id: Hyronalin
  name: hyronalin
  group: Medicine
  desc: A weak treatment for radiation damage. Considered to be useful mainly for genetic modification, where it reduces radiation levels, and thus the chance of genetic mutations. Largely outclassed by Arithrazine.
  physicalDesc: cloudy
  color: "#4cb580"
  metabolisms:
    Medicine:
      effects:
      - !type:HealthChange
        damage:
          types:
            Radiation: -1

- type: reagent
  id: Inaprovaline
  name: inaprovaline
  group: Medicine
  desc: Inaprovaline is a synaptic stimulant and cardiostimulant. Commonly used to stabilize patients- it stops oxygen loss when the patient is in critical health. It'll also slow down bleeding by a good amount. Acts as a decent painkiller.
  physicalDesc: opaque
  color: "#731024"
  metabolisms:
    Medicine:
      effects:
      - !type:HealthChange
        conditions:
        - !type:TotalDamage
          # they gotta be in crit first
          min: 100
        damage:
          types:
            Asphyxiation: -5
      - !type:ModifyBleedAmount
        amount: -0.25

- type: reagent
  id: Kelotane
  name: kelotane
  group: Medicine
  desc: Treats burn damage and prevents infection.
  physicalDesc: strong-smelling
  color: "#bf3d19"
  metabolisms:
    Medicine:
      effects:
      - !type:HealthChange
        damage:
          groups:
            Burn: -1

- type: reagent
  id: Leporazine
  name: leporazine
  group: Medicine
  desc: This keeps a patient's body temperature stable. High doses can allow short periods of unprotected EVA, but prevents use of the cryogenics tubes.
  physicalDesc: pungent
  color: "#ff7db5"
  metabolisms:
    Medicine:
      effects:
      - !type:AdjustTemperature
        conditions:
        - !type:Temperature
          max: 293.15
        amount: 1000 # thermal energy, not temperature!
      - !type:AdjustTemperature
        conditions:
        - !type:Temperature
          min: 293.15
        amount: -1000
      - !type:PopupMessage
        type: Local
        messages: [ "leporazine-effect-temperature-adjusting" ]
        probability: 0.2

- type: reagent
  id: Phalanximine
  name: phalanximine
  group: Medicine
  desc: Used in the treatment of cancer, is as effective as Anti-Toxin. Causes moderate radiation and hair loss.
  physicalDesc: acrid
  color: "#c8ff75"
  metabolisms:
    Medicine:
      effects:
      - !type:HealthChange
        damage:
          types:
            Cellular: -1
            Radiation: 1

- type: reagent
  id: PulpedBananaPeel
  name: pulped banana peel
  group: Medicine
  desc: Pulped banana peels have some effectiveness against bleeding.
  physicalDesc: pulpy
  color: "#FFE774"
  metabolisms:
    Medicine:
      effects:
      - !type:ModifyBleedAmount
        amount: -0.5

- type: reagent
  id: Siderlac
  name: siderlac
  group: Medicine
  desc: A powerful anti-caustic medicine derived from plants.
  physicalDesc: milky
  color: "#f4dab8"
  metabolisms:
    Medicine:
      effects:
      - !type:HealthChange
        damage:
          groups:
            Caustic: -5

- type: reagent
  id: Spaceacillin
  name: spaceacillin
  group: Medicine
  desc: A theta-lactam antibiotic. A common and very useful medicine, effective against many diseases likely to be encountered in space. Slows progression of diseases.
  physicalDesc: opaque
  color: "#9942f5"
  metabolisms:
    Medicine:
      effects:
        - !type:ChemCureDisease

- type: reagent
  id: Stellibinin
  name: stellibinin
  group: Medicine
  desc: A natual antitoxin with particular effectiveness against amatoxin.
  physicalDesc: starry
  color: "#2b2f77"
  metabolisms:
    Medicine:
      effects:
      - !type:HealthChange
        damage:
          types:
            Poison: -1
      - !type:AdjustReagent
        conditions:
        - !type:ReagentThreshold
          reagent: Amatoxin
          min: 1
        reagent: Amatoxin
        amount: -3

- type: reagent
  id: Synaptizine
  name: synaptizine
  group: Medicine
  desc: Toxic, but treats hallucinations, drowsiness & halves the duration of paralysis, stuns and knockdowns. One unit is enough to treat hallucinations; two units is deadly.
  physicalDesc: pungent
  color: "#d49a2f"
  metabolisms:
    Poison:
      effects:
      - !type:HealthChange
        damage:
          types:
            Poison: 3
      - !type:GenericStatusEffect
        key: Stun
        time: 3.0
        type: Remove
      - !type:GenericStatusEffect
        key: KnockedDown
        time: 3.0
        type: Remove

- type: reagent
  id: TranexamicAcid
  name: tranexamic acid
  group: Medicine
  desc: A blood clotting medicine for preventing heavy bleeding. Very dangerous in large quantities.
  physicalDesc: viscous
  color: "#ba7d7d"
  metabolisms:
    Medicine:
      effects:
      # Medium-large quantities can hurt you instead,
      # but still technically stop your bleeding.
      - !type:ModifyBleedAmount
        amount: -1.5
      - !type:HealthChange
        conditions:
        - !type:ReagentThreshold
          min: 15
        damage:
          types:
            Bloodloss: 3

- type: reagent
  id: Tricordrazine
  name: tricordrazine
  group: Medicine
  desc: A wide-spectrum stimulant, originally derived from Cordrazine. It is capable of healing most common damage types simultaneously, however only at about half the rate of other medications. Because of its low potency, it's best used as a supplement to other medicines.
  physicalDesc: opaque
  color: "#00e5ff"
  metabolisms:
    Medicine:
      effects:
      - !type:HealthChange
        conditions:
        - !type:TotalDamage
          max: 50
        damage:
          groups:
            Burn: -1
            Brute: -1
          types:
            Poison: -0.5 ##Should be about what it was when it healed the toxin group

- type: reagent
  id: Lipozine
  name: lipozine
  group: Medicine
  desc: Causes weight loss upon consumption.
  physicalDesc: oily
  color: "#2690b5"
  metabolisms:
    Medicine:
      effects:
      # what the hell, this isn't satiating at all!!
      - !type:SatiateHunger
        factor: -1

- type: reagent
  id: Omnizine
  name: Omnizine
  group: Medicine
  desc: A soothing milky liquid with an iridescent gleam. A well known conspiracy theory says that it's origins remain a mystery because knowing the secrets of its production would render most commercial pharmaceuticals obsolete.
  physicalDesc: soothing
  color: "#fcf7f9"
  metabolisms:
    Medicine:
      effects:
      - !type:HealthChange
        damage:
          groups:
            Burn: -2
            Toxin: -2
            Airloss: -2
            Brute: -2

- type: reagent
  id: Ultravasculine
  name: ultravasculine
  group: Medicine
  desc: Rapidly flushes toxins from the body, but places some stress on the veins. Do not overdose.
  physicalDesc: thick and grainy
  color: "#520e30"
  metabolisms:
    Medicine:
      effects:
      - !type:HealthChange
        conditions:
        - !type:ReagentThreshold
          min: 0
          max: 30
        damage:
          groups:
            Toxin: -3
            Brute: 0.5
      - !type:HealthChange
        conditions:
        - !type:ReagentThreshold
          min: 30
        damage:
          groups:
            Toxin: -1
            Brute: 3
      - !type:AdjustReagent
        conditions:
        - !type:ReagentThreshold
          reagent: Histamine
          min: 1
        reagent: Histamine
        amount: -1
      - !type:AdjustReagent
        conditions:
        - !type:ReagentThreshold
          reagent: Histamine
          min: 1
        reagent: Ultravasculine
        amount: 0.5
