<?xml version="1.0" encoding="utf-8"?>
<Items>
  <SmartGraft name="Smart Graft" identifier="smartgraft" aliases="" category="Medical" Tags="smallitem,medical" maxstacksize="60" maxstacksizecharacterinventory="60" cargocontaineridentifier="mediccrate" description="" useinhealthinterface="true" scale="0.4" impactsoundtag="impact_metal_light" RequireAimToUse="True">
    <Upgrade gameversion="0.10.0.0" scale="0.5" />
    <PreferredContainer primary="medcab" secondary="medcontainer" minamount="1" maxamount="2" spawnprobability="1" />
    <PreferredContainer secondary="wreckmedcab,abandonedmedcab,beaconmedcab" minamount="1" maxamount="2" spawnprobability="0.1" />
    <PreferredContainer secondary="outpostmedcab" minamount="1" maxamount="3" spawnprobability="0.05" />
    <PreferredContainer secondary="outpostmedcompartment" amount="1" spawnprobability="0.05" />
    <Price baseprice="270" minavailable="5">
      <Price storeidentifier="merchantmedical" multiplier="0.9" />
      <Price storeidentifier="merchantcity" />
      <Price storeidentifier="merchantresearch" />
    </Price>
    <Fabricate suitablefabricators="medicalfabricator" requiredtime="25" amount="2">
      <RequiredSkill identifier="medical" level="25" />
      <RequiredItem identifier="antibleeding2" amount="2" />
      <RequiredItem identifier="antibloodloss2" />
    </Fabricate>
    <Deconstruct time="6">
      <Item identifier="antibleeding2" />
      <Item identifier="elastin" />
    </Deconstruct>
    <InventoryIcon texture="%ModDir%/Icons/medicineIcons.png" sourcerect="64,0,64,64" origin="0.5,0.5" />
    <Sprite texture="%ModDir%/Icons/medicines.png" sourcerect="37,0,37,69" depth="0.6" origin="0.5,0.5" />
    <Body width="25" height="40" density="15" />
    <SuitableTreatment identifier="rupturedlung" suitability="100" />
    <SuitableTreatment identifier="acoustictrauma" suitability="50" />
    <MeleeWeapon canBeCombined="true" removeOnCombined="true" slots="Any,RightHand,LeftHand" aimpos="40,5" handle1="0,0" holdangle="10" reload="1.0" msg="ItemMsgPickUpSelect">
      <RequiredSkill identifier="medical" level="35" />
      <StatusEffect type="OnUse" target="This" Condition="-100.0" disabledeltatime="true">
        <Sound file="%ModDir%/Sounds/smartGraft1.ogg" range="500" selectionmode="random" />
        <Sound file="%ModDir%/Sounds/smartGraft2.ogg" range="500" />
        <Sound file="%ModDir%/Sounds/smartGraft3.ogg" range="500" />
        <Sound file="%ModDir%/Sounds/smartGraft4.ogg" range="500" />
      </StatusEffect>
      <StatusEffect tags="medical" type="OnSuccess" target="This, Limb" duration="25.0">
        <ReduceAffliction type="rupturedlung" amount="3" />
        <ReduceAffliction type="acoustictrauma" amount="3.5" />
        <ReduceAffliction type="lacerations" amount="2" />
        <ReduceAffliction type="bleeding" amount="1.5" />
        <ReduceAffliction type="burn" amount="1" />
      </StatusEffect>
      <StatusEffect tags="medical" type="OnFailure" target="This, Limb" duration="25.0">
        <ReduceAffliction type="rupturedlung" amount="2.2" />
        <ReduceAffliction type="acoustictrauma" amount="3" />
        <ReduceAffliction type="lacerations" amount="1.5" />
        <ReduceAffliction type="bleeding" amount="1" />
        <ReduceAffliction type="burn" amount="0.7" />
      </StatusEffect>
      <!-- Remove the item when fully used -->
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
    </MeleeWeapon>
  </SmartGraft>
  <Cortizide name="Cortizide" identifier="cortizide" aliases="" category="Medical" maxstacksize="60" maxstacksizecharacterinventory="60" cargocontaineridentifier="mediccrate" Tags="smallitem,chem,medical,syringe" description="" useinhealthinterface="true" scale="0.5" impactsoundtag="impact_metal_light" RequireAimToUse="True">
    <Upgrade gameversion="0.10.0.0" scale="0.5" />
    <PreferredContainer primary="toxcab" secondary="toxcontainer" amount="1" spawnprobability="1" />
    <PreferredContainer primary="wrecktoxcab,abandonedtoxcab" minamount="1" maxamount="2" spawnprobability="0.05" />
    <PreferredContainer secondary="wreckmedcab,abandonedmedcab,beaconmedcab" amount="1" spawnprobability="0.02" />
    <PreferredContainer secondary="outpostmedcab" amount="1" spawnprobability="0.005" />
    <PreferredContainer secondary="outpostmedcompartment" amount="1" spawnprobability="0.005" />
    <PreferredContainer secondary="outposttrashcan" amount="1" spawnprobability="0.001" />
    <Price baseprice="600" minavailable="3">
      <Price storeidentifier="merchantcity" />
      <Price storeidentifier="merchantresearch" />
      <Price storeidentifier="merchantmedical" multiplier="0.9" />
    </Price>
    <SuitableTreatment type="brainhemorrhage" suitability="100" />
    <Fabricate suitablefabricators="medicalfabricator" requiredtime="30">
      <RequiredSkill identifier="medical" level="50" />
      <RequiredItem identifier="smartgraft" />
      <RequiredItem identifier="adrenaline" />
      <RequiredItem identifier="deusizine" />
    </Fabricate>
    <Deconstruct time="20">
      <Item identifier="adrenaline" />
      <Item identifier="deusizine" />
    </Deconstruct>
    <InventoryIcon texture="%ModDir%/Icons/medicineIcons.png" sourcerect="0,0,64,64" origin="0.5,0.5" />
    <Sprite texture="%ModDir%/Icons/medicines.png" sourcerect="0,0,37,69" depth="0.6" origin="0.5,0.5" />
    <Body width="35" height="65" density="15" />
    <MeleeWeapon canBeCombined="true" removeOnCombined="true" slots="Any,RightHand,LeftHand" aimpos="40,5" handle1="0,0" holdangle="220" reload="1.0" msg="ItemMsgPickUpSelect">
      <RequiredSkill identifier="medical" level="70" />
      <StatusEffect type="OnFailure" target="This" Condition="-100.0" disabledeltatime="true">
        <Sound file="Content/Items/Medical/Syringe.ogg" range="500" />
      </StatusEffect>
      <StatusEffect type="OnSuccess" target="This" Condition="-100.0" disabledeltatime="true">
        <Sound file="Content/Items/Medical/Syringe.ogg" range="500" />
      </StatusEffect>
      <StatusEffect type="OnFailure" target="UseTarget, Limb" comparison="and">
        <Conditional isLocalPlayer="true" />
        <Conditional limbtype="eq head" />
        <Sound file="%ModDir%/Sounds/cortizideInjection.ogg" dontmuffle="true" volume="1.5" />
      </StatusEffect>
      <StatusEffect type="OnSuccess" target="UseTarget, Limb" comparison="and">
        <Conditional isLocalPlayer="true" />
        <Conditional limbtype="eq head" />
        <Sound file="%ModDir%/Sounds/cortizideInjection.ogg" dontmuffle="true" volume="1.5" />
      </StatusEffect>
      <!-- Apply "cortizideinjection" if administered to the head. This affliction handles the visuals. -->
      <StatusEffect tags="medical" type="OnSuccess" target="This, Limb" disabledeltatime="true" interval="1" multiplyafflictionsbymaxvitality="true" comparison="and">
        <Conditional serversidelua="lteq 0" />
        <Conditional limbtype="eq head" />
        <Affliction identifier="cortizideinjection" amount="1" />
      </StatusEffect>
      <StatusEffect tags="medical" type="OnFailure" target="This, Limb" disabledeltatime="true" interval="1" multiplyafflictionsbymaxvitality="true" comparison="and">
        <Conditional serversidelua="lteq 0" />
        <Conditional limbtype="eq head" />
        <Affliction identifier="cortizideinjection" amount="1" />
      </StatusEffect>
      <!-- On success, with affliction -->
      <StatusEffect tags="medical" type="OnSuccess" target="This, Limb" disabledeltatime="true" interval="0.1" delay="2" duration="10" multiplyafflictionsbymaxvitality="true" comparison="and">
        <Conditional brainhemorrhage="gt 0" />
        <Conditional limbtype="eq head" />
        <ReduceAffliction type="brainhemorrhage" amount="1" />
        <ReduceAffliction type="bleeding" amount="0.3" />
        <Affliction identifier="damageimmunity" amount="1" />
        <Affliction identifier="stun" amount="0.01" />
        <Affliction identifier="removehemorrhagefx" amount="1" />
      </StatusEffect>
      <!-- On failure, with affliction -->
      <StatusEffect tags="medical" type="OnFailure" target="This, Limb" disabledeltatime="true" interval="0.1" delay="2" duration="10" multiplyafflictionsbymaxvitality="true" comparison="and">
        <Conditional brainhemorrhage="gt 0" />
        <Conditional limbtype="eq head" />
        <ReduceAffliction type="brainhemorrhage" amount="1" />
        <ReduceAffliction type="bleeding" amount="0.2" />
        <Affliction identifier="damageimmunity" amount="1" />
        <Affliction identifier="stun" amount="0.01" />
        <Affliction identifier="removehemorrhagefx" amount="1" />
      </StatusEffect>
      <!-- On success, with affliction LOWFX-->
      <StatusEffect tags="medical" type="OnSuccess" target="This, Limb" disabledeltatime="true" interval="0.1" delay="2" duration="10" multiplyafflictionsbymaxvitality="true" comparison="and">
        <Conditional brainhemorrhagelowfx="gt 0" />
        <Conditional limbtype="eq head" />
        <ReduceAffliction type="brainhemorrhagelowfx" amount="1" />
        <ReduceAffliction type="bleeding" amount="0.3" />
        <Affliction identifier="damageimmunity" amount="1" />
        <Affliction identifier="stun" amount="0.01" />
        <Affliction identifier="removehemorrhagefx" amount="1" />
      </StatusEffect>
      <!-- On failure, with affliction LOWFX-->
      <StatusEffect tags="medical" type="OnFailure" target="This, Limb" disabledeltatime="true" interval="0.1" delay="2" duration="10" multiplyafflictionsbymaxvitality="true" comparison="and">
        <Conditional brainhemorrhagelowfx="gt 0" />
        <Conditional limbtype="eq head" />
        <ReduceAffliction type="brainhemorrhagelowfx" amount="1" />
        <ReduceAffliction type="bleeding" amount="0.2" />
        <Affliction identifier="damageimmunity" amount="1" />
        <Affliction identifier="stun" amount="0.01" />
        <Affliction identifier="removehemorrhagefx" amount="1" />
      </StatusEffect>
      <!-- On success, with affliction NOFX-->
      <StatusEffect tags="medical" type="OnSuccess" target="This, Limb" disabledeltatime="true" interval="0.1" delay="2" duration="10" multiplyafflictionsbymaxvitality="true" comparison="and">
        <Conditional brainhemorrhagenofx="gt 0" />
        <Conditional limbtype="eq head" />
        <ReduceAffliction type="brainhemorrhagenofx" amount="1" />
        <ReduceAffliction type="bleeding" amount="0.3" />
        <Affliction identifier="damageimmunity" amount="1" />
        <Affliction identifier="stun" amount="0.01" />
        <Affliction identifier="removehemorrhagefx" amount="1" />
      </StatusEffect>
      <!-- On failure, with affliction NOFX-->
      <StatusEffect tags="medical" type="OnFailure" target="This, Limb" disabledeltatime="true" interval="0.1" delay="2" duration="10" multiplyafflictionsbymaxvitality="true" comparison="and">
        <Conditional brainhemorrhagenofx="gt 0" />
        <Conditional limbtype="eq head" />
        <ReduceAffliction type="brainhemorrhagenofx" amount="1" />
        <ReduceAffliction type="bleeding" amount="0.2" />
        <Affliction identifier="damageimmunity" amount="1" />
        <Affliction identifier="stun" amount="0.01" />
        <Affliction identifier="removehemorrhagefx" amount="1" />
      </StatusEffect>
      <!-- On success, no affliction -->
      <StatusEffect tags="medical" type="OnSuccess" target="This, Limb" disabledeltatime="true" interval="0.1" delay="2" duration="10" multiplyafflictionsbymaxvitality="true" comparison="and">
        <Conditional brainhemorrhage="lteq 0" />
        <Conditional brainhemorrhagelowfx="lteq 0" />
        <Conditional brainhemorrhagenofx="lteq 0" />
        <Conditional limbtype="eq head" />
        <ReduceAffliction type="bleeding" amount="0.3" />
        <Affliction identifier="burn" amount="0.07" />
        <Affliction identifier="stun" amount="0.01" />
        <Affliction identifier="psychosis" amount="0.1" />
      </StatusEffect>
      <!-- Delayed head explosion -->
      <StatusEffect tags="medical" type="OnSuccess" target="This, Limb" disabledeltatime="true" comparison="and" duration="0">
        <Conditional brainhemorrhage="lteq 0" />
        <Conditional brainhemorrhagelowfx="lteq 0" />
        <Conditional brainhemorrhagenofx="lteq 0" />
        <Conditional limbtype="eq head" />
        <Affliction identifier="cortizidedeathdelay" amount="1" />
      </StatusEffect>
      <!-- On failure, no affliction -->
      <StatusEffect tags="medical" type="OnFailure" target="This, Limb" disabledeltatime="true" interval="0.1" delay="2" duration="10" multiplyafflictionsbymaxvitality="true" comparison="and">
        <Conditional brainhemorrhage="lteq 0" />
        <Conditional brainhemorrhagelowfx="lteq 0" />
        <Conditional brainhemorrhagenofx="lteq 0" />
        <Conditional limbtype="eq head" />
        <ReduceAffliction type="bleeding" amount="0.2" />
        <Affliction identifier="burn" amount="0.09" />
        <Affliction identifier="stun" amount="0.01" />
        <Affliction identifier="psychosis" amount="0.1" />
      </StatusEffect>
      <!-- For some reason, just doing limbtype="! head" doesn't work. And at the time of writing this, neither does "eq leftleg" or "eq rightleg". -->
      <!-- On success, body injection -->
      <StatusEffect tags="medical" type="OnSuccess" target="This, Limb" disabledeltatime="true" interval="0.1" delay="2" duration="10" multiplyafflictionsbymaxvitality="true" comparison="or">
        <Conditional limbtype="eq torso" />
        <Conditional limbtype="eq leftarm" />
        <Conditional limbtype="eq rightarm" />
        <Conditional limbtype="eq leftleg" />
        <Conditional limbtype="eq rightleg" />
        <ReduceAffliction type="bleeding" amount="0.3" target="limb" />
        <Affliction identifier="burn" amount="0.07" target="limb" />
      </StatusEffect>
      <!-- On failure, body injection -->
      <StatusEffect tags="medical" type="OnFailure" target="This, Limb" disabledeltatime="true" interval="0.1" delay="2" duration="10" multiplyafflictionsbymaxvitality="true" comparison="or">
        <Conditional limbtype="eq torso" />
        <Conditional limbtype="eq leftarm" />
        <Conditional limbtype="eq rightarm" />
        <Conditional limbtype="eq leftleg" />
        <Conditional limbtype="eq rightleg" />
        <ReduceAffliction type="bleeding" amount="0.2" target="limb" />
        <Affliction identifier="burn" amount="0.09" target="limb" />
      </StatusEffect>
      <!-- Remove the item when fully used -->
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
    </MeleeWeapon>
    <Projectile characterusable="false" launchimpulse="20.0" sticktocharacters="true" launchrotation="-90" inheritstatuseffectsfrom="MeleeWeapon" inheritrequiredskillsfrom="MeleeWeapon" />
  </Cortizide>
  <MannaExtract name="Manna Extract" identifier="manna" category="Medical" maxstacksize="60" maxstacksizecharacterinventory="60" cargocontaineridentifier="mediccrate" Tags="smallitem,chem,medical" useinhealthinterface="true" scale="0.5" impactsoundtag="impact_soft">
    <Upgrade gameversion="0.10.0.0" scale="0.5" />
    <PreferredContainer primary="medcab" secondary="medcontainer" minamount="1" maxamount="4" spawnprobability="1" />
    <PreferredContainer secondary="outpostmedcab" minamount="1" maxamount="2" spawnprobability="0.12" />
    <PreferredContainer secondary="outpostmedcompartment" amount="1" spawnprobability="0.05" />
    <PreferredContainer secondary="wreckmedcab,abandonedmedcab,beaconmedcab" minamount="1" maxamount="3" spawnprobability="0.16" />
    <Price baseprice="350">
      <Price storeidentifier="merchantmedical" multiplier="0.9" />
    </Price>
    <Fabricate suitablefabricators="medicalfabricator" requiredtime="25" amount="2">
      <RequiredSkill identifier="medical" level="30" />
      <RequiredItem identifier="antibloodloss2" amount="2" />
      <RequiredItem identifier="alienblood" amount="2" />
      <RequiredItem identifier="stabilozine" amount="1" />
      <RequiredItem identifier="pomegrenadeextract" amount="1" />
    </Fabricate>
    <Deconstruct time="20">
      <Item identifier="alienblood" />
      <Item identifier="stabilozine" />
      <Item identifier="pomegrenadeextract" />
    </Deconstruct>
    <SuitableTreatment identifier="vibrationdamage" suitability="100" />
    <SuitableTreatment identifier="muscledamage" suitability="50" />
    <SuitableTreatment identifier="mannainfluence" suitability="-1000" />
    <SuitableTreatment identifier="mannausage" suitability="-1000" />
    <SuitableTreatment identifier="mannaoverdose" suitability="-1000" />
    <InventoryIcon texture="%ModDir%/Icons/medicineIcons.png" sourcerect="128,0,64,64" origin="0.5,0.5" />
    <Sprite texture="%ModDir%/Icons/medicines.png" sourcerect="74,0,74,69" depth="0.6" origin="0.5,0.5" />
    <Body width="80" height="42" density="11" />
    <Holdable canBeCombined="true" removeOnCombined="true" slots="Any,RightHand,LeftHand" handle1="0,0" msg="ItemMsgPickUpSelect">
      <RequiredSkill identifier="medical" level="35" />
      <StatusEffect type="OnUse" target="This" Condition="-100.0" disabledeltatime="true">
        <Sound file="Content/Items/Medical/Syringe.ogg" range="500" />
      </StatusEffect>
      <!-- If Manna is given to the head. -->
      <StatusEffect tags="medical" type="OnSuccess" target="This, Limb" duration="36">
        <Conditional limbtype="eq head" />
        <Affliction identifier="mannainfluencehead" amount="100" />
      </StatusEffect>
      <StatusEffect tags="medical" type="OnFailure" target="This, Limb" duration="36">
        <Conditional limbtype="eq head" />
        <Affliction identifier="mannainfluencehead" amount="100" />
      </StatusEffect>
      <!-- If Manna is given to the head and brain hemorrhagge is less than 15%. -->
      <StatusEffect tags="medical" type="OnSuccess" target="This, Limb" duration="36" comparison="and">
        <Conditional limbtype="eq head" />
        <Conditional brainhemorrhage="lteq 15" />
        <Conditional brainhemorrhagelowfx="lteq 15" />
        <Conditional brainhemorrhagenofx="lteq 15" />
        <ReduceAffliction identifier="brainhemorrhage" amount="0.3" />
        <ReduceAffliction identifier="brainhemorrhagelowfx" amount="0.3" />
        <ReduceAffliction identifier="brainhemorrhagenofx" amount="0.3" />
      </StatusEffect>
      <StatusEffect tags="medical" type="OnFailure" target="This, Limb" duration="36" comparison="and">
        <Conditional limbtype="eq head" />
        <Conditional brainhemorrhage="lteq 15" />
        <Conditional brainhemorrhagelowfx="lteq 15" />
        <Conditional brainhemorrhagenofx="lteq 15" />
        <ReduceAffliction identifier="brainhemorrhage" amount="0.18" />
        <ReduceAffliction identifier="brainhemorrhagelowfx" amount="0.3" />
        <ReduceAffliction identifier="brainhemorrhagenofx" amount="0.3" />
      </StatusEffect>
      <!-- If Manna is not active on the patient. -->
      <StatusEffect tags="medical" type="OnSuccess" target="This, Limb" SpeedMultiplier="1.3" setvalue="true" duration="36">
        <Conditional mannainfluence="lteq 0" />
        <Affliction identifier="mannainfluence" amount="100" />
        <Affliction identifier="mannausage" amount="0.024" />
        <ReduceAffliction identifier="vibrationdamage" amount="0.007" />
        <ReduceAffliction type="sonardamage" amount="0.008" />
        <Affliction identifier="oxygenlow" amount="-0.008" />
        <Affliction identifier="bloodloss" amount="-0.008" />
        <ReduceAffliction type="damage" amount="0.004" />
      </StatusEffect>
      <StatusEffect tags="medical" type="OnFailure" target="This, Limb" SpeedMultiplier="1.2" setvalue="true" duration="36">
        <Conditional mannainfluence="lteq 0" />
        <Affliction identifier="mannainfluence" amount="100" />
        <Affliction identifier="mannausage" amount="0.024" />
        <ReduceAffliction identifier="vibrationdamage" amount="0.006" />
        <ReduceAffliction type="sonardamage" amount="0.006" />
        <Affliction identifier="oxygenlow" amount="-0.006" />
        <Affliction identifier="bloodloss" amount="-0.006" />
        <ReduceAffliction type="damage" amount="0.002" />
      </StatusEffect>
      <!-- If Manna is already active on the patient. -->
      <StatusEffect tags="medical" type="OnSuccess" target="This, Limb" SpeedMultiplier="1.3" setvalue="true" duration="36">
        <Conditional mannainfluence="gt 0" />
        <Affliction identifier="mannainfluence" amount="100" />
        <Affliction identifier="mannausage" amount="0.025" />
        <ReduceAffliction identifier="vibrationdamage" amount="0.004" />
        <ReduceAffliction type="sonardamage" amount="0.004" />
        <Affliction identifier="oxygenlow" amount="-0.004" />
        <Affliction identifier="bloodloss" amount="-0.004" />
        <ReduceAffliction type="damage" amount="0.0015" />
      </StatusEffect>
      <StatusEffect tags="medical" type="OnFailure" target="This, Limb" SpeedMultiplier="1.2" setvalue="true" duration="36">
        <Conditional mannainfluence="gt 0" />
        <Affliction identifier="mannainfluence" amount="100" />
        <Affliction identifier="mannausage" amount="0.025" />
        <ReduceAffliction identifier="vibrationdamage" amount="0.002" />
        <ReduceAffliction type="sonardamage" amount="0.002" />
        <Affliction identifier="oxygenlow" amount="-0.002" />
        <Affliction identifier="bloodloss" amount="-0.002" />
        <ReduceAffliction type="damage" amount="0.001" />
      </StatusEffect>
      <!-- Remove the item when fully used -->
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
    </Holdable>
    <AiTarget sightrange="1000" static="true" />
  </MannaExtract>
</Items>