# TODO: Reagent Args which allow more selective scaling.
# Currently all Gas metabolisms scale by reagent quantity metabolized, where other Metabolisms are modified by metabolism rate!

- type: reagent
  id: Oxygen
  name: reagent-name-oxygen
  desc: reagent-desc-oxygen
  physicalDesc: reagent-physical-desc-gaseous
  flavor: bitter
  color: "#c4f5ff"
  boilingPoint: -183.0
  meltingPoint: -218.4
  metabolisms:
    Bloodstream:
      effects:
      - !type:Oxygenate
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Human, Animal, Rat, Plant, Arachnid ]
      # Convert Oxygen into CO2.
      - !type:ModifyLungGas
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Vox ]
          inverted: true
        ratios:
          CarbonDioxide: 1.0
          Oxygen: -1.0
      - !type:HealthChange
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Vox ]
        ignoreResistances: true
        damage:
          types:
            Poison: 1.5
      - !type:AdjustAlert
        alertType: Toxins
        minScale: 1
        conditions:
          - !type:MetabolizerTypeCondition
            type: [ Vox ]
        clear: true
        time: 5
    Respiration:
      effects:
      - !type:Oxygenate
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Human, Animal, Rat, Plant, Arachnid, Moth ]
      # Convert Oxygen into CO2.
      - !type:ModifyLungGas
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Vox ]
          inverted: true
        ratios:
          CarbonDioxide: 1.0
          Oxygen: -1.0
      - !type:HealthChange
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Vox ]
        ignoreResistances: true
        damage:
          types:
            Poison: 0.7
      - !type:AdjustAlert
        alertType: Toxins
        minScale: 0.5
        conditions:
          - !type:MetabolizerTypeCondition
            type: [ Vox ]
        clear: true
        time: 5

- type: reagent
  id: Plasma
  name: reagent-name-plasma
  desc: reagent-desc-plasma
  physicalDesc: reagent-physical-desc-gaseous
  flavor: bitter
  color: "#7e009e"
  recognizable: true
  boilingPoint: -127.3 # Random values picked between the actual values for CO2 and O2
  meltingPoint: -186.4
  tileReactions:
  - !type:FlammableTileReaction
    temperatureMultiplier: 1.5
  metabolisms:
    Bloodstream:
      effects:
      - !type:HealthChange
        damage:
          types:
            Poison: 1.5
      - !type:AdjustReagent
        reagent: Inaprovaline
        amount: -2.0
    Respiration:
      effects:
      - !type:HealthChange
        ignoreResistances: true
        damage:
          types:
            Poison:
              0.1
      # We need a metabolism effect on reagent removal
      - !type:AdjustAlert
        alertType: Toxins
        minScale: 1.5
        clear: True
        time: 5
  reactiveEffects:
    Flammable:
      methods: [ Touch ]
      effects:
      - !type:Flammable

- type: reagent
  id: Tritium
  name: reagent-name-tritium
  desc: reagent-desc-tritium
  physicalDesc: reagent-physical-desc-ionizing
  allowedDepartments:
  - Engineering
  flavor: bitter
  color: "#66ff33"
  tileReactions:
  - !type:FlammableTileReaction
    temperatureMultiplier: 2.0
  reactiveEffects:
    Flammable:
      methods: [ Touch ]
      effects:
      - !type:Flammable
        multiplier: 0.8
  metabolisms:
    Bloodstream:
      effects:
      - !type:HealthChange
        damage:
          types:
            Radiation: 1.5
    Respiration:
      effects:
      - !type:HealthChange
        ignoreResistances: true
        damage:
          types:
            Radiation:
              1
      # We need a metabolism effect on reagent removal
      - !type:AdjustAlert
        alertType: Toxins
        minScale: 1.5
        clear: True
        time: 5

- type: reagent
  id: CarbonDioxide
  name: reagent-name-carbon-dioxide
  desc: reagent-desc-carbon-dioxide
  physicalDesc: reagent-physical-desc-odorless
  flavor: bitter
  color: "#66ff33"
  metabolisms:
    Bloodstream:
      effects:
      - !type:Oxygenate
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Plant ]
      - !type:HealthChange
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Plant, Vox ]
          inverted: true
        ignoreResistances: true
        damage:
          types:
            Poison:
              0.4
      - !type:Oxygenate
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Plant ]
          inverted: true
        factor: -4
    Respiration:
      effects:
      - !type:Oxygenate
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Plant ]
      - !type:HealthChange
        minScale: 0.5
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Plant, Vox ]
          inverted: true
        # Don't want people to get toxin damage from the gas they just
        # exhaled, right?
        ignoreResistances: true
        damage:
          types:
            Poison:
              0.8
      - !type:Oxygenate # carbon dioxide displaces oxygen from the bloodstream, causing asphyxiation
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Plant ]
          inverted: true
        factor: -4
      # We need a metabolism effect on reagent removal
      #- !type:AdjustAlert
      #  alertType: CarbonDioxide

