<tower 
      unittype="tower"
      name="teslagun"
      radius="210"
       effect_on_shoot="type:lighting,offset:2x48"
      allowtargets="earth"
       maxtargets="2"
       >
  <effects>
    <positive electroRate="34" electroTime="0.6"/>
  </effects>

  <machine_unit>
    <transitions>

      <!--
      <sleep seetarget="cocking"/>
      <cocking ready="readyfire"/>
      <readyfire charge="charging"/>
      <readyfire notarget="waittarget"/>
      <charging ready="readyfire"/>
      <waittarget relax="relaxation"/>
      <waittarget seetarget="readyfire"/>
      <relaxation sleep="sleep"/>
      -->
      <sleep seetarget="readyfire"/>
      <readyfire notarget="waittarget"/>
      <readyfire charge="charging"/>
      <charging ready="readyfire"/>
      <waittarget seetarget="readyfire"/>

    </transitions>
    <params>
      <state_readyfire charge_volume="5" delay="1"/>
      <state_waittarget duration="999999"/>
      <state_charging duration="1"/>
    </params>
  </machine_unit>

  <machine_move>
    <transitions>
      <move stop="stop"/>
      <stop move="move"/>
    </transitions>
  </machine_move>

  <mover>
    <params>
      <allowangles value="0"/>
      <thresold value="0"/>
    </params>
  </mover>
  

  <children>
    <node type="sprite" name="skin" image="teslagun.2::turret3_20001.png" center="0.5x0.3"/>
  </children>

  <actions>
    <action name="animate" value="Animate[0.5,[folder:teslagun.2::,frames:turret3_20001.png,turret3_20002.png,turret3_20003.png,turret3_20004.png]]"/>
  </actions>

  <events>
    <eventlist name="on_shoot">
      <playsound sound="##sound_tesla2##"/>
      <runaction action="animate" target="skin"/>
    </eventlist>
  </events>

</tower>
