<?xml version="1.0" encoding="utf-8"?>
<Items>
  <Item name="Electrospike" identifier="electrospike" category="Misc" interactthroughwalls="true" tags="light,ignorebyai" Scale="0.5" health="20" damagedbyexplosions="false" damagedbyprojectiles="true" ItemDamageMultiplier="0.2" damagedbymeleeweapons="true" damagedbyrepairtools="true" sonarsize="20" hideinmenus="true">
    <Sprite texture="%ModDir:2532991202%/Characters/Special Creatures/Spineling_Electric/Spineling_Electric.png" sourcerect="0,860,720,72" depth="0.55" />
    <Body width="300" height="35" density="20" />
    <LightComponent range="200" castshadows="False" drawbehindsubs="False" ison="True" lightcolor="50,240,255,150" flicker="1.0" flickerspeed="5" vulnerabletoemp="False" pickingtime="0" canbepicked="False" allowingameediting="False" msg="">
      <Sprite texture="%ModDir:2532991202%/Characters/Special Creatures/Spineling_Electric/Spineling_Electric.png" sourcerect="0,940,720,72" origin="0.5,0.5" alpha="0.1" />
    </LightComponent>
    <Projectile characterusable="false" launchimpulse="25" sticktocharacters="false" sticktoitems="false" sticktodoors="false" sticktostructures="true" friendlyfire="false" damagedoors="true">
      <Attack structuredamage="30" itemdamage="15" targetforce="10" severlimbsprobability="0">
        <Affliction identifier="lacerations" strength="15" />
        <Affliction identifier="bleeding" strength="10" />
        <Affliction identifier="stun" strength="1" />
      </Attack>
      <!-- break after 5 minutes -->
      <StatusEffect type="Always" target="This" delay="300" stackable="false" condition="-100" />
      <!-- break after 3s if not stuck -->
      <StatusEffect type="OnNotContained" target="This" delay="3" condition="-100" checkconditionalalways="true">
        <Conditional IsStuckToTarget="false" />
      </StatusEffect>
      <!-- remove when breaking -->
      <StatusEffect type="OnBroken" target="This">
        <Remove />
        <particleemitter particle="brownchunks" drawontop="true" particleamount="30" velocitymin="100" velocitymax="300" anglemin="0" anglemax="360" scalemin="0.3" scalemax="0.5" />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" lifetime="0.5">
        <ParticleEmitter particle="ammotrailwater" copyentityangle="true" anglemin="0" anglemax="0" particleamount="10" velocitymin="-10" velocitymax="-100" scalemin="0.5" scalemax="1" />
      </StatusEffect>
    </Projectile>
    <ElectricalDischarger duration="0.2" outdoorsonly="false" powerconsumption="0" range="600" rangemultiplierinwalls="1">
      <Attack targetimpulse="50">
        <Affliction identifier="stun" strength="1" />
        <Affliction identifier="burn" strength="5" />
      </Attack>
      <StatusEffect target="this" type="OnUse">
        <sound file="Content/Items/Weapons/WEAPONS_electricalDischarge1.ogg" range="2000" selectionmode="random" />
        <sound file="Content/Items/Weapons/WEAPONS_electricalDischarge2.ogg" range="2000" />
        <ParticleEmitter particle="risingbubbles" anglemin="0" anglemax="360" particleamount="50" velocitymin="50" velocitymax="100" scalemin="1" scalemax="2" />
        <Explosion range="2000.0" camerashake="3" stun="0" force="0.0" flames="false" shockwave="false" sparks="True" underwaterbubble="false" />
      </StatusEffect>
    </ElectricalDischarger>
    <ItemComponent>
      <!-- when the component activates, apply extra load to nearby items and deactive the component -->
      <StatusEffect type="OnUse" target="NearbyItems" targettags="junctionbox" range="800.0" setvalue="true" extraload="1000" />
      <StatusEffect type="OnActive" target="This" IsActive="false" delay="5" />
      <!-- trigger discharge and load -->
      <StatusEffect type="Always" target="UseTarget,This" interval="20">
        <Conditional targetitemcomponent="Projectile" IsStuckToTarget="True" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This">
        <ParticleEmitter particle="ElectricShock" distancemin="-150" distancemax="150" particlespersecond="2.0" particleamount="5" emitinterval="2.1" scalemin="0.1" scalemax="0.2" copyentityangle="true" />
      </StatusEffect>
    </ItemComponent>
  </Item>
  <Item name="Alien Generator" identifier="aliengeneratorPA" category="Alien" Tags="alien,aliengenerator,artifactcontainer" scale="0.3">
    <Sprite texture="Content/Items/Alien/Legacy/AlienRuin_Legacy.png" depth="0.8" sourcerect="512,0,512,573" />
    <LightComponent AllowInGameEditing="false" lightcolor="112,146,190,50" canbeselected="false" range="800.0" IsOn="true">
      <Sprite texture="Content/Items/Alien/Legacy/AlienRuin_Legacy.png" sourcerect="0,486,176,176" origin="0.47, 0.3" alpha="1.0" />
    </LightComponent>
    <ItemContainer capacity="1" maxstacksize="60" canbeselected="true" hideitems="true" itempos="264,-321" containedspritedepth="0.01" autointeractwithcontained="true">
      <GuiFrame relativesize="0.2,0.25" anchor="Center" minsize="140,170" maxsize="280,280" style="ItemUI" />
      <StatusEffect type="Always" target="This" Charge="-10.0" interval="0.1" />
      <Containable items="faradayartifact">
        <StatusEffect type="OnContaining" target="This" Charge="100.0" Voltage="10" setvalue="true" duration="0.1" stackable="false" />
      </Containable>
    </ItemContainer>
    <PowerContainer capacity="50" canbeselected="false" maxrechargespeed="1000.0" maxoutput="10000.0" />
    <ConnectionPanel canbeselected="true" hudpriority="10">
      <GuiFrame relativesize="0.2,0.32" minsize="400,350" maxsize="480,420" anchor="Center" style="ConnectionPanel" />
      <RequiredItem items="screwdriver" type="Equipped" />
      <!-- break the item when a shutdown signal is received -->
      <input name="shutdown" displayname="connection.shutdown">
        <StatusEffect type="OnUse" target="This" condition="-100" setvalue="true" />
      </input>
      <output name="power_out" displayname="connection.powerout"  maxwires="10" />
      <output name="power_value_out" displayname="connection.powervalueout"  maxwires="10" />
      <output name="charge" displayname="connection.batterychargestatusout"  maxwires="10" />
      <output name="charge_%" displayname="connection.batterychargepercentage"  maxwires="10" />
    </ConnectionPanel>
  </Item>
  <Item name="Pest Nest" identifier="cavepestspawner" category="Alien" Tags="alien,pestnest" scale="0.4" damagedbyexplosions="true" damagedbyprojectiles="true" damagedbyrepairtools="true" damagedbymeleeweapons="true" health="5">
    <Sprite texture="%ModDir:2532991202%/Items/Alien/Caveworms.png" depth="0.55" sourcerect="190,11,258,218" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir:2532991202%/Items/Alien/Caveworms.png" sourcerect="453,11,258,218" depth="0.55" maxcondition="0" />
    <Body radius="120" bodytype="static" />
    <MotionSensor rangex="25" rangey="130" detectoffset="0,-110" canbeselected="false" IgnoreDead="True" minimumvelocity="0" updateinterval="0.1" target="Human" DetectOwnMotion="false">
      <StatusEffect type="Always" interval="4.35" target="This">
        <Conditional condition="gt 0" />
        <particleemitter particle="whitegoosplash" particleamount="2" velocitymin="200" velocitymax="300" anglemin="260" anglemax="280" scalemin="0.5" scalemax="0.75" copyentityangle="False" drawontop="true" colormultiplier="200,200,255,150" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="0" setvalue="true" comparison="And">
        <Conditional condition="gt 0" />
      </StatusEffect>
      <StatusEffect type="OnFire" target="This" condition="-1" />
      <StatusEffect type="OnBroken" target="This" noninteractable="true">
        <particleemitter particle="whitegoosplash" particleamount="20" velocitymin="0" velocitymax="300" anglemin="240" anglemax="300" scalemin="0.5" scalemax="1.0" copyentityangle="False" drawontop="true" colormultiplier="200,200,255,255" />
        <SpawnItem identifier="cavepest" spawnposition="This" rotation="270" count="5" aimspread="60" />
        <Explosion range="100.0" showeffects="false" force="5.0">
          <Affliction identifier="acidburn" strength="15" />
        </Explosion>
      </StatusEffect>
    </MotionSensor>
  </Item>
  <Item name="Cave Pest" identifier="cavepest" scale="0.5" category="Alien" tags="alien" damagedbyexplosions="true" damagedbyprojectiles="false" damagedbyrepairtools="true" damagedbymeleeweapons="true" health="5" impacttolerance="0.1" isdangerous="true">
    <Sprite texture="%ModDir:2532991202%/Items/Alien/Caveworms.png" depth="0.2" sourcerect="100,135,69,39" origin="0.5,0.5" />
    <DecorativeSprite texture="%ModDir:2532991202%/Items/Alien/Caveworms.png" depth="0.2" sourcerect="15,15,76,41" origin="0.5,0.5" offset="5,5" offsetanim="Noise" offsetanimspeed="3.0" randomgroupid="1" />
    <DecorativeSprite texture="%ModDir:2532991202%/Items/Alien/Caveworms.png" depth="0.2" sourcerect="93,15,76,41" origin="0.5,0.5" offset="5,5" offsetanim="Noise" offsetanimspeed="3.0" randomgroupid="1" />
    <DecorativeSprite texture="%ModDir:2532991202%/Items/Alien/Caveworms.png" depth="0.2" sourcerect="15,76,76,41" origin="0.5,0.5" offset="5,5" offsetanim="Noise" offsetanimspeed="3.0" randomgroupid="1" />
    <DecorativeSprite texture="%ModDir:2532991202%/Items/Alien/Caveworms.png" depth="0.2" sourcerect="93,73,76,41" origin="0.5,0.5" offset="5,5" offsetanim="Noise" offsetanimspeed="3.0" randomgroupid="1" />
    <InventoryIcon texture="%ModDir:2532991202%/Items/Alien/Caveworms.png" sourcerect="22,79,69,35" />
    <LightComponent range="1" lightcolor="40,60,70,255" castshadows="false" IsOn="true">
      <sprite texture="%ModDir:2532991202%/Items/Alien/Caveworms.png" sourcerect="15,117,76,41" origin="0.5,0.5" />
    </LightComponent>
    <Body width="30" height="15" density="10" />
    <Throwable slots="RightHand,LeftHand" holdpos="30,-15" handle1="0,0" handle2="0,0" throwforce="2.5" aimpos="35,-10" msg="ItemMsgPickUpSelect">
      <StatusEffect type="OnActive" target="This" duration="3" stackable="false" condition="-0.5" />
      <StatusEffect type="OnImpact" target="This" Condition="0" setvalue="true" />
    </Throwable>
    <Projectile launchimpulse="1" characterusable="false" sticktocharacters="true" sticktodeflective="true" sticktolighttargets="true" impulsespread="0.3" spread="30" launchrotation="0">
      <Attack structuredamage="0" severlimbsprobability="0">
        <Affliction identifier="concussion" strength="0.1" />
        <Affliction identifier="stun" strength="0.1" probability="0.25" />
      </Attack>
      <StatusEffect type="OnActive" target="UseTarget,This" condition="-0.3">
        <sound file="Content/Characters/Variants/Mudraptor_pet/MUDRAPTOR_petHungry1.ogg" range="250.0" loop="true" frequencymultiplier="3" selectionmode="Random" />
        <sound file="Content/Characters/Variants/Mudraptor_pet/MUDRAPTOR_petHungry2.ogg" range="250.0" loop="true" frequencymultiplier="3" selectionmode="Random" />
        <sound file="Content/Characters/Variants/Mudraptor_pet/MUDRAPTOR_petHungry3.ogg" range="250.0" loop="true" frequencymultiplier="3" selectionmode="Random" />
        <Affliction identifier="acidburn" strength="0.1" />
        <Affliction identifier="slow" strength="200" />
        <ParticleEmitter particle="organeruption" distancemin="0" distancemax="10" particlespersecond="5" scalemin="0.25" scalemax="0.5" anglemin="250" anglemax="290" velocitymin="0" velocitymax="50" colormultiplier="80,120,30,255" drawontop="true" lifetimemultiplier="0.25" />
        <ParticleEmitter particle="whitegoosplash" distancemin="0" distancemax="10" particlespersecond="5" scalemin="0.25" scalemax="0.5" anglemin="0" anglemax="360" velocitymin="0" velocitymax="0" colormultiplier="80,120,30,255" drawontop="true" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <particleemitter particle="whitegoosplash" particleamount="20" velocitymin="0" velocitymax="300" anglemin="0" anglemax="360" scalemin="0.25" scalemax="0.5" copyentityangle="False" colormultiplier="100,170,150,255" />
        <Explosion range="100.0" showeffects="false" force="1.0">
          <Affliction identifier="acidburn" strength="10" />
        </Explosion>
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
</Items>