<?xml version="1.0" encoding="utf-8"?>
<Afflictions>
  <Override>
    <!-- _________________________________________________________________ -->
    <!-- HUSK INFECTION AFFLICTION -->
    <!-- _________________________________________________________________ -->
    <AfflictionHusk name="Husk infection" identifier="huskinfection" description="Something alien moves within the mouth..." type="alieninfection" transferbuffs="true" targets="human,crawler,crawler_hatchling,swarmcrawler,mudraptor,mudraptor_unarmored,mudraptor_hatchling,bonethresher,tigerthresher,tigerthresher_hatchling,hammerhead,hammerheadgold,hammerheadmatriarch,hammerheadspawn,hammerhead_m,hammerheadgold_m,moloch,moloch_m,molochblack,molochblack_m,molochbaby,mantis,legacycrawler,coelanth,psilotoad,orangeboy,peanut,spineling,watcher,endworm,charybdis" huskedspeciesname="[speciesname]husk" causeofdeathdescription="Taken over by a husk parasite" selfcauseofdeathdescription="You have been taken over by the husk parasite." limbspecific="false" indicatorlimb="Torso" activationthreshold="0" showinhealthscannerthreshold="50" showiconthreshold="50" showicontoothersthreshold="75" activethreshold="75" transformthresholdondeath="85" karmachangeonapplied="-5" maxstrength="100" achievementonremoved="healhusk" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255" causespeechimpediment="false" sendmessages="false" needsair="true">
      <Effect minstrength="0" maxstrength="100" strengthchange="1.6">
        <StatusEffect target="Character" PressureProtection="4000.0" setvalue="true">
          <Conditional huskinfection="gte 75.0" />
        </StatusEffect>
        <StatusEffect type="Always" target="Character" comparison="and">
          <Conditional huskinfection="gt 80" />
          <Conditional speciesgroup="!eq human" />
          <dropcontaineditems />
        </StatusEffect>
      </Effect>
      <PeriodicEffect mininterval="3" maxinterval="6">
        <StatusEffect target="Character" checkconditionalalways="true" comparison="and">
          <Conditional huskinfection="gte 75.0" />
          <Conditional isunconscious="false" />
          <Reduceaffliction identifier="Oxygenlow" amount="15" />
        </StatusEffect>
        <!-- <Periodic damage when husk infection reaches 100 strength - Because they normally just take a long nap before turning into a problem, anyone can just run away or even drag the body outside of the submarine. This fixes this problem by killing the host faster.-->
        <StatusEffect target="Character" comparison="and">
          <Conditional isdead="false" />
          <Conditional huskinfection="eq 100.0" />
          <ParticleEmitter particle="bloodsplash" particlespersecond="100" scalemin="1" scalemax="2" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackblood" particlespersecond="100" scalemin="1" scalemax="2" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="waterblood" particlespersecond="100" scalemin="1" scalemax="2" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackwaterblood" particlespersecond="100" scalemin="1" scalemax="2" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <Affliction identifier="internaldamage" amount="5" />
        </StatusEffect>
        <!-- Periodic damage when husk infection reaches 100 strength> -->
        <!-- <Large Chonks - Because they have a shit ton of health, we need to damage them more when they are turning so that it can actually happen by the end of the round -->
        <StatusEffect target="Character" comparison="and">
          <Conditional isdead="false" />
          <Conditional huskinfection="eq 100.0" />
          <Conditional speciesname="moloch" />
          <ParticleEmitter particle="bloodsplash" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackwaterblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="waterblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <Affliction identifier="internaldamage" amount="20" />
        </StatusEffect>
        <StatusEffect target="Character" comparison="and">
          <Conditional isdead="false" />
          <Conditional huskinfection="eq 100.0" />
          <Conditional speciesname="moloch_m" />
          <ParticleEmitter particle="bloodsplash" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackwaterblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="waterblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <Affliction identifier="internaldamage" amount="20" />
        </StatusEffect>
        <StatusEffect target="Character" comparison="and">
          <Conditional isdead="false" />
          <Conditional huskinfection="eq 100.0" />
          <Conditional speciesname="molochblack" />
          <ParticleEmitter particle="bloodsplash" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackwaterblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="waterblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <Affliction identifier="internaldamage" amount="20" />
        </StatusEffect>
        <StatusEffect target="Character" comparison="and">
          <Conditional isdead="false" />
          <Conditional huskinfection="eq 100.0" />
          <Conditional speciesname="molochblack_m" />
          <ParticleEmitter particle="bloodsplash" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackwaterblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="waterblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <Affliction identifier="internaldamage" amount="20" />
        </StatusEffect>
        <StatusEffect target="Character" comparison="and">
          <Conditional isdead="false" />
          <Conditional huskinfection="eq 100.0" />
          <Conditional speciesname="hammerheadmatriarch" />
          <ParticleEmitter particle="bloodsplash" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackwaterblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="waterblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <Affliction identifier="internaldamage" amount="10" />
        </StatusEffect>
        <StatusEffect target="Character" comparison="and">
          <Conditional isdead="false" />
          <Conditional huskinfection="eq 100.0" />
          <Conditional speciesname="watcher" />
          <ParticleEmitter particle="bloodsplash" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackwaterblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="waterblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <Affliction identifier="internaldamage" amount="10" />
        </StatusEffect>
        <StatusEffect target="Character" comparison="and">
          <Conditional isdead="false" />
          <Conditional huskinfection="eq 100.0" />
          <Conditional speciesname="charybdis" />
          <ParticleEmitter particle="bloodsplash" particlespersecond="300" scalemin="8" scalemax="13" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackwaterblood" particlespersecond="300" scalemin="8" scalemax="13" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="waterblood" particlespersecond="300" scalemin="8" scalemax="13" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackblood" particlespersecond="300" scalemin="8" scalemax="13" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <Affliction identifier="internaldamage" amount="50" />
        </StatusEffect>
        <StatusEffect target="Character" interval="0.2" comparison="and">
          <Conditional isdead="false" />
          <Conditional huskinfection="gt 95" />
          <Conditional speciesname="endworm" />
          <Conditional bleedingnonstop="lte 0" />
          <!-- The husk infection has this quirk where a monster cannot be transformed if they have lost any limbs. In this case we only want to check if it has been majorly dismembered, while if it has lost some armor, it doesn't matter. -->
          <ParticleEmitter particle="bloodsplash" particlespersecond="300" scalemin="20" scalemax="30" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackwaterblood" particlespersecond="300" scalemin="20" scalemax="30" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="waterblood" particlespersecond="300" scalemin="20" scalemax="30" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackblood" particlespersecond="300" scalemin="20" scalemax="30" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <SpawnCharacter speciesname="endwormhusk" count="1" transfercontrol="true" spread="0" />
          <RemoveCharacter />
        </StatusEffect>
        <StatusEffect target="Character" interval="0.2" comparison="and">
          <Conditional isdead="false" />
          <Conditional huskinfection="gt 85" />
          <Conditional speciesname="hammerheadmatriarch" />
          <!-- The hammerhead matriarch explodes on death, releasing a bunch of baby boys. I'd rather that not happen. -->
          <ParticleEmitter particle="bloodsplash" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackwaterblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="waterblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackblood" particlespersecond="300" scalemin="8" scalemax="10" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <SpawnCharacter speciesname="hammerheadmatriarchhusk" count="1" transfercontrol="true" spread="0" />
          <RemoveCharacter />
        </StatusEffect>
        <!-- Large Chonks> -->
        <!-- <Pets - Because they explode on death, we need to spawn a husk before they die, otherwise nothing will spawn -->
        <StatusEffect target="Character" interval="0.2" comparison="and">
          <Conditional isdead="false" />
          <Conditional huskinfection="gte 75.0" />
          <Conditional speciesname="peanut" />
          <ParticleEmitter particle="bloodsplash" particlespersecond="300" scalemin="1" scalemax="2" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackblood" particlespersecond="300" scalemin="1" scalemax="2" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="waterblood" particlespersecond="100" scalemin="1" scalemax="2" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackwaterblood" particlespersecond="100" scalemin="1" scalemax="2" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <SpawnCharacter speciesname="peanuthusk" count="1" transfercontrol="true" spread="0" />
          <RemoveCharacter />
        </StatusEffect>
        <StatusEffect target="Character" interval="0.2" comparison="and">
          <Conditional isdead="false" />
          <Conditional huskinfection="gte 75.0" />
          <Conditional speciesname="psilotoad" />
          <ParticleEmitter particle="bloodsplash" particlespersecond="300" scalemin="1" scalemax="2" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackblood" particlespersecond="300" scalemin="1" scalemax="2" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="waterblood" particlespersecond="100" scalemin="1" scalemax="2" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackwaterblood" particlespersecond="100" scalemin="1" scalemax="2" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <SpawnCharacter speciesname="psilotoadhusk" count="1" transfercontrol="true" spread="0" />
          <RemoveCharacter />
        </StatusEffect>
        <StatusEffect target="Character" interval="0.2" comparison="and">
          <Conditional isdead="false" />
          <Conditional huskinfection="gte 75.0" />
          <Conditional speciesname="orangeboy" />
          <ParticleEmitter particle="bloodsplash" particlespersecond="300" scalemin="1" scalemax="2" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackblood" particlespersecond="300" scalemin="1" scalemax="2" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="waterblood" particlespersecond="100" scalemin="1" scalemax="2" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <ParticleEmitter particle="blackwaterblood" particlespersecond="100" scalemin="1" scalemax="2" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
          <SpawnCharacter speciesname="orangeboyhusk" count="1" transfercontrol="true" spread="0" />
          <RemoveCharacter />
        </StatusEffect>
        <!-- Pets> -->
        <!-- <Humans - The husk infection will progress more slowly on humans compared to monsters -->
        <StatusEffect target="Character" comparison="and">
          <Conditional isdead="false" />
          <Conditional blacktoxin="lt 1" />
          <Conditional huskinfection="gt 5.0" />
          <Conditional huskinfection="lt 75.0" />
          <Conditional speciesname="human" />
          <ReduceAffliction identifier="huskinfection" amount="5" />
        </StatusEffect>
        <StatusEffect target="Character" comparison="and">
          <Conditional isdead="false" />
          <Conditional blacktoxin="lt 1" />
          <Conditional huskinfection="gt 85.0" />
          <Conditional huskinfection="lt 99.0" />
          <Conditional speciesname="human" />
          <ReduceAffliction identifier="huskinfection" amount="5" />
        </StatusEffect>
        <!-- Humans> -->
        <!-- <Spread the infection and heal the host to hopefully make it survive. We don't want husks to kill everything and then just die themselves, leaving nothing for the humans to fight. -->
        <StatusEffect target="Character" comparison="and">
          <Conditional isdead="false" />
          <Conditional huskinfection="gte 55" />
          <Conditional speciesname="!eq human" />
          <SpawnItem identifier="huskinfectionexplosion" spawnposition="This" count="1" spread="0" />
          <ParticleEmitter particle="huskgoo" particlespersecond="5" scalemin="1.0" scalemax="1.2" velocitymin="0" velocitymax="0" anglemin="0" anglemax="360" copyentityangle="false" />
          <ReduceAffliction type="damage" strength="2" />
        </StatusEffect>
        <!-- <Humans don't spread the infection but slowly heal if they have a good amount of husk infection and are unconscious> -->
        <StatusEffect target="Character" comparison="and">
          <Conditional isdead="false" />
          <Conditional isunconscious="true" />
          <Conditional huskinfection="gt 50" />
          <Conditional huskinfection="lt 100" />
          <Conditional speciesname="eq human" />
          <SpawnItem identifier="humanhuskclickingsound" spawnposition="This" count="1" spread="0" />
          <ReduceAffliction type="damage" strength="2" />
        </StatusEffect>
        <!-- Spread the infection> -->
      </PeriodicEffect>
      <Periodiceffect mininterval="15" maxinterval="25">
        <StatusEffect target="Character" comparison="or">
          <Conditional speciesname="eq peanut" />
          <Conditional speciesname="eq orangeboy" />
          <Conditional speciesname="eq psilotoad" />
          <Affliction identifier="stun" amount="2" />
          <ParticleEmitter particle="huskgoo" particlespersecond="5" scalemin="1.0" scalemax="1.2" velocitymin="0" velocitymax="0" anglemin="0" anglemax="360" copyentityangle="false" />
          <Sound file="%ModDir:Improved Husks%/Characters/Pets/infect.ogg" range="1000" />
          <!-- Play a special sound when a pet is infected cause want people to know about it.-->
        </StatusEffect>
      </Periodiceffect>
      <icon texture="Content/UI/MainIconsAtlas.png" sourcerect="0,640,128,128" color="60,107,195,255" origin="0,0" />
    </AfflictionHusk>
  </Override>
  <!-- _________________________________________________________________ -->
  <!-- CALYXANIDE AFFLICTION -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Calyxanide Injection" identifier="calyxanideinjection" description="The patient (or victim) has been injected with calyxanide." type="calyxanideinjection" isbuff="true" limbspecific="false" indicatorlimb="Torso" activationthreshold="0" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
    <Effect minstrength="0" maxstrength="100" strengthchange="-1" minscreendistort="0.0" maxscreendistort="3.0" />
    <PeriodicEffect mininterval="1" maxinterval="2">
      <StatusEffect target="Character" comparison="or" duration="3">
        <!-- Reduce husk related afflictions -->
        <Conditional huskinfection="lt 100.0" />
        <!-- Will not work on someone who is too far gone. -->
        <ReduceAffliction identifier="huskinfection" amount="100" />
        <ReduceAffliction identifier="symbiotichusk" amount="2" />
        <ReduceAffliction identifier="blacktoxin" amount="5" />
        <ReduceAffliction identifier="huskinfectioncontagion" amount="100" />
      </StatusEffect>
      <StatusEffect target="Character" comparison="or" duration="6">
        <!-- Damage husks -->
        <Conditional speciesgroup="husk" />
        <Affliction identifier="organdamage" amount="10" />
        <Affliction identifier="internaldamage" amount="5" />
      </StatusEffect>
      <StatusEffect target="Character" checkconditionalalways="true" comparison="or" duration="5">
        <!-- Damage symbiotic husk users -->
        <Conditional symbiotichusk="gt 51" />
        <Affliction identifier="organdamage" amount="2" />
      </StatusEffect>
    </PeriodicEffect>
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="256,0,128,128" color="255,255,255,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- HUSK MUTATION AFFLICTION -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Husk Mutation" identifier="huskmutation" description="The skin contorts and the bones crack... something foul is happening." type="huskmutation" limbspecific="false" indicatorlimb="Torso" showiconthreshold="0" showicontoothersthreshold="50" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
    <Effect minstrength="0" maxstrength="60" strengthchange="1.5" minscreendistort="0.0" maxscreendistort="0.2" minscreenblur="0.0" maxscreenblur="0.2">
      <StatusEffect target="Character" setvalue="true" SpeedMultiplier="0.8" />
    </Effect>
    <Effect minstrength="60" maxstrength="99" strengthchange="1.3" minscreendistort="0.4" maxscreendistort="0.7" minscreenblur="0.4" maxscreenblur="0.7">
      <StatusEffect target="Character" setvalue="true" SpeedMultiplier="0.6" />
      <!-- All humanoid husks are normally transformed into mutant human husks, however if they have the affliction "divinghuskmutation", they will instead become one of the diving suit mutant husks -->
      <StatusEffect target="Character" interval="0.2" targetlimb="Head" checkconditionalalways="true" stackable="false" comparison="and">
        <Conditional speciesname="huskold" />
        <Conditional divinghuskmutation="gt 0" />
        <SpawnItem identifier="huskmutantarmoredspawn" spawnposition="This" count="1" spread="0" />
        <SpawnCharacter speciesname="huskmutantarmored" transfercontrol="true" count="1" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" targetlimb="Head" checkconditionalalways="true" stackable="false" comparison="and">
        <Conditional speciesname="huskpucsold" />
        <Conditional divinghuskmutation="gt 0" />
        <SpawnItem identifier="huskmutantarmoredspawn" spawnposition="This" count="1" spread="0" />
        <SpawnCharacter speciesname="huskmutantarmoredpucs" transfercontrol="true" count="1" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
    </Effect>
    <Effect minstrength="99" maxstrength="100" strengthchange="1" minscreendistort="0.8" maxscreendistort="1.0" minscreenblur="0.8" maxscreenblur="1.0">
      <!-- <Check what character has the affliction and spawn an appropriate cocoon type once it reaches close to 100 strength -->
      <StatusEffect target="Character" interval="0.2" targetlimb="Head" checkconditionalalways="true" stackable="false" comparison="or">
        <Conditional speciesname="crawlerhusk" />
        <Conditional speciesname="swarmcrawlerhusk" />
        <SpawnItem identifier="huskcocoonspawn" spawnposition="This" count="1" spread="0" />
        <SpawnCharacter speciesname="huskmutantcocooncrawler" transfercontrol="true" count="1" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" targetlimb="Head" checkconditionalalways="true" stackable="false" comparison="or">
        <Conditional speciesname="humanhusk" />
        <Conditional speciesname="humanhuskold" />
        <Conditional speciesname="humanhuskdiver" />
        <Conditional speciesname="huskold" />
        <Conditional speciesname="huskcombatold" />
        <Conditional speciesname="huskabyssold" />
        <Conditional speciesname="huskpucsold" />
        <Conditional speciesname="huskslipold" />
        <SpawnItem identifier="huskcocoonspawn" spawnposition="This" transfercontrol="true" count="1" spread="0" />
        <SpawnCharacter speciesname="huskmutantcocoonhuman" count="1" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" targetlimb="Head" checkconditionalalways="true" stackable="false" comparison="or">
        <Conditional speciesname="mudraptorhusk" />
        <Conditional speciesname="mudraptor_unarmoredhusk" />
        <SpawnItem identifier="huskcocoonspawn" spawnposition="This" count="1" spread="0" />
        <SpawnCharacter speciesname="huskmutantcocoonmudraptor" count="1" transfercontrol="true" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" targetlimb="Head" checkconditionalalways="true" stackable="false" comparison="or">
        <Conditional speciesname="crawler_hatchlinghusk" />
        <Conditional speciesname="mudraptor_hatchlinghusk" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="15" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="20" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="25" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="30" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="35" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="40" />
        <sound file="Content/Sounds/Damage/Gore1.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore2.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore3.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore4.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore5.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore6.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore7.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore8.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore9.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore10.ogg" range="1000" volume="1" selectionmode="Random" />
        <SpawnCharacter speciesname="snatcher2" count="1" transfercontrol="true" spread="0" />
        <!-- This version of the snatcher doesn't die over time. -->
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" targetlimb="Head" checkconditionalalways="true" stackable="false" comparison="or">
        <Conditional speciesname="tigerthresher_hatchlinghusk" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="15" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="20" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="25" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="30" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="35" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="40" />
        <sound file="Content/Sounds/Damage/Gore1.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore2.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore3.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore4.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore5.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore6.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore7.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore8.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore9.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore10.ogg" range="1000" volume="1" selectionmode="Random" />
        <SpawnCharacter speciesname="nibbler2" count="1" transfercontrol="true" spread="0" />
        <!-- This version of the nibbler doesn't die over time. -->
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" targetlimb="Head" checkconditionalalways="true" stackable="false" comparison="or" onlyoutside="True">
        <Conditional speciesname="tigerthresherhusk" />
        <SpawnItem identifier="huskaquaticcocoonspawn" spawnposition="This" count="1" spread="0" />
        <SpawnCharacter speciesname="huskmutantcocoontigerthresher" count="1" transfercontrol="true" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" targetlimb="Head" checkconditionalalways="true" stackable="false" comparison="or" onlyoutside="True">
        <Conditional speciesname="bonethresherhusk" />
        <SpawnItem identifier="huskaquaticcocoonspawn" spawnposition="This" count="1" spread="0" />
        <SpawnCharacter speciesname="huskmutantcocoonbonethresher" count="1" transfercontrol="true" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <!-- Check what character has the affliction and spawn an appropriate cocoon type once it reaches close to 100 strength> -->
    </Effect>
    <PeriodicEffect mininterval="5" maxinterval="15">
      <!-- Spawn particles and heal the husk a so that it doesn't anticlimaxily die. -->
      <StatusEffect target="Character" comparison="and">
        <Conditional isdead="false" />
        <Conditional huskmutation="gte 1" />
        <SpawnItem identifier="symbiotichuskparticle" spawnposition="This" count="5" spread="25" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="15" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="20" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="25" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="30" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="35" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="40" />
        <ReduceAffliction type="damage" strength="2" />
      </StatusEffect>
    </PeriodicEffect>
    <PeriodicEffect mininterval="1" maxinterval="2">
      <!-- When the cocoon is about to be created, do all of the above with higher frequency. -->
      <StatusEffect target="Character" comparison="and">
        <Conditional isdead="false" />
        <Conditional huskmutation="gte 85" />
        <sound file="Content/Sounds/Damage/Gore1.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore2.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore3.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore4.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore5.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore6.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore7.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore8.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore9.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="Content/Sounds/Damage/Gore10.ogg" range="1000" volume="1" selectionmode="Random" />
        <SpawnItem identifier="symbiotichuskparticle" spawnposition="This" count="10" spread="45" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="15" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="20" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="25" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="30" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="35" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="45" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="55" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="65" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="3" spread="75" />
        <ReduceAffliction type="damage" strength="3" />
        <Affliction identifier="stun" amount="7" />
      </StatusEffect>
      <!-- If an old husk has this affliction and also has a husk stinger (9% chance), they will instead begin to transform into a diving suit husk mutant -->
      <StatusEffect target="Character" comparison="and">
        <Conditional speciesname="huskold" />
        <Conditional HasStatusTag="eq huskrandomchance" />
        <Affliction identifier="divinghuskmutation" amount="100" />
      </StatusEffect>
      <StatusEffect target="Character" comparison="and">
        <Conditional speciesname="huskpucsold" />
        <Conditional HasStatusTag="eq huskrandomchance" />
        <Affliction identifier="divinghuskmutation" amount="100" />
      </StatusEffect>
    </PeriodicEffect>
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="0,0,128,128" color="60,140,195,255" origin="0,0" />
  </Affliction>
  <Affliction name="Diving Suit Husk Mutation" identifier="divinghuskmutation" description="The rusted diving acts as a cocoon, as whatever is inside it changes shape." type="divinghuskmutation" limbspecific="false" indicatorlimb="Torso" activationthreshold="0" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100">
    <Effect minstrength="0" maxstrength="100" strengthchange="0" />
    <!-- <This affliction always at 100% strength on old husks if they have a husk stinger (random chance) while mutating> -->
    <PeriodicEffect mininterval="5" maxinterval="15">
      <StatusEffect target="Character" comparison="and">
        <Conditional isdead="false" />
        <sound file="%ModDir:Improved Husks%/Characters/Huskold/creak.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="%ModDir:Improved Husks%/Characters/Huskold/creak2.ogg" range="1000" volume="1" selectionmode="Random" />
        <sound file="%ModDir:Improved Husks%/Characters/Huskold/creak3.ogg" range="1000" volume="1" selectionmode="Random" />
      </StatusEffect>
    </PeriodicEffect>
    <icon texture="Content/UI/MainIconsAtlas.png" sourcerect="0,640,128,128" color="60,107,195,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- WATCHER HUSK BROADCAST-->
  <!-- _________________________________________________________________ -->
  <Affliction name="Watcher husk's broadcast" identifier="watcherhuskbroadcast" description="The watcher husk's screech shakes you to your core..." type="watcherhuskbroadcast" limbspecific="false" indicatorlimb="Torso" activationthreshold="0" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
    <Effect minstrength="0" maxstrength="100" strengthchange="-3" minscreendistort="0.5" maxscreendistort="1" minscreenblur="0.5" maxscreenblur="1" minradialdistort="0" maxradialdistort="2" minchromaticaberration="0" maxchromaticaberration="50" />
    <PeriodicEffect mininterval="2" maxinterval="6">
      <StatusEffect target="Character" duration="2" comparison="and">
        <Conditional isdead="false" />
        <Conditional speciesname="eq human" />
        <Affliction identifier="watcherderailed" amount="20" />
        <Affliction identifier="psychosis" amount="1" />
      </StatusEffect>
    </PeriodicEffect>
    <PeriodicEffect mininterval="1" maxinterval="1">
      <StatusEffect target="Character" comparison="or">
        <Conditional speciesname="crawlerhusk" />
        <Conditional speciesname="crawler_hatchlinghusk" />
        <Conditional speciesname="swarmcrawlerhusk" />
        <Conditional speciesname="humanhusk" />
        <Conditional speciesname="humanhuskold" />
        <Conditional speciesname="humanhuskdiver" />
        <Conditional speciesname="huskold" />
        <Conditional speciesname="huskcombatold" />
        <Conditional speciesname="huskabyssold" />
        <Conditional speciesname="huskpucsold" />
        <Conditional speciesname="huskslipold" />
        <Conditional speciesname="mudraptorhusk" />
        <Conditional speciesname="mudraptor_hatchlinghusk" />
        <Conditional speciesname="mudraptor_unarmoredhusk" />
        <Conditional speciesname="tigerthresherhusk" />
        <Conditional speciesname="tigerthresher_hatchlinghusk" />
        <Conditional speciesname="bonethresherhusk" />
        <Affliction identifier="huskmutation" amount="5" />
      </StatusEffect>
    </PeriodicEffect>
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="256,0,128,128" color="255,255,255,255" origin="0,0" />
  </Affliction>
  <Affliction name="Derailed" identifier="watcherderailed" description="" type="watcherderailed" causeofdeathdescription="" selfcauseofdeathdescription="" limbspecific="false" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100">
    <Effect minstrength="0" maxstrength="100" minscreendistort="0.7" maxscreendistort="0.9" minradialdistort="0.7" maxradialdistort="0.9" minscreenblur="0.8" maxscreenblur="1.2" minchromaticaberration="0.5" maxchromaticaberration="1.0" strengthchange="-3.0" MinAfflictionOverlayAlphaMultiplier="0" MaxAfflictionOverlayAlphaMultiplier="0.7" mingrainstrength="0" maxgrainstrength="1">
      <StatusEffect target="Character" SpeedMultiplier="0.6" setvalue="true" />
      <StatusEffect target="Character">
        <Conditional IsLocalPlayer="True" />
        <Sound file="%ModDir:Improved Husks%/Characters/Watcherhusk/derailed.ogg" loop="true" volume="1" selectionmode="Random" />
      </StatusEffect>
    </Effect>
    <AfflictionOverlay texture="%ModDir:Improved Husks%/Characters/Watcherhusk/watcheroverlay.png" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- SYMBIOTIC HUSK SECONDARY AFFLICTION -->
  <!-- PASSIVE HEALING AFFLICTION -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Husk Infection Healing" identifier="huskinfectionhealing" description="The symbiotic husk keeps your body oxygenated and produces other beneficial substances that can make you recover from a critical state." type="huskinfectionhealing" isbuff="true" limbspecific="false" indicatorlimb="Torso" activationthreshold="0" showiconthreshold="0" showinhealthscannerthreshold="1000" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
    <Effect minstrength="0" maxstrength="100" strengthchange="-4" />
    <PeriodicEffect mininterval="2" maxinterval="4">
      <!-- Silently heal the host when it becomes unconscious -->
      <StatusEffect target="Character" comparison="and">
        <Conditional isdead="false" />
        <Conditional isunconscious="true" />
        <Conditional speciesname="eq human" />
        <ReduceAffliction type="damage" strength="2" />
      </StatusEffect>
      <!-- If the symbiotic husk infection is given to anything other than a human, it'll just infect them as usual and slowly remove the affliction itself. -->
      <StatusEffect target="Character" comparison="and">
        <Conditional isdead="false" />
        <Conditional speciesname="!eq human" />
        <Affliction identifier="huskinfection" strength="2" />
        <ReduceAffliction identifier="symbiotichusk" strength="10" />
      </StatusEffect>
    </PeriodicEffect>
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="256,0,128,128" color="255,255,255,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- SYMBIOTIC HUSK SECONDARY AFFLICTION -->
  <!-- HUSK INFECTION RESISTANCE -->
  <!-- _________________________________________________________________ -->
  <Afflictionhusk name="Husk Infection Affinity" identifier="huskinfectionaffinity" description="The symbiotic husk has fully established itself within your body, providing pressure resistance and control over the common husk infection, preventing it from taking over you entirely." type="alieninfection" isbuff="true" limbspecific="false" indicatorlimb="Torso" activationthreshold="0" showiconthreshold="0" showinhealthscannerthreshold="1000" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,0,195,255;60,0,195,255;60,0,195,255" targets="human" huskedspeciesname="husk" needsair="true" causespeechimpediment="false" treatmentthreshold="1000" dormantthreshold="0" activethreshold="0" transitionthreshold="1000" transformthresholdondeath="1000" sendmessages="false">
    <Effect minstrength="0" maxstrength="100" strengthchange="-4" />
    <PeriodicEffect mininterval="2" maxinterval="5">
      <!-- Continuously remove the husk infection so that bots don't try to heal it with calyxanide -->
      <StatusEffect target="Character" comparison="and">
        <Conditional isdead="false" />
        <Conditional speciesname="eq human" />
        <ReduceAffliction identifier="huskinfection" strength="50" />
      </StatusEffect>
      <!-- Loudly heal the host when it becomes unconscious -->
      <StatusEffect target="Character" comparison="and">
        <Conditional isdead="false" />
        <Conditional isunconscious="true" />
        <Conditional speciesname="eq human" />
        <ReduceAffliction type="damage" strength="2" />
        <SpawnItem identifier="humanhuskclickingsound" spawnposition="This" count="1" spread="0" />
      </StatusEffect>
    </PeriodicEffect>
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="384,0,128,128" color="60,0,195,255" origin="0,0" />
  </Afflictionhusk>
  <!-- _________________________________________________________________ -->
  <!-- SYMBIOTIC HUSK INFECTION AFFLICTION -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Symbiotic Husk Infection" identifier="symbiotichusk" description="Something alien but benevolent thrives within..." type="symbiotichusk" isbuff="true" limbspecific="false" indicatorlimb="Torso" showiconthreshold="0" activationthreshold="0" showinhealthscannerthreshold="50" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
    <Effect minstrength="0" maxstrength="50" strengthchange="0">
      <StatusEffect target="Character" OxygenAvailable="1000.0" setvalue="true" />
      <StatusEffect target="Character">
        <Affliction identifier="huskinfectionhealing" amount="50" />
      </StatusEffect>
    </Effect>
    <Effect minstrength="51" maxstrength="100" strengthchange="0">
      <StatusEffect target="Character" SpeedMultiplier="1.1" PressureProtection="10000.0" OxygenAvailable="1000.0" setvalue="true" />
      <StatusEffect target="Character">
        <Affliction identifier="huskinfectionhealing" amount="50" />
        <Affliction identifier="huskinfectionaffinity" amount="50" />
      </StatusEffect>
      <StatusEffect target="Character" delay="1.5" stackable="false">
        <SpawnItem identifier="symbiotichuskparticle" spawnposition="This" count="1" spread="0" />
      </StatusEffect>
    </Effect>
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="128,0,128,128" color="255,255,255,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- BOOSTER HUSK INFECTION AFFLICTION -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Booster Husk Infection" identifier="boosterhusk" description="A powerful but volatile mixture of stem-like cells quickly integrate themselves into the patient, speeding up various processes within their body." type="boosterhusk" isbuff="true" limbspecific="false" indicatorlimb="Torso" showiconthreshold="0" activationthreshold="0" showinhealthscannerthreshold="10" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
    <Effect minstrength="0" maxstrength="100" strengthchange="-1">
      <StatusEffect target="Character" SpeedMultiplier="1.1" setvalue="true" />
    </Effect>
    <PeriodicEffect mininterval="2" maxinterval="4">
      <!-- Slowly heal damage -->
      <StatusEffect target="Character" comparison="and">
        <Conditional isdead="false" />
        <ReduceAffliction type="damage" strength="4" />
      </StatusEffect>
      <!-- Apply growth affliction to hatchlings and adults -->
      <StatusEffect target="Character" comparison="or">
        <Conditional speciesname="crawler_hatchling" />
        <Conditional speciesname="crawler" />
        <Conditional speciesname="mudraptor_hatchling" />
        <Conditional speciesname="mudraptor_unarmored" />
        <Conditional speciesname="tigerthresher_hatchling" />
        <Conditional speciesname="tigerthresher" />
        <Conditional speciesname="bonethresher" />
        <Conditional speciesname="swarmcrawler" />
        <Conditional speciesname="mudraptor" />
        <Affliction identifier="creaturegrowth" strength="6" />
      </StatusEffect>
    </PeriodicEffect>
    <PeriodicEffect mininterval="15" maxinterval="600">
      <!-- No side effects? HAHAHAHAHA. -->
      <StatusEffect target="Character" comparison="and">
        <Conditional isdead="false" />
        <Affliction identifier="huskinfection" strength="5" />
      </StatusEffect>
    </PeriodicEffect>
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="0,128,128,128" color="255,255,255,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- GROWTH AFFLICTION -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Growth" identifier="creaturegrowth" description="The creature is growing at an abnormal rate." type="creaturegrowth" limbspecific="false" indicatorlimb="Torso" showiconthreshold="0" activationthreshold="0" showinhealthscannerthreshold="10" showicontoothersthreshold="1000" maxstrength="100" iconcolors="155,175,150,255;155,175,50,255;155,175,0,255">
    <Effect minstrength="0" maxstrength="100" strengthchange="0">
      <StatusEffect target="Character" SpeedMultiplier="1.1" setvalue="true" />
    </Effect>
    <PeriodicEffect mininterval="2" maxinterval="3">
      <!-- Grow creatures to enhanced forms when affliction reaches 100 strength -->
      <StatusEffect target="Character" interval="0.2" comparison="and">
        <Conditional speciesname="crawler_hatchling" />
        <Conditional isdead="false" />
        <Conditional creaturegrowth="eq 100" />
        <SpawnCharacter speciesname="crawler" transfercontrol="true" count="1" spread="0" />
        <SpawnItem identifier="growparticles" spawnposition="This" count="1" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" comparison="and">
        <Conditional speciesname="crawler" />
        <Conditional isdead="false" />
        <Conditional creaturegrowth="eq 100" />
        <SpawnCharacter speciesname="swarmcrawler" transfercontrol="true" count="1" spread="0" />
        <SpawnItem identifier="growparticles" spawnposition="This" count="1" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" comparison="and">
        <Conditional speciesname="mudraptor_hatchling" />
        <Conditional isdead="false" />
        <Conditional creaturegrowth="eq 100" />
        <SpawnCharacter speciesname="mudraptor_unarmored" transfercontrol="true" count="1" spread="0" />
        <SpawnItem identifier="growparticles" spawnposition="This" count="1" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" comparison="and">
        <Conditional speciesname="mudraptor_unarmored" />
        <Conditional isdead="false" />
        <Conditional creaturegrowth="eq 100" />
        <SpawnCharacter speciesname="mudraptor" count="1" transfercontrol="true" spread="0" />
        <SpawnItem identifier="growparticles" spawnposition="This" count="1" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" comparison="and">
        <Conditional speciesname="tigerthresher_hatchling" />
        <Conditional isdead="false" />
        <Conditional creaturegrowth="eq 100" />
        <SpawnCharacter speciesname="tigerthresher" count="1" transfercontrol="true" spread="0" />
        <SpawnItem identifier="growparticles" spawnposition="This" count="1" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" comparison="and" onlyoutside="True">
        <Conditional speciesname="tigerthresher" />
        <Conditional isdead="false" />
        <Conditional creaturegrowth="eq 100" />
        <SpawnCharacter speciesname="bonethresher" count="1" transfercontrol="true" spread="0" />
        <SpawnItem identifier="growparticles" spawnposition="This" count="1" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <!-- Adult creatures drop eggs. Uhh... Good luck getting tigerthresher eggs. -->
      <StatusEffect target="Character" interval="0.2" comparison="and">
        <Conditional speciesname="swarmcrawler" />
        <Conditional isdead="false" />
        <Conditional creaturegrowth="gte 50" />
        <SpawnItem identifier="mediumcrawleregg" spawnposition="This" count="1" spread="0" />
        <ReduceAffliction identifier="creaturegrowth" strength="1000" />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" comparison="and">
        <Conditional speciesname="mudraptor" />
        <Conditional isdead="false" />
        <Conditional creaturegrowth="gte 50" />
        <SpawnItem identifier="mediummodmudraptoregg" spawnposition="This" count="1" spread="0" />
        <ReduceAffliction identifier="creaturegrowth" strength="1000" />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" comparison="and">
        <Conditional speciesname="bonethresher" />
        <Conditional isdead="false" />
        <Conditional creaturegrowth="gte 50" />
        <SpawnItem identifier="mediumthresheregg" spawnposition="This" count="1" spread="0" />
        <ReduceAffliction identifier="creaturegrowth" strength="1000" />
      </StatusEffect>
    </PeriodicEffect>
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="0,128,128,128" color="255,255,255,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- HUSK ROTTING AFFLICTION -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Rotting" identifier="huskrotting" description="The corpse being piloted by the parasite is slowly rotting away..." type="huskrotting" limbspecific="false" indicatorlimb="Torso" activationthreshold="0" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100">
    <Effect minstrength="0" maxstrength="99" strengthchange="-0.1">
      <!-- <The affliction is constantly increased on human husks> -->
    </Effect>
    <Effect minstrength="99" maxstrength="100" strengthchange="1">
      <!-- Spawn old husk when affliction reaches 100 strength -->
      <StatusEffect target="Character" interval="0.2" targetlimb="Head" checkconditionalalways="true" stackable="false" comparison="and">
        <Conditional speciesname="humanhusk" />
        <Conditional isunconscious="false" />
        <Conditional healthpercentage="gte 10" />
        <Conditional isdead="false" />
        <dropcontaineditems />
        <SpawnCharacter speciesname="humanhuskold" count="1" transfercontrol="true" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
    </Effect>
    <icon texture="Content/UI/MainIconsAtlas.png" sourcerect="0,640,128,128" color="60,107,195,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- HUSK RUSTING AFFLICTION -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Suit Rusting" identifier="suitrusting" description="The diving suit being worn by the husk is rusting..." type="suitrusting" limbspecific="false" indicatorlimb="Torso" activationthreshold="0" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100">
    <Effect minstrength="0" maxstrength="99" strengthchange="-0.1">
      <!-- <The affliction is increased when a non-rusted diver husk is in the water> -->
    </Effect>
    <Effect minstrength="99" maxstrength="100" strengthchange="1">
      <!-- Spawn rusted / old husk diver when affliction reaches 100 strength -->
      <StatusEffect target="Character" interval="0.2" targetlimb="Head" checkconditionalalways="true" stackable="false" comparison="and">
        <Conditional speciesname="humanhuskdiver" />
        <Conditional healthpercentage="gte 40" />
        <Conditional isunconscious="false" />
        <Conditional isdead="false" />
        <Conditional huskregularsuit="gt 0" />
        <dropcontaineditems />
        <SpawnCharacter speciesname="huskold" count="1" transfercontrol="true" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" targetlimb="Head" checkconditionalalways="true" stackable="false" comparison="and">
        <Conditional speciesname="humanhuskdiver" />
        <Conditional healthpercentage="gte 40" />
        <Conditional isunconscious="false" />
        <Conditional isdead="false" />
        <Conditional huskcombatsuit="gt 0" />
        <dropcontaineditems />
        <SpawnCharacter speciesname="huskcombatold" count="1" transfercontrol="true" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" targetlimb="Head" checkconditionalalways="true" stackable="false" comparison="and">
        <Conditional speciesname="humanhuskdiver" />
        <Conditional healthpercentage="gte 40" />
        <Conditional isunconscious="false" />
        <Conditional isdead="false" />
        <Conditional huskabysssuit="gt 0" />
        <dropcontaineditems />
        <SpawnCharacter speciesname="huskabyssold" count="1" transfercontrol="true" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" targetlimb="Head" checkconditionalalways="true" stackable="false" comparison="and">
        <Conditional speciesname="humanhuskdiver" />
        <Conditional healthpercentage="gte 40" />
        <Conditional isunconscious="false" />
        <Conditional isdead="false" />
        <Conditional huskslipsuit="gt 0" />
        <dropcontaineditems />
        <SpawnCharacter speciesname="huskslipold" count="1" transfercontrol="true" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" targetlimb="Head" checkconditionalalways="true" stackable="false" comparison="and">
        <Conditional speciesname="humanhuskdiver" />
        <Conditional healthpercentage="gte 40" />
        <Conditional isunconscious="false" />
        <Conditional isdead="false" />
        <Conditional huskpucssuit="gt 0" />
        <dropcontaineditems />
        <SpawnCharacter speciesname="huskpucsold" count="1" transfercontrol="true" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
    </Effect>
    <icon texture="Content/UI/MainIconsAtlas.png" sourcerect="0,640,128,128" color="60,107,195,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- HUSK COCOON DEVELOPMENT AFFLICTION -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Husk Cocoon Development" identifier="huskcocoondevelopment" description="A strange and alien creature slowly develops inside the cocoon..." type="huskcocoondevelopment" limbspecific="false" indicatorlimb="Torso" activationthreshold="0" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100">
    <Effect minstrength="0" maxstrength="99" strengthchange="0">
      <!-- <The affliction is increased periodically by a husk cocoon monster> -->
    </Effect>
    <Effect minstrength="99" maxstrength="100" strengthchange="0">
      <!-- Spawn the corresponding husk mutant when the affliction reaches 100 strength -->
      <StatusEffect target="Character" interval="0.2" targetlimb="Torso" checkconditionalalways="true" stackable="false" comparison="and">
        <Conditional speciesname="huskmutantcocooncrawler" />
        <Conditional isunconscious="false" />
        <Conditional isdead="false" />
        <SpawnCharacter speciesname="huskmutantcrawler" count="1" transfercontrol="true" spread="0" />
        <SpawnItem identifier="huskmutantcrawlerspawn" spawnposition="This" count="1" spread="0" />
        <SpawnItem identifier="huskmutantacidexplosion" spawnposition="This" count="1" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" targetlimb="Torso" checkconditionalalways="true" stackable="false" comparison="and">
        <Conditional speciesname="huskmutantcocoonhuman" />
        <Conditional isunconscious="false" />
        <Conditional isdead="false" />
        <SpawnCharacter speciesname="huskmutanthuman" count="1" transfercontrol="true" spread="0" />
        <SpawnItem identifier="huskmutanthumanspawn" spawnposition="This" count="1" spread="0" />
        <SpawnItem identifier="huskmutantacidexplosion" spawnposition="This" count="1" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" targetlimb="Torso" checkconditionalalways="true" stackable="false" comparison="and">
        <Conditional speciesname="huskmutantcocoonmudraptor" />
        <Conditional isunconscious="false" />
        <Conditional isdead="false" />
        <SpawnCharacter speciesname="huskmutantmudraptor" count="1" transfercontrol="true" spread="0" />
        <SpawnItem identifier="huskmutantmudraptorspawn" spawnposition="This" count="1" spread="0" />
        <SpawnItem identifier="huskmutantacidexplosion" spawnposition="This" count="1" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" targetlimb="Torso" checkconditionalalways="true" stackable="false" comparison="and">
        <Conditional speciesname="huskmutantcocoontigerthresher" />
        <Conditional isunconscious="false" />
        <Conditional isdead="false" />
        <SpawnCharacter speciesname="huskmutanttigerthresher" count="1" transfercontrol="true" spread="0" />
        <SpawnItem identifier="huskmutanttigerthresherspawn" spawnposition="This" count="1" spread="0" />
        <SpawnItem identifier="huskmutantacidexplosionbig" spawnposition="This" count="1" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
      <StatusEffect target="Character" interval="0.2" targetlimb="Torso" checkconditionalalways="true" stackable="false" comparison="and" onlyoutside="True">
        <Conditional speciesname="huskmutantcocoonbonethresher" />
        <Conditional isunconscious="false" />
        <Conditional isdead="false" />
        <SpawnCharacter speciesname="huskmutantbonethresher" count="1" transfercontrol="true" spread="0" />
        <SpawnItem identifier="huskmutantbonethresherspawn" spawnposition="This" count="1" spread="0" />
        <SpawnItem identifier="huskmutantacidexplosionbig" spawnposition="This" count="1" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
    </Effect>
    <icon texture="Content/UI/MainIconsAtlas.png" sourcerect="0,640,128,128" color="60,107,195,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- SHAMBLER MUTATION AFFLICTION(S) -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Shambler Mutation" identifier="shamblermutation2" description="The shambler twitches as the alien head controlling it slowly embeds itself deeper into its body." type="shamblermutation2" limbspecific="false" indicatorlimb="Torso" activationthreshold="0" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100">
    <Effect minstrength="0" maxstrength="98" strengthchange="-0.3" />
    <!-- This affliction reduces itself, while the one below increases it at random intervals. -->
    <Effect minstrength="99" maxstrength="100" strengthchange="0">
      <!-- Spawn hunter husk when affliction reaches 100 strength -->
      <StatusEffect target="Character" interval="0.2" targetlimb="Head" checkconditionalalways="true" stackable="false" comparison="and">
        <Conditional speciesname="humanshambler" />
        <Conditional healthpercentage="gte 50" />
        <Conditional isunconscious="false" />
        <Conditional isdead="false" />
        <dropcontaineditems />
        <SpawnItem identifier="huskmutanthunterspawn" spawnposition="This" count="1" spread="0" />
        <SpawnCharacter speciesname="huskmutanthunter" count="1" transfercontrol="true" spread="0" />
        <RemoveCharacter />
      </StatusEffect>
    </Effect>
    <icon texture="Content/UI/MainIconsAtlas.png" sourcerect="0,640,128,128" color="60,107,195,255" origin="0,0" />
  </Affliction>
  <Affliction name="Shambler Mutation" identifier="shamblermutation1" description="The shambler twitches as the alien head controlling it slowly embeds itself deeper into its body." type="shamblermutation1" limbspecific="false" indicatorlimb="Torso" activationthreshold="0" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100">
    <Effect minstrength="0" maxstrength="100" strengthchange="0" />
    <!-- <This affliction always at 100% strength on shamblers.> -->
    <PeriodicEffect mininterval="20" maxinterval="45">
      <StatusEffect target="Character" comparison="and">
        <Conditional isdead="false" />
        <Conditional speciesname="humanshambler" />
        <Affliction identifier="shamblermutation2" amount="35" />
      </StatusEffect>
    </PeriodicEffect>
    <icon texture="Content/UI/MainIconsAtlas.png" sourcerect="0,640,128,128" color="60,107,195,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- HUSK INFECTION CONTAGION AFFLICTION -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Husk Infection Contagion" identifier="huskinfectioncontagion" description="The victim has inhaled or come in contact with airborne / waterborne active samples of the husk infection." type="huskinfectioncontagion" limbspecific="false" indicatorlimb="Head" activationthreshold="0" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100">
    <Effect minstrength="0" maxstrength="100" strengthchange="-1" />
    <PeriodicEffect mininterval="1" maxinterval="2">
      <StatusEffect target="Character" comparison="and">
        <Conditional isdead="false" />
        <Conditional speciesgroup="!eq human" />
        <!-- This affliction doesn't actually affect humans and pets otherwise it would be stupidly powerful. -->
        <Affliction identifier="huskinfection" strength="2" />
      </StatusEffect>
      <StatusEffect target="Character" comparison="and">
        <Conditional speciesgroup="husk" />
        <Conditional speciesname="!watcherhusk" />
        <!-- This affliction can be triggered by husked watchers when they are damaged. It infects creatures nearby and heals husked creatures, but shouldn't do anything to husked watchers, otherwise they would heal constantly. -->
        <ReduceAffliction type="damage" strength="5" />
      </StatusEffect>
    </PeriodicEffect>
    <icon texture="Content/UI/MainIconsAtlas.png" sourcerect="0,640,128,128" color="60,107,195,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- DIVING SUIT HUSK HELMET BREAKING AFFLICTIONS -->
  <!-- _________________________________________________________________ -->
  <Afflictionhusk name="Helmet Shattering" identifier="helmetbreaking" description="The helmet being worn by the husk is breaking..." type="alieninfection" targets="humanhusk" transferbuffs="true" controlhusk="true" huskedspeciesname="[speciesname]diver" limbspecific="false" indicatorlimb="Head" activationthreshold="0" dormantthreshold="1" activethreshold="1" transitionthreshold="1" transformthresholdondeath="0" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255" causespeechimpediment="false" sendmessages="false" needsair="false">
    <Effect minstrength="0" maxstrength="100" strengthchange="35" />
    <PeriodicEffect mininterval="2" maxinterval="3">
      <!-- <Periodic damage and sound / particle effects.-->
      <StatusEffect target="Character" targetlimb="Head" comparison="and">
        <Conditional isdead="false" />
        <SpawnItem identifier="huskhumandiveremitter" spawnposition="This" count="1" spread="0" />
      </StatusEffect>
      <StatusEffect target="Character" comparison="and">
        <Conditional isdead="false" />
        <Affliction identifier="internaldamage" amount="5" />
      </StatusEffect>
      <!-- Periodic damage and sound / particle effects.> -->
    </PeriodicEffect>
    <icon texture="Content/UI/MainIconsAtlas.png" sourcerect="0,640,128,128" color="60,107,195,255" origin="0,0" />
  </Afflictionhusk>
  <!-- _________________________________________________________________ -->
  <!-- DIVING SUIT HUSK IDENTIFIER AFFLICTIONS -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Regularsuit" identifier="huskregularsuit" description="This human husk is wearing a regular suit." type="huskregularsuit" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100">
    <Effect minstrength="0" maxstrength="100" strengthchange="0" />
    <icon texture="Content/UI/MainIconsAtlas.png" sourcerect="0,640,128,128" color="60,107,195,255" origin="0,0" />
  </Affliction>
  <Affliction name="Combatsuit" identifier="huskcombatsuit" description="This human husk is wearing a combat suit." type="huskcombatsuit" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100">
    <Effect minstrength="0" maxstrength="100" strengthchange="0" />
    <icon texture="Content/UI/MainIconsAtlas.png" sourcerect="0,640,128,128" color="60,107,195,255" origin="0,0" />
  </Affliction>
  <Affliction name="Abysssuit" identifier="huskabysssuit" description="This human husk is wearing a abyss suit." type="huskabysssuit" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100">
    <Effect minstrength="0" maxstrength="100" strengthchange="0" />
    <icon texture="Content/UI/MainIconsAtlas.png" sourcerect="0,640,128,128" color="60,107,195,255" origin="0,0" />
  </Affliction>
  <Affliction name="Pucssuit" identifier="huskpucssuit" description="This human husk is wearing a pucs suit." type="huskabysssuit" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100">
    <Effect minstrength="0" maxstrength="100" strengthchange="0" />
    <icon texture="Content/UI/MainIconsAtlas.png" sourcerect="0,640,128,128" color="60,107,195,255" origin="0,0" />
  </Affliction>
  <Affliction name="Slipssuit" identifier="huskslipsuit" description="This human husk is wearing a slipsuit." type="huskabysssuit" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100">
    <Effect minstrength="0" maxstrength="100" strengthchange="0" />
    <icon texture="Content/UI/MainIconsAtlas.png" sourcerect="0,640,128,128" color="60,107,195,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- MUTANT HUSK SEVERED HIJACKING HEAD IN-PROGRESS / COOLDOWN AFFLICTION-->
  <!-- _________________________________________________________________ -->
  <!-- This affliction prevents multiple heads from latching onto the same person. It also serves as a cooldown so that you don't get attacked by another head immediately after getting rid of one. -->
  <Affliction name="Head Hijacking in progress" identifier="huskheadhijackinginprogress" description="This human is either already having its head hijacked by a skittering head or just managed to save itself after being attacked by one." type="huskheadhijackinginprogress" limbspecific="false" indicatorlimb="Head" activationthreshold="0" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100">
    <Effect minstrength="0" maxstrength="100" strengthchange="-3" />
    <icon texture="Content/UI/MainIconsAtlas.png" sourcerect="0,640,128,128" color="60,107,195,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- MUTANT HUSK SEVERED HEAD BEFORE-HIJACK AFFLICTION-->
  <!-- _________________________________________________________________ -->
  <!-- This affliction is occasionally inflicted by mutant heads. Having this affliction makes you a possible candidate for being hijacked the next time you are attacked by one. -->
  <Affliction name="Head Hijacking" identifier="huskheadhijacking" description="The victim was just attacked by a severed skittering head." type="huskheadhijacking" limbspecific="false" indicatorlimb="Head" activationthreshold="0" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100">
    <Effect minstrength="0" maxstrength="100" strengthchange="-6" />
    <icon texture="Content/UI/MainIconsAtlas.png" sourcerect="0,640,128,128" color="60,107,195,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- MUTANT HUSK SEVERED HEAD HIJACKING AFFLICTION -->
  <!-- _________________________________________________________________ -->
  <Afflictionhusk name="Head Hijacking" identifier="huskheadhijacking1" description="A severed head is attempting to dislocate your skull! Attempting to push it away by yourself seems to be futile... You need to ask someone else to shoot it off!" type="alieninfection" transferbuffs="true" dormantthreshold="5" activethreshold="5" transitionthreshold="100" transformthresholdondeath="0" targets="human" huskedspeciesname="[speciesname]shambler" limbspecific="false" indicatorlimb="Head" activationthreshold="0" showiconthreshold="0" showinhealthscannerthreshold="1000" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255" causespeechimpediment="false" sendmessages="false" needsair="true">
    <Effect minstrength="0" maxstrength="100" strengthchange="2.2" SpeedMultiplier="0.6" dialogflag="Headhijacking">
      <StatusEffect target="Character" delay="0.1" stackable="false" targetlimb="Head">
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="1" spread="15" />
        <SpawnItem identifier="huskmutanthumanheadhijackparticle" spawnposition="This" count="1" spread="20" />
        <Affliction identifier="huskheadhijackinginprogress" strength="50" />
      </StatusEffect>
      <StatusEffect target="Character" delay="5" duration="10" stackable="false">
        <!-- Constantly apply the husk infection -->
        <Affliction identifier="huskinfection" amount="0.5" />
      </StatusEffect>
      <StatusEffect target="Character" delay="1" duration="10" stackable="false">
        <!-- Reduce husk infection if it reaches 50% strength -->
        <Conditional huskinfection="gt 50" />
        <ReduceAffliction identifier="huskinfection" amount="0.5" />
      </StatusEffect>
      <StatusEffect type="Always" target="Character" delay="2" duration="1" stackable="false" checkconditionalalways="true" comparison="and">
        <conditional burn="gte 60" />
        <conditional huskheadhijacking1="gt 0" />
        <ReduceAffliction identifier="huskheadhijacking1" amount="1000" />
        <SpawnItem identifier="huskmutanthumanheadhijackdie" spawnposition="This" count="1" spread="0" />
      </StatusEffect>
    </Effect>
    <PeriodicEffect mininterval="2" maxinterval="3">
      <StatusEffect target="Character" checkconditionalalways="true" targetlimb="Head" comparison="and">
        <Conditional speciesname="human" />
        <Conditional isdead="false" />
        <Conditional isunconscious="false" />
        <ParticleEmitter particle="bloodsplash" particlespersecond="100" scalemin="1" scalemax="1" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
        <ParticleEmitter particle="blackblood" particlespersecond="100" scalemin="1" scalemax="1" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
        <ParticleEmitter particle="waterblood" particlespersecond="100" scalemin="1" scalemax="2" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
        <ParticleEmitter particle="blackwaterblood" particlespersecond="100" scalemin="1" scalemax="2" velocitymin="0" velocitymax="40" anglemin="0" anglemax="360" />
        <Affliction identifier="blunttrauma" amount="0.4" />
      </StatusEffect>
      <StatusEffect target="Character" checkconditionalalways="true" targetlimb="Head" comparison="and">
        <Conditional speciesname="human" />
        <Conditional isdead="false" />
        <Conditional huskheadhijacking1="gte 100" />
        <Affliction identifier="blunttrauma" amount="50" />
        <Affliction identifier="stun" amount="5" />
      </StatusEffect>
      <StatusEffect target="Character" checkconditionalalways="true" targetlimb="Head" comparison="and">
        <Conditional speciesname="human" />
        <Conditional isdead="false" />
        <Sound file="%ModDir:Improved Husks%/Characters/Huskmutanthumanhead/headloop.ogg" range="1000" volume="0.8" />
      </StatusEffect>
    </PeriodicEffect>
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="512,0,128,128" color="255,255,255,255" origin="0,0" />
  </Afflictionhusk>
  <Affliction name="Armed" identifier="shamblerarmed" description="This shambler has a weapon and is not afraid to use it!" type="shamblerarmed" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100">
    <Effect minstrength="0" maxstrength="100" strengthchange="0">
      <StatusEffect target="Character" SpeedMultiplier="0.8" setvalue="true" />
    </Effect>
    <icon texture="Content/UI/MainIconsAtlas.png" sourcerect="0,640,128,128" color="60,107,195,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- BLACK TOXIN AFFLICTION  -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Black Toxin" identifier="blacktoxin" description="Throbbing black veins are spreading around the patient's skin, spreading some sort of black liquid at an alarming rate." type="blacktoxin" limbspecific="false" indicatorlimb="Torso" showiconthreshold="10" showicontoothersthreshold="20" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
    <!-- Causes the husk infection to progress ridiculously faster. Also slows down the victim. -->
    <Effect minstrength="0" maxstrength="25" minscreendistort="0.2" maxscreendistort="0.4" minscreenblur="0.2" maxscreenblur="0.4" strengthchange="0.4">
      <StatusEffect target="Character" SpeedMultiplier="0.8" setvalue="true" />
    </Effect>
    <Effect minstrength="25" maxstrength="50" minscreendistort="0.4" maxscreendistort="0.6" minscreenblur="0.4" maxscreenblur="0.6" strengthchange="0.5" minbodytint="0,0,0,0" maxbodytint="0,0,0,150">
      <StatusEffect target="Character" SpeedMultiplier="0.6" setvalue="true" />
    </Effect>
    <Effect minstrength="50" maxstrength="75" minscreendistort="0.6" maxscreendistort="0.8" minscreenblur="0.6" maxscreenblur="0.8" strengthchange="0.6" minbodytint="0,0,0,150" maxbodytint="0,0,0,200">
      <StatusEffect target="Character" SpeedMultiplier="0.4" setvalue="true" />
    </Effect>
    <Effect minstrength="75" maxstrength="98" minscreendistort="0.8" maxscreendistort="1.0" minscreenblur="0.8" maxscreenblur="1.0" strengthchange="0.7" minbodytint="0,0,0,200" maxbodytint="0,0,0,240">
      <StatusEffect target="Character" SpeedMultiplier="0.2" setvalue="true" />
    </Effect>
    <Effect minstrength="99" maxstrength="100" minscreendistort="0.8" maxscreendistort="1.0" minscreenblur="0.8" maxscreenblur="1.0" strengthchange="0.8" minbodytint="0,0,0,240" maxbodytint="0,0,0,255">
      <StatusEffect target="Character" SpeedMultiplier="0" setvalue="true">
        <Affliction identifier="stun" amount="1" />
      </StatusEffect>
    </Effect>
    <PeriodicEffect mininterval="8" maxinterval="20">
      <!-- Apply the husk infection after this one reaches a critical strength. -->
      <StatusEffect target="Character" comparison="and">
        <Conditional isdead="false" />
        <Conditional blacktoxin="gte 75" />
        <Affliction identifier="huskinfection" amount="1" />
      </StatusEffect>
    </PeriodicEffect>
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="640,0,128,128" color="255,255,255,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- ENRAGED AFFLICTION, currently unused -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Enraged" identifier="huskenraged" description="The monster is ANGERY. Gains stun resistance." type="huskenraged" limbspecific="false" indicatorlimb="Torso" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
    <Effect minstrength="0" maxstrength="100" strengthchange="0">
      <StatusEffect target="Character">
        <ReduceAffliction identifier="stun" amount="1" />
      </StatusEffect>
      <StatusEffect target="Character" SpeedMultiplier="1.2" setvalue="true" />
    </Effect>
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="640,0,128,128" color="255,255,255,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- WATCHER DAMAGE AFFLICTION  -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Watcher's Patience" identifier="watcherdamage" description="The more you hit it the more it runs out." type="watcherdamage" limbspecific="false" indicatorlimb="Torso" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
    <Effect minstrength="0" maxstrength="100" strengthchange="-0.2" />
    <!-- The affliction is increased when the watcherhusk is damaged.-->
    <PeriodicEffect mininterval="20" maxinterval="35">
      <StatusEffect target="Character" comparison="and">
        <Conditional isdead="false" />
        <Conditional speciesname="Watcherhusk" />
        <conditional isunconscious="false" />
        <Conditional watcherdamage="gte 50" />
        <Conditional watcherdamage="lt 80" />
        <SpawnItem identifier="watcherscreechemitter" spawnposition="This" count="1" spread="0" />
        <ReduceAffliction identifier="watcherdamage" amount="45" />
      </StatusEffect>
    </PeriodicEffect>
    <PeriodicEffect mininterval="15" maxinterval="20">
      <StatusEffect target="Character" comparison="and">
        <Conditional isdead="false" />
        <Conditional speciesname="Watcherhusk" />
        <conditional isunconscious="false" />
        <Conditional watcherdamage="gte 80" />
        <SpawnItem identifier="watcherscreechemitter" spawnposition="This" count="1" spread="0" />
        <ReduceAffliction identifier="watcherdamage" amount="45" />
      </StatusEffect>
    </PeriodicEffect>
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="640,0,128,128" color="255,255,255,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- RANDOM AFFLICTION  -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Randomness" identifier="huskrandomchance" description="This affliction is like, totally random." type="huskrandomchance" limbspecific="false" indicatorlimb="Torso" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
    <Effect minstrength="0" maxstrength="100" strengthchange="5.5">
      <StatusEffect target="Character" comparison="and" duration="4">
        <Conditional isdead="false" />
        <Conditional huskrandomchance="gte 100" />
        <!-- If randomness is 100% then we want it to go back to 0 so it can randomly change again.-->
        <ReduceAffliction identifier="huskrandomchance" amount="80" />
      </StatusEffect>
    </Effect>
    <PeriodicEffect mininterval="2" maxinterval="8">
      <!-- RANDOMLY decrease the affliction.-->
      <StatusEffect target="Character" comparison="and">
        <Conditional isdead="false" />
        <ReduceAffliction identifier="huskrandomchance" amount="30" />
      </StatusEffect>
    </PeriodicEffect>
    <PeriodicEffect mininterval="1" maxinterval="10">
      <!-- RANDOMLY increase the affliction.-->
      <StatusEffect target="Character" comparison="and">
        <Conditional isdead="false" />
        <Affliction identifier="huskrandomchance" amount="30" />
      </StatusEffect>
    </PeriodicEffect>
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="640,0,128,128" color="255,255,255,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- HUSK VARIANT SPAWN RANDOM AFFLICTION  -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Randomness" identifier="huskspawnrandomchance" description="This affliction is like, totally random." type="huskspawnrandomchance" limbspecific="false" indicatorlimb="Torso" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
    <Effect minstrength="0" maxstrength="100" strengthchange="5.5" />
    <PeriodicEffect mininterval="0.1" maxinterval="0.1">
      <!-- Spawn a random item which will spawn one of the husks. -->
      <!-- By repeating the same item over and over, we can emulate giving each item a different probability to spawn. -->
      <StatusEffect target="Character" comparison="and" spawnitemrandomly="true">
        <SpawnItem identifier="huskoldspawn" spawnposition="This" count="1" />
        <SpawnItem identifier="huskoldspawn" spawnposition="This" count="1" />
        <SpawnItem identifier="huskoldspawn" spawnposition="This" count="1" />
        <SpawnItem identifier="huskoldspawn" spawnposition="This" count="1" />
        <SpawnItem identifier="huskcombatoldspawn" spawnposition="This" count="1" />
        <SpawnItem identifier="huskcombatoldspawn" spawnposition="This" count="1" />
        <SpawnItem identifier="huskcombatoldspawn" spawnposition="This" count="1" />
        <SpawnItem identifier="huskcombatoldspawn" spawnposition="This" count="1" />
        <SpawnItem identifier="huskabyssoldspawn" spawnposition="This" count="1" />
        <SpawnItem identifier="huskabyssoldspawn" spawnposition="This" count="1" />
        <SpawnItem identifier="huskabyssoldspawn" spawnposition="This" count="1" />
        <SpawnItem identifier="huskslipoldspawn" spawnposition="This" count="1" />
        <SpawnItem identifier="huskslipoldspawn" spawnposition="This" count="1" />
        <SpawnItem identifier="huskpucsoldspawn" spawnposition="This" count="1" />
        <RemoveCharacter />
      </StatusEffect>
    </PeriodicEffect>
    <icon texture="Content/UI/MainIconsAtlas.png" sourcerect="0,640,128,128" color="60,107,195,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- OLD HUSK FAKE DEATH AFFLICTION  -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Fake death" identifier="huskfakedeath" description="It's not really dead!" type="huskfakedeath" limbspecific="false" indicatorlimb="Torso" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
    <Effect minstrength="0" maxstrength="100" strengthchange="-1">
      <StatusEffect target="Character" comparison="and" indetectable="true">
        <!-- "Indetectable" makes it effectively be ignored by monsters as if it was truly dead.-->
        <Conditional isdead="false" />
        <Affliction identifier="paralysis" amount="150" />
        <!-- Keep it stunned and quiet through paralysis -->
        <Affliction identifier="stun" amount="1" />
        <ReduceAffliction type="damage" strength="100" />
        <!-- Constantly heal it so no health bar ever shows up. -->
      </StatusEffect>
      <StatusEffect target="Character" comparison="and" duration="1">
        <!-- Wake it up if affliction drops below 50%, remove paralysis and affliction.-->
        <Conditional isdead="false" />
        <Conditional huskfakedeath="lte 50" />
        <ReduceAffliction identifier="paralysis" amount="1000" />
        <ReduceAffliction identifier="stun" amount="1000" />
        <ReduceAffliction identifier="huskfakedeath" amount="1000" />
      </StatusEffect>
    </Effect>
    <PeriodicEffect mininterval="10" maxinterval="35">
      <!-- Randomly increase the affliction to make it wake up after a non-certain period.-->
      <StatusEffect target="Character" comparison="and">
        <Conditional huskfakedeath="gt 50" />
        <Conditional isdead="false" />
        <Affliction identifier="huskfakedeath" amount="5" />
      </StatusEffect>
      <StatusEffect target="Character" comparison="and" duration="1">
        <!-- Wake it up if the damaged affliction has been removed and it still hasn't woken up, remove paralysis and affliction.-->
        <Conditional isdead="false" />
        <Conditional huskdamaged="eq 0" />
        <ReduceAffliction identifier="paralysis" amount="1000" />
        <ReduceAffliction identifier="stun" amount="1000" />
        <ReduceAffliction identifier="huskfakedeath" amount="1000" />
      </StatusEffect>
    </PeriodicEffect>
    <PeriodicEffect mininterval="5" maxinterval="25">
      <!-- Randomly decrease the affliction.-->
      <StatusEffect target="Character" comparison="and">
        <Conditional huskfakedeath="gt 50" />
        <Conditional isdead="false" />
        <ReduceAffliction identifier="huskfakedeath" amount="2" />
      </StatusEffect>
    </PeriodicEffect>
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="640,0,128,128" color="255,255,255,255" origin="0,0" />
  </Affliction>
  <!-- Paralysis effect in order to keep the husk completely still and make it not make noise. -->
  <!-- Unused for now as the most recent update broke modded paralysis functionality -->
  <Affliction name="Fake death" identifier="huskfakedeathparalysis" description="It's not really dead!" type="paralysis" limbspecific="false" indicatorlimb="Torso" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
    <Effect minstrength="0" maxstrength="100" strengthchange="0" />
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="640,0,128,128" color="255,255,255,255" origin="0,0" />
  </Affliction>
  <!-- Affliction to remember that this monster was wounded. Used by humanhuskold and huskpucsold/huskmutantarmoredpucs -->
  <Affliction name="Damaged" identifier="huskdamaged" description="The monster is DAMAGED. Becomes slower and has less health." type="huskdamaged" limbspecific="false" indicatorlimb="Torso" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
    <Effect minstrength="0" maxstrength="100" strengthchange="0">
      <StatusEffect target="Character" HealthMultiplier="0.6" SpeedMultiplier="0.9" setvalue="true" />
    </Effect>
    <PeriodicEffect mininterval="120" maxinterval="300">
      <!-- After 2 to 5 minutes, remove this status -->
      <StatusEffect target="Character" comparison="and">
        <Conditional isdead="false" />
        <ReduceAffliction identifier="huskdamaged" amount="1000" />
      </StatusEffect>
    </PeriodicEffect>
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="640,0,128,128" color="255,255,255,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- MUTANT HUMAN DISMEMBER AFFLICTION  -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Husk mutant human damage" identifier="huskmutanthumandamage" description="It's about to blow!" type="huskmutanthumandamage" limbspecific="false" indicatorlimb="Torso" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
    <Effect minstrength="0" maxstrength="100" strengthchange="-2" />
    <!-- The affliction is increased when a huskmutanthuman is damaged in certain body parts.-->
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="640,0,128,128" color="255,255,255,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- HUNTER HEAD STORAGE AFFLICTIONS  -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Storage" identifier="huskhunterstorage" description="The monster is carrying some things!" type="huskhunterstorage" limbspecific="false" indicatorlimb="Torso" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
    <Effect minstrength="0" maxstrength="100" strengthchange="0" />
    <PeriodicEffect mininterval="0.5" maxinterval="1.3">
      <StatusEffect target="Character" targetlimb="Torso">
        <Conditional isdead="False" />
        <Conditional huskhunterstorage="gt 0" />
        <SpawnItem identifier="huskhunterstorageparticle" spawnposition="This" count="3" spread="25" />
      </StatusEffect>
    </PeriodicEffect>
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="640,0,128,128" color="255,255,255,255" origin="0,0" />
  </Affliction>
  <!-- _________________________________________________________________ -->
  <!-- GENERIC AFFLICTION  -->
  <!-- _________________________________________________________________ -->
  <Affliction name="Generic affliction" identifier="genericaffliction" description="I don't want to make a separate affliction for every time I just need to check if something did or didn't happen." type="genericaffliction" limbspecific="false" indicatorlimb="Torso" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
    <Effect minstrength="0" maxstrength="100" strengthchange="0" />
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="640,0,128,128" color="255,255,255,255" origin="0,0" />
  </Affliction>
  <Affliction name="Generic affliction" identifier="genericaffliction2" description="Turns out you'll need at least two of these to get by!" type="genericaffliction" limbspecific="false" indicatorlimb="Torso" showinhealthscannerthreshold="1000" showiconthreshold="1000" showicontoothersthreshold="1000" maxstrength="100" iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
    <Effect minstrength="0" maxstrength="100" strengthchange="0" />
    <icon texture="%ModDir:Improved Husks%/Afflictionicons.png" sourcerect="640,0,128,128" color="255,255,255,255" origin="0,0" />
  </Affliction>
</Afflictions>