<?xml version="1.0" encoding="utf-8"?>
<!-- ↓↓↓ Main afflictions/injuries applied by sonar. ↓↓↓ -->
<!-- NO FX VERSION. Some affliction visuals are still above zero to remain consistent with the vanilla game. -->
<Afflictions>
  <!-- Brain hemorrhage -->
  <Affliction name="Brain hemorrhage" identifier="brainhemorrhagenofx" type="brainhemorrhage" maxstrength="100" treatmentthreshold="40" limbspecific="true" indicatorlimb="Head" healcostmultiplier="0" basehealcost="650" showiconthreshold="33" showinhealthscannerthreshold="0" causeofdeathdescription="afflictioncauseofdeath.brainhemorrhage" selfcauseofdeathdescription="afflictioncauseofdeathself.brainhemorrhage">
    <icon texture="%ModDir%/Icons/Afflictions.png" sourcerect="384,0,128,128" origin="0,0" />
    <Description textidentifier="afflictiondescription.brainhemorrhage" target="OtherCharacter" minstrength="0" maxstrength="25" />
    <Description textidentifier="afflictiondescription.brainhemorrhage.medium" target="OtherCharacter" minstrength="25" maxstrength="99" />
    <Description textidentifier="afflictiondescription.brainhemorrhage.high" target="OtherCharacter" minstrength="99" maxstrength="100" />
    <Description textidentifier="afflictiondescription.brainhemorrhage.self" target="Self" minstrength="0" maxstrength="25" />
    <Description textidentifier="afflictiondescription.brainhemorrhage.medium.self" target="Self" minstrength="25" maxstrength="100" />
    <Effect minstrength="0" maxstrength="15" multiplybymaxvitality="true" minvitalitydecrease="0.0" maxvitalitydecrease="0.15" minscreendistort="0.0" maxscreendistort="0.15" minscreenblur="0.0" maxscreenblur="0.15" minradialdistort="0.0" maxradialdistort="0.15" minspeedmultiplier="1" maxspeedmultiplier="0.8">
      <StatusEffect target="Character" disabledeltatime="true" interval="1">
        <ReduceAffliction identifier="brainhemorrhagenofx" strength="0.02" />
      </StatusEffect>
      <!-- Integration with Neurotrauma brain transplants & amputations. -->
      <StatusEffect target="Character" interval="1" disabledeltatime="true" comparison="or">
        <Conditional brainremoved="gt 0" />
        <Conditional th_amputation="gt 0" />
        <Conditional sh_amputation="gt 0" />
        <ReduceAffliction type="brainhemorrhagenofx" strength="1000" />
        <Affliction identifier="removehemorrhagefx" strength="1000" />
      </StatusEffect>
    </Effect>
    <Effect minstrength="15" maxstrength="99" multiplybymaxvitality="true" dialogflag="BrainHemorrhageLow" minvitalitydecrease="0.15" maxvitalitydecrease="1.0" minscreendistort="0.15" maxscreendistort="0.85" minscreenblur="0.15" maxscreenblur="1.0" mingrainstrength="0.15" maxgrainstrength="1.0" minradialdistort="0.15" maxradialdistort="0.85" minspeedmultiplier="0.8" maxspeedmultiplier="0.25">
      <!-- Integration with Neurotrauma brain transplants & amputations. -->
      <StatusEffect target="Character" interval="1" disabledeltatime="true" comparison="or">
        <Conditional brainremoved="gt 0" />
        <Conditional th_amputation="gt 0" />
        <Conditional sh_amputation="gt 0" />
        <ReduceAffliction type="brainhemorrhagenofx" strength="1000" />
        <Affliction identifier="removehemorrhagefx" strength="1000" />
      </StatusEffect>
      <!-- After 15%, the hemorrhaging advances by itself, leaving the patient with ~5 minutes to live. -->
      <StatusEffect target="Character" targetlimb="Head" disabledeltatime="true" interval="1">
        <Conditional mannainfluencehead="lteq 0" />
        <Affliction identifier="brainhemorrhagenofx" strength="0.28" />
      </StatusEffect>
      <StatusEffect target="Character" targetlimb="Head" disabledeltatime="true" interval="1">
        <Conditional brainhemorrhagenofx="gteq 30" />
        <Affliction identifier="ataxianofx" strength="0.8" />
      </StatusEffect>
      <StatusEffect target="Character">
        <Conditional brainhemorrhagenofx="gteq 50" />
        <Affliction identifier="psychosis" strength="1" />
      </StatusEffect>
      <StatusEffect target="Character" targetlimb="Head">
        <Conditional brainhemorrhagenofx="gteq 60" />
        <Affliction identifier="aphasia" strength="0.8" />
      </StatusEffect>
      <StatusEffect target="Character" targetlimb="LeftArm,RightArm">
        <Conditional brainhemorrhagenofx="gteq 70" />
        <Affliction identifier="nervedamage" strength="0.1" />
      </StatusEffect>
      <!-- Sound loops -->
      <StatusEffect target="Character" comparison="and">
        <Conditional isLocalPlayer="true" />
        <Conditional brainhemorrhagenofx="gteq 15" />
        <Conditional brainhemorrhagenofx="lt 32" />
        <Sound file="%ModDir%/Sounds/brainHemorrhageStage1.ogg" volume="1.0" dontmuffle="true" loop="true" />
      </StatusEffect>
      <StatusEffect target="Character" comparison="and">
        <Conditional isLocalPlayer="true" />
        <Conditional brainhemorrhagenofx="gteq 32" />
        <Conditional brainhemorrhagenofx="lt 49" />
        <Sound file="%ModDir%/Sounds/brainHemorrhageStage2.ogg" volume="1.2" dontmuffle="true" loop="true" />
      </StatusEffect>
      <StatusEffect target="Character" comparison="and">
        <Conditional isLocalPlayer="true" />
        <Conditional brainhemorrhagenofx="gteq 49" />
        <Conditional brainhemorrhagenofx="lt 66" />
        <Sound file="%ModDir%/Sounds/brainHemorrhageStage3.ogg" volume="1.4" dontmuffle="true" loop="true" />
      </StatusEffect>
      <StatusEffect target="Character" comparison="and">
        <Conditional isLocalPlayer="true" />
        <Conditional brainhemorrhagenofx="gteq 66" />
        <Conditional brainhemorrhagenofx="lt 83" />
        <Sound file="%ModDir%/Sounds/brainHemorrhageStage4.ogg" volume="1.6" dontmuffle="true" loop="true" />
      </StatusEffect>
      <StatusEffect target="Character" comparison="and">
        <Conditional isLocalPlayer="true" />
        <Conditional brainhemorrhagenofx="gteq 83" />
        <Sound file="%ModDir%/Sounds/brainHemorrhageStage5.ogg" volume="1.8" dontmuffle="true" loop="true" />
      </StatusEffect>
    </Effect>
    <!-- Kills the patient at 100% -->
    <Effect minstrength="99" maxstrength="100" multiplybymaxvitality="true" minvitalitydecrease="1.0" maxvitalitydecrease="2.0" minscreendistort="1" maxscreendistort="2" minscreenblur="1" maxscreenblur="2" minchromaticaberration="1" maxchromaticaberration="2" mingrainstrength="1" maxgrainstrength="2" minradialdistort="1" maxradialdistort="2">
      <StatusEffect target="Character" targetlimb="Head">
        <Affliction identifier="brainhemorrhagenofx" strength="0.35" />
      </StatusEffect>
      <StatusEffect target="Character" comparison="and">
        <Conditional brainhemorrhagenofx="gteq 97" />
        <Conditional IsLocalPlayer="True" />
        <Sound file="%ModDir%/Sounds/brainDeath.ogg" loop="false" dontmuffle="true" volume="1.4" />
      </StatusEffect>
    </Effect>
  </Affliction>
  <!-- Cortizide injection NO visuals -->
  <Affliction identifier="cortizideinjectionnofx" showiconthreshold="1000" showinhealthscannerthreshold="1000" maxstrength="122">
    <Effect minstrength="0" maxstrength="100">
      <StatusEffect target="Character">
        <Affliction identifier="blurandabberationnofx" strength="1" />
        <Affliction identifier="cortizideinjectionnofx" strength="9.92" />
      </StatusEffect>
      <StatusEffect target="Character" disabledeltatime="true" interval="0.1" comparison="and">
        <Conditional isLocalPlayer="true" />
        <Conditional cortizideinjectionnofx="gteq 21.34" />
        <Explosion range="1" force="0" smoke="false" sparks="false" flames="false" shockwave="false" underwaterbubble="false" camerashake="10" camerashakerange="3000" />
      </StatusEffect>
      <StatusEffect target="Character" disabledeltatime="true">
        <Conditional cortizideinjectionnofx="gteq 122" />
        <Affliction identifier="cortizideinjectionnofx" strength="-1000" />
        <Affliction identifier="blurandabberationnofx" strength="-1000" />
      </StatusEffect>
    </Effect>
  </Affliction>
  <Affliction identifier="blurandabberationnofx" showiconthreshold="1000" showinhealthscannerthreshold="1000" maxstrength="100">
    <Effect minstrength="0" maxstrength="100" strengthchange="20" minscreenblur="0" maxscreenblur="1" minchromaticaberration="0" maxchromaticaberration="1"></Effect>
  </Affliction>
  <!-- ↓↓↓ Cosmetic Afflictions ↓↓↓ -->
  <!-- Ataxia : Poor muslce control that leads to clumsy voluntary movements. -->
  <Affliction name="Ataxia" identifier="ataxianofx" type="ataxia" maxstrength="100" limbspecific="true" indicatorlimb="Head" showiconthreshold="0" showinhealthscannerthreshold="0" healableinmedicalclinic="false">
    <icon texture="%ModDir%/Icons/Afflictions.png" sourcerect="896,0,128,128" origin="0,0" />
    <Description textidentifier="afflictiondescription.ataxia" target="OtherCharacter" />
    <Description textidentifier="afflictiondescription.ataxia.self" target="Self" />
    <Effect minstrength="0" maxstrength="100">
      <!-- Remove ataxia if brainhemorrhage is treated. -->
      <StatusEffect target="Character" interval="1" disabledeltatime="true">
        <Conditional brainhemorrhagenofx="lt 30" />
        <ReduceAffliction identifier="invertcontrols" strength="1000" />
        <Affliction identifier="ataxianofx" strength="-1000" />
      </StatusEffect>
    </Effect>
    <!-- Repeatedly inverts the characters movement. -->
    <PeriodicEffect mininterval="9" maxinterval="18">
      <StatusEffect target="Character">
        <Conditional invertcontrols="lteq 0" />
        <Conditional brainhemorrhagenofx="gteq 30" />
        <Affliction identifier="invertcontrols" strength="20" />
      </StatusEffect>
    </PeriodicEffect>
    <PeriodicEffect mininterval="9" maxinterval="18">
      <StatusEffect target="Character">
        <Conditional invertcontrols="gteq 1" />
        <ReduceAffliction identifier="invertcontrols" strength="1000" />
      </StatusEffect>
    </PeriodicEffect>
    <!-- Convulsions -->
    <PeriodicEffect mininterval="0.5" maxinterval="1.5">
      <StatusEffect target="Character" disabledeltatime="true" stackable="false" delay="0" checkconditionalalways="false" comparison="and">
        <Conditional brainhemorrhagenofx="gteq 65" />
        <Conditional isLocalPlayer="true" />
        <Explosion range="1" flashrange="0" flashduration="0" stun="0" structuredamage="0" itemdamage="0" force="20" severlimbsprobability="0.0" ballastfloradamage="0" smoke="false" flash="false" flames="false" shockwave="false" sparks="false" underwaterbubble="false" />
      </StatusEffect>
    </PeriodicEffect>
  </Affliction>
</Afflictions>