- type: reagent
  id: Nitrogen
  name: reagent-name-nitrogen
  desc: reagent-desc-nitrogen
  physicalDesc: reagent-physical-desc-gaseous
  flavor: bitter
  color: "#a1e1ff"
  boilingPoint: -195.8
  meltingPoint: -210.0
  metabolisms:
    Bloodstream:
      effects:
      - !type:HealthChange
        damage:
          types:
            Cold: 0.5 # liquid nitrogen is cold
    Respiration:
      effects:
      - !type:Oxygenate
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Vox, Slime ]
      # Converts Nitrogen into Ammonia
      - !type:ModifyLungGas
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Vox ]
        ratios:
          Ammonia: 1.0
          Nitrogen: -1.0
      - !type:ModifyLungGas
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Slime ]
        ratios:
          NitrousOxide: 1.0
          Nitrogen: -1.0

- type: reagent
  id: NitrousOxide
  name: reagent-name-nitrous-oxide
  desc: reagent-desc-nitrous-oxide
  physicalDesc: reagent-physical-desc-gaseous
  flavor: bitter
  color: "#5d88c9"
  boilingPoint: -88
  meltingPoint: -90
  metabolisms:
    Bloodstream:
      effects:
      - !type:HealthChange
        damage:
          types:
            Poison: 1
    Respiration:
      effects:
      - !type:Emote
        minScale: 0.2
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Slime ]
          inverted: true
        emote: Laugh
        probability: 0.1
      - !type:Emote
        minScale: 0.2
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Slime ]
          inverted: true
        emote: Scream
        probability: 0.01
      - !type:PopupMessage
        minScale: 0.5
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Slime ]
          inverted: true
        type: Local
        visualType: Medium
        messages: [ "effect-sleepy" ]
        probability: 0.1
      - !type:MovementSpeedModifier
        minScale: 1
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Slime ]
          inverted: true
        walkSpeedModifier: 0.65
        sprintSpeedModifier: 0.65
      - !type:ModifyStatusEffect
        minScale: 1.8
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Slime ]
          inverted: true
        effectProto: StatusEffectForcedSleeping
        time: 3
        type: Update
      - !type:HealthChange
        minScale: 3.5
        conditions:
        - !type:MetabolizerTypeCondition
          type: [ Slime ]
          inverted: true
        ignoreResistances: true
        scaling: true
        damage:
          types:
            Poison: 1

- type: reagent
  id: Frezon
  name: reagent-name-frezon
  desc: reagent-desc-frezon
  physicalDesc: reagent-physical-desc-gaseous
  allowedDepartments:
  - Engineering
  allowedJobs:
  - Chemist
  flavor: bitter
  color: "#3a758c"
  boilingPoint: -195.8
  meltingPoint: -210.0
  metabolisms:
    Bloodstream:
      effects:
      - !type:HealthChange
        ignoreResistances: true
        damage:
          types:
            Cellular: 0.5
      - !type:ModifyStatusEffect
        effectProto: StatusEffectSeeingRainbow
        type: Add
        time: 15
      - !type:Drunk
        boozePower: 15
      - !type:PopupMessage
        type: Local
        messages: [ "frezon-lungs-cold" ]
        probability: 0.1
        minScale: 1
      - !type:PopupMessage
        type: Local
        visualType: Medium
        messages: [ "frezon-euphoric" ]
        probability: 0.1
        conditions:
        minScale: 2
    Respiration:
      effects:
      - !type:HealthChange
        minScale: 0.5
        ignoreResistances: true
        damage:
          types:
            Cellular: 0.05
      - !type:ModifyStatusEffect
        minScale: 1
        effectProto: StatusEffectSeeingRainbow
        type: Add
        time: 500
      - !type:Drunk
        boozePower: 500
        minScale: 1
      - !type:PopupMessage
        type: Local
        messages: [ "frezon-lungs-cold" ]
        probability: 0.1
        minScale: 1
      - !type:PopupMessage
        type: Local
        visualType: Medium
        messages: [ "frezon-euphoric" ]
        probability: 0.1
        minScale: 1
