<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
  <spriteName>sRamulken</spriteName>
  <solid>0</solid>
  <visible>-1</visible>
  <depth>0</depth>
  <persistent>0</persistent>
  <parentName>oEnemy</parentName>
  <maskName>&lt;undefined&gt;</maskName>
  <events>
    <event eventtype="0" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>event_inherited();
makeActive();
setCollisionBounds(-14, -14, 14, 14);
facing = 1;
myhealth = 60;
freezehp = 10;
damage = 32;
hpush = 6;
vpush = -3;
hitsound = sndEHit2;
deathsound = sndEDeath1;
platyoffset = -6;
frozenspr = sRamulkenFrozen;
flipx = 0;
state = 0;
shield1 = instance_create(x, y - 8, oRamulkenShield);
limit_l = x - 80;
limit_r = x + 80;
image_speed = 0.2;

x = floor(x);
y = floor(y);
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="1" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>if (instance_exists(shield1)) with (shield1) instance_destroy();
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="3" enumb="2">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>if (instance_exists(shield1)) {
    shield1.x = round(x);
    shield1.y = round(y) - 8;
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="3" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>if (frozen == 0) {
    if (state == 0) {
        hspeed = lerp(hspeed, 0.5 * facing, 0.05);
        vspeed = 0;
        if (collision_line(x + facing * 25, y - 4, x + facing * 25, y + 4, oSolid, true, true) || facing == 1 &amp;&amp; x &gt; limit_r || facing == -1 &amp;&amp; x &lt; limit_l) facing = -facing;
        if (collision_line(x + facing * 30, y - 4, x + facing * 30, y + 4, oRamulkenShield, true, true)) facing = -facing;
        if (collision_line(x, y, x, y + 120, oCharacter, true, true)) {
            state = 1;
            statetime = 0;
            startx = floor(x);
            starty = floor(y);
            speed = 0;
        }
    }
    if (state == 1) {
        if (statetime &gt;= 10 &amp;&amp; statetime &lt; 90) {
            direction = point_direction(x, y, oCharacter.x, oCharacter.y - 16);
            speed = lerp(speed, 2.7, 0.06);
            if ((((oCharacter.state == oCharacter.BALL) || (oCharacter.state == oCharacter.SPIDERBALL)) &amp;&amp; point_distance(x, y, oCharacter.x, oCharacter.y - 16) &lt; 3) || (((oCharacter.state != oCharacter.BALL) &amp;&amp; (oCharacter.state != oCharacter.SPIDERBALL)) &amp;&amp; point_distance(x, y, oCharacter.x, oCharacter.y - 16) &lt; 8)) {
                state = 2;
                statetime = -1;
                speed = 0;
            }
            if (statetime &gt; 60 &amp;&amp; collision_line(x - 16, y + 10, x + 16, y + 10, oSolid, true, true) || collision_line(x + 20, y - 8, x + 20, y + 8, oSolid, true, true) || collision_line(x - 20, y - 8, x - 20, y + 8, oSolid, true, true)) {
                state = 2;
                statetime = -1;
                speed = 0;
            }
        }
        if (statetime &gt;= 90) speed *= 0.95;
        if (statetime &gt;= 110) {
            state = 2;
            statetime = -1;
        }
    }
    if (state == 2) {
        direction = point_direction(x, y, startx, starty);
        speed = lerp(speed, 2, 0.1);
        if (point_distance(x, y, startx, starty) &lt; 2) {
            state = 0;
            statetime = -1;
            time = 0;
            vspeed = 0;
            x = floor(startx);
            y = floor(starty);
        }
    }
} else speed = 0; // if (frozen == 0) else
event_inherited();
if (state == 100) {
    if (instance_exists(shield1)) {
        deb = instance_create(shield1.x, shield1.y, oDebris);
        deb.image_angle = shield1.image_angle;
        deb.sprite_index = sRamulkenShield;
        deb.direction = 0 + random(30);
        deb.speed = 0.5 + random(3);
        deb.gravity = 0.1;
        deb.playsound = 0;
        with (shield1) instance_destroy();
    }
    enemy_death();
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="8" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>//draw_self();
draw_sprite(sprite_index, image_index, round(x), round(y));
event_inherited();
with(shield1) draw_self();
if(instance_exists(oCharacter) &amp;&amp; collision_line(x, y, oCharacter.x-1, oCharacter.y-16, oSolid, false, true) == noone) {
    draw_sprite(sRamulkenEye, floor((point_direction(x, y, oCharacter.x-1, oCharacter.y-16)+22.5)/45), round(x), round(y)+1);
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
  </events>
  <PhysicsObject>0</PhysicsObject>
  <PhysicsObjectSensor>0</PhysicsObjectSensor>
  <PhysicsObjectShape>0</PhysicsObjectShape>
  <PhysicsObjectDensity>0.5</PhysicsObjectDensity>
  <PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
  <PhysicsObjectGroup>0</PhysicsObjectGroup>
  <PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
  <PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
  <PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction>
  <PhysicsObjectAwake>-1</PhysicsObjectAwake>
  <PhysicsObjectKinematic>0</PhysicsObjectKinematic>
  <PhysicsShapePoints/>
</object>